diff --git a/.rubocop.yml b/.rubocop.yml index 2608741..047cb90 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,17 @@ +inherit_from: .rubocop_todo.yml + +inherit_mode: + merge: + - Exclude + - Include + +inherit_gem: + rubocop-gusto: + - config/default.yml + +plugins: + - rubocop-gusto + # The behavior of RuboCop can be controlled via the .rubocop.yml # configuration file. It makes it possible to enable/disable # certain cops (checks) and to alter their behavior if they accept @@ -13,7 +27,7 @@ AllCops: SuggestExtensions: false Exclude: - vendor/bundle/**/** - TargetRubyVersion: 2.6.0 + TargetRubyVersion: 3.2 Metrics/ParameterLists: Enabled: false @@ -50,9 +64,6 @@ Style/GuardClause: Metrics/ModuleLength: Enabled: false -Layout/LineLength: - Enabled: false - Metrics/BlockLength: Enabled: false @@ -93,10 +104,6 @@ Style/EmptyElse: Style/RedundantCondition: Enabled: false -# This leads to code that is not very readable at times (very long lines) -Layout/MultilineMethodCallIndentation: - Enabled: false - # Blocks across lines are okay sometimes Style/BlockDelimiters: Enabled: false @@ -105,19 +112,8 @@ Style/BlockDelimiters: Naming/AccessorMethodName: Enabled: false -# This leads to code that is not very readable at times (very long lines) -Layout/FirstArgumentIndentation: - Enabled: false - -# This leads to code that is not very readable at times (very long lines) -Layout/ArgumentAlignment: - Enabled: false - Style/AccessorGrouping: Enabled: false Style/NumericPredicate: Enabled: false - -Layout/BlockEndNewline: - Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000..61ef2d6 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,75 @@ +# This configuration was generated by +# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 100` +# on 2026-03-05 21:24:10 UTC using RuboCop version 1.85.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 8 +Gusto/NoMetaprogramming: + Exclude: + - 'lib/packs/cli.rb' + - 'lib/packs/private/interactive_cli/use_cases/interface.rb' + - 'spec/packs/private/cli_spec.rb' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowedPatterns. +Sorbet/BlockMethodDefinition: + Exclude: + - 'spec/packs/private/cli_spec.rb' + - 'spec/packs_spec.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, BlockForwardingName. +# SupportedStyles: anonymous, explicit +Naming/BlockForwarding: + Exclude: + - 'lib/packs/configuration.rb' + - 'lib/packs/logging.rb' + +# Offense count: 1 +# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates. +# AllowedMethods: call +# WaywardPredicates: infinite?, nonzero? +Naming/PredicateMethod: + Exclude: + - 'lib/packs/configuration.rb' + +# Offense count: 1 +Performance/MapMethodChain: + Exclude: + - 'lib/packs/private/interactive_cli/use_cases/get_info.rb' + +# Offense count: 65 +# Configuration parameters: Prefixes, AllowedPatterns. +# Prefixes: when, with, without +RSpec/ContextWording: + Exclude: + - 'spec/packs/private/cli_spec.rb' + - 'spec/packs_spec.rb' + +# Offense count: 2 +# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector. +# SupportedInflectors: default, active_support +RSpec/SpecFilePathFormat: + Exclude: + - 'spec/packs/private/cli_spec.rb' + - 'spec/verify_docs_spec.rb' + +# Offense count: 12 +Sorbet/ConstantsFromStrings: + Exclude: + - 'spec/packs/private/cli_spec.rb' + - 'spec/packs_spec.rb' + - 'spec/spec_helper.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: SuggestedStrictness. +Sorbet/StrictSigil: + Exclude: + - 'sorbet/tapioca/require.rb' + - 'spec/spec_helper.rb' diff --git a/Gemfile b/Gemfile index 8e6ea5f..13605c8 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,3 @@ source 'https://rubygems.org' # Specify your gem's dependencies in packs.gemspec gemspec - -gem 'packwerk', github: 'Shopify/packwerk', branch: 'main' diff --git a/Gemfile.lock b/Gemfile.lock index 3717b9a..d4097c4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,19 +1,3 @@ -GIT - remote: https://github.com/Shopify/packwerk.git - revision: c27be1b1bc917d088fa46484414f303d81217117 - branch: main - specs: - packwerk (3.1.0) - activesupport (>= 6.0) - ast - better_html - bundler - constant_resolver (>= 0.2.0) - parallel - parser - sorbet-runtime (>= 0.5.9914) - zeitwerk (>= 2.6.1) - PATH remote: . specs: @@ -31,142 +15,238 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.0.7) - activesupport (= 7.0.7) + actionview (8.1.2) + activesupport (= 8.1.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activesupport (7.0.7) - concurrent-ruby (~> 1.0, >= 1.0.2) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activesupport (8.1.2) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) - ast (2.4.2) - base64 (0.1.1) - better_html (2.0.2) - actionview (>= 6.0) - activesupport (>= 6.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) + ast (2.4.3) + base64 (0.3.0) + benchmark (0.5.0) + better_html (2.2.0) + actionview (>= 7.0) + activesupport (>= 7.0) ast (~> 2.0) erubi (~> 1.4) parser (>= 2.4) smart_properties - bigdecimal (3.1.6) - builder (3.2.4) - byebug (11.1.3) - code_ownership (1.34.2) + bigdecimal (4.0.1) + builder (3.3.0) + byebug (13.0.0) + reline (>= 0.6.0) + code_ownership (2.1.1-aarch64-linux) + code_teams (~> 1.0) + packs-specification + sorbet-runtime (>= 0.6.12763) + code_ownership (2.1.1-arm64-darwin) + code_teams (~> 1.0) + packs-specification + sorbet-runtime (>= 0.6.12763) + code_ownership (2.1.1-x86_64-darwin) + code_teams (~> 1.0) + packs-specification + sorbet-runtime (>= 0.6.12763) + code_ownership (2.1.1-x86_64-linux) code_teams (~> 1.0) packs-specification - sorbet-runtime (>= 0.5.10821) - code_teams (1.0.2) + sorbet-runtime (>= 0.6.12763) + code_ownership (2.1.1-x86_64-linux-musl) + code_teams (~> 1.0) + packs-specification + sorbet-runtime (>= 0.6.12763) + code_teams (1.3.0) sorbet-runtime coderay (1.1.3) - concurrent-ruby (1.2.2) - constant_resolver (0.2.0) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) + constant_resolver (0.3.0) crass (1.0.6) - diff-lcs (1.5.0) - erubi (1.12.0) - i18n (1.14.1) + diff-lcs (1.6.2) + drb (2.2.3) + erubi (1.13.1) + i18n (1.14.8) concurrent-ruby (~> 1.0) - json (2.6.3) - language_server-protocol (3.17.0.3) - loofah (2.21.3) + io-console (0.8.2) + json (2.18.1) + json-schema (6.1.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + logger (1.7.0) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - method_source (1.0.0) - minitest (5.19.0) + mcp (0.8.0) + json-schema (>= 4.1) + method_source (1.1.0) + minitest (6.0.2) + drb (~> 2.0) + prism (~> 1.5) netrc (0.11.0) - nokogiri (1.18.1-arm64-darwin) + nokogiri (1.19.1-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.1-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.19.1-arm64-darwin) + racc (~> 1.4) + nokogiri (1.19.1-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.1-x86_64-darwin) + nokogiri (1.19.1-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.1-x86_64-linux-gnu) + nokogiri (1.19.1-x86_64-linux-musl) racc (~> 1.4) - packs-specification (0.0.10) + packs-specification (0.0.11) sorbet-runtime - parallel (1.23.0) - parse_packwerk (0.25.0) + packwerk (3.2.3) + activesupport (>= 6.0) + ast + better_html + bundler + constant_resolver (>= 0.3) + parallel + parser + prism (>= 0.25.0) + sorbet-runtime (>= 0.5.9914) + zeitwerk (>= 2.6.1) + parallel (1.27.0) + parse_packwerk (0.27.0) bigdecimal sorbet-runtime - parser (3.2.2.3) + parser (3.3.10.2) ast (~> 2.4.1) racc pastel (0.8.0) tty-color (~> 0.5) - pry (0.14.2) + prism (1.9.0) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.10.1) - byebug (~> 11.0) - pry (>= 0.13, < 0.15) + reline (>= 0.6.0) + pry-byebug (3.12.0) + byebug (~> 13.0) + pry (>= 0.13, < 0.17) + public_suffix (7.0.5) racc (1.8.1) - rails-dom-testing (2.2.0) + rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) - loofah (~> 2.21) - nokogiri (~> 1.14) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) - rake (13.0.6) - rbi (0.0.17) - ast - parser (>= 3.0.0) - sorbet-runtime (>= 0.5.9204) - unparser (>= 0.5.6) - regexp_parser (2.8.1) - rexml (3.2.6) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rake (13.3.1) + rbi (0.3.9) + prism (~> 1.0) + rbs (>= 3.4.4) + rbs (4.0.0.dev.5) + logger + prism (>= 1.3.0) + tsort + regexp_parser (2.11.3) + reline (0.6.3) + io-console (~> 0.5) + require-hooks (0.2.3) + rexml (3.4.4) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-support (3.12.1) - rubocop (1.56.3) - base64 (~> 0.1.1) + rspec-support (~> 3.13.0) + rspec-support (3.13.7) + rubocop (1.85.1) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) - parser (>= 3.2.1.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-gusto (10.6.0) + lint_roller + rubocop (>= 1.76) + rubocop-performance + rubocop-rake + rubocop-rspec + rubocop-sorbet + thor + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-rspec (3.9.0) + lint_roller (~> 1.1) + rubocop (~> 1.81) + rubocop-sorbet (0.12.0) + lint_roller + rubocop (>= 1.75.2) ruby-progressbar (1.13.0) + securerandom (0.4.1) smart_properties (1.17.0) - sorbet (0.5.11318) - sorbet-static (= 0.5.11318) - sorbet-runtime (0.5.11318) - sorbet-static (0.5.11318-universal-darwin) - sorbet-static (0.5.11318-x86_64-linux) - sorbet-static-and-runtime (0.5.11318) - sorbet (= 0.5.11318) - sorbet-runtime (= 0.5.11318) - spoom (1.2.1) - sorbet (>= 0.5.10187) - sorbet-runtime (>= 0.5.9204) + sorbet (0.6.12992) + sorbet-static (= 0.6.12992) + sorbet-runtime (0.6.12992) + sorbet-static (0.6.12992-aarch64-linux) + sorbet-static (0.6.12992-universal-darwin) + sorbet-static (0.6.12992-x86_64-linux) + sorbet-static-and-runtime (0.6.12992) + sorbet (= 0.6.12992) + sorbet-runtime (= 0.6.12992) + spoom (1.7.11) + erubi (>= 1.10.0) + prism (>= 0.28.0) + rbi (>= 0.3.3) + rbs (>= 4.0.0.dev.4) + rexml (>= 3.2.6) + sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - tapioca (0.11.8) + tapioca (0.17.10) + benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.0.0, >= 0.0.16) - sorbet-static-and-runtime (>= 0.5.10187) - spoom (~> 1.2.0, >= 1.2.0) + rbi (>= 0.3.7) + require-hooks (>= 0.2.2) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.7.9) thor (>= 1.2.0) yard-sorbet - thor (1.2.2) + thor (1.5.0) + tsort (0.2.0) tty-color (0.6.0) tty-cursor (0.7.1) tty-prompt (0.23.1) @@ -176,37 +256,44 @@ GEM tty-cursor (~> 0.7) tty-screen (~> 0.8) wisper (~> 2.0) - tty-screen (0.8.1) + tty-screen (0.8.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) - unparser (0.6.8) - diff-lcs (~> 1.3) - parser (>= 3.2.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + uri (1.1.1) wisper (2.0.1) - yard (0.9.34) - yard-sorbet (0.8.1) - sorbet-runtime (>= 0.5) - yard (>= 0.9) - zeitwerk (2.6.11) + yard (0.9.38) + yard-sorbet (0.9.0) + sorbet-runtime + yard + zeitwerk (2.7.5) PLATFORMS + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm64-darwin universal-darwin + x86_64-darwin x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES - bundler (~> 2.2) + bundler packs! - packwerk! pry pry-byebug rake rspec (~> 3.0) rubocop + rubocop-gusto sorbet sorbet-static - spoom (= 1.2.1) + spoom tapioca BUNDLED WITH - 2.6.2 + 4.0.7 diff --git a/README.md b/README.md index f41c209..0329e94 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,9 @@ bin/packwerk init ## Describe available commands or one specific command `bin/packs help [COMMAND]` +## Print a tree of all available commands +`bin/packs tree` + ## Create pack with name packs/your_pack `bin/packs create packs/your_pack` diff --git a/bin/rubocop b/bin/rubocop index ff03802..d73598d 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -8,22 +8,9 @@ # this file is here to facilitate running it. # -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', - Pathname.new(__FILE__).realpath) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -bundle_binstub = File.expand_path('bundle', __dir__) +require "rubygems" +require "bundler/setup" -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('rubocop', 'rubocop') +load Gem.bin_path("rubocop", "rubocop") diff --git a/bin/tapioca b/bin/tapioca index ce95fac..82de9af 100755 --- a/bin/tapioca +++ b/bin/tapioca @@ -8,22 +8,9 @@ # this file is here to facilitate running it. # -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', - Pathname.new(__FILE__).realpath) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -bundle_binstub = File.expand_path('bundle', __dir__) +require "rubygems" +require "bundler/setup" -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') +load Gem.bin_path("tapioca", "tapioca") diff --git a/lib/packs/cli.rb b/lib/packs/cli.rb index 045c4f2..c8da1ef 100644 --- a/lib/packs/cli.rb +++ b/lib/packs/cli.rb @@ -39,7 +39,7 @@ def add_dependency(from_pack, to_pack) exit_successfully end - POSSIBLE_TYPES = T.let(%w[dependency privacy layer], T::Array[String]) + POSSIBLE_TYPES = T.let(%w(dependency privacy layer).freeze, T::Array[String]) desc 'list_top_violations type [ packs/your_pack ]', 'List the top violations of a specific type for packs/your_pack.' long_desc <<~LONG_DESC Possible types are: #{POSSIBLE_TYPES.join(', ')}. @@ -176,17 +176,14 @@ def move_to_folder(pack_name, destination) private - # This is used by thor to know that these private methods are not intended to be CLI commands - no_commands do - sig { params(pack_names: T::Array[String]).returns(T::Array[Packs::Pack]) } - def parse_pack_names(pack_names) - pack_names.empty? ? Packs.all : pack_names.map { |p| Packs.find(p.gsub(%r{/$}, '')) }.compact - end - - sig { void } - def exit_successfully - Private.exit_with(true) - end + sig { params(pack_names: T::Array[String]).returns(T::Array[Packs::Pack]) } + def parse_pack_names(pack_names) + pack_names.empty? ? Packs.all : pack_names.filter_map { |p| Packs.find(p.delete_suffix('/')) } + end + + sig { void } + def exit_successfully + Private.exit_with(true) end end end diff --git a/lib/packs/code_ownership_post_processor.rb b/lib/packs/code_ownership_post_processor.rb index cfbf76c..9c93d17 100644 --- a/lib/packs/code_ownership_post_processor.rb +++ b/lib/packs/code_ownership_post_processor.rb @@ -25,7 +25,7 @@ def before_move_file!(file_move_operation) replace_with: relative_path_to_destination ) - team = CodeOwnership.for_file(relative_path_to_origin.to_s) + team = CodeOwnership.for_file(relative_path_to_origin.to_s, from_codeowners: false) if team @teams << team.name diff --git a/lib/packs/configuration.rb b/lib/packs/configuration.rb index 226e5d8..9e2e854 100644 --- a/lib/packs/configuration.rb +++ b/lib/packs/configuration.rb @@ -30,7 +30,7 @@ class Configuration def initialize @enforce_dependencies = T.let(default_enforce_dependencies, T::Boolean) @user_event_logger = T.let(DefaultUserEventLogger.new, UserEventLogger) - @on_package_todo_lint_failure = T.let(->(output) {}, OnPackageTodoLintFailure) + @on_package_todo_lint_failure = T.let(-> (output) {}, OnPackageTodoLintFailure) @use_pks = T.let(false, T::Boolean) end @@ -68,8 +68,7 @@ class << self sig { returns(Configuration) } def config Private.load_client_configuration - @config = T.let(@config, T.nilable(Configuration)) - @config ||= Configuration.new + @config ||= T.let(Configuration.new, T.nilable(Configuration)) end sig { params(blk: T.proc.params(arg0: Configuration).void).void } diff --git a/lib/packs/per_file_processor_interface.rb b/lib/packs/per_file_processor_interface.rb index f293924..eeece3b 100644 --- a/lib/packs/per_file_processor_interface.rb +++ b/lib/packs/per_file_processor_interface.rb @@ -8,7 +8,8 @@ module PerFileProcessorInterface abstract! sig { abstract.params(file_move_operation: Private::FileMoveOperation).void } - def before_move_file!(file_move_operation); end + def before_move_file!(file_move_operation) + end sig { overridable.params(file_move_operations: T::Array[Private::FileMoveOperation]).void } def after_move_files!(file_move_operations) diff --git a/lib/packs/private.rb b/lib/packs/private.rb index 9ecfa87..27f29e6 100644 --- a/lib/packs/private.rb +++ b/lib/packs/private.rb @@ -22,7 +22,7 @@ def self.clean_pack_name(pack_name) # This results in the pack not being found, but when we write the package YML it writes to the same place, # causing a behaviorally confusing diff. # We ignore trailing slashes as an ergonomic feature to the user. - pack_name.gsub(%r{/$}, '') + pack_name.delete_suffix('/') end sig do @@ -37,10 +37,12 @@ def self.replace_in_file(file:, find:, replace_with:) return if !file.exist? count = 0 - file.write(file.read.gsub(find.to_s) do - count += 1 - replace_with.to_s - end) + file.write( + file.read.gsub(find.to_s) do + count += 1 + replace_with.to_s + end + ) Logging.print "Replaced #{count} occurrence(s) of #{find} in #{file}" if count > 0 end @@ -131,7 +133,7 @@ def self.move_to_pack!(pack_name:, paths_relative_to_root:, per_file_processors: ) [ file_move_operation, - file_move_operation.spec_file_move_operation + file_move_operation.spec_file_move_operation, ] end file_move_operations.each do |file_move_operation| @@ -297,8 +299,8 @@ def self.move_to_parent!( end if other_package.name == parent_name && - !new_dependencies.include?(new_package_name) && - !new_config['ignored_dependencies']&.include?(new_package_name) + !new_dependencies.include?(new_package_name) && + !new_config['ignored_dependencies']&.include?(new_package_name) new_dependencies += [new_package_name] end @@ -358,7 +360,7 @@ def self.make_public!(paths_relative_to_root:, per_file_processors:) [ file_move_operation, - file_move_operation.spec_file_move_operation + file_move_operation.spec_file_move_operation, ] end @@ -488,7 +490,7 @@ def self.create_pack_if_not_exists!(pack_name:, enforce_dependencies:, enforce_p # but we'll need to add an API to CodeOwnership to do this if Pathname.new('config/code_ownership.yml').exist? config = { - 'owner' => team.nil? ? 'MyTeam' : team.name + 'owner' => team.nil? ? 'MyTeam' : team.name, } else config = {} @@ -559,7 +561,7 @@ def self.diff_package_todo_yml(before, after) write_package_todo_to_tmp_folder(before, dir_containing_contents_before) write_package_todo_to_tmp_folder(after, dir_containing_contents_after) - diff = `diff -r #{dir_containing_contents_before}/ #{dir_containing_contents_after}/` + diff = %x(diff -r #{dir_containing_contents_before}/ #{dir_containing_contents_after}/) # For ease of reading, sub out the tmp directory from the diff diff.gsub(dir_containing_contents_before, '').gsub(dir_containing_contents_after, '') ensure @@ -604,13 +606,13 @@ def self.packwerk_package_to_pack(package) include_date: T::Boolean ).void end - def self.get_info(packs: Packs.all, format: :detail, types: %i[privacy dependency layer], include_date: false) + def self.get_info(packs: Packs.all, format: :detail, types: %i(privacy dependency layer), include_date: false) require 'csv' if format == :csv today = Date.today.iso8601 violations = { inbound: {}, - outbound: {} + outbound: {}, } package_by_name = {} @@ -627,7 +629,7 @@ def self.get_info(packs: Packs.all, format: :detail, types: %i[privacy dependenc all = { inbound: T.let([], T::Array[ParsePackwerk::Violation]), - outbound: T.let([], T::Array[ParsePackwerk::Violation]) + outbound: T.let([], T::Array[ParsePackwerk::Violation]), } packs.each do |pack| all[:inbound] += violations[:inbound][pack.name] || [] @@ -661,7 +663,7 @@ def self.get_info(packs: Packs.all, format: :detail, types: %i[privacy dependenc pack_name: pack.name, owner: owner.nil? ? 'No one' : owner.name, size: pack.relative_path.glob('**/*.rb').count, - public_api: pack.relative_path.join(package_by_name[pack.name].public_path) + public_api: pack.relative_path.join(package_by_name[pack.name].public_path), } row.delete(:date) unless include_date diff --git a/lib/packs/private/file_move_operation.rb b/lib/packs/private/file_move_operation.rb index 2b5439e..6d5272a 100644 --- a/lib/packs/private/file_move_operation.rb +++ b/lib/packs/private/file_move_operation.rb @@ -94,7 +94,7 @@ def filepath_without_pack_name def spec_pathname_for_app(pathname, file_extension) pathname .sub('/app/', '/spec/') - .sub(%r{^app/}, 'spec/') + .sub(%r(\Aapp/), 'spec/') .sub(".#{file_extension}", '_spec.rb') end @@ -102,7 +102,7 @@ def spec_pathname_for_app(pathname, file_extension) def spec_pathname_for_non_app(pathname, file_extension, folder) pathname .sub("/#{folder}/", "/spec/#{folder}/") - .sub(%r{^#{folder}/}, "spec/#{folder}/") + .sub(%r(\A#{folder}/), "spec/#{folder}/") .sub(".#{file_extension}", '_spec.rb') end diff --git a/lib/packs/private/interactive_cli.rb b/lib/packs/private/interactive_cli.rb index bcebdf3..1110021 100644 --- a/lib/packs/private/interactive_cli.rb +++ b/lib/packs/private/interactive_cli.rb @@ -28,16 +28,21 @@ module InteractiveCli sig { params(prompt: T.nilable(TTY::Prompt)).void } def self.start!(prompt: nil) - prompt ||= TTY::Prompt.new(interrupt: lambda { - puts "\n\nGoodbye! I hope you have a good day." - exit 1 }) + prompt ||= TTY::Prompt.new( + interrupt: -> { + puts "\n\nGoodbye! I hope you have a good day." + exit 1 + } + ) help_text = '(Press ↑/↓ arrow to move, Enter to select and letters to filter)' - choice = prompt.select('Hello! What would you like to do?', + choice = prompt.select( + 'Hello! What would you like to do?', cycle: true, filter: true, help: help_text, show_help: :always, - per_page: 15) do |menu| + per_page: 15 + ) do |menu| menu.enum '.' UseCases::Interface.all.each do |use_case| diff --git a/lib/packs/private/interactive_cli/pack_selector.rb b/lib/packs/private/interactive_cli/pack_selector.rb index 61d07b9..8d7f3a4 100644 --- a/lib/packs/private/interactive_cli/pack_selector.rb +++ b/lib/packs/private/interactive_cli/pack_selector.rb @@ -10,13 +10,15 @@ class PackSelector def self.single_pack_select(prompt, question_text: 'Please use space to select a pack') packs = Packs.all.to_h { |t| [t.name, t] } - pack_selection = T.let(prompt.select( - question_text, - packs, - filter: true, - per_page: 10, - show_help: :always - ), T.nilable(Packs::Pack)) + pack_selection = T.let( + prompt.select( + question_text, + packs, + filter: true, + per_page: 10, + show_help: :always + ), T.nilable(Packs::Pack) + ) while pack_selection.nil? prompt.error( @@ -31,13 +33,15 @@ def self.single_pack_select(prompt, question_text: 'Please use space to select a sig { params(prompt: TTY::Prompt, question_text: String).returns(T::Array[Packs::Pack]) } def self.single_or_all_pack_multi_select(prompt, question_text: 'Please use space to select one or more packs') - pack_selection = T.let(prompt.multi_select( - question_text, - Packs.all.to_h { |t| [t.name, t] }, - filter: true, - per_page: 10, - show_help: :always - ), T::Array[Packs::Pack]) + pack_selection = T.let( + prompt.multi_select( + question_text, + Packs.all.to_h { |t| [t.name, t] }, + filter: true, + per_page: 10, + show_help: :always + ), T::Array[Packs::Pack] + ) while pack_selection.empty? prompt.error( diff --git a/lib/packs/private/interactive_cli/team_selector.rb b/lib/packs/private/interactive_cli/team_selector.rb index 670071a..c9ab03b 100644 --- a/lib/packs/private/interactive_cli/team_selector.rb +++ b/lib/packs/private/interactive_cli/team_selector.rb @@ -9,15 +9,17 @@ class TeamSelector sig { params(prompt: TTY::Prompt, question_text: String).returns(T.nilable(CodeTeams::Team)) } def self.single_select(prompt, question_text: 'Please use space to select a team owner') teams = CodeTeams.all.sort_by(&:name).to_h { |t| [t.name, t] } - return nil if teams.count == 0 - - team_selection = T.let(prompt.select( - question_text, - teams, - filter: true, - per_page: 10, - show_help: :always - ), T.nilable(CodeTeams::Team)) + return nil if teams.none? + + team_selection = T.let( + prompt.select( + question_text, + teams, + filter: true, + per_page: 10, + show_help: :always + ), T.nilable(CodeTeams::Team) + ) while team_selection.nil? prompt.error( @@ -34,13 +36,15 @@ def self.single_select(prompt, question_text: 'Please use space to select a team def self.multi_select(prompt, question_text: 'Please use space to select team owners') teams = CodeTeams.all.to_h { |t| [t.name, t] } - team_selection = T.let(prompt.multi_select( - question_text, - teams, - filter: true, - per_page: 10, - show_help: :always - ), T::Array[CodeTeams::Team]) + team_selection = T.let( + prompt.multi_select( + question_text, + teams, + filter: true, + per_page: 10, + show_help: :always + ), T::Array[CodeTeams::Team] + ) while team_selection.empty? prompt.error( diff --git a/lib/packs/private/interactive_cli/use_cases/get_info.rb b/lib/packs/private/interactive_cli/use_cases/get_info.rb index 10b30eb..8fc0ad0 100644 --- a/lib/packs/private/interactive_cli/use_cases/get_info.rb +++ b/lib/packs/private/interactive_cli/use_cases/get_info.rb @@ -26,11 +26,11 @@ def perform!(prompt) selected_packs = PackSelector.single_or_all_pack_multi_select(prompt, question_text: 'What pack(s) would you like info on?') end - format = prompt.select('What output format do you want?', %w[Detail CSV]) + format = prompt.select('What output format do you want?', %w(Detail CSV)) types = prompt.multi_select( 'What violation types do you want stats for?', - %w[Privacy Dependency Layer] + %w(Privacy Dependency Layer) ) include_date = !prompt.no?('Should the current date be included in the report?') diff --git a/lib/packs/private/interactive_cli/use_cases/interface.rb b/lib/packs/private/interactive_cli/use_cases/interface.rb index 6fe59a6..33b4e55 100644 --- a/lib/packs/private/interactive_cli/use_cases/interface.rb +++ b/lib/packs/private/interactive_cli/use_cases/interface.rb @@ -23,10 +23,12 @@ def self.all end sig { abstract.params(prompt: TTY::Prompt).void } - def perform!(prompt); end + def perform!(prompt) + end sig { abstract.returns(String) } - def user_facing_name; end + def user_facing_name + end end end end diff --git a/lib/packs/private/interactive_cli/use_cases/move_pack.rb b/lib/packs/private/interactive_cli/use_cases/move_pack.rb index 3d1334d..c7f8684 100644 --- a/lib/packs/private/interactive_cli/use_cases/move_pack.rb +++ b/lib/packs/private/interactive_cli/use_cases/move_pack.rb @@ -16,7 +16,7 @@ def perform!(prompt) { 'Move a child pack to be nested under a parent pack' => :move_to_parent, 'Move a pack to a folder that is not a pack' => - :move_to_folder + :move_to_folder, } ) diff --git a/lib/packs/private/interactive_cli/use_cases/query.rb b/lib/packs/private/interactive_cli/use_cases/query.rb index f39116a..c22fe6d 100644 --- a/lib/packs/private/interactive_cli/use_cases/query.rb +++ b/lib/packs/private/interactive_cli/use_cases/query.rb @@ -30,7 +30,7 @@ def perform!(prompt) limit = prompt.ask('Specify the limit of constants to analyze', default: 10, convert: :integer) - selection = prompt.select('Are you interested in dependency, privacy, or layer violations?', %w[Dependency Privacy Layer], default: 'Privacy') + selection = prompt.select('Are you interested in dependency, privacy, or layer violations?', %w(Dependency Privacy Layer), default: 'Privacy') Packs.list_top_violations( type: selection.downcase, diff --git a/lib/packs/update_references_post_processor.rb b/lib/packs/update_references_post_processor.rb index 66033d5..2187270 100644 --- a/lib/packs/update_references_post_processor.rb +++ b/lib/packs/update_references_post_processor.rb @@ -19,7 +19,7 @@ def after_move_files!(file_move_operations) destination_pack = T.must(file_move_operations.first).destination_pack.name if self.class.ripgrep_enabled? - matching_files = `rg -l --hidden '#{origin_pack}' .` + matching_files = %x(rg -l --hidden '#{origin_pack}' .) matching_files.split("\n").each do |file_name| substitute_references!(file_name, origin_pack, destination_pack) end diff --git a/packs.gemspec b/packs.gemspec index be2089e..fec2a35 100644 --- a/packs.gemspec +++ b/packs.gemspec @@ -19,14 +19,14 @@ Gem::Specification.new do |spec| 'public gem pushes.' end - spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0') + spec.required_ruby_version = Gem::Requirement.new('>= 3.2') # Specify which files should be added to the gem when it is released. spec.files = Dir['README.md', 'lib/**/*', 'bin/**/*'] # https://guides.rubygems.org/make-your-own-gem/#adding-an-executable # and # https://bundler.io/blog/2015/03/20/moving-bins-to-exe.html - spec.executables = %w[packs] + spec.executables = %w(packs) spec.add_dependency 'bigdecimal' spec.add_dependency 'code_ownership', '>= 1.33.0' @@ -39,15 +39,16 @@ Gem::Specification.new do |spec| spec.add_dependency 'tty-prompt' # rubocop:disable Gemspec/DevelopmentDependencies - spec.add_development_dependency 'bundler', '~> 2.2' + spec.add_development_dependency 'bundler' spec.add_development_dependency 'pry' spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'rubocop' + spec.add_development_dependency 'rubocop-gusto' spec.add_development_dependency 'sorbet' spec.add_development_dependency 'sorbet-static' - spec.add_development_dependency 'spoom', '1.2.1' # later versions do not support ruby 2.7 + spec.add_development_dependency 'spoom' spec.add_development_dependency 'tapioca' # rubocop:enable Gemspec/DevelopmentDependencies end diff --git a/sorbet/rbi/gems/actionview@8.1.2.rbi b/sorbet/rbi/gems/actionview@8.1.2.rbi new file mode 100644 index 0000000..4c0fb70 --- /dev/null +++ b/sorbet/rbi/gems/actionview@8.1.2.rbi @@ -0,0 +1,15303 @@ +# 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`. + + +# :include: ../README.rdoc +# +# source://actionview//lib/action_view/gem_version.rb#3 +module ActionView + extend ::ActiveSupport::Autoload + + class << self + # source://actionview//lib/action_view/deprecator.rb#4 + def deprecator; end + + # source://actionview//lib/action_view.rb#97 + 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 + + # source://actionview//lib/action_view.rb#94 + def render_tracker; end + + # source://actionview//lib/action_view.rb#94 + def render_tracker=(_arg0); end + + # Returns the currently loaded version of Action View as a +Gem::Version+. + # + # source://actionview//lib/action_view/version.rb#7 + def version; end + end +end + +# This class defines the interface for a renderer. Each class that +# subclasses +AbstractRenderer+ is used by the base +Renderer+ class to +# render a specific type of object. +# +# The base +Renderer+ class uses its +render+ method to delegate to the +# renderers. These currently consist of +# +# PartialRenderer - Used for rendering partials +# TemplateRenderer - Used for rendering other types of templates +# StreamingTemplateRenderer - Used for streaming +# +# Whenever the +render+ method is called on the base +Renderer+ class, a new +# renderer object of the correct type is created, and the +render+ method on +# that new object is called in turn. This abstracts the set up and rendering +# into a separate classes for partials and templates. +# +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#21 +class ActionView::AbstractRenderer + # @return [AbstractRenderer] a new instance of AbstractRenderer + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#24 + def initialize(lookup_context); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + def any_templates?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + def formats(*_arg0, **_arg1, &_arg2); end + + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#28 + def render; end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#22 + def template_exists?(*_arg0, **_arg1, &_arg2); end + + private + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#182 + def build_rendered_collection(templates, spacer); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#178 + def build_rendered_template(content, template); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#159 + def extract_details(options); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#171 + def prepend_formats(formats); end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#157 +ActionView::AbstractRenderer::NO_DETAILS = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#32 +module ActionView::AbstractRenderer::ObjectRendering + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#37 + def initialize(lookup_context, options); end + + private + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#43 + def local_variable(path); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#92 + def merge_prefix_into_object_path(prefix, object_path); end + + # Obtains the path to where the object's partial is located. If the object + # responds to +to_partial_path+, then +to_partial_path+ will be called and + # will provide the path. If the object does not respond to +to_partial_path+, + # then an +ArgumentError+ is raised. + # + # If +prefix_partial_path_with_controller_namespace+ is true, then this + # method will prefix the partial paths with a namespace. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#76 + def partial_path(object, view); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#61 + def raise_invalid_identifier(path); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#65 + def raise_invalid_option_as(as); end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#54 +ActionView::AbstractRenderer::ObjectRendering::IDENTIFIER_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#57 +ActionView::AbstractRenderer::ObjectRendering::OPTION_AS_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#33 +ActionView::AbstractRenderer::ObjectRendering::PREFIXED_PARTIAL_NAMES = T.let(T.unsafe(nil), Concurrent::Map) + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#110 +class ActionView::AbstractRenderer::RenderedCollection + # @return [RenderedCollection] a new instance of RenderedCollection + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#117 + def initialize(rendered_templates, spacer); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#122 + def body; end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#126 + def format; end + + # Returns the value of attribute rendered_templates. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#115 + def rendered_templates; end + + class << self + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#111 + def empty(format); end + end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#130 +class ActionView::AbstractRenderer::RenderedCollection::EmptyCollection + # @return [EmptyCollection] a new instance of EmptyCollection + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#133 + def initialize(format); end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#137 + def body; end + + # Returns the value of attribute format. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#131 + def format; end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#141 +class ActionView::AbstractRenderer::RenderedTemplate + # @return [RenderedTemplate] a new instance of RenderedTemplate + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#144 + def initialize(body, template); end + + # Returns the value of attribute body. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 + def body; end + + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#149 + def format; end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/renderer/abstract_renderer.rb#142 + def template; end +end + +# source://actionview//lib/action_view/renderer/abstract_renderer.rb#153 +ActionView::AbstractRenderer::RenderedTemplate::EMPTY_SPACER = T.let(T.unsafe(nil), T.untyped) + +# = Action View Errors +# +# source://actionview//lib/action_view/template/error.rb#8 +class ActionView::ActionViewError < ::StandardError; end + +# = Action View \Base +# +# Action View templates can be written in several ways. +# If the template file has a .erb extension, then it uses the erubi[https://rubygems.org/gems/erubi] +# template system which can embed Ruby into an HTML document. +# If the template file has a .builder extension, then Jim Weirich's Builder::XmlMarkup library is used. +# +# == ERB +# +# You trigger ERB by using embeddings such as <% %>, <% -%>, and <%= %>. The <%= %> tag set is used when you want output. Consider the +# following loop for names: +# +# Names of all the people +# <% @people.each do |person| %> +# Name: <%= person.name %>
+# <% end %> +# +# The loop is set up in regular embedding tags <% %>, and the name is written using the output embedding tag <%= %>. Note that this +# is not just a usage suggestion. Regular output functions like print or puts won't work with ERB templates. So this would be wrong: +# +# <%# WRONG %> +# Hi, Mr. <% puts "Frodo" %> +# +# If you absolutely must write from within a function use +concat+. +# +# When on a line that only contains whitespaces except for the tag, <% %> suppresses leading and trailing whitespace, +# including the trailing newline. <% %> and <%- -%> are the same. +# Note however that <%= %> and <%= -%> are different: only the latter removes trailing whitespaces. +# +# === Using sub templates +# +# Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The +# classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts): +# +# <%= render "application/header" %> +# Something really specific and terrific +# <%= render "application/footer" %> +# +# As you see, we use the output embeddings for the render methods. The render call itself will just return a string holding the +# result of the rendering. The output embedding writes it to the current template. +# +# But you don't have to restrict yourself to static includes. Templates can share variables amongst themselves by using instance +# variables defined using the regular embedding tags. Like this: +# +# <% @page_title = "A Wonderful Hello" %> +# <%= render "application/header" %> +# +# Now the header can pick up on the @page_title variable and use it for outputting a title tag: +# +# <%= @page_title %> +# +# === Passing local variables to sub templates +# +# You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values: +# +# <%= render "application/header", { headline: "Welcome", person: person } %> +# +# These can now be accessed in application/header with: +# +# Headline: <%= headline %> +# First name: <%= person.first_name %> +# +# The local variables passed to sub templates can be accessed as a hash using the local_assigns hash. This lets you access the +# variables as: +# +# Headline: <%= local_assigns[:headline] %> +# +# This is useful in cases where you aren't sure if the local variable has been assigned. Alternatively, you could also use +# defined? headline to first check if the variable has been assigned before using it. +# +# By default, templates will accept any locals as keyword arguments. To restrict what locals a template accepts, add a locals: magic comment: +# +# <%# locals: (headline:) %> +# +# Headline: <%= headline %> +# +# In cases where the local variables are optional, declare the keyword argument with a default value: +# +# <%# locals: (headline: nil) %> +# +# <% unless headline.nil? %> +# Headline: <%= headline %> +# <% end %> +# +# Read more about strict locals in {Action View Overview}[https://guides.rubyonrails.org/action_view_overview.html#strict-locals] +# in the guides. +# +# === Template caching +# +# By default, \Rails will compile each template to a method in order to render it. When you alter a template, +# \Rails will check the file's modification time and recompile it in development mode. +# +# == Builder +# +# Builder templates are a more programmatic alternative to ERB. They are especially useful for generating XML content. An XmlMarkup object +# named +xml+ is automatically made available to templates with a .builder extension. +# +# Here are some basic examples: +# +# xml.em("emphasized") # => emphasized +# xml.em { xml.b("emph & bold") } # => emph & bold +# xml.a("A Link", "href" => "http://onestepback.org") # => A Link +# xml.target("name" => "compile", "option" => "fast") # => +# # NOTE: order of attributes is not specified. +# +# Any method with a block will be treated as an XML markup tag with nested markup in the block. For example, the following: +# +# xml.div do +# xml.h1(@person.name) +# xml.p(@person.bio) +# end +# +# would produce something like: +# +#
+#

David Heinemeier Hansson

+#

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

+#
+# +# Here is a full-length RSS example actually used on Basecamp: +# +# xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do +# xml.channel do +# xml.title(@feed_title) +# xml.link(@url) +# xml.description "Basecamp: Recent items" +# xml.language "en-us" +# xml.ttl "40" +# +# @recent_items.each do |item| +# xml.item do +# xml.title(item_title(item)) +# xml.description(item_description(item)) if item_description(item) +# xml.pubDate(item_pubDate(item)) +# xml.guid(@person.firm.account.url + @recent_items.url(item)) +# xml.link(@person.firm.account.url + @recent_items.url(item)) +# +# xml.tag!("dc:creator", item.author_name) if item_has_creator?(item) +# end +# end +# end +# end +# +# For more information on Builder please consult the {source code}[https://github.com/rails/builder]. +# +# source://actionview//lib/action_view/base.rb#158 +class ActionView::Base + include ::ActionView::Context + include ::ERB::Escape + include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::Benchmarkable + include ::ActionView::Helpers::ActiveModelHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AtomFeedHelper + include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::ControllerHelper + include ::ActionView::Helpers::CspHelper + include ::ActionView::Helpers::CsrfHelper + include ::ActionView::Helpers::DateHelper + include ::ActionView::Helpers::DebugHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionView::ModelNaming + include ::ActionView::RecordIdentifier + include ::ActionView::Helpers::FormHelper + include ::ActionView::Helpers::TranslationHelper + include ::ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::JavaScriptHelper + include ::ActionView::Helpers::NumberHelper + include ::ActionView::Helpers::RenderingHelper + include ::ActionView::Helpers + extend ::ActionView::Helpers::UrlHelper::ClassMethods + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # :startdoc: + # + # @return [Base] a new instance of Base + # + # source://actionview//lib/action_view/base.rb#249 + def initialize(lookup_context, assigns, controller); end + + # source://actionview//lib/action_view/base.rb#182 + def _routes; end + + # source://actionview//lib/action_view/base.rb#182 + def _routes=(_arg0); end + + # source://actionview//lib/action_view/base.rb#182 + def _routes?; end + + # source://actionview//lib/action_view/base.rb#264 + def _run(method, template, locals, buffer, add_to_stack: T.unsafe(nil), has_strict_locals: T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/base.rb#180 + def annotate_rendered_view_with_filenames; end + + # source://actionview//lib/action_view/base.rb#180 + def annotate_rendered_view_with_filenames=(val); end + + # source://actionview//lib/action_view/base.rb#228 + def assign(new_assigns); end + + # source://actionview//lib/action_view/base.rb#224 + def assigns; end + + # source://actionview//lib/action_view/base.rb#224 + def assigns=(_arg0); end + + # source://actionview//lib/action_view/base.rb#177 + def automatically_disable_submit_tag; end + + # source://actionview//lib/action_view/base.rb#177 + def automatically_disable_submit_tag=(val); end + + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/base.rb#287 + def compiled_method_container; end + + # source://actionview//lib/action_view/base.rb#224 + def config; end + + # source://actionview//lib/action_view/base.rb#224 + def config=(_arg0); end + + # source://actionview//lib/action_view/base.rb#159 + def debug_missing_translation; end + + # source://actionview//lib/action_view/base.rb#159 + def debug_missing_translation=(val); end + + # source://actionview//lib/action_view/base.rb#174 + def default_formats; end + + # source://actionview//lib/action_view/base.rb#174 + def default_formats=(val); end + + # source://actionview//lib/action_view/base.rb#162 + def field_error_proc; end + + # source://actionview//lib/action_view/base.rb#162 + def field_error_proc=(val); end + + # source://actionview//lib/action_view/base.rb#226 + def formats(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/base.rb#226 + def formats=(arg); end + + # source://actionview//lib/action_view/base.rb#295 + def in_rendering_context(options); end + + # source://actionview//lib/action_view/base.rb#226 + def locale(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/base.rb#226 + def locale=(arg); end + + # source://actionview//lib/action_view/base.rb#183 + def logger; end + + # source://actionview//lib/action_view/base.rb#183 + def logger=(_arg0); end + + # source://actionview//lib/action_view/base.rb#183 + def logger?; end + + # Returns the value of attribute lookup_context. + # + # source://actionview//lib/action_view/base.rb#223 + def lookup_context; end + + # source://actionview//lib/action_view/base.rb#171 + def prefix_partial_path_with_controller_namespace; end + + # source://actionview//lib/action_view/base.rb#171 + def prefix_partial_path_with_controller_namespace=(_arg0); end + + # source://actionview//lib/action_view/base.rb#171 + def prefix_partial_path_with_controller_namespace?; end + + # source://actionview//lib/action_view/base.rb#187 + def remove_hidden_field_autocomplete; end + + # source://actionview//lib/action_view/base.rb#187 + def remove_hidden_field_autocomplete=(val); end + + # source://actionview//lib/action_view/base.rb#166 + def streaming_completion_on_exception; end + + # source://actionview//lib/action_view/base.rb#166 + def streaming_completion_on_exception=(val); end + + # source://actionview//lib/action_view/base.rb#226 + def view_paths(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/base.rb#226 + def view_paths=(arg); end + + # Returns the value of attribute view_renderer. + # + # source://actionview//lib/action_view/base.rb#223 + def view_renderer; end + + class << self + # source://actionview//lib/action_view/base.rb#182 + def _routes; end + + # source://actionview//lib/action_view/base.rb#182 + def _routes=(value); end + + # source://actionview//lib/action_view/base.rb#182 + def _routes?; end + + # source://actionview//lib/action_view/base.rb#180 + def annotate_rendered_view_with_filenames; end + + # source://actionview//lib/action_view/base.rb#180 + def annotate_rendered_view_with_filenames=(val); end + + # source://actionview//lib/action_view/base.rb#177 + def automatically_disable_submit_tag; end + + # source://actionview//lib/action_view/base.rb#177 + def automatically_disable_submit_tag=(val); end + + # source://actionview//lib/action_view/base.rb#192 + def cache_template_loading; end + + # source://actionview//lib/action_view/base.rb#196 + def cache_template_loading=(value); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/base.rb#218 + def changed?(other); end + + # source://actionview//lib/action_view/base.rb#159 + def debug_missing_translation; end + + # source://actionview//lib/action_view/base.rb#159 + def debug_missing_translation=(val); end + + # source://actionview//lib/action_view/base.rb#314 + def default_form_builder; end + + # source://actionview//lib/action_view/base.rb#314 + def default_form_builder=(val); end + + # source://actionview//lib/action_view/base.rb#174 + def default_formats; end + + # source://actionview//lib/action_view/base.rb#174 + def default_formats=(val); end + + # :stopdoc: + # + # source://actionview//lib/action_view/base.rb#235 + def empty; end + + # source://actionview//lib/action_view/base.rb#190 + def erb_trim_mode=(arg); end + + # source://actionview//lib/action_view/base.rb#162 + def field_error_proc; end + + # source://actionview//lib/action_view/base.rb#162 + def field_error_proc=(val); end + + # source://actionview//lib/action_view/base.rb#183 + def logger; end + + # source://actionview//lib/action_view/base.rb#183 + def logger=(value); end + + # source://actionview//lib/action_view/base.rb#183 + def logger?; end + + # source://actionview//lib/action_view/base.rb#171 + def prefix_partial_path_with_controller_namespace; end + + # source://actionview//lib/action_view/base.rb#171 + def prefix_partial_path_with_controller_namespace=(value); end + + # source://actionview//lib/action_view/base.rb#171 + def prefix_partial_path_with_controller_namespace?; end + + # source://actionview//lib/action_view/base.rb#187 + def remove_hidden_field_autocomplete; end + + # source://actionview//lib/action_view/base.rb#187 + def remove_hidden_field_autocomplete=(val); end + + # source://actionview//lib/action_view/base.rb#166 + def streaming_completion_on_exception; end + + # source://actionview//lib/action_view/base.rb#166 + def streaming_completion_on_exception=(val); end + + # source://actionview//lib/action_view/base.rb#243 + def with_context(context, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end + + # source://actionview//lib/action_view/base.rb#204 + def with_empty_template_cache; end + + # source://actionview//lib/action_view/base.rb#239 + def with_view_paths(view_paths, assigns = T.unsafe(nil), controller = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/base.rb#200 + def xss_safe?; end + + private + + # source://actionview//lib/action_view/base.rb#182 + def __class_attr__routes; end + + # source://actionview//lib/action_view/base.rb#182 + def __class_attr__routes=(new_value); end + + # source://actionview//lib/action_view/base.rb#183 + def __class_attr_logger; end + + # source://actionview//lib/action_view/base.rb#183 + def __class_attr_logger=(new_value); end + + # source://actionview//lib/action_view/base.rb#171 + def __class_attr_prefix_partial_path_with_controller_namespace; end + + # source://actionview//lib/action_view/base.rb#171 + def __class_attr_prefix_partial_path_with_controller_namespace=(new_value); end + end +end + +# source://actionview//lib/action_view/cache_expiry.rb#4 +module ActionView::CacheExpiry; end + +# source://actionview//lib/action_view/cache_expiry.rb#5 +class ActionView::CacheExpiry::ViewReloader + # @return [ViewReloader] a new instance of ViewReloader + # + # source://actionview//lib/action_view/cache_expiry.rb#6 + def initialize(watcher:, &block); end + + # source://actionview//lib/action_view/cache_expiry.rb#21 + def execute; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/cache_expiry.rb#16 + def updated?; end + + private + + # source://actionview//lib/action_view/cache_expiry.rb#64 + def all_view_paths; end + + # source://actionview//lib/action_view/cache_expiry.rb#37 + def build_watcher; end + + # source://actionview//lib/action_view/cache_expiry.rb#60 + def dirs_to_watch; end + + # source://actionview//lib/action_view/cache_expiry.rb#55 + def rebuild_watcher; end + + # source://actionview//lib/action_view/cache_expiry.rb#33 + def reload!; end +end + +# source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#6 +module ActionView::CollectionCaching + extend ::ActiveSupport::Concern + + private + + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#20 + def cache_collection_render(instrumentation_payload, view, template, collection); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#54 + def callable_cache_key?; end + + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#58 + def collection_by_cache_keys(view, template, collection); end + + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#71 + def expanded_cache_key(key, view, template, digest_path); end + + # `order_by` is an enumerable object containing keys of the cache, + # all keys are passed in whether found already or not. + # + # `cached_partials` is a hash. If the value exists + # it represents the rendered partial from the cache + # otherwise `Hash#fetch` will take the value of its block. + # + # This method expects a block that will return the rendered + # partial. An example is to render all results + # for each element that was not found in the cache and store it as an array. + # Order it so that the first empty cache element in `cached_partials` + # corresponds to the first element in `rendered_partials`. + # + # If the partial is not already cached it will also be + # written back to the underlying cache store. + # + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#91 + def fetch_or_cache_partial(cached_partials, template, order_by:); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/renderer/partial_renderer/collection_caching.rb#16 + def will_cache?(options, view); end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#33 +class ActionView::CollectionRenderer < ::ActionView::PartialRenderer + include ::ActionView::AbstractRenderer::ObjectRendering + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#130 + def render_collection_derive_partial(collection, context, block); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#112 + def render_collection_with_partial(collection, partial, context, block); end + + private + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#182 + def collection_with_template(view, template, layout, collection); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#153 + def render_collection(collection, view, path, template, layout, block); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#148 + def retrieve_variable(path); end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#36 +class ActionView::CollectionRenderer::CollectionIterator + include ::Enumerable + + # @return [CollectionIterator] a new instance of CollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#39 + def initialize(collection); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#43 + def each(&blk); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#51 + def length; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#55 + def preload!; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#47 + def size; end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#100 +class ActionView::CollectionRenderer::MixedCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator + # @return [MixedCollectionIterator] a new instance of MixedCollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#101 + def initialize(collection, paths); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#106 + def each_with_info; end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#78 +class ActionView::CollectionRenderer::PreloadCollectionIterator < ::ActionView::CollectionRenderer::SameCollectionIterator + # @return [PreloadCollectionIterator] a new instance of PreloadCollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#79 + def initialize(collection, path, variables, relation); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#89 + def each_with_info; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#85 + def from_collection(collection); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#95 + def preload!; end +end + +# source://actionview//lib/action_view/renderer/collection_renderer.rb#60 +class ActionView::CollectionRenderer::SameCollectionIterator < ::ActionView::CollectionRenderer::CollectionIterator + # @return [SameCollectionIterator] a new instance of SameCollectionIterator + # + # source://actionview//lib/action_view/renderer/collection_renderer.rb#61 + def initialize(collection, path, variables); end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#71 + def each_with_info; end + + # source://actionview//lib/action_view/renderer/collection_renderer.rb#67 + def from_collection(collection); end +end + +# = Action View Context +# +# Action View contexts are supplied to Action Controller to render a template. +# The default Action View context is ActionView::Base. +# +# In order to work with Action Controller, a Context must just include this +# module. The initialization of the variables used by the context +# (@output_buffer, @view_flow, and @virtual_path) is responsibility of the +# object that includes this module (although you can call _prepare_context +# defined below). +# +# source://actionview//lib/action_view/context.rb#14 +module ActionView::Context + # Encapsulates the interaction with the view flow so it + # returns the correct buffer on +yield+. This is usually + # overwritten by helpers to add more behavior. + # + # source://actionview//lib/action_view/context.rb#27 + def _layout_for(name = T.unsafe(nil)); end + + # Prepares the context by setting the appropriate instance variables. + # + # source://actionview//lib/action_view/context.rb#18 + def _prepare_context; end + + # Returns the value of attribute output_buffer. + # + # source://actionview//lib/action_view/context.rb#15 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://actionview//lib/action_view/context.rb#15 + def output_buffer=(_arg0); end + + # Returns the value of attribute view_flow. + # + # source://actionview//lib/action_view/context.rb#15 + def view_flow; end + + # Sets the attribute view_flow + # + # @param value the value to set the attribute view_flow to. + # + # source://actionview//lib/action_view/context.rb#15 + def view_flow=(_arg0); end +end + +# source://actionview//lib/action_view/dependency_tracker.rb#8 +class ActionView::DependencyTracker + extend ::ActiveSupport::Autoload + + class << self + # source://actionview//lib/action_view/dependency_tracker.rb#17 + def find_dependencies(name, template, view_paths = T.unsafe(nil)); end + + # source://actionview//lib/action_view/dependency_tracker.rb#24 + def register_tracker(extension, tracker); end + + # source://actionview//lib/action_view/dependency_tracker.rb#35 + def remove_tracker(handler); end + end +end + +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#5 +class ActionView::DependencyTracker::ERBTracker + # @return [ERBTracker] a new instance of ERBTracker + # + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#72 + def initialize(name, template, view_paths = T.unsafe(nil)); end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#76 + def dependencies; end + + private + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#104 + def add_dependencies(render_dependencies, arguments, pattern); end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#112 + def add_dynamic_dependency(dependencies, dependency); end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#118 + def add_static_dependency(dependencies, dependency, quote_type); end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#88 + def directory; end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#158 + def explicit_dependencies; end + + # Returns the value of attribute name. + # + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80 + def name; end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#92 + def render_dependencies; end + + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#84 + def source; end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#80 + def template; end + + class << self + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#68 + def call(name, template, view_paths = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#64 + def supports_view_paths?; end + end +end + +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#6 +ActionView::DependencyTracker::ERBTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) + +# A valid ruby identifier - suitable for class, method and specially variable names +# +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#9 +ActionView::DependencyTracker::ERBTracker::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#58 +ActionView::DependencyTracker::ERBTracker::LAYOUT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) + +# Part of any hash containing the :layout key +# +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#36 +ActionView::DependencyTracker::ERBTracker::LAYOUT_HASH_KEY = T.let(T.unsafe(nil), Regexp) + +# Part of any hash containing the :partial key +# +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#30 +ActionView::DependencyTracker::ERBTracker::PARTIAL_HASH_KEY = T.let(T.unsafe(nil), Regexp) + +# Matches: +# partial: "comments/comment", collection: @all_comments => "comments/comment" +# (object: @single_comment, partial: "comments/comment") => "comments/comment" +# +# "comments/comments" +# 'comments/comments' +# ('comments/comments') +# +# (@topic) => "topics/topic" +# topics => "topics/topic" +# (message.topics) => "topics/topic" +# +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#52 +ActionView::DependencyTracker::ERBTracker::RENDER_ARGUMENTS = T.let(T.unsafe(nil), Regexp) + +# A simple string literal. e.g. "School's out!" +# +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#23 +ActionView::DependencyTracker::ERBTracker::STRING = T.let(T.unsafe(nil), Regexp) + +# Any kind of variable name. e.g. @instance, @@class, $global or local. +# Possibly following a method call chain +# +# source://actionview//lib/action_view/dependency_tracker/erb_tracker.rb#16 +ActionView::DependencyTracker::ERBTracker::VARIABLE_OR_METHOD_CHAIN = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#5 +class ActionView::DependencyTracker::RubyTracker + # @return [RubyTracker] a new instance of RubyTracker + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#20 + def initialize(name, template, view_paths = T.unsafe(nil), parser_class: T.unsafe(nil)); end + + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#12 + def dependencies; end + + private + + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#38 + def explicit_dependencies; end + + # Returns the value of attribute name. + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26 + def name; end + + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#28 + def render_dependencies; end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26 + def template; end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#26 + def view_paths; end + + class << self + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#8 + def call(name, template, view_paths = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#16 + def supports_view_paths?; end + end +end + +# source://actionview//lib/action_view/dependency_tracker/ruby_tracker.rb#6 +ActionView::DependencyTracker::RubyTracker::EXPLICIT_DEPENDENCY = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#5 +class ActionView::DependencyTracker::WildcardResolver + # @return [WildcardResolver] a new instance of WildcardResolver + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#6 + def initialize(view_paths, dependencies); end + + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#13 + def resolve; end + + private + + # Returns the value of attribute explicit_dependencies. + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def explicit_dependencies; end + + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#22 + def resolved_wildcard_dependencies; end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def view_paths; end + + # Returns the value of attribute wildcard_dependencies. + # + # source://actionview//lib/action_view/dependency_tracker/wildcard_resolver.rb#20 + def wildcard_dependencies; end +end + +# source://actionview//lib/action_view/digestor.rb#6 +class ActionView::Digestor + class << self + # Supported options: + # + # * name - Template name + # * format - Template format + # * +finder+ - An instance of ActionView::LookupContext + # * dependencies - An array of dependent views + # + # source://actionview//lib/action_view/digestor.rb#16 + def digest(name:, finder:, format: T.unsafe(nil), dependencies: T.unsafe(nil)); end + + # source://actionview//lib/action_view/digestor.rb#38 + def logger; end + + # Create a dependency tree for template named +name+. + # + # source://actionview//lib/action_view/digestor.rb#43 + def tree(name, finder, partial = T.unsafe(nil), seen = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/digestor.rb#71 + def find_template(finder, name, prefixes, partial, keys); end + end +end + +# source://actionview//lib/action_view/digestor.rb#125 +class ActionView::Digestor::Injected < ::ActionView::Digestor::Node + # source://actionview//lib/action_view/digestor.rb#126 + def digest(finder, _ = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/digestor.rb#121 +class ActionView::Digestor::Missing < ::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#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(seen = T.unsafe(nil)); 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#129 +class ActionView::Digestor::NullLogger + class << self + # source://actionview//lib/action_view/digestor.rb#130 + def debug(_); end + + # source://actionview//lib/action_view/digestor.rb#131 + def error(_); end + end +end + +# source://actionview//lib/action_view/digestor.rb#119 +class ActionView::Digestor::Partial < ::ActionView::Digestor::Node; end + +# source://actionview//lib/action_view.rb#35 +ActionView::ENCODING_FLAG = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/template/error.rb#11 +class ActionView::EncodingError < ::StandardError; end + +# A resolver that loads files from the filesystem. +# +# source://actionview//lib/action_view/template/resolver.rb#90 +class ActionView::FileSystemResolver < ::ActionView::Resolver + # @raise [ArgumentError] + # @return [FileSystemResolver] a new instance of FileSystemResolver + # + # source://actionview//lib/action_view/template/resolver.rb#93 + def initialize(path); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/resolver.rb#115 + def ==(resolver); end + + # source://actionview//lib/action_view/template/resolver.rb#117 + def all_template_paths; end + + # source://actionview//lib/action_view/template/resolver.rb#126 + def built_templates; end + + # source://actionview//lib/action_view/template/resolver.rb#101 + def clear_cache; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/resolver.rb#112 + def eql?(resolver); end + + # Returns the value of attribute path. + # + # source://actionview//lib/action_view/template/resolver.rb#91 + def path; end + + # source://actionview//lib/action_view/template/resolver.rb#110 + def to_path; end + + # source://actionview//lib/action_view/template/resolver.rb#107 + def to_s; end + + private + + # source://actionview//lib/action_view/template/resolver.rb#131 + def _find_all(name, prefix, partial, details, key, locals); end + + # source://actionview//lib/action_view/template/resolver.rb#150 + def build_unbound_template(template); end + + # source://actionview//lib/action_view/template/resolver.rb#208 + def escape_entry(entry); end + + # source://actionview//lib/action_view/template/resolver.rb#180 + def filter_and_sort_by_details(templates, requested_details); end + + # source://actionview//lib/action_view/template/resolver.rb#146 + def source_for_template(template); end + + # Safe glob within @path + # + # source://actionview//lib/action_view/template/resolver.rb#195 + def template_glob(glob); end + + # source://actionview//lib/action_view/template/resolver.rb#163 + def unbound_templates_from_path(path); end +end + +# source://actionview//lib/action_view/helpers/capture_helper.rb#6 +module ActionView::Helpers + include ::ActiveSupport::Benchmarkable + include ::ActionView::Helpers::ActiveModelHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AtomFeedHelper + include ::ActionView::Helpers::CacheHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::ControllerHelper + include ::ActionView::Helpers::CspHelper + include ::ActionView::Helpers::CsrfHelper + include ::ActionView::Helpers::DateHelper + include ::ActionView::Helpers::DebugHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::JavaScriptHelper + include ::ActionView::Helpers::NumberHelper + include ::ActionView::Helpers::RenderingHelper + extend ::ActiveSupport::Autoload + extend ::ActiveSupport::Concern + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::FormHelper + include ::ActionView::Helpers::TranslationHelper + + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + + class << self + # source://actionview//lib/action_view/helpers.rb#35 + def eager_load!; end + end +end + +# source://actionview//lib/action_view/helpers/active_model_helper.rb#8 +module ActionView::Helpers::ActiveModelHelper; end + +# = Active \Model Instance Tag \Helpers +# +# source://actionview//lib/action_view/helpers/active_model_helper.rb#12 +module ActionView::Helpers::ActiveModelInstanceTag + # source://actionview//lib/action_view/helpers/active_model_helper.rb#20 + def content_tag(type, options, *_arg2); end + + # source://actionview//lib/action_view/helpers/active_model_helper.rb#36 + def error_message; end + + # source://actionview//lib/action_view/helpers/active_model_helper.rb#28 + def error_wrapping(html_tag); end + + # source://actionview//lib/action_view/helpers/active_model_helper.rb#13 + def object; end + + # source://actionview//lib/action_view/helpers/active_model_helper.rb#24 + def tag(type, options, *_arg2); end + + private + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/active_model_helper.rb#41 + def object_has_errors?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/active_model_helper.rb#45 + def select_markup_helper?(type); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/active_model_helper.rb#49 + def tag_generate_errors?(options); end +end + +# = Action View Asset Tag \Helpers +# +# This module provides methods for generating HTML that links views to assets such +# as images, JavaScripts, stylesheets, and feeds. These methods do not verify +# the assets exist before linking to them: +# +# image_tag("rails.png") +# # => +# stylesheet_link_tag("application") +# # => +# +# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#21 +module ActionView::Helpers::AssetTagHelper + include ::ActionView::Helpers::AssetUrlHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default=(val); end + + # Returns an HTML audio tag for the +sources+. If +sources+ is a string, + # a single audio tag will be returned. If +sources+ is an array, an audio + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public audios + # directory, or Active Storage attachments. + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. + # + # audio_tag("sound") + # # => + # audio_tag("sound.wav") + # # => + # audio_tag("sound.wav", autoplay: true, controls: true) + # # => + # audio_tag("sound.wav", "sound.mid") + # # => + # + # Active Storage blobs (audios that are uploaded by the users of your app): + # + # audio_tag(user.name_pronunciation_audio) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#612 + 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#279 + def auto_discovery_link_tag(type = T.unsafe(nil), url_options = T.unsafe(nil), tag_options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#29 + def auto_include_nonce_for_scripts; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#29 + def auto_include_nonce_for_scripts=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#30 + def auto_include_nonce_for_styles; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#30 + def auto_include_nonce_for_styles=(val); 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#320 + def favicon_link_tag(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading=(val); end + + # Returns an HTML image tag for the +source+. The +source+ can be a full + # path, a file, or an Active Storage attachment. + # + # ==== Options + # + # You can add HTML attributes using the +options+. The +options+ supports + # additional keys for convenience and conformance: + # + # * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes + # width="30" height="45", and "50" becomes width="50" height="50". + # :size will be ignored if the value is not in the correct format. + # * :srcset - If supplied as a hash or array of [source, descriptor] + # pairs, each image path will be expanded before the list is formatted as a string. + # + # ==== Examples + # + # Assets (images that are part of your app): + # + # image_tag("icon") + # # => + # image_tag("icon.png") + # # => + # image_tag("icon.png", size: "16x10", alt: "Edit Entry") + # # => Edit Entry + # image_tag("/icons/icon.gif", size: "16") + # # => + # image_tag("/icons/icon.gif", height: '32', width: '32') + # # => + # image_tag("/icons/icon.gif", class: "menu_icon") + # # => + # image_tag("/icons/icon.gif", data: { title: 'Rails Application' }) + # # => + # image_tag("icon.png", srcset: { "icon_2x.png" => "2x", "icon_4x.png" => "4x" }) + # # => + # image_tag("pic.jpg", srcset: [["pic_1024.jpg", "1024w"], ["pic_1980.jpg", "1980w"]], sizes: "100vw") + # # => + # + # Active Storage blobs (images that are uploaded by the users of your app): + # + # image_tag(user.avatar) + # # => + # image_tag(user.avatar.variant(resize_to_limit: [100, 100])) + # # => + # image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100') + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#449 + def image_tag(source, options = T.unsafe(nil)); end + + # Returns an HTML script tag for each of the +sources+ provided. + # + # Sources may be paths to JavaScript files. Relative paths are assumed to be relative + # to assets/javascripts, full paths are assumed to be relative to the document + # root. Relative paths are idiomatic, use absolute paths only when needed. + # + # When passing paths, the ".js" extension is optional. If you do not want ".js" + # appended to the path extname: false can be set on the options. + # + # You can modify the HTML attributes of the script tag by passing a hash as the + # last argument. + # + # When the Asset Pipeline is enabled, you can pass the name of your manifest as + # source, and include other JavaScript or CoffeeScript files inside the manifest. + # + # If the server supports HTTP Early Hints, and the +defer+ option is not + # enabled, \Rails will push a 103 Early Hints response that links + # to the assets. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. This includes but is not limited to the following options: + # + # * :extname - Append an extension to the generated URL unless the extension + # already exists. This only applies for relative URLs. + # * :protocol - Sets the protocol of the generated URL. This option only + # applies when a relative URL and +host+ options are provided. + # * :host - When a relative URL is provided the host is added to the + # that path. + # * :skip_pipeline - This option is used to bypass the asset pipeline + # when it is set to true. + # * :nonce - When set to true, adds an automatic nonce value if + # you have Content Security Policy enabled. + # * :async - When set to +true+, adds the +async+ HTML + # attribute, allowing the script to be fetched in parallel to be parsed + # and evaluated as soon as possible. + # * :defer - When set to +true+, adds the +defer+ HTML + # attribute, which indicates to the browser that the script is meant to + # be executed after the document has been parsed. Additionally, prevents + # sending the Preload Links header. + # * :nopush - Specify if the use of server push is not desired + # for the script. Defaults to +true+. + # + # Any other specified options will be treated as HTML attributes for the + # +script+ tag. + # + # For more information regarding how the :async and :defer + # options affect the + # + # javascript_include_tag "xmlhr", host: "localhost", protocol: "https" + # # => + # + # javascript_include_tag "template.jst", extname: false + # # => + # + # javascript_include_tag "xmlhr.js" + # # => + # + # javascript_include_tag "common.javascript", "/elsewhere/cools" + # # => + # # + # + # javascript_include_tag "http://www.example.com/xmlhr" + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js" + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", nonce: true + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", async: true + # # => + # + # javascript_include_tag "http://www.example.com/xmlhr.js", defer: true + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#115 + def javascript_include_tag(*sources); end + + # Returns an HTML picture tag for the +sources+. If +sources+ is a string, + # a single picture tag will be returned. If +sources+ is an array, a picture + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public images + # directory, or Active Storage attachments. Since the picture tag requires + # an img tag, the last element you provide will be used for the img tag. + # For complete control over the picture tag, a block can be passed, which + # will populate the contents of the tag accordingly. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. Apart from all the HTML supported options, the following are supported: + # + # * :image - Hash of options that are passed directly to the +image_tag+ helper. + # + # ==== Examples + # + # picture_tag("picture.webp") + # # => + # picture_tag("gold.png", :image => { :size => "20" }) + # # => + # picture_tag("gold.png", :image => { :size => "45x70" }) + # # => + # picture_tag("picture.webp", "picture.png") + # # => + # picture_tag("picture.webp", "picture.png", :image => { alt: "Image" }) + # # => Image + # picture_tag(["picture.webp", "picture.png"], :image => { alt: "Image" }) + # # => Image + # picture_tag(:class => "my-class") { tag(:source, :srcset => image_path("picture.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # picture_tag { tag(:source, :srcset => image_path("picture-small.webp"), :media => "(min-width: 600px)") + tag(:source, :srcset => image_path("picture-big.webp")) + image_tag("picture.png", :alt => "Image") } + # # => Image + # + # Active Storage blobs (images that are uploaded by the users of your app): + # + # picture_tag(user.profile_picture) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#510 + def picture_tag(*sources, &block); end + + # Returns a link tag that browsers can use to preload the +source+. + # The +source+ can be the path of a resource managed by asset pipeline, + # a full path, or an URI. + # + # ==== Options + # + # * :type - Override the auto-generated mime type, defaults to the mime type for +source+ extension. + # * :as - Override the auto-generated value for as attribute, calculated using +source+ extension and mime type. + # * :crossorigin - Specify the crossorigin attribute, required to load cross-origin resources. + # * :nopush - Specify if the use of server push is not desired for the resource. Defaults to +false+. + # * :integrity - Specify the integrity attribute. + # + # ==== Examples + # + # preload_link_tag("custom_theme.css") + # # => + # + # preload_link_tag("/videos/video.webm") + # # => + # + # preload_link_tag(post_path(format: :json), as: "fetch") + # # => + # + # preload_link_tag("worker.js", as: "worker") + # # => + # + # preload_link_tag("//example.com/font.woff2") + # # => + # + # preload_link_tag("//example.com/font.woff2", crossorigin: "use-credentials") + # # => + # + # preload_link_tag("/media/audio.ogg", nopush: true) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#363 + def preload_link_tag(source, options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header=(val); end + + # Returns a stylesheet link tag for the sources specified as arguments. + # + # When passing paths, the .css extension is optional. + # If you don't specify an extension, .css will be appended automatically. + # If you do not want .css appended to the path, + # set extname: false in the options. + # You can modify the link attributes by passing a hash as the last argument. + # + # If the server supports HTTP Early Hints, \Rails will push a 103 Early + # Hints response that links to the assets. + # + # ==== Options + # + # * :extname - Append an extension to the generated URL unless the extension + # already exists. This only applies for relative URLs. + # * :protocol - Sets the protocol of the generated URL. This option only + # applies when a relative URL and +host+ options are provided. + # * :host - When a relative URL is provided the host is added to the + # that path. + # * :skip_pipeline - This option is used to bypass the asset pipeline + # when it is set to true. + # * :nonce - When set to true, adds an automatic nonce value if + # you have Content Security Policy enabled. + # * :nopush - Specify if the use of server push is not desired + # for the stylesheet. Defaults to +true+. + # + # ==== Examples + # + # stylesheet_link_tag "style" + # # => + # + # stylesheet_link_tag "style.css" + # # => + # + # stylesheet_link_tag "http://www.example.com/style.css" + # # => + # + # stylesheet_link_tag "style.less", extname: false, skip_pipeline: true, rel: "stylesheet/less" + # # => + # + # stylesheet_link_tag "style", media: "all" + # # => + # + # stylesheet_link_tag "style", media: "print" + # # => + # + # stylesheet_link_tag "random.styles", "/css/stylish" + # # => + # # + # + # stylesheet_link_tag "style", nonce: true + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#207 + def stylesheet_link_tag(*sources); end + + # Returns an HTML video tag for the +sources+. If +sources+ is a string, + # a single video tag will be returned. If +sources+ is an array, a video + # tag with nested source tags for each source will be returned. The + # +sources+ can be full paths, files that exist in your public videos + # directory, or Active Storage attachments. + # + # ==== Options + # + # When the last parameter is a hash you can add HTML attributes using that + # parameter. The following options are supported: + # + # * :poster - Set an image (like a screenshot) to be shown + # before the video loads. The path is calculated like the +src+ of +image_tag+. + # * :size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes + # width="30" height="45", and "50" becomes width="50" height="50". + # :size will be ignored if the value is not in the correct format. + # * :poster_skip_pipeline will bypass the asset pipeline when using + # the :poster option instead using an asset in the public folder. + # + # ==== Examples + # + # video_tag("trailer") + # # => + # video_tag("trailer.ogg") + # # => + # video_tag("trailer.ogg", controls: true, preload: 'none') + # # => + # video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png") + # # => + # video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png", poster_skip_pipeline: true) + # # => + # video_tag("/trailers/hd.avi", size: "16x16") + # # => + # video_tag("/trailers/hd.avi", size: "16") + # # => + # video_tag("/trailers/hd.avi", height: '32', width: '32') + # # => + # video_tag("trailer.ogg", "trailer.flv") + # # => + # video_tag(["trailer.ogg", "trailer.flv"]) + # # => + # video_tag(["trailer.ogg", "trailer.flv"], size: "160x120") + # # => + # + # Active Storage blobs (videos that are uploaded by the users of your app): + # + # video_tag(user.intro_video) + # # => + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#580 + def video_tag(*sources); end + + private + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#653 + def check_for_image_tag_errors(options); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#644 + def extract_dimensions(size); end + + # @yield [options] + # + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#617 + def multiple_sources_tag_builder(type, sources); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#634 + def resolve_asset_source(asset_type, source, skip_pipeline); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#659 + def resolve_link_as(extname, mime_type); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#673 + def send_preload_links_header(preload_links, max_header_size: T.unsafe(nil)); end + + class << self + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#28 + def apply_stylesheet_media_default=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#29 + def auto_include_nonce_for_scripts; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#29 + def auto_include_nonce_for_scripts=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#30 + def auto_include_nonce_for_styles; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#30 + def auto_include_nonce_for_styles=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#26 + def image_decoding=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#25 + def image_loading=(val); end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header; end + + # source://actionview//lib/action_view/helpers/asset_tag_helper.rb#27 + def preload_links_header=(val); end + end +end + +# Some HTTP client and proxies have a 4kiB header limit, but more importantly +# including preload links has diminishing returns so it's best to not go overboard +# +# source://actionview//lib/action_view/helpers/asset_tag_helper.rb#671 +ActionView::Helpers::AssetTagHelper::MAX_HEADER_SIZE = T.let(T.unsafe(nil), Integer) + +# = Action View Asset URL \Helpers +# +# This module provides methods for generating asset paths and +# URLs. +# +# image_path("rails.png") +# # => "/assets/rails.png" +# +# image_url("rails.png") +# # => "http://www.example.com/assets/rails.png" +# +# === Using asset hosts +# +# By default, \Rails links to these assets on the current host in the public +# folder, but you can direct \Rails to link to assets from a dedicated asset +# server by setting ActionController::Base.asset_host in the application +# configuration, typically in config/environments/production.rb. +# For example, you'd define assets.example.com to be your asset +# host this way, inside the configure block of your environment-specific +# configuration files or config/application.rb: +# +# config.action_controller.asset_host = "assets.example.com" +# +# Helpers take that into account: +# +# image_tag("rails.png") +# # => +# stylesheet_link_tag("application") +# # => +# +# Browsers open a limited number of simultaneous connections to a single +# host. The exact number varies by browser and version. This limit may cause +# some asset downloads to wait for previous assets to finish before they can +# begin. You can use the %d wildcard in the +asset_host+ to +# distribute the requests over four hosts. For example, +# assets%d.example.com will spread the asset requests over +# "assets0.example.com", ..., "assets3.example.com". +# +# image_tag("rails.png") +# # => +# stylesheet_link_tag("application") +# # => +# +# This may improve the asset loading performance of your application. +# It is also possible the combination of additional connection overhead +# (DNS, SSL) and the overall browser connection limits may result in this +# solution being slower. You should be sure to measure your actual +# performance across targeted browsers both before and after this change. +# +# To implement the corresponding hosts you can either set up four actual +# hosts or use wildcard DNS to CNAME the wildcard to a single asset host. +# You can read more about setting up your DNS CNAME records from your ISP. +# +# Note: This is purely a browser performance optimization and is not meant +# for server load balancing. See https://www.die.net/musings/page_load_time/ +# for background and https://www.browserscope.org/?category=network for +# connection limit data. +# +# Alternatively, you can exert more control over the asset host by setting +# +asset_host+ to a proc like this: +# +# ActionController::Base.asset_host = Proc.new { |source| +# "http://assets#{OpenSSL::Digest::SHA256.hexdigest(source).to_i(16) % 2 + 1}.example.com" +# } +# image_tag("rails.png") +# # => +# stylesheet_link_tag("application") +# # => +# +# The example above generates "http://assets1.example.com" and +# "http://assets2.example.com". This option is useful for example if +# you need fewer/more than four hosts, custom host names, etc. +# +# As you see the proc takes a +source+ parameter. That's a string with the +# absolute path of the asset, for example "/assets/rails.png". +# +# ActionController::Base.asset_host = Proc.new { |source| +# if source.end_with?('.css') +# "http://stylesheets.example.com" +# else +# "http://assets.example.com" +# end +# } +# image_tag("rails.png") +# # => +# stylesheet_link_tag("application") +# # => +# +# Alternatively you may ask for a second parameter +request+. That one is +# particularly useful for serving assets from an SSL-protected page. The +# example proc below disables asset hosting for HTTPS connections, while +# still sending assets for plain HTTP requests from asset hosts. If you don't +# have SSL certificates for each of the asset hosts this technique allows you +# to avoid warnings in the client about mixed media. +# Note that the +request+ parameter might not be supplied, e.g. when the assets +# are precompiled with the command bin/rails assets:precompile. Make sure to use a +# +Proc+ instead of a lambda, since a +Proc+ allows missing parameters and sets them +# to +nil+. +# +# config.action_controller.asset_host = Proc.new { |source, request| +# if request && request.ssl? +# "#{request.protocol}#{request.host_with_port}" +# else +# "#{request.protocol}assets.example.com" +# end +# } +# +# You can also implement a custom asset host object that responds to +call+ +# and takes either one or two parameters just like the proc. +# +# config.action_controller.asset_host = AssetHostingWithMinimumSsl.new( +# "http://asset%d.example.com", "https://asset1.example.com" +# ) +# +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#121 +module ActionView::Helpers::AssetUrlHelper + # This is the entry point for all assets. + # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the + # behavior is "enhanced". You can bypass the asset pipeline by passing in + # skip_pipeline: true to the options. + # + # All other asset *_path helpers delegate through this method. + # + # === With the asset pipeline + # + # All options passed to +asset_path+ will be passed to +compute_asset_path+ + # which is implemented by asset pipeline gems. + # + # asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js" + # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js" + # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js" + # + # === Without the asset pipeline (skip_pipeline: true) + # + # Accepts a type option that can specify the asset's extension. No error + # checking is done to verify the source passed into +asset_path+ is valid + # and that the file exists on disk. + # + # asset_path("application.js", skip_pipeline: true) # => "application.js" + # asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png" + # asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js" + # asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css" + # + # === Options applying to all assets + # + # Below lists scenarios that apply to +asset_path+ whether or not you're + # using the asset pipeline. + # + # - All fully qualified URLs are returned immediately. This bypasses the + # asset pipeline and all other behavior described. + # + # asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js" + # + # - All assets that begin with a forward slash are assumed to be full + # URLs and will not be expanded. This will bypass the asset pipeline. + # + # asset_path("/foo.png") # => "/foo.png" + # + # - All blank strings will be returned immediately. This bypasses the + # asset pipeline and all other behavior described. + # + # asset_path("") # => "" + # + # - If config.relative_url_root is specified, all assets will have that + # root prepended. + # + # Rails.application.config.relative_url_root = "bar" + # asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js" + # + # - A different asset host can be specified via config.action_controller.asset_host + # this is commonly used in conjunction with a CDN. + # + # Rails.application.config.action_controller.asset_host = "assets.example.com" + # asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js" + # + # - An extension name can be specified manually with extname. + # + # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" + # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" + # + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#187 + def asset_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to an asset in the public directory. This + # will use +asset_path+ internally, so most of their behaviors + # will be the same. If +:host+ options is set, it overwrites global + # +config.action_controller.asset_host+ setting. + # + # All other options provided are forwarded to +asset_path+ call. + # + # asset_url "application.js" # => http://example.com/assets/application.js + # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#231 + def asset_url(source, options = T.unsafe(nil)); end + + # Computes the path to an audio asset in the public audios directory. + # Full paths from the document root will be passed through. + # Used internally by +audio_tag+ to build the audio path. + # + # audio_path("horse") # => /audios/horse + # audio_path("horse.wav") # => /audios/horse.wav + # audio_path("sounds/horse.wav") # => /audios/sounds/horse.wav + # audio_path("/sounds/horse.wav") # => /sounds/horse.wav + # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#430 + def audio_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to an audio asset in the public audios directory. + # This will use +audio_path+ internally, so most of their behaviors will be the same. + # Since +audio_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ + # options is set, it overwrites global +config.action_controller.asset_host+ setting. + # + # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#442 + def audio_url(source, options = T.unsafe(nil)); end + + # Compute extname to append to asset path. Returns +nil+ if + # nothing should be added. + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#243 + def compute_asset_extname(source, options = T.unsafe(nil)); end + + # Pick an asset host for this source. Returns +nil+ if no host is set, + # the host if no wildcard is set, the host interpolated with the + # numbers 0-3 if it contains %d (the number is the source hash mod 4), + # or the value returned from invoking call on an object responding to call + # (proc or otherwise). + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#277 + def compute_asset_host(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # Computes asset path to public directory. Plugins and + # extensions can override this method to point to custom assets + # or generate digested paths or query strings. + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#266 + def compute_asset_path(source, options = T.unsafe(nil)); end + + # Computes the path to a font asset. + # Full paths from the document root will be passed through. + # + # font_path("font") # => /fonts/font + # font_path("font.ttf") # => /fonts/font.ttf + # font_path("dir/font.ttf") # => /fonts/dir/font.ttf + # font_path("/dir/font.ttf") # => /dir/font.ttf + # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#455 + def font_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to a font asset. + # This will use +font_path+ internally, so most of their behaviors will be the same. + # Since +font_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ + # options is set, it overwrites global +config.action_controller.asset_host+ setting. + # + # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#467 + def font_url(source, options = T.unsafe(nil)); end + + # Computes the path to an image asset. + # Full paths from the document root will be passed through. + # Used internally by +image_tag+ to build the image path: + # + # image_path("edit") # => "/assets/edit" + # image_path("edit.png") # => "/assets/edit.png" + # image_path("icons/edit.png") # => "/assets/icons/edit.png" + # image_path("/icons/edit.png") # => "/icons/edit.png" + # image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png" + # + # If you have images as application resources this method may conflict with their named routes. + # The alias +path_to_image+ is provided to avoid that. \Rails uses the alias internally, and + # plugin authors are encouraged to do so. + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#378 + def image_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to an image asset. + # This will use +image_path+ internally, so most of their behaviors will be the same. + # Since +image_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ + # options is set, it overwrites global +config.action_controller.asset_host+ setting. + # + # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#390 + def image_url(source, options = T.unsafe(nil)); end + + # Computes the path to a JavaScript asset in the public javascripts directory. + # If the +source+ filename has no extension, .js will be appended (except for explicit URIs) + # Full paths from the document root will be passed through. + # Used internally by +javascript_include_tag+ to build the script path. + # + # javascript_path "xmlhr" # => /assets/xmlhr.js + # javascript_path "dir/xmlhr.js" # => /assets/dir/xmlhr.js + # javascript_path "/dir/xmlhr" # => /dir/xmlhr.js + # javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr + # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#321 + def javascript_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to a JavaScript asset in the public javascripts directory. + # This will use +javascript_path+ internally, so most of their behaviors will be the same. + # Since +javascript_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ + # options is set, it overwrites global +config.action_controller.asset_host+ setting. + # + # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#333 + def javascript_url(source, options = T.unsafe(nil)); end + + # This is the entry point for all assets. + # When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the + # behavior is "enhanced". You can bypass the asset pipeline by passing in + # skip_pipeline: true to the options. + # + # All other asset *_path helpers delegate through this method. + # + # === With the asset pipeline + # + # All options passed to +asset_path+ will be passed to +compute_asset_path+ + # which is implemented by asset pipeline gems. + # + # asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js" + # asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js" + # asset_path("application.js", host: 'example.com', protocol: 'https') # => "https://example.com/assets/application.js" + # + # === Without the asset pipeline (skip_pipeline: true) + # + # Accepts a type option that can specify the asset's extension. No error + # checking is done to verify the source passed into +asset_path+ is valid + # and that the file exists on disk. + # + # asset_path("application.js", skip_pipeline: true) # => "application.js" + # asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png" + # asset_path("application", type: :javascript, skip_pipeline: true) # => "/javascripts/application.js" + # asset_path("application", type: :stylesheet, skip_pipeline: true) # => "/stylesheets/application.css" + # + # === Options applying to all assets + # + # Below lists scenarios that apply to +asset_path+ whether or not you're + # using the asset pipeline. + # + # - All fully qualified URLs are returned immediately. This bypasses the + # asset pipeline and all other behavior described. + # + # asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js" + # + # - All assets that begin with a forward slash are assumed to be full + # URLs and will not be expanded. This will bypass the asset pipeline. + # + # asset_path("/foo.png") # => "/foo.png" + # + # - All blank strings will be returned immediately. This bypasses the + # asset pipeline and all other behavior described. + # + # asset_path("") # => "" + # + # - If config.relative_url_root is specified, all assets will have that + # root prepended. + # + # Rails.application.config.relative_url_root = "bar" + # asset_path("foo.js", skip_pipeline: true) # => "bar/foo.js" + # + # - A different asset host can be specified via config.action_controller.asset_host + # this is commonly used in conjunction with a CDN. + # + # Rails.application.config.action_controller.asset_host = "assets.example.com" + # asset_path("foo.js", skip_pipeline: true) # => "http://assets.example.com/foo.js" + # + # - An extension name can be specified manually with extname. + # + # asset_path("foo", skip_pipeline: true, extname: ".js") # => "/foo.js" + # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" + # aliased to avoid conflicts with an asset_path named route + # + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#219 + 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#433 + 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#458 + 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#381 + 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#324 + 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#351 + 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#407 + 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#270 + def public_compute_asset_path(source, options = T.unsafe(nil)); end + + # Computes the path to a stylesheet asset in the public stylesheets directory. + # If the +source+ filename has no extension, .css will be appended (except for explicit URIs). + # Full paths from the document root will be passed through. + # Used internally by +stylesheet_link_tag+ to build the stylesheet path. + # + # stylesheet_path "style" # => /assets/style.css + # stylesheet_path "dir/style.css" # => /assets/dir/style.css + # stylesheet_path "/dir/style.css" # => /dir/style.css + # stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style + # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#348 + def stylesheet_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to a stylesheet asset in the public stylesheets directory. + # This will use +stylesheet_path+ internally, so most of their behaviors will be the same. + # Since +stylesheet_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ + # options is set, it overwrites global +config.action_controller.asset_host+ setting. + # + # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#360 + def stylesheet_url(source, options = T.unsafe(nil)); end + + # Computes the full URL to an asset in the public directory. This + # will use +asset_path+ internally, so most of their behaviors + # will be the same. If +:host+ options is set, it overwrites global + # +config.action_controller.asset_host+ setting. + # + # All other options provided are forwarded to +asset_path+ call. + # + # asset_url "application.js" # => http://example.com/assets/application.js + # asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js + # aliased to avoid conflicts with an asset_url named route + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#234 + 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#445 + 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#470 + 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#393 + 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#336 + 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#363 + 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#419 + def url_to_video(source, options = T.unsafe(nil)); end + + # Computes the path to a video asset in the public videos directory. + # Full paths from the document root will be passed through. + # Used internally by +video_tag+ to build the video path. + # + # video_path("hd") # => /videos/hd + # video_path("hd.avi") # => /videos/hd.avi + # video_path("trailers/hd.avi") # => /videos/trailers/hd.avi + # video_path("/trailers/hd.avi") # => /trailers/hd.avi + # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#404 + def video_path(source, options = T.unsafe(nil)); end + + # Computes the full URL to a video asset in the public videos directory. + # This will use +video_path+ internally, so most of their behaviors will be the same. + # Since +video_url+ is based on +asset_url+ method you can set +:host+ options. If +:host+ + # options is set, it overwrites global +config.action_controller.asset_host+ setting. + # + # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi + # + # source://actionview//lib/action_view/helpers/asset_url_helper.rb#416 + def video_url(source, options = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#236 +ActionView::Helpers::AssetUrlHelper::ASSET_EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# Maps asset types to public directory. +# +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#254 +ActionView::Helpers::AssetUrlHelper::ASSET_PUBLIC_DIRECTORIES = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/helpers/asset_url_helper.rb#122 +ActionView::Helpers::AssetUrlHelper::URI_REGEXP = T.let(T.unsafe(nil), Regexp) + +# = Action View Atom Feed \Helpers +# +# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#6 +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#96 + def atom_feed(options = T.unsafe(nil), &block); end +end + +# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#127 +class ActionView::Helpers::AtomFeedHelper::AtomBuilder + # @return [AtomBuilder] a new instance of AtomBuilder + # + # source://actionview//lib/action_view/helpers/atom_feed_helper.rb#130 + 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#138 + 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#153 + def xhtml_block?(method, arguments); end +end + +# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#128 +ActionView::Helpers::AtomFeedHelper::AtomBuilder::XHTML_TAG_NAMES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/atom_feed_helper.rb#161 +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#162 + 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#180 + 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#167 + def updated(date_or_time = T.unsafe(nil)); end +end + +# = Action View Cache \Helpers +# +# source://actionview//lib/action_view/helpers/cache_helper.rb#6 +module ActionView::Helpers::CacheHelper + # This helper exposes a method for caching fragments of a view + # rather than an entire action or page. This technique is useful + # caching pieces like menus, lists of new topics, static HTML + # fragments, and so on. This method takes a block that contains + # the content you wish to cache. + # + # The best way to use this is by doing recyclable key-based cache expiration + # on top of a cache store like Memcached or Redis that'll automatically + # kick out old entries. + # + # When using this method, you list the cache dependency as the name of the cache, like so: + # + # <% cache project do %> + # All the topics on this project + # <%= render project.topics %> + # <% end %> + # + # This approach will assume that when a new topic is added, you'll touch + # the project. The cache key generated from this call will be something like: + # + # views/template/action:7a1156131a6928cb0026877f8b749ac9/projects/123 + # ^template path ^template tree digest ^class ^id + # + # This cache key is stable, but it's combined with a cache version derived from the project + # record. When the project updated_at is touched, the #cache_version changes, even + # if the key stays stable. This means that unlike a traditional key-based cache expiration + # approach, you won't be generating cache trash, unused keys, simply because the dependent + # record is updated. + # + # If your template cache depends on multiple sources (try to avoid this to keep things simple), + # you can name all these dependencies as part of an array: + # + # <% cache [ project, current_user ] do %> + # All the topics on this project + # <%= render project.topics %> + # <% end %> + # + # This will include both records as part of the cache key and updating either of them will + # expire the cache. + # + # ==== \Template digest + # + # The template digest that's added to the cache key is computed by taking an MD5 of the + # contents of the entire template file. This ensures that your caches will automatically + # expire when you change the template file. + # + # Note that the MD5 is taken of the entire template file, not just what's within the + # cache do/end call. So it's possible that changing something outside of that call will + # still expire the cache. + # + # Additionally, the digestor will automatically look through your template file for + # explicit and implicit dependencies, and include those as part of the digest. + # + # The digestor can be bypassed by passing skip_digest: true as an option to the cache call: + # + # <% cache project, skip_digest: true do %> + # All the topics on this project + # <%= render project.topics %> + # <% end %> + # + # ==== Implicit dependencies + # + # Most template dependencies can be derived from calls to render in the template itself. + # Here are some examples of render calls that Cache Digests knows how to decode: + # + # render partial: "comments/comment", collection: commentable.comments + # render "comments/comments" + # render 'comments/comments' + # render('comments/comments') + # + # render "header" # translates to render("comments/header") + # + # render(@topic) # translates to render("topics/topic") + # render(topics) # translates to render("topics/topic") + # render(message.topics) # translates to render("topics/topic") + # + # It's not possible to derive all render calls like that, though. + # Here are a few examples of things that can't be derived: + # + # render group_of_attachments + # render @project.documents.where(published: true).order('created_at') + # + # You will have to rewrite those to the explicit form: + # + # render partial: 'attachments/attachment', collection: group_of_attachments + # render partial: 'documents/document', collection: @project.documents.where(published: true).order('created_at') + # + # One last type of dependency can be determined implicitly: + # + # render "maintenance_tasks/runs/info/#{run.status}" + # + # Because the value passed to render ends in interpolation, Action View + # will mark all partials within the "maintenance_tasks/runs/info" folder as + # dependencies. + # + # === Explicit dependencies + # + # Sometimes you'll have template dependencies that can't be derived at all. This is typically + # the case when you have template rendering that happens in helpers. Here's an example: + # + # <%= render_sortable_todolists @project.todolists %> + # + # You'll need to use a special comment format to call those out: + # + # <%# Template Dependency: todolists/todolist %> + # <%= render_sortable_todolists @project.todolists %> + # + # In some cases, like a single table inheritance setup, you might have + # a bunch of explicit dependencies. Instead of writing every template out, + # you can use a wildcard to match any template in a directory: + # + # <%# Template Dependency: events/* %> + # <%= render_categorizable_events @person.events %> + # + # This marks every template in the directory as a dependency. To find those + # templates, the wildcard path must be absolutely defined from app/views or paths + # otherwise added with +prepend_view_path+ or +append_view_path+. + # This way the wildcard for app/views/recordings/events would be recordings/events/* etc. + # + # The pattern used to match explicit dependencies is /# Template Dependency: (\S+)/, + # so it's important that you type it out just so. + # You can only declare one template dependency per line. + # + # === External dependencies + # + # If you use a helper method, for example, inside a cached block and + # you then update that helper, you'll have to bump the cache as well. + # It doesn't really matter how you do it, but the MD5 of the template file + # must change. One recommendation is to simply be explicit in a comment, like: + # + # <%# Helper Dependency Updated: May 6, 2012 at 6pm %> + # <%= some_helper_method(person) %> + # + # Now all you have to do is change that timestamp when the helper method changes. + # + # === Collection Caching + # + # When rendering a collection of objects that each use the same partial, a :cached + # option can be passed. + # + # For collections rendered such: + # + # <%= render partial: 'projects/project', collection: @projects, cached: true %> + # + # The cached: true will make Action View's rendering read several templates + # from cache at once instead of one call per template. + # + # Templates in the collection not already cached are written to cache. + # + # Works great alongside individual template fragment caching. + # For instance if the template the collection renders is cached like: + # + # # projects/_project.html.erb + # <% cache project do %> + # <%# ... %> + # <% end %> + # + # Any collection renders will find those cached templates when attempting + # to read multiple templates at once. + # + # If your collection cache depends on multiple sources (try to avoid this to keep things simple), + # you can name all these dependencies as part of a block that returns an array: + # + # <%= render partial: 'projects/project', collection: @projects, cached: -> project { [ project, current_user ] } %> + # + # This will include both records as part of the cache key and updating either of them will + # expire the cache. + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#176 + def cache(name = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # This helper returns the name of a cache key for a given fragment cache + # call. By supplying skip_digest: true to cache, the digestion of cache + # fragments can be manually bypassed. This is useful when cache fragments + # cannot be manually expired unless you know the exact key which is the + # case when using memcached. + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#248 + def cache_fragment_name(name = T.unsafe(nil), skip_digest: T.unsafe(nil), digest_path: T.unsafe(nil)); end + + # Cache fragments of a view if +condition+ is true + # + # <% cache_if admin?, project do %> + # All the topics on this project + # <%= render project.topics %> + # <% end %> + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#223 + def cache_if(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Cache fragments of a view unless +condition+ is true + # + # <% cache_unless admin?, project do %> + # All the topics on this project + # <%= render project.topics %> + # <% end %> + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#239 + def cache_unless(condition, name = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Returns whether the current view fragment is within a +cache+ block. + # + # Useful when certain fragments aren't cacheable: + # + # <% cache project do %> + # <% raise StandardError, "Caching private data!" if caching? %> + # <% end %> + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#196 + def caching?; end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#256 + def digest_path_from_template(template); end + + # Raises UncacheableFragmentError when called from within a +cache+ block. + # + # Useful to denote helper methods that can't participate in fragment caching: + # + # def project_name_with_time(project) + # uncacheable! + # "#{project.name} - #{Time.now}" + # end + # + # # Which will then raise if used within a `cache` block: + # <% cache project do %> + # <%= project_name_with_time(project) %> + # <% end %> + # + # @raise [UncacheableFragmentError] + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#213 + def uncacheable!; end + + private + + # source://actionview//lib/action_view/helpers/cache_helper.rb#278 + def fragment_for(name = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#267 + def fragment_name_with_digest(name, digest_path); end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#288 + def read_fragment_for(name, options); end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#292 + def write_fragment_for(name, options, &block); end +end + +# source://actionview//lib/action_view/helpers/cache_helper.rb#297 +module ActionView::Helpers::CacheHelper::CachingRegistry + extend ::ActionView::Helpers::CacheHelper::CachingRegistry + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/cache_helper.rb#300 + def caching?; end + + # source://actionview//lib/action_view/helpers/cache_helper.rb#304 + def track_caching; end +end + +# source://actionview//lib/action_view/helpers/cache_helper.rb#7 +class ActionView::Helpers::CacheHelper::UncacheableFragmentError < ::StandardError; end + +# = Action View Capture \Helpers +# +# \CaptureHelper exposes methods to let you extract generated markup which +# can be used in other parts of a template or layout file. +# +# It provides a method to capture blocks into variables through #capture and +# a way to capture a block of markup for use in a layout through #content_for. +# +# As well as provides a method when using streaming responses through #provide. +# See ActionController::Streaming for more information. +# +# source://actionview//lib/action_view/helpers/capture_helper.rb#17 +module ActionView::Helpers::CaptureHelper + # The capture method extracts part of a template as a string object. + # You can then use this object anywhere in your templates, layout, or helpers. + # + # The capture method can be used in \ERB templates... + # + # <% @greeting = capture do %> + # Welcome to my shiny new web page! The date and time is + # <%= Time.now %> + # <% end %> + # + # ...and Builder (RXML) templates. + # + # @timestamp = capture do + # "The current timestamp is #{Time.now}." + # end + # + # You can then use that variable anywhere else. For example: + # + # + # <%= @greeting %> + # + # <%= @greeting %> + # + # + # + # The return of capture is the string generated by the block. For Example: + # + # @greeting # => "Welcome to my shiny new web page! The date and time is 2018-09-06 11:09:16 -0500" + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#47 + def capture(*_arg0, **_arg1, &block); end + + # Calling content_for stores a block of markup in an identifier for later use. + # In order to access this stored content in other templates, helper modules + # or the layout, you would pass the identifier as an argument to content_for. + # + # Note: yield can still be used to retrieve the stored content, but calling + # yield doesn't work in helper modules, while content_for does. + # + # <% content_for :not_authorized do %> + # alert('You are not authorized to do that!') + # <% end %> + # + # You can then use content_for :not_authorized anywhere in your templates. + # + # <%= content_for :not_authorized if current_user.nil? %> + # + # This is equivalent to: + # + # <%= yield :not_authorized if current_user.nil? %> + # + # content_for, however, can also be used in helper modules. + # + # module StorageHelper + # def stored_content + # content_for(:storage) || "Your storage is empty" + # end + # end + # + # This helper works just like normal helpers. + # + # <%= stored_content %> + # + # You can also use the yield syntax alongside an existing call to + # yield in a layout. For example: + # + # <%# This is the layout %> + # + # + # My Website + # <%= yield :script %> + # + # + # <%= yield %> + # + # + # + # And now, we'll create a view that has a content_for call that + # creates the script identifier. + # + # <%# This is our view %> + # Please login! + # + # <% content_for :script do %> + # + # <% end %> + # + # Then, in another view, you could to do something like this: + # + # <%= link_to 'Logout', action: 'logout', remote: true %> + # + # <% content_for :script do %> + # <%= javascript_include_tag :defaults %> + # <% end %> + # + # That will place +script+ tags for your default set of JavaScript files on the page; + # this technique is useful if you'll only be using these scripts in a few views. + # + # Note that content_for concatenates (default) the blocks it is given for a particular + # identifier in order. For example: + # + # <% content_for :navigation do %> + #
  • <%= link_to 'Home', action: 'index' %>
  • + # <% end %> + # + # And in another place: + # + # <% content_for :navigation do %> + #
  • <%= link_to 'Login', action: 'login' %>
  • + # <% end %> + # + # Then, in another template or layout, this code would render both links in order: + # + # + # + # 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: + # + # + # + # Lastly, simple content can be passed as a parameter: + # + # <% content_for :script, javascript_include_tag(:defaults) %> + # + # WARNING: content_for is ignored in caches. So you shouldn't use it for elements that will be fragment cached. + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#172 + def content_for(name, content = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # content_for? checks whether any content has been captured yet using content_for. + # + # Useful to render parts of your layout differently based on what is in your views. + # + # <%# This is the layout %> + # + # + # My Website + # <%= yield :script %> + # + # + # <%= yield %> + # <%= yield :right_col %> + # + # + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#215 + def content_for?(name); end + + # The same as +content_for+ but when used with streaming flushes + # straight back to the layout. In other words, if you want to + # concatenate several times to the same buffer when rendering a given + # template, you should use +content_for+, if not, use +provide+ to tell + # the layout to stop looking for more contents. + # + # See ActionController::Streaming for more information. + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#194 + def provide(name, content = T.unsafe(nil), &block); end + + # Use an alternate output buffer for the duration of the block. + # Defaults to a new empty string. + # + # source://actionview//lib/action_view/helpers/capture_helper.rb#221 + def with_output_buffer(buf = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#5 +module ActionView::Helpers::ContentExfiltrationPreventionHelper + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention; end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention=(val); end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#61 + def prevent_content_exfiltration(html); end + + class << self + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention; end + + # source://actionview//lib/action_view/helpers/content_exfiltration_prevention_helper.rb#6 + def prepend_content_exfiltration_prevention=(val); end + end +end + +# Close any open tags that support CDATA (textarea, xmp) before each form tag. +# This prevents attackers from injecting unclosed tags that could capture +# form contents. +# +# For example, an attacker might inject: +# +#
    or +# the end of the document would be captured by the attacker's +# + # + # textarea(:comment, :text, size: "20x30") + # # => + # + # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') + # # => + # + # textarea(:entry, :body, size: "20x20", disabled: 'disabled') + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1280 + def text_area(object_name, method, options = T.unsafe(nil)); end + + # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object + # assigned to the template (identified by +object+). Additional options on the input tag can be passed as a + # hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example + # shown. + # + # ==== Examples + # text_field(:article, :title, size: 20) + # # => + # + # text_field(:article, :title, class: "create_input") + # # => + # + # text_field(:article, :title, maxlength: 30, class: "title_input") + # # => + # + # text_field(:session, :user, onchange: "if ($('#session_user').val() === 'admin') { alert('Your login cannot be admin!'); }") + # # => + # + # text_field(:snippet, :code, size: 20, class: 'code_input') + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1175 + def text_field(object_name, method, options = T.unsafe(nil)); end + + # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+) + # on an object assigned to the template (identified by +object+). Additional options on the input tag can be passed as a + # hash with +options+. + # + # ==== Examples + # textarea(:article, :body, cols: 20, rows: 40) + # # => + # + # textarea(:comment, :text, size: "20x30") + # # => + # + # textarea(:application, :notes, cols: 40, rows: 15, class: 'app_input') + # # => + # + # textarea(:entry, :body, size: "20x20", disabled: 'disabled') + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1277 + def textarea(object_name, method, options = T.unsafe(nil)); end + + # Returns a text_field of type "time". + # + # The default value is generated by trying to call +strftime+ with "%T.%L" + # on the object's value. If you pass include_seconds: false, it will be + # formatted by trying to call +strftime+ with "%H:%M" on the object's value. + # It is also possible to override this by passing the "value" option. + # + # ==== Options + # + # Supports the same options as FormTagHelper#time_field_tag. + # + # ==== Examples + # + # time_field("task", "started_at") + # # => + # + # You can create values for the "min" and "max" attributes by passing + # instances of Date or Time to the options hash. + # + # time_field("task", "started_at", min: Time.now) + # # => + # + # Alternatively, you can pass a String formatted as an ISO8601 time as the + # values for "min" and "max." + # + # time_field("task", "started_at", min: "01:00:00") + # # => + # + # By default, provided times will be formatted including seconds. You can render just the hour + # and minute by passing include_seconds: false. Some browsers will render a simpler UI + # if you exclude seconds in the timestamp format. + # + # time_field("task", "started_at", value: Time.now, include_seconds: false) + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1479 + def time_field(object_name, method, options = T.unsafe(nil)); end + + # Returns a text_field of type "url". + # + # url_field("user", "homepage") + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1559 + def url_field(object_name, method, options = T.unsafe(nil)); end + + # Returns a text_field of type "week". + # + # week_field("user", "born_on") + # # => + # + # The default value is generated by trying to call +strftime+ with "%Y-W%W" + # on the object's value, which makes it behave as expected for instances + # of DateTime and ActiveSupport::TimeWithZone. + # + # @user.born_on = Date.new(1984, 5, 12) + # week_field("user", "born_on") + # # => + # + # source://actionview//lib/action_view/helpers/form_helper.rb#1550 + def week_field(object_name, method, options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/form_helper.rb#465 + def apply_form_for_options!(object, options); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#1624 + def default_form_builder_class; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#1595 + def html_options_for_form_with(url_for_options = T.unsafe(nil), model = T.unsafe(nil), html: T.unsafe(nil), local: T.unsafe(nil), skip_enforcing_utf8: T.unsafe(nil), **options); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#1610 + def instantiate_builder(record_name, record_object, options); end + + class << self + # source://actionview//lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#481 + def form_with_generates_ids=(val); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#479 + def form_with_generates_remote_forms=(val); end + + # source://actionview//lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden; end + + # source://actionview//lib/action_view/helpers/form_helper.rb#483 + def multiple_file_field_include_hidden=(val); end + end +end + +# = Action View Form Option \Helpers +# +# Provides a number of methods for turning different kinds of containers into a set of option tags. +# +# The #collection_select, #select and #time_zone_select methods take an options parameter, a hash: +# +# * :include_blank - set to true or a prompt string if the first option element of the select element is a blank. Useful if there is not a default value required for the select element. +# +# select(:post, :category, Post::CATEGORIES, { include_blank: true }) +# +# could become: +# +# +# +# Another common case is a select tag for a belongs_to-associated object. +# +# Example with @post.person_id => 2: +# +# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: "None" }) +# +# could become: +# +# +# +# * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string. +# +# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { prompt: "Select Person" }) +# +# could become: +# +# +# +# * :index - like the other form helpers, #select can accept an :index option to manually set the ID used in the resulting output. Unlike other helpers, #select expects this +# option to be in the +html_options+ parameter. +# +# select("album[]", :genre, %w[ rap rock country ], {}, { index: nil }) +# +# becomes: +# +# +# +# * :disabled - can be a single value or an array of values that will be disabled options in the final output. +# +# select(:post, :category, Post::CATEGORIES, { disabled: "restricted" }) +# +# could become: +# +# +# +# When used with the #collection_select helper, :disabled can also be a Proc that identifies those options that should be disabled. +# +# collection_select(:post, :category_id, Category.all, :id, :name, { disabled: -> (category) { category.archived? } }) +# +# If the categories "2008 stuff" and "Christmas" return true when the method archived? is called, this would return: +# +# +# source://actionview//lib/action_view/helpers/form_options_helper.rb#93 +module ActionView::Helpers::FormOptionsHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::TextHelper + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # Returns check box tags for the collection of existing return values of + # +method+ for +object+'s class. The value returned from calling +method+ + # on the instance +object+ will be selected. If calling +method+ returns + # +nil+, no selection is made. + # + # The :value_method and :text_method parameters are + # methods to be called on each member of +collection+. The return values + # are used as the +value+ attribute and contents of each check box tag, + # respectively. They can also be any object that responds to +call+, such + # as a +proc+, that will be called for each member of the +collection+ to + # retrieve the value/text. + # + # Example object structure for use with this method: + # class Post < ActiveRecord::Base + # has_and_belongs_to_many :authors + # end + # class Author < ActiveRecord::Base + # has_and_belongs_to_many :posts + # def name_with_initial + # "#{first_name.first}. #{last_name}" + # end + # end + # + # Sample usage (selecting the associated Author for an instance of Post, @post): + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) + # + # If @post.author_ids is already [1], this would return: + # + # + # + # + # + # + # + # + # It is also possible to customize the way the elements will be shown by + # giving a block to the method: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label { b.checkbox } + # end + # + # The argument passed to the block is a special kind of builder for this + # collection, which has the ability to generate the label and check box + # for the current item in the collection, with proper text and value. + # Using it, you can change the label and check box display order or even + # use the label as wrapper, as in the example above. + # + # The builder methods label and checkbox also accept + # extra HTML options: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } + # end + # + # There are also three special methods available: object, text and + # value, which are the current item being rendered, its text and value methods, + # respectively. You can use them like this: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(:"data-value" => b.value) { b.checkbox + b.text } + # end + # + # ==== Gotcha + # + # When no selection is made for a collection of checkboxes most + # web browsers will not send any value. + # + # For example, if we have a +User+ model with +category_ids+ field and we + # have the following code in our update action: + # + # @user.update(params[:user]) + # + # If no +category_ids+ are selected then we can safely assume this field + # will not be updated. + # + # This is possible thanks to a hidden field generated by the helper method + # for every collection of checkboxes. + # This hidden field is given the same field name as the checkboxes with a + # blank value. + # + # In the rare case you don't want this hidden field, you can pass the + # include_hidden: false option to the helper method. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#787 + def collection_check_boxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns check box tags for the collection of existing return values of + # +method+ for +object+'s class. The value returned from calling +method+ + # on the instance +object+ will be selected. If calling +method+ returns + # +nil+, no selection is made. + # + # The :value_method and :text_method parameters are + # methods to be called on each member of +collection+. The return values + # are used as the +value+ attribute and contents of each check box tag, + # respectively. They can also be any object that responds to +call+, such + # as a +proc+, that will be called for each member of the +collection+ to + # retrieve the value/text. + # + # Example object structure for use with this method: + # class Post < ActiveRecord::Base + # has_and_belongs_to_many :authors + # end + # class Author < ActiveRecord::Base + # has_and_belongs_to_many :posts + # def name_with_initial + # "#{first_name.first}. #{last_name}" + # end + # end + # + # Sample usage (selecting the associated Author for an instance of Post, @post): + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) + # + # If @post.author_ids is already [1], this would return: + # + # + # + # + # + # + # + # + # It is also possible to customize the way the elements will be shown by + # giving a block to the method: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label { b.checkbox } + # end + # + # The argument passed to the block is a special kind of builder for this + # collection, which has the ability to generate the label and check box + # for the current item in the collection, with proper text and value. + # Using it, you can change the label and check box display order or even + # use the label as wrapper, as in the example above. + # + # The builder methods label and checkbox also accept + # extra HTML options: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(class: "checkbox") { b.checkbox(class: "checkbox") } + # end + # + # There are also three special methods available: object, text and + # value, which are the current item being rendered, its text and value methods, + # respectively. You can use them like this: + # collection_checkboxes(:post, :author_ids, Author.all, :id, :name_with_initial) do |b| + # b.label(:"data-value" => b.value) { b.checkbox + b.text } + # end + # + # ==== Gotcha + # + # When no selection is made for a collection of checkboxes most + # web browsers will not send any value. + # + # For example, if we have a +User+ model with +category_ids+ field and we + # have the following code in our update action: + # + # @user.update(params[:user]) + # + # If no +category_ids+ are selected then we can safely assume this field + # will not be updated. + # + # This is possible thanks to a hidden field generated by the helper method + # for every collection of checkboxes. + # This hidden field is given the same field name as the checkboxes with a + # blank value. + # + # In the rare case you don't want this hidden field, you can pass the + # include_hidden: false option to the helper method. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#784 + def collection_checkboxes(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns radio button tags for the collection of existing return values + # of +method+ for +object+'s class. The value returned from calling + # +method+ on the instance +object+ will be selected. If calling +method+ + # returns +nil+, no selection is made. + # + # The :value_method and :text_method parameters are + # methods to be called on each member of +collection+. The return values + # are used as the +value+ attribute and contents of each radio button tag, + # respectively. They can also be any object that responds to +call+, such + # as a +proc+, that will be called for each member of the +collection+ to + # retrieve the value/text. + # + # Example object structure for use with this method: + # + # class Post < ActiveRecord::Base + # belongs_to :author + # end + # + # class Author < ActiveRecord::Base + # has_many :posts + # + # def name_with_initial + # "#{first_name.first}. #{last_name}" + # end + # end + # + # Sample usage (selecting the associated Author for an instance of Post, @post): + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) + # + # If @post.author_id is already 1, this would return: + # + # + # + # + # + # + # + # It is also possible to customize the way the elements will be shown by + # giving a block to the method: + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| + # b.label { b.radio_button } + # end + # + # The argument passed to the block is a special kind of builder for this + # collection, which has the ability to generate the label and radio button + # for the current item in the collection, with proper text and value. + # Using it, you can change the label and radio button display order or + # even use the label as wrapper, as in the example above. + # + # The builder methods label and radio_button also accept + # extra HTML options: + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| + # b.label(class: "radio_button") { b.radio_button(class: "radio_button") } + # end + # + # There are also three special methods available: object, text and + # value, which are the current item being rendered, its text and value methods, + # respectively. You can use them like this: + # collection_radio_buttons(:post, :author_id, Author.all, :id, :name_with_initial) do |b| + # b.label(:"data-value" => b.value) { b.radio_button + b.text } + # end + # + # ==== Gotcha + # + # The HTML specification says when nothing is selected on a collection of radio buttons + # web browsers do not send any value to server. + # Unfortunately this introduces a gotcha: + # if a +User+ model has a +category_id+ field and in the form no category is selected, no +category_id+ parameter is sent. So, + # any strong parameters idiom like: + # + # params.expect(user: [...]) + # + # will raise an error since no {user: ...} will be present. + # + # To prevent this the helper generates an auxiliary hidden field before + # every collection of radio buttons. The hidden field has the same name as collection radio button and blank value. + # + # In case if you don't want the helper to generate this hidden field you can specify + # include_hidden: false option. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#700 + def collection_radio_buttons(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns + # + # + # + # + # + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#198 + def collection_select(object, method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # Returns + # + # + # + # + # + # + # + # + # + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#257 + def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # Returns a string of tags, like #options_for_select, but + # wraps them with tags: + # + # grouped_options = [ + # ['North America', + # [['United States','US'],'Canada']], + # ['Europe', + # ['Denmark','Germany','France']] + # ] + # grouped_options_for_select(grouped_options) + # + # grouped_options = { + # 'North America' => [['United States','US'], 'Canada'], + # 'Europe' => ['Denmark','Germany','France'] + # } + # grouped_options_for_select(grouped_options) + # + # Possible output: + # + # + # + # + # + # + # + # + # + # + # ==== Parameters + # + # * +grouped_options+ - Accepts a nested array or hash of strings. The first value serves as the + # label while the second value must be an array of options. The second value can be a + # nested array of text-value pairs. See options_for_select for more info. + # Ex. ["North America",[["United States","US"],["Canada","CA"]]] + # An optional third value can be provided as HTML attributes for the optgroup. + # Ex. ["North America",[["United States","US"],["Canada","CA"]], { disabled: "disabled" }] + # * +selected_key+ - A value equal to the +value+ attribute for one of the tags, + # which will have the +selected+ attribute set. Note: It is possible for this value to match multiple options + # as you might have the same option in multiple groups. Each will then get selected="selected". + # + # ==== Options + # + # * :prompt - set to true or a prompt string. When the select element doesn't have a value yet, this + # prepends an option with a generic prompt - "Please select" - or the given prompt string. + # * :divider - the divider for the options groups. + # + # grouped_options = [ + # [['United States','US'], 'Canada'], + # ['Denmark','Germany','France'] + # ] + # grouped_options_for_select(grouped_options, nil, divider: '---------') + # + # Possible output: + # + # + # + # + # + # + # + # + # + # + # Note: Only the and tags are returned, so you still have to + # wrap the output in an appropriate tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#461 + def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = T.unsafe(nil)); end + + # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container + # where the elements respond to first and last (such as a two-element array), the "lasts" serve as option values and + # the "firsts" as option text. Hashes are turned into this form automatically, so the keys become "firsts" and values + # become lasts. If +selected+ is specified, the matching "last" or element will get the selected option-tag. +selected+ + # may also be an array of values to be selected when using a multiple select. + # + # options_for_select([["Dollar", "$"], ["Kroner", "DKK"]]) + # # => + # # => + # + # options_for_select([ "VISA", "MasterCard" ], "MasterCard") + # # => + # # => + # + # options_for_select({ "Basic" => "$20", "Plus" => "$40" }, "$40") + # # => + # # => + # + # options_for_select([ "VISA", "MasterCard", "Discover" ], ["VISA", "Discover"]) + # # => + # # => + # # => + # + # You can optionally provide HTML attributes as the last element of the array. + # + # options_for_select([ "Denmark", ["USA", { class: 'bold' }], "Sweden" ], ["USA", "Sweden"]) + # # => + # # => + # # => + # + # options_for_select([["Dollar", "$", { class: "bold" }], ["Kroner", "DKK", { onclick: "alert('HI');" }]]) + # # => + # # => + # + # If you wish to specify disabled option tags, set +selected+ to be a hash, with :disabled being either a value + # or array of values to be disabled. In this case, you can use :selected to specify selected option tags. + # + # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], disabled: "Super Platinum") + # # => + # # => + # # => + # # => + # + # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], disabled: ["Advanced", "Super Platinum"]) + # # => + # # => + # # => + # # => + # + # options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], selected: "Free", disabled: "Super Platinum") + # # => + # # => + # # => + # # => + # + # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#357 + def options_for_select(container, selected = T.unsafe(nil)); end + + # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning + # the result of a call to the +value_method+ as the option value and the +text_method+ as the option text. + # + # options_from_collection_for_select(@people, 'id', 'name') + # # => + # + # This is more often than not used inside a #select_tag like this example: + # + # select_tag 'person', options_from_collection_for_select(@people, 'id', 'name') + # + # If +selected+ is specified as a value or array of values, the element(s) returning a match on +value_method+ + # will be selected option tag(s). + # + # If +selected+ is specified as a Proc, those members of the collection that return true for the anonymous + # function are the selected values. + # + # +selected+ can also be a hash, specifying both :selected and/or :disabled values as required. + # + # Be sure to specify the same class as the +value_method+ when specifying selected or disabled options. + # Failure to do this will produce undesired results. Example: + # options_from_collection_for_select(@people, 'id', 'name', '1') + # Will not select a person with the id of 1 because 1 (an Integer) is not the same as '1' (a string) + # options_from_collection_for_select(@people, 'id', 'name', 1) + # should produce the desired results. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#400 + def options_from_collection_for_select(collection, value_method, text_method, selected = T.unsafe(nil)); end + + # Create a select tag and a series of contained option tags for the provided object and method. + # The option currently held by the object will be selected, provided that the object is available. + # + # There are two possible formats for the +choices+ parameter, corresponding to other helpers' output: + # + # * A flat collection (see options_for_select). + # * A nested collection (see grouped_options_for_select). + # + # Example with @post.person_id => 2: + # + # select :post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: true } + # + # would become: + # + # + # + # This can be used to provide a default set of options in the standard way: before rendering the create form, a + # new model instance is assigned the default options and bound to @model_name. Usually this model is not saved + # to the database. Instead, a second model object is created when the create request is received. + # This allows the user to submit a form page more than once with the expected results of creating multiple records. + # In addition, this allows a single partial to be used to generate form inputs for both edit and create forms. + # + # By default, post.person_id is the selected option. Specify selected: value to use a different selection + # or selected: nil to leave all options unselected. Similarly, you can specify values to be disabled in the option + # tags by specifying the :disabled option. This can either be a single value or an array of values to be disabled. + # + # A block can be passed to #select to customize how the options tags will be rendered. This + # is useful when the options tag has complex attributes. + # + # select(report, :campaign_ids) do + # available_campaigns.each do |c| + # tag.option(c.name, value: c.id, data: { tags: c.tags.to_json }) + # end + # end + # + # ==== Gotcha + # + # The HTML specification says when +multiple+ parameter passed to select and all options got deselected + # web browsers do not send any value to server. Unfortunately this introduces a gotcha: + # if a +User+ model has many +roles+ and have +role_ids+ accessor, and in the form that edits roles of the user + # the user deselects all roles from +role_ids+ multiple select box, no +role_ids+ parameter is sent. So, + # any mass-assignment idiom like + # + # @user.update(params[:user]) + # + # wouldn't update roles. + # + # To prevent this the helper generates an auxiliary hidden field before + # every multiple select. The hidden field has the same name as multiple select and blank value. + # + # Note: The client either sends only the hidden field (representing + # the deselected multiple select box), or both fields. This means that the resulting array + # always contains a blank string. + # + # In case if you don't want the helper to generate this hidden field you can specify + # include_hidden: false option. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#158 + def select(object, method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Returns a string of option tags for pretty much any time zone in the + # world. Supply an ActiveSupport::TimeZone name as +selected+ to have it + # marked as the selected option tag. You can also supply an array of + # ActiveSupport::TimeZone objects as +priority_zones+, so that they will + # be listed above the rest of the (long) list. (You can use + # ActiveSupport::TimeZone.us_zones as a convenience for obtaining a list + # of the US time zones, or a Regexp to select the zones of your choice) + # + # The +selected+ parameter must be either +nil+, or a string that names + # an ActiveSupport::TimeZone. + # + # By default, +model+ is the ActiveSupport::TimeZone constant (which can + # be obtained in Active Record as a value object). The +model+ parameter + # must respond to +all+ and return an array of objects that represent time + # zones; each object must respond to +name+. If a Regexp is given it will + # attempt to match the zones using match? method. + # + # NOTE: Only the option tags are returned, you have to wrap this call in + # a regular HTML select tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#580 + def time_zone_options_for_select(selected = T.unsafe(nil), priority_zones = T.unsafe(nil), model = T.unsafe(nil)); end + + # Returns select and option tags for the given object and method, using + # #time_zone_options_for_select to generate the list of option tags. + # + # In addition to the :include_blank option documented above, + # this method also supports a :model option, which defaults + # to ActiveSupport::TimeZone. This may be used by users to specify a + # different time zone model object. (See #time_zone_options_for_select + # for more information.) + # + # You can also supply an array of ActiveSupport::TimeZone objects + # as +priority_zones+ so that they will be listed above the rest of the + # (long) list. You can use ActiveSupport::TimeZone.us_zones for a list + # of US time zones, ActiveSupport::TimeZone.country_zones(country_code) + # for another country's time zones, or a Regexp to select the zones of + # your choice. + # + # Finally, this method supports a :default option, which selects + # a default ActiveSupport::TimeZone if the object's time zone is +nil+. + # + # time_zone_select(:user, :time_zone, nil, include_blank: true) + # + # time_zone_select(:user, :time_zone, nil, default: "Pacific Time (US & Canada)") + # + # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.us_zones, default: "Pacific Time (US & Canada)") + # + # time_zone_select(:user, :time_zone, [ ActiveSupport::TimeZone["Alaska"], ActiveSupport::TimeZone["Hawaii"] ]) + # + # time_zone_select(:user, :time_zone, /Australia/) + # + # time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone) + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#291 + def time_zone_select(object, method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end + + # Returns a string of option tags for the days of the week. + # + # ====Options + # + # * :index_as_value - Defaults to false, set to true to use the indexes from + # I18n.translate("date.day_names") as the values. By default, Sunday is always 0. + # * :day_format - The I18n key of the array to use for the weekday options. + # Defaults to +:day_names+, set to +:abbr_day_names+ for abbreviations. + # * :beginning_of_week - Defaults to Date.beginning_of_week. + # + # NOTE: Only the option tags are returned, you have to wrap this call in + # a regular HTML select tag. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#613 + def weekday_options_for_select(selected = T.unsafe(nil), index_as_value: T.unsafe(nil), day_format: T.unsafe(nil), beginning_of_week: T.unsafe(nil)); end + + # Returns select and option tags for the given object and method, using + # #weekday_options_for_select to generate the list of option tags. + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#297 + def weekday_select(object, method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + private + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#812 + def extract_selected_and_disabled(selected); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#823 + def extract_values_from_collection(collection, value_method, selected); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#790 + def option_html_attributes(element); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#798 + def option_text_and_value(option); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/form_options_helper.rb#808 + def option_value_selected?(value, selected); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#837 + def prompt_text(prompt); end + + # source://actionview//lib/action_view/helpers/form_options_helper.rb#833 + def value_for_collection(item, value); end +end + +# = Action View Form Tag \Helpers +# +# Provides a number of methods for creating form tags that don't rely on an Active Record object assigned to the template like +# FormHelper does. Instead, you provide the names and values manually. +# +# NOTE: The HTML options disabled, readonly, and multiple can all be treated as booleans. So specifying +# disabled: true will give disabled="disabled". +# +# source://actionview//lib/action_view/helpers/form_tag_helper.rb#18 +module ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + extend ::ActiveSupport::Concern + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # Creates a button element that defines a submit button, + # reset button or a generic button which can be used in + # JavaScript, for example. You can use the button tag as a regular + # submit tag but it isn't supported in legacy browsers. However, + # the button tag does allow for richer labels such as images and emphasis, + # so this helper will also accept a block. By default, it will create + # a button tag with type submit, if type is not given. + # + # ==== Options + # * :data - This option can be used to add custom data attributes. + # * :disabled - If true, the user will not be able to + # use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # button_tag + # # => + # + # button_tag 'Reset', type: 'reset' + # # => + # + # button_tag 'Button', type: 'button' + # # => + # + # button_tag 'Reset', type: 'reset', disabled: true + # # => + # + # button_tag(type: 'button') do + # content_tag(:strong, 'Ask me!') + # end + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#571 + def button_tag(content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # :call-seq: + # checkbox_tag(name, options = {}) + # checkbox_tag(name, value, options = {}) + # checkbox_tag(name, value, checked, options = {}) + # + # Creates a check box form input tag. + # + # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # checkbox_tag 'accept' + # # => + # + # checkbox_tag 'rock', 'rock music' + # # => + # + # checkbox_tag 'receive_email', 'yes', true + # # => + # + # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' + # # => + # + # checkbox_tag 'eula', 'accepted', false, disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#469 + def check_box_tag(name, *args); end + + # :call-seq: + # checkbox_tag(name, options = {}) + # checkbox_tag(name, value, options = {}) + # checkbox_tag(name, value, checked, options = {}) + # + # Creates a check box form input tag. + # + # ==== Options + # * :value - The value of the input. Defaults to "1". + # * :checked - If set to true, the checkbox will be checked by default. + # * :disabled - If set to true, the user will not be able to use this input. + # * Any other key creates standard HTML options for the tag. + # + # ==== Examples + # checkbox_tag 'accept' + # # => + # + # checkbox_tag 'rock', 'rock music' + # # => + # + # checkbox_tag 'receive_email', 'yes', true + # # => + # + # checkbox_tag 'tos', 'yes', false, class: 'accept_tos' + # # => + # + # checkbox_tag 'eula', 'accepted', false, disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#459 + def checkbox_tag(name, *args); end + + # Creates a text field of type "color". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # color_field_tag 'name' + # # => + # + # color_field_tag 'color', '#DEF726' + # # => + # + # color_field_tag 'color', nil, class: 'special_input' + # # => + # + # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#671 + def color_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "date". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # date_field_tag 'name' + # # => + # + # date_field_tag 'date', '2014-12-31' + # # => + # + # date_field_tag 'date', nil, class: 'special_input' + # # => + # + # date_field_tag 'date', '2014-12-31', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#741 + def date_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "datetime-local". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). + # + # ==== Examples + # + # datetime_field_tag 'name' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => + # + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#800 + def datetime_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # Creates a text field of type "datetime-local". + # + # ==== Options + # + # Supports the same options as #text_field_tag. Additionally, supports: + # + # * :min - The minimum acceptable value. + # * :max - The maximum acceptable value. + # * :step - The acceptable value granularity. + # * :include_seconds - Include seconds in the output timestamp format (true by default). + # + # ==== Examples + # + # datetime_field_tag 'name' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01' + # # => + # + # datetime_field_tag 'datetime', nil, class: 'special_input' + # # => + # + # datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#804 + def datetime_local_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#28 + def default_enforce_utf8; end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#28 + def default_enforce_utf8=(val); end + + # Creates a text field of type "email". + # + # ==== Options + # + # Supports the same options as #text_field_tag. + # + # ==== Examples + # + # email_field_tag 'name' + # # => + # + # email_field_tag 'email', 'email@example.com' + # # => + # + # email_field_tag 'email', nil, class: 'special_input' + # # => + # + # email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true + # # => + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#902 + def email_field_tag(name, value = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#25 + def embed_authenticity_token_in_remote_forms; end + + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#25 + def embed_authenticity_token_in_remote_forms=(val); end + + # Generate an HTML id attribute value for the given name and + # field combination + # + # Return the value generated by the FormBuilder for the given + # attribute name. + # + # <%= label_tag :post, :title %> + # <%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %> + # <%= tag.span("is blank", id: field_id(:post, :title, :error) %> + # + # In the example above, the element built by + # the call to text_field declares an + # aria-describedby attribute referencing the + # element, sharing a common id root (post_title, in this + # case). + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#101 + def field_id(object_name, method_name, *suffixes, index: T.unsafe(nil), namespace: T.unsafe(nil)); end + + # Generate an HTML name attribute value for the given name and + # field combination + # + # Return the value generated by the FormBuilder for the given + # attribute name. + # + # <%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %> + # <%# => %> + # + # <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %> + # <%# => %> + # + # source://actionview//lib/action_view/helpers/form_tag_helper.rb#131 + def field_name(object_name, method_name, *method_names, multiple: T.unsafe(nil), index: T.unsafe(nil)); end + + # Creates a field set for grouping HTML form elements. + # + # legend will become the fieldset's title (optional as per W3C). + # options accept the same values as tag. + # + # ==== Examples + # <%= field_set_tag do %> + #

    <%= text_field_tag 'name' %>

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

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

    <%= text_field_tag 'name' %>

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

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

    <%= text_field_tag 'name' %>

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

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

    <%= text_field_tag 'name' %>

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

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

    <%= text_field_tag 'name' %>

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

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

    <%= text_field_tag 'name' %>

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

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

    bar

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

    foo

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

    foo


    bar

    " + # + # source://actionview//lib/action_view/helpers/output_safety_helper.rb#33 + def safe_join(array, sep = T.unsafe(nil)); end + + # Converts the array to a comma-separated sentence where the last element is + # joined by the connector word. This is the html_safe-aware version of + # ActiveSupport's Array#to_sentence. + # + # source://actionview//lib/action_view/helpers/output_safety_helper.rb#42 + def to_sentence(array, options = T.unsafe(nil)); end +end + +# # Action View Rendering Helpers +# +# Implements methods that allow rendering from a view context. In order to use +# this module, all you need is to implement view_renderer that returns an +# ActionView::Renderer object. +# +# source://actionview//lib/action_view/helpers/rendering_helper.rb#12 +module ActionView::Helpers::RenderingHelper + # Overrides _layout_for in the context object so it supports the case a block is + # passed to a partial. Returns the contents that are yielded to a layout, given + # a name or a block. + # + # You can think of a layout as a method that is called with a block. If the user + # calls `yield :some_name`, the block, by default, returns + # `content_for(:some_name)`. If the user calls simply `yield`, the default block + # returns `content_for(:layout)`. + # + # The user can override this default by passing a block to the layout: + # + # # The template + # <%= render layout: "my_layout" do %> + # Content + # <% end %> + # + # # The layout + # + # <%= yield %> + # + # + # In this case, instead of the default block, which would return `content_for(:layout)`, + # this method returns the block that was passed in to `render :layout`, and the response + # would be + # + # + # Content + # + # + # Finally, the block can take block arguments, which can be passed in by + # `yield`: + # + # # The template + # <%= render layout: "my_layout" do |customer| %> + # Hello <%= customer.name %> + # <% end %> + # + # # The layout + # + # <%= yield Struct.new(:name).new("David") %> + # + # + # In this case, the layout would receive the block passed into `render :layout`, + # and the struct specified would be passed into the block as an argument. The result + # would be + # + # + # Hello David + # + # + # source://actionview//lib/action_view/helpers/rendering_helper.rb#207 + def _layout_for(*args, &block); end + + # Renders a template and returns the result. + # + # Pass the template to render as the first argument. This is shorthand + # syntax for partial rendering, so the template filename should be + # prefixed with an underscore. The partial renderer looks for the partial + # template in the directory of the calling template first. + # + # <% # app/views/posts/new.html.erb %> + # <%= render "form" %> + # # => renders app/views/posts/_form.html.erb + # + # Use the complete view path to render a partial from another directory. + # + # <% # app/views/posts/show.html.erb %> + # <%= render "comments/form" %> + # # => renders app/views/comments/_form.html.erb + # + # Without the rendering mode, the second argument can be a Hash of local + # variable assignments for the template. + # + # <% # app/views/posts/new.html.erb %> + # <%= render "form", post: Post.new %> + # # => renders app/views/posts/_form.html.erb + # + # If the first argument responds to `render_in`, the template will be rendered + # by calling `render_in` with the current view context. + # + # class Greeting + # def render_in(view_context) + # view_context.render html: "

    Hello, World

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

    Hello, World

    " + # + # #### Rendering Mode + # + # Pass the rendering mode as first argument to override it. + # + # `:partial` + # + # <%= render partial: "form", locals: { post: Post.new } %> + # # => renders app/views/posts/_form.html.erb + # + # `:file` + # unsanitized user input. + # + # <%= render file: "/path/to/some/file" %> + # # => renders /path/to/some/file + # + # `:inline` + # + # <% name = "World" %> + # <%= render inline: "

    Hello, <%= name %>!

    " %> + # # => renders "

    Hello, World!

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

    Hello, World!

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

    Hello, World!

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

    Hello, World!

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

    Hello, World

    " + # + # + # #### Options + # + # `:locals` + # + # <%= render inline: "

    Hello, <%= name %>!

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

    Hello, World!

    " + # + # `:formats` + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", formats: [:text] %> + # # => renders app/views/posts/content.text.erb + # + # `:variants` + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", variants: [:tablet] %> + # # => renders app/views/posts/content.html+tablet.erb + # + # `:handlers` + # + # <% # app/views/posts/show.html.erb %> + # <%= render template: "posts/content", handlers: [:builder] %> + # # => renders app/views/posts/content.html.builder + # + # source://actionview//lib/action_view/helpers/rendering_helper.rb#138 + def render(options = T.unsafe(nil), locals = T.unsafe(nil), &block); end +end + +# = Action View Sanitize \Helpers +# +# The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. +# These helper methods extend Action View making them callable within your template files. +# +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#11 +module ActionView::Helpers::SanitizeHelper + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # Sanitizes HTML input, stripping all but known-safe tags and attributes. + # + # It also strips +href+ / +src+ attributes with unsafe protocols like +javascript:+, while + # also protecting against attempts to use Unicode, ASCII, and hex character references to work + # around these protocol filters. + # + # The default sanitizer is +Rails::HTML5::SafeListSanitizer+. See {Rails HTML + # Sanitizers}[https://github.com/rails/rails-html-sanitizer] for more information. + # + # Custom sanitization rules can also be provided. + # + # Warning: Adding disallowed tags or attributes to the allowlists may introduce + # vulnerabilities into your application. Please rely on the default allowlists whenever + # possible, because they are curated to maintain security and safety. If you think that the + # default allowlists should be expanded, please {open an issue on the rails-html-sanitizer + # project}[https://github.com/rails/rails-html-sanitizer/issues]. + # + # Please note that sanitizing user-provided text does not guarantee that the + # resulting markup is valid or even well-formed. + # + # ==== Options + # + # [+:tags+] + # An array of allowed tags. + # + # [+:attributes+] + # An array of allowed attributes. + # + # [+:scrubber+] + # A {Rails::HTML scrubber}[https://github.com/rails/rails-html-sanitizer] + # or {Loofah::Scrubber}[https://github.com/flavorjones/loofah] object that + # defines custom sanitization rules. A custom scrubber takes precedence over + # custom tags and attributes. + # + # ==== Examples + # + # ===== Normal use + # + # <%= sanitize @comment.body %> + # + # ===== Providing custom lists of permitted tags and attributes + # + # <%= sanitize @comment.body, tags: %w(strong em a), attributes: %w(href) %> + # + # ===== Providing a custom +Rails::HTML+ scrubber + # + # class CommentScrubber < Rails::HTML::PermitScrubber + # def initialize + # super + # self.tags = %w( form script comment blockquote ) + # self.attributes = %w( style ) + # end + # + # def skip_node?(node) + # node.text? + # end + # end + # + # + # + # <%= sanitize @comment.body, scrubber: CommentScrubber.new %> + # + # See {Rails HTML Sanitizer}[https://github.com/rails/rails-html-sanitizer] for + # documentation about +Rails::HTML+ scrubbers. + # + # ===== Providing a custom +Loofah::Scrubber+ + # + # scrubber = Loofah::Scrubber.new do |node| + # node.remove if node.name == 'script' + # end + # + # + # + # <%= sanitize @comment.body, scrubber: scrubber %> + # + # See {Loofah's documentation}[https://github.com/flavorjones/loofah] for more + # information about defining custom +Loofah::Scrubber+ objects. + # + # ==== Global Configuration + # + # To set the default allowed tags or attributes across your application: + # + # # In config/application.rb + # config.action_view.sanitized_allowed_tags = ['strong', 'em', 'a'] + # config.action_view.sanitized_allowed_attributes = ['href', 'title'] + # + # The default, starting in \Rails 7.1, is to use an HTML5 parser for sanitization (if it is + # available, see NOTE below). If you wish to revert back to the previous HTML4 behavior, you + # can do so by setting the following in your application configuration: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer + # + # Or, if you're upgrading from a previous version of \Rails and wish to opt into the HTML5 + # behavior: + # + # # In config/application.rb + # config.action_view.sanitizer_vendor = Rails::HTML5::Sanitizer + # + # NOTE: +Rails::HTML5::Sanitizer+ is not supported on JRuby, so on JRuby platforms \Rails will + # fall back to using +Rails::HTML4::Sanitizer+. + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#117 + 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#122 + def sanitize_css(style); end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + + # Strips all link tags from +html+ leaving just the link text. + # + # strip_links('Ruby on Rails') + # # => Ruby on Rails + # + # strip_links('Please e-mail me at me@email.com.') + # # => Please e-mail me at me@email.com. + # + # strip_links('Blog: Visit.') + # # => Blog: Visit. + # + # strip_links('<malformed & link') + # # => <malformed & link + # + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#156 + 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#139 + def strip_tags(html); end + + class << self + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#12 + def sanitizer_vendor=(val); end + end +end + +# source://actionview//lib/action_view/helpers/sanitize_helper.rb#160 +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#181 + 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#161 + 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#191 + 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#161 + 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#201 + 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#161 + def safe_list_sanitizer=(_arg0); end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#171 + def sanitized_allowed_attributes; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#167 + def sanitized_allowed_tags; end + + # source://actionview//lib/action_view/helpers/sanitize_helper.rb#163 + def sanitizer_vendor; end +end + +# = Action View Tag \Helpers +# +# Provides methods to generate HTML tags programmatically both as a modern +# HTML5 compliant builder style and legacy XHTML compliant tags. +# +# source://actionview//lib/action_view/helpers/tag_helper.rb#16 +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#555 + 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#540 + 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#513 + 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#567 + def escape_once(html); end + + # Returns an HTML tag. + # + # === Building HTML tags + # + # Builds HTML5 compliant tags with a tag proxy. Every tag can be built with: + # + # tag.(optional content, options) + # + # where tag name can be e.g. br, div, section, article, or any tag really. + # + # ==== Passing content + # + # Tags can pass content to embed within it: + # + # tag.h1 'All titles fit to print' # =>

    All titles fit to print

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

    Hello world!

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

    The next great American novel starts here.

    + # + # ==== Options + # + # Use symbol keyed options to add attributes to the generated tag. + # + # tag.section class: %w( kitties puppies ) + # # =>
    + # + # tag.section id: dom_id(@post) + # # =>
    + # + # Pass +true+ for any attributes that can render with no values, like +disabled+ and +readonly+. + # + # tag.input type: 'text', disabled: true + # # => + # + # HTML5 data-* and aria-* attributes can be set with a + # single +data+ or +aria+ key pointing to a hash of sub-attributes. + # + # To play nicely with JavaScript conventions, sub-attributes are dasherized. + # + # tag.article data: { user_id: 123 } + # # =>
    + # + # Thus data-user-id can be accessed as dataset.userId. + # + # Data attribute values are encoded to JSON, with the exception of strings, symbols, and + # BigDecimals. + # This may come in handy when using jQuery's HTML5-aware .data() + # from 1.4.3. + # + # tag.div data: { city_state: %w( Chicago IL ) } + # # =>
    + # + # The generated tag names and attributes are escaped by default. This can be disabled using + # +escape+. + # + # tag.img src: 'open & shut.png' + # # => + # + # tag.img src: 'open & shut.png', escape: false + # # => + # + # The tag builder respects + # {HTML5 void elements}[https://www.w3.org/TR/html5/syntax.html#void-elements] + # if no content is passed, and omits closing tags for those elements. + # + # # A standard element: + # tag.div # =>
    + # + # # A void element: + # tag.br # =>
    + # + # Note that when using the block form options should be wrapped in + # parenthesis. + # + # <%= tag.a(href: "/about", class: "font-bold") do %> + # About the author + # <% end %> + # # => About the author + # + # === Building HTML attributes + # + # Transforms a Hash into HTML attributes, ready to be interpolated into + # ERB. Includes or omits boolean attributes based on their truthiness. + # Transforms keys nested within + # aria: or data: objects into aria- and data- + # prefixed attributes: + # + # > + # # => + # + # + # # => + # + # === Legacy syntax + # + # The following format is for legacy syntax support. It will be deprecated in future versions of \Rails. + # + # tag(name, options = nil, open = false, escape = true) + # + # It returns an empty HTML tag of type +name+ which by default is XHTML + # compliant. Set +open+ to true to create an open tag compatible + # with HTML 4.0 and below. Add HTML attributes by passing an attributes + # hash to +options+. Set +escape+ to false to disable attribute value + # escaping. + # + # ==== Options + # + # You can use symbols or strings for the attribute names. + # + # Use +true+ with boolean attributes that can render with no value, like + # +disabled+ and +readonly+. + # + # HTML5 data-* attributes can be set with a single +data+ key + # pointing to a hash of sub-attributes. + # + # ==== Examples + # + # tag("br") + # # =>
    + # + # tag("br", nil, true) + # # =>
    + # + # tag("input", type: 'text', disabled: true) + # # => + # + # tag("input", type: 'text', class: ["strong", "highlight"]) + # # => + # + # tag("img", src: "open & shut.png") + # # => + # + # tag("img", { src: "open & shut.png" }, false, false) + # # => + # + # tag("div", data: { name: 'Stephen', city_state: %w(Chicago IL) }) + # # =>
    + # + # tag("div", class: { highlight: current_user.admin? }) + # # =>
    + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#476 + 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#535 + def token_list(*args); end + + private + + # source://actionview//lib/action_view/helpers/tag_helper.rb#577 + def build_tag_values(*args); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#572 + def ensure_valid_html5_tag_name(name); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#597 + def tag_builder; end + + class << self + # source://actionview//lib/action_view/helpers/tag_helper.rb#595 + def build_tag_values(*args); end + + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#575 + def ensure_valid_html5_tag_name(name); end + end +end + +# source://actionview//lib/action_view/helpers/tag_helper.rb#33 +ActionView::Helpers::TagHelper::ARIA_PREFIXES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#20 +ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#34 +ActionView::Helpers::TagHelper::DATA_PREFIXES = T.let(T.unsafe(nil), Set) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#42 +ActionView::Helpers::TagHelper::PRE_CONTENT_STRINGS = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#36 +ActionView::Helpers::TagHelper::TAG_TYPES = T.let(T.unsafe(nil), Hash) + +# source://actionview//lib/action_view/helpers/tag_helper.rb#46 +class ActionView::Helpers::TagHelper::TagBuilder + # @return [TagBuilder] a new instance of TagBuilder + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#213 + def initialize(view_context); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def a(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def abbr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def address(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def animate(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def animate_motion(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def animate_transform(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def area(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def article(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def aside(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # Transforms a Hash into HTML Attributes, ready to be interpolated into + # ERB. + # + # > + # # => + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#222 + def attributes(attributes); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def audio(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def b(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def base(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def bdi(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def bdo(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def blockquote(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def body(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def br(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def button(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def canvas(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def caption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def circle(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def cite(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def code(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def col(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def colgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#226 + def content_tag_string(name, content, options, escape = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def data(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def datalist(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def dd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def del(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def details(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def dfn(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def dialog(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def div(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def dl(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def dt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def ellipse(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def em(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def embed(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def fieldset(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def figcaption(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def figure(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def footer(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def form(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def h1(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def h2(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def h3(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def h4(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def h5(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def h6(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def head(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def header(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def hgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def hr(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def html(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def i(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def iframe(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def img(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def input(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def ins(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def kbd(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def keygen(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def label(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def legend(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def li(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def line(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def link(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def main(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def map(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def mark(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def menu(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def meta(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def meter(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def nav(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def noscript(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def object(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def ol(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def optgroup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def option(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def output(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def p(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def path(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def picture(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def polygon(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def polyline(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def portal(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def pre(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def progress(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def q(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def rect(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def rp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def rt(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def ruby(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def s(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def samp(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def script(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def search(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def section(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def select(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def set(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def slot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def small(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def source(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def span(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def stop(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def strong(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def style(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def sub(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def summary(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def sup(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def table(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#235 + def tag_options(options, escape = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def tbody(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def td(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def template(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def textarea(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def tfoot(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def th(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def thead(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def time(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def title(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def tr(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def track(escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def u(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def ul(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def use(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def var(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def video(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def view(content = T.unsafe(nil), escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#80 + def wbr(escape: T.unsafe(nil), **options, &block); end + + private + + # source://actionview//lib/action_view/helpers/tag_helper.rb#288 + def boolean_tag_option(key); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#321 + def method_missing(called, *args, escape: T.unsafe(nil), **options, &block); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#309 + def prefix_tag_option(prefix, key, value, escape); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tag_helper.rb#317 + def respond_to_missing?(*args); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#284 + def self_closing_tag_string(name, options, escape = T.unsafe(nil), tag_suffix = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#292 + def tag_option(key, value, escape); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#278 + def tag_string(name, content = T.unsafe(nil), options, escape: T.unsafe(nil), &block); end + + class << self + # source://actionview//lib/action_view/helpers/tag_helper.rb#47 + def define_element(name, code_generator:, method_name: T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#67 + def define_self_closing_element(name, code_generator:, method_name: T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tag_helper.rb#58 + def define_void_element(name, code_generator:, method_name: T.unsafe(nil)); end + end +end + +# source://actionview//lib/action_view/helpers/tags.rb#5 +module ActionView::Helpers::Tags + extend ::ActiveSupport::Autoload +end + +# source://actionview//lib/action_view/helpers/tags/base.rb#6 +class ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + include ::ActionView::Helpers::ContentExfiltrationPreventionHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::ActiveModelInstanceTag + extend ::ActionView::Helpers::UrlHelper::ClassMethods + extend ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # @return [Base] a new instance of Base + # + # source://actionview//lib/action_view/helpers/tags/base.rb#11 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + + # Returns the value of attribute object. + # + # source://actionview//lib/action_view/helpers/tags/base.rb#9 + def object; end + + # This is what child classes implement. + # + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/helpers/tags/base.rb#31 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/base.rb#97 + def add_default_name_and_field(options, field = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#83 + def add_default_name_and_field_for_value(tag_value, options, field = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#108 + def add_default_name_and_id(options, field = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#95 + def add_default_name_and_id_for_value(tag_value, options, field = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/base.rb#134 + def generate_ids?; end + + # source://actionview//lib/action_view/helpers/tags/base.rb#126 + def name_and_id_index(options); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#74 + def retrieve_autoindex(pre_match); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#63 + def retrieve_object(object); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#118 + def sanitized_method_name; end + + # source://actionview//lib/action_view/helpers/tags/base.rb#122 + def sanitized_value(value); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#114 + def tag_id(index = T.unsafe(nil), namespace = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#110 + def tag_name(multiple = T.unsafe(nil), index = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/base.rb#36 + def value; end + + # source://actionview//lib/action_view/helpers/tags/base.rb#46 + def value_before_type_cast; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/base.rb#58 + def value_came_from_user?; end +end + +# source://actionview//lib/action_view/helpers/tags/check_box.rb#8 +class ActionView::Helpers::Tags::CheckBox < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::Checkable + + # @return [CheckBox] a new instance of CheckBox + # + # source://actionview//lib/action_view/helpers/tags/check_box.rb#11 + def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options); end + + # source://actionview//lib/action_view/helpers/tags/check_box.rb#17 + def render; end + + private + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/check_box.rb#42 + def checked?(value); end + + # source://actionview//lib/action_view/helpers/tags/check_box.rb#59 + def hidden_field_for_checkbox(options); end +end + +# source://actionview//lib/action_view/helpers/tags/checkable.rb#6 +module ActionView::Helpers::Tags::Checkable + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/checkable.rb#7 + def input_checked?(options); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#8 +class ActionView::Helpers::Tags::CollectionCheckBoxes < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::CollectionHelpers + include ::ActionView::Helpers::FormOptionsHelper + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#22 + def render(&block); end + + private + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#31 + def hidden_field_name; end + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#27 + def render_component(builder); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#12 +class ActionView::Helpers::Tags::CollectionCheckBoxes::CheckBoxBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#19 + def check_box(extra_html_options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/collection_check_boxes.rb#13 + def checkbox(extra_html_options = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#6 +module ActionView::Helpers::Tags::CollectionHelpers + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#30 + def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end + + private + + # Generate default options for collection helpers, such as :checked and + # :disabled. + # + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#47 + def default_html_options_for_collection(item, value); end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#107 + def hidden_field; end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#113 + def hidden_field_name; end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#40 + def instantiate_builder(builder_class, item, value, text, html_options); end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#75 + def render_collection; end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#86 + def render_collection_for(builder_class, &block); end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#71 + def sanitize_attribute_name(value); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#7 +class ActionView::Helpers::Tags::CollectionHelpers::Builder + # @return [Builder] a new instance of Builder + # + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#10 + def initialize(template_object, object_name, method_name, object, sanitized_attribute_name, text, value, input_html_options); end + + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#22 + def label(label_html_options = T.unsafe(nil), &block); end + + # Returns the value of attribute object. + # + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 + def object; end + + # Returns the value of attribute text. + # + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 + def text; end + + # Returns the value of attribute value. + # + # source://actionview//lib/action_view/helpers/tags/collection_helpers.rb#8 + def value; end +end + +# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#8 +class ActionView::Helpers::Tags::CollectionRadioButtons < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::CollectionHelpers + include ::ActionView::Helpers::FormOptionsHelper + + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#20 + def render(&block); end + + private + + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#25 + def render_component(builder); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#12 +class ActionView::Helpers::Tags::CollectionRadioButtons::RadioButtonBuilder < ::ActionView::Helpers::Tags::CollectionHelpers::Builder + # source://actionview//lib/action_view/helpers/tags/collection_radio_buttons.rb#13 + def radio_button(extra_html_options = T.unsafe(nil)); end +end + +# source://actionview//lib/action_view/helpers/tags/collection_select.rb#6 +class ActionView::Helpers::Tags::CollectionSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [CollectionSelect] a new instance of CollectionSelect + # + # source://actionview//lib/action_view/helpers/tags/collection_select.rb#10 + def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/collection_select.rb#19 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/color_field.rb#6 +class ActionView::Helpers::Tags::ColorField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/color_field.rb#7 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/color_field.rb#15 + def validate_color_string(string); end +end + +# source://actionview//lib/action_view/helpers/tags/date_field.rb#6 +class ActionView::Helpers::Tags::DateField < ::ActionView::Helpers::Tags::DatetimeField + private + + # source://actionview//lib/action_view/helpers/tags/date_field.rb#8 + def format_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/date_select.rb#8 +class ActionView::Helpers::Tags::DateSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + + # @return [DateSelect] a new instance of DateSelect + # + # source://actionview//lib/action_view/helpers/tags/date_select.rb#11 + def initialize(object_name, method_name, template_object, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#17 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#32 + def datetime_selector(options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#45 + def default_datetime(options); end + + # source://actionview//lib/action_view/helpers/tags/date_select.rb#28 + def select_type; end + + class << self + # source://actionview//lib/action_view/helpers/tags/date_select.rb#22 + def select_type; end + end +end + +# source://actionview//lib/action_view/helpers/tags/datetime_field.rb#6 +class ActionView::Helpers::Tags::DatetimeField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#7 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#17 + def datetime_value(value); end + + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#25 + def format_datetime(value); end + + # source://actionview//lib/action_view/helpers/tags/datetime_field.rb#29 + def parse_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#6 +class ActionView::Helpers::Tags::DatetimeLocalField < ::ActionView::Helpers::Tags::DatetimeField + # @return [DatetimeLocalField] a new instance of DatetimeLocalField + # + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#7 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#19 + def format_datetime(value); end + + class << self + # source://actionview//lib/action_view/helpers/tags/datetime_local_field.rb#13 + def field_type; end + end +end + +# source://actionview//lib/action_view/helpers/tags/datetime_select.rb#6 +class ActionView::Helpers::Tags::DatetimeSelect < ::ActionView::Helpers::Tags::DateSelect; end + +# source://actionview//lib/action_view/helpers/tags/email_field.rb#6 +class ActionView::Helpers::Tags::EmailField < ::ActionView::Helpers::Tags::TextField; end + +# source://actionview//lib/action_view/helpers/tags/file_field.rb#6 +class ActionView::Helpers::Tags::FileField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/file_field.rb#7 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/file_field.rb#23 + def hidden_field_for_multiple_file(options); end +end + +# source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#6 +class ActionView::Helpers::Tags::GroupedCollectionSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [GroupedCollectionSelect] a new instance of GroupedCollectionSelect + # + # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#10 + def initialize(object_name, method_name, template_object, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/grouped_collection_select.rb#21 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/hidden_field.rb#6 +class ActionView::Helpers::Tags::HiddenField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/hidden_field.rb#7 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/label.rb#6 +class ActionView::Helpers::Tags::Label < ::ActionView::Helpers::Tags::Base + # @return [Label] a new instance of Label + # + # source://actionview//lib/action_view/helpers/tags/label.rb#34 + def initialize(object_name, method_name, template_object, content_or_options = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/tags/label.rb#48 + def render(&block); end + + private + + # source://actionview//lib/action_view/helpers/tags/label.rb#71 + def render_component(builder); end +end + +# source://actionview//lib/action_view/helpers/tags/label.rb#7 +class ActionView::Helpers::Tags::Label::LabelBuilder + # @return [LabelBuilder] a new instance of LabelBuilder + # + # source://actionview//lib/action_view/helpers/tags/label.rb#10 + def initialize(template_object, object_name, method_name, object, tag_value); end + + # Returns the value of attribute object. + # + # source://actionview//lib/action_view/helpers/tags/label.rb#8 + def object; end + + # source://actionview//lib/action_view/helpers/tags/label.rb#29 + def to_s; end + + # source://actionview//lib/action_view/helpers/tags/label.rb#18 + def translation; end +end + +# source://actionview//lib/action_view/helpers/tags/month_field.rb#6 +class ActionView::Helpers::Tags::MonthField < ::ActionView::Helpers::Tags::DatetimeField + private + + # source://actionview//lib/action_view/helpers/tags/month_field.rb#8 + def format_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/number_field.rb#6 +class ActionView::Helpers::Tags::NumberField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/number_field.rb#7 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/password_field.rb#6 +class ActionView::Helpers::Tags::PasswordField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/password_field.rb#7 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/placeholderable.rb#6 +module ActionView::Helpers::Tags::Placeholderable + # source://actionview//lib/action_view/helpers/tags/placeholderable.rb#7 + def initialize(*_arg0); end +end + +# source://actionview//lib/action_view/helpers/tags/radio_button.rb#8 +class ActionView::Helpers::Tags::RadioButton < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::Checkable + + # @return [RadioButton] a new instance of RadioButton + # + # source://actionview//lib/action_view/helpers/tags/radio_button.rb#11 + def initialize(object_name, method_name, template_object, tag_value, options); end + + # source://actionview//lib/action_view/helpers/tags/radio_button.rb#16 + def render; end + + private + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/radio_button.rb#26 + def checked?(value); end +end + +# source://actionview//lib/action_view/helpers/tags/range_field.rb#6 +class ActionView::Helpers::Tags::RangeField < ::ActionView::Helpers::Tags::NumberField; end + +# source://actionview//lib/action_view/helpers/tags/search_field.rb#6 +class ActionView::Helpers::Tags::SearchField < ::ActionView::Helpers::Tags::TextField + # source://actionview//lib/action_view/helpers/tags/search_field.rb#7 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/select.rb#6 +class ActionView::Helpers::Tags::Select < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [Select] a new instance of Select + # + # source://actionview//lib/action_view/helpers/tags/select.rb#10 + def initialize(object_name, method_name, template_object, choices, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/select.rb#19 + def render; end + + private + + # Grouped choices look like this: + # + # [nil, []] + # { nil => [] } + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/select.rb#39 + def grouped_choices?; end +end + +# source://actionview//lib/action_view/helpers/tags/select_renderer.rb#6 +module ActionView::Helpers::Tags::SelectRenderer + private + + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#38 + def add_options(option_tags, options, value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#33 + def placeholder_required?(html_options); end + + # source://actionview//lib/action_view/helpers/tags/select_renderer.rb#8 + def select_content_tag(option_tags, options, html_options); end +end + +# source://actionview//lib/action_view/helpers/tags/tel_field.rb#6 +class ActionView::Helpers::Tags::TelField < ::ActionView::Helpers::Tags::TextField; end + +# source://actionview//lib/action_view/helpers/tags/text_area.rb#8 +class ActionView::Helpers::Tags::TextArea < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::Placeholderable + + # source://actionview//lib/action_view/helpers/tags/text_area.rb#11 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/text_field.rb#8 +class ActionView::Helpers::Tags::TextField < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::Placeholderable + + # source://actionview//lib/action_view/helpers/tags/text_field.rb#11 + def render; end + + private + + # source://actionview//lib/action_view/helpers/tags/text_field.rb#27 + def field_type; end + + class << self + # source://actionview//lib/action_view/helpers/tags/text_field.rb#21 + def field_type; end + end +end + +# source://actionview//lib/action_view/helpers/tags/time_field.rb#6 +class ActionView::Helpers::Tags::TimeField < ::ActionView::Helpers::Tags::DatetimeField + # @return [TimeField] a new instance of TimeField + # + # source://actionview//lib/action_view/helpers/tags/time_field.rb#7 + def initialize(object_name, method_name, template_object, options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/tags/time_field.rb#13 + def format_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/time_select.rb#6 +class ActionView::Helpers::Tags::TimeSelect < ::ActionView::Helpers::Tags::DateSelect; end + +# source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#6 +class ActionView::Helpers::Tags::TimeZoneSelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [TimeZoneSelect] a new instance of TimeZoneSelect + # + # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#10 + def initialize(object_name, method_name, template_object, priority_zones, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/time_zone_select.rb#17 + def render; end +end + +# source://actionview//lib/action_view/helpers/tags/translator.rb#6 +class ActionView::Helpers::Tags::Translator + # @return [Translator] a new instance of Translator + # + # source://actionview//lib/action_view/helpers/tags/translator.rb#7 + def initialize(object, object_name, method_and_value, scope:); end + + # source://actionview//lib/action_view/helpers/tags/translator.rb#14 + def translate; end + + private + + # source://actionview//lib/action_view/helpers/tags/translator.rb#31 + def human_attribute_name; end + + # source://actionview//lib/action_view/helpers/tags/translator.rb#22 + def i18n_default; end + + # Returns the value of attribute method_and_value. + # + # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + def method_and_value; end + + # Returns the value of attribute model. + # + # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + def model; end + + # Returns the value of attribute object_name. + # + # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + def object_name; end + + # Returns the value of attribute scope. + # + # source://actionview//lib/action_view/helpers/tags/translator.rb#20 + def scope; end +end + +# source://actionview//lib/action_view/helpers/tags/url_field.rb#6 +class ActionView::Helpers::Tags::UrlField < ::ActionView::Helpers::Tags::TextField; end + +# source://actionview//lib/action_view/helpers/tags/week_field.rb#6 +class ActionView::Helpers::Tags::WeekField < ::ActionView::Helpers::Tags::DatetimeField + private + + # source://actionview//lib/action_view/helpers/tags/week_field.rb#8 + def format_datetime(value); end +end + +# source://actionview//lib/action_view/helpers/tags/weekday_select.rb#6 +class ActionView::Helpers::Tags::WeekdaySelect < ::ActionView::Helpers::Tags::Base + include ::ActionView::Helpers::Tags::SelectRenderer + include ::ActionView::Helpers::FormOptionsHelper + + # @return [WeekdaySelect] a new instance of WeekdaySelect + # + # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#10 + def initialize(object_name, method_name, template_object, options, html_options); end + + # source://actionview//lib/action_view/helpers/tags/weekday_select.rb#16 + def render; end +end + +# = Action View Text \Helpers +# +# The TextHelper module provides a set of methods for filtering, formatting +# and transforming strings, which can reduce the amount of inline Ruby code in +# your views. These helper methods extend Action View making them callable +# within your template files. +# +# ==== Sanitization +# +# Most text helpers that generate HTML output sanitize the given input by default, +# but do not escape it. This means HTML tags will appear in the page but all malicious +# code will be removed. Let's look at some examples using the +simple_format+ method: +# +# simple_format('Example') +# # => "

    Example

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

    Example

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

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

    " +# +# source://actionview//lib/action_view/helpers/text_helper.rb#36 +module ActionView::Helpers::TextHelper + include ::ActionView::Helpers::CaptureHelper + include ::ActionView::Helpers::OutputSafetyHelper + include ::ActionView::Helpers::TagHelper + extend ::ActiveSupport::Concern + include ::ActionView::Helpers::SanitizeHelper + + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods + + # The preferred method of outputting text in your views is to use the + # <%= "text" %> eRuby syntax. The regular +puts+ and +print+ methods + # do not operate as expected in an eRuby code block. If you absolutely must + # output text within a non-output code block (i.e., <% %>), you + # can use the +concat+ method. + # + # <% concat "hello" %> is equivalent to <%= "hello" %> + # + # <% + # unless signed_in? + # concat link_to("Sign In", action: :sign_in) + # end + # %> + # + # is equivalent to + # + # <% unless signed_in? %> + # <%= link_to "Sign In", action: :sign_in %> + # <% end %> + # + # source://actionview//lib/action_view/helpers/text_helper.rb#63 + def concat(string); end + + # Returns the current cycle string after a cycle has been started. Useful + # for complex table highlighting or any other design need which requires + # the current cycle string in more than one place. + # + # <%# Alternate background colors %> + # <% @items = [1,2,3,4] %> + # <% @items.each do |item| %> + #
    "> + # <%= item %> + #
    + # <% end %> + # + # source://actionview//lib/action_view/helpers/text_helper.rb#461 + def current_cycle(name = T.unsafe(nil)); end + + # Creates a Cycle object whose +to_s+ method cycles through elements of an + # array every time it is called. This can be used for example, to alternate + # classes for table rows. You can use named cycles to allow nesting in loops. + # Passing a Hash as the last parameter with a :name key will create a + # named cycle. The default name for a cycle without a +:name+ key is + # "default". You can manually reset a cycle by calling reset_cycle + # and passing the name of the cycle. The current cycle string can be obtained + # anytime using the current_cycle method. + # + # <%# Alternate CSS classes for even and odd numbers... %> + # <% @items = [1,2,3,4] %> + # + # <% @items.each do |item| %> + # "> + # + # + # <% end %> + #
    <%= item %>
    + # + # + # <%# Cycle CSS classes for rows, and text colors for values within each row %> + # <% @items = [ + # { first: "Robert", middle: "Daniel", last: "James" }, + # { first: "Emily", middle: "Shannon", maiden: "Pike", last: "Hicks" }, + # { first: "June", middle: "Dae", last: "Jones" }, + # ] %> + # <% @items.each do |item| %> + # "> + # + # <% item.values.each do |value| %> + # <%# Create a named cycle "colors" %> + # "> + # <%= value %> + # + # <% end %> + # <% reset_cycle("colors") %> + # + # + # <% end %> + # + # source://actionview//lib/action_view/helpers/text_helper.rb#437 + def cycle(first_value, *values); end + + # Extracts the first occurrence of +phrase+ plus surrounding text from + # +text+. An omission marker is prepended / appended if the start / end of + # the result does not coincide with the start / end of +text+. The result + # is always stripped in any case. Returns +nil+ if +phrase+ isn't found. + # + # ==== Options + # + # [+:radius+] + # The number of characters (or tokens — see +:separator+ option) around + # +phrase+ to include in the result. Defaults to 100. + # + # [+:omission+] + # The marker to prepend / append when the start / end of the excerpt + # does not coincide with the start / end of +text+. Defaults to + # "...". + # + # [+:separator+] + # The separator between tokens to count for +:radius+. Defaults to + # "", which treats each character as a token. + # + # ==== Examples + # + # excerpt('This is an example', 'an', radius: 5) + # # => "...s is an exam..." + # + # excerpt('This is an example', 'is', radius: 5) + # # => "This is a..." + # + # excerpt('This is an example', 'is') + # # => "This is an example" + # + # excerpt('This next thing is an example', 'ex', radius: 2) + # # => "...next..." + # + # excerpt('This is also an example', 'an', radius: 8, omission: ' ') + # # => " is also an example" + # + # excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) + # # => "...a very beautiful..." + # + # source://actionview//lib/action_view/helpers/text_helper.rb#235 + def excerpt(text, phrase, options = T.unsafe(nil)); end + + # Highlights occurrences of +phrases+ in +text+ by formatting them with a + # highlighter string. +phrases+ can be one or more strings or regular + # expressions. The result will be marked HTML safe. By default, +text+ is + # sanitized before highlighting to prevent possible XSS attacks. + # + # If a block is specified, it will be used instead of the highlighter + # string. Each occurrence of a phrase will be passed to the block, and its + # return value will be inserted into the final result. + # + # ==== Options + # + # [+:highlighter+] + # The highlighter string. Uses \1 as the placeholder for a + # phrase, similar to +String#sub+. Defaults to "\1". + # This option is ignored if a block is specified. + # + # [+:sanitize+] + # Whether to sanitize +text+ before highlighting. Defaults to true. + # + # ==== Examples + # + # highlight('You searched for: rails', 'rails') + # # => "You searched for: rails" + # + # highlight('You searched for: rails', /for|rails/) + # # => "You searched for: rails" + # + # highlight('You searched for: ruby, rails, dhh', 'actionpack') + # # => "You searched for: ruby, rails, dhh" + # + # highlight('You searched for: rails', ['for', 'rails'], highlighter: '\1') + # # => "You searched for: rails" + # + # highlight('You searched for: rails', 'rails', highlighter: '\1') + # # => "You searched for: rails" + # + # highlight('You searched for: rails', 'rails') { |match| link_to(search_path(q: match)) } + # # => "You searched for: rails" + # + # highlight('ruby on rails', 'rails', sanitize: false) + # # => "ruby on rails" + # + # source://actionview//lib/action_view/helpers/text_helper.rb#174 + def highlight(text, phrases, options = T.unsafe(nil), &block); end + + # Attempts to pluralize the +singular+ word unless +count+ is 1. If + # +plural+ is supplied, it will use that when count is > 1, otherwise + # it will use the Inflector to determine the plural form for the given locale, + # which defaults to +I18n.locale+. + # + # The word will be pluralized using rules defined for the locale + # (you must define your own inflection rules for languages other than English). + # See ActiveSupport::Inflector.pluralize. + # + # pluralize(1, 'person') + # # => "1 person" + # + # pluralize(2, 'person') + # # => "2 people" + # + # pluralize(3, 'person', plural: 'users') + # # => "3 users" + # + # pluralize(0, 'person') + # # => "0 people" + # + # pluralize(2, 'Person', locale: :de) + # # => "2 Personen" + # + # source://actionview//lib/action_view/helpers/text_helper.rb#297 + 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#484 + def reset_cycle(name = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/text_helper.rb#67 + def safe_concat(string); end + + # Returns +text+ transformed into HTML using simple formatting rules. + # Two or more consecutive newlines (\n\n or \r\n\r\n) are + # considered a paragraph and wrapped in

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

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

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

    We want to put a paragraph...

    \n\n

    ...right there.

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

    Look ma! A class!

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

    Unblinkable.

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

    Blinkable! It's true.

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

    Continue

    " + # + # source://actionview//lib/action_view/helpers/text_helper.rb#383 + def simple_format(text, html_options = T.unsafe(nil), options = T.unsafe(nil)); end + + # Truncates +text+ if it is longer than a specified +:length+. If +text+ + # is truncated, an omission marker will be appended to the result for a + # total length not exceeding +:length+. + # + # You can also pass a block to render and append extra content after the + # omission marker when +text+ is truncated. However, this content _can_ + # cause the total length to exceed +:length+ characters. + # + # The result will be escaped unless escape: false is specified. + # In any case, the result will be marked HTML-safe. Care should be taken + # if +text+ might contain HTML tags or entities, because truncation could + # produce invalid HTML, such as unbalanced or incomplete tags. + # + # ==== Options + # + # [+:length+] + # The maximum number of characters that should be returned, excluding + # any extra content from the block. Defaults to 30. + # + # [+:omission+] + # The string to append after truncating. Defaults to "...". + # + # [+:separator+] + # A string or regexp used to find a breaking point at which to truncate. + # By default, truncation can occur at any character in +text+. + # + # [+:escape+] + # Whether to escape the result. Defaults to true. + # + # ==== Examples + # + # truncate("Once upon a time in a world far far away") + # # => "Once upon a time in a world..." + # + # truncate("Once upon a time in a world far far away", length: 17) + # # => "Once upon a ti..." + # + # truncate("Once upon a time in a world far far away", length: 17, separator: ' ') + # # => "Once upon a..." + # + # truncate("And they found that many people were sleeping better.", length: 25, omission: '... (continued)') + # # => "And they f... (continued)" + # + # truncate("

    Once upon a time in a world far far away

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

    Once upon a time in a world far far away

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

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

    " + # + # Most values in +html_options+ are passed through to the button element, + # but there are a few special options: + # + # * :method - \Symbol of HTTP verb. Supported verbs are :post, :get, + # :delete, :patch, and :put. By default it will be :post. + # * :disabled - If set to true, it will generate a disabled button. + # * :data - This option can be used to add custom data attributes. + # * :form - This hash will be form attributes + # * :form_class - This controls the class of the form within which the submit button will + # be placed + # * :params - \Hash of parameters to be rendered as hidden fields within the form. + # + # ==== Examples + # <%= button_to "New", action: "new" %> + # # => "
    + # # + # # + # #
    " + # + # <%= button_to "New", new_article_path %> + # # => "
    + # # + # # + # #
    " + # + # <%= button_to "New", new_article_path, params: { time: Time.now } %> + # # => "
    + # # + # # + # # + # #
    " + # + # <%= button_to [:make_happy, @user] do %> + # Make happy <%= @user.name %> + # <% end %> + # # => "
    + # # + # # + # #
    " + # + # <%= button_to "New", { action: "new" }, form_class: "new-thing" %> + # # => "
    + # # + # # + # #
    " + # + # <%= button_to "Create", { action: "create" }, form: { "data-type" => "json" } %> + # # => "
    + # # + # # + # #
    " + # + # source://actionview//lib/action_view/helpers/url_helper.rb#296 + def button_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + def button_to_generates_button_tag; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + def button_to_generates_button_tag=(val); end + + # True if the current request URI was generated by the given +options+. + # + # ==== Examples + # Let's say we're in the http://www.example.com/shop/checkout?order=desc&page=1 action. + # + # current_page?(action: 'process') + # # => false + # + # current_page?(action: 'checkout') + # # => true + # + # current_page?(controller: 'library', action: 'checkout') + # # => false + # + # current_page?(controller: 'shop', action: 'checkout') + # # => true + # + # current_page?(controller: 'shop', action: 'checkout', order: 'asc') + # # => false + # + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '1') + # # => true + # + # current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '2') + # # => false + # + # current_page?('http://www.example.com/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout', check_parameters: true) + # # => false + # + # current_page?('/shop/checkout') + # # => true + # + # current_page?('http://www.example.com/shop/checkout?order=desc&page=1') + # # => true + # + # Different actions may share the same URL path but have a different HTTP method. Let's say we + # sent a POST to http://www.example.com/products and rendered a validation error. + # + # current_page?(controller: 'product', action: 'index') + # # => false + # + # current_page?(controller: 'product', action: 'create') + # # => false + # + # current_page?(controller: 'product', action: 'create', method: :post) + # # => true + # + # current_page?(controller: 'product', action: 'index', method: [:get, :post]) + # # => true + # + # We can also pass in the symbol arguments instead of strings. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/url_helper.rb#559 + def current_page?(options = T.unsafe(nil), check_parameters: T.unsafe(nil), method: T.unsafe(nil), **options_as_kwargs); end + + # Creates an anchor element of the given +name+ using a URL created by the set of +options+. + # See the valid options in the documentation for +url_for+. It's also possible to + # pass a \String instead of an options hash, which generates an anchor element that uses the + # value of the \String as the href for the link. Using a :back \Symbol instead + # of an options hash will generate a link to the referrer (a JavaScript back link + # will be used in place of a referrer if none exists). If +nil+ is passed as the name + # the value of the link itself will become the name. + # + # ==== Signatures + # + # link_to(body, url, html_options = {}) + # # url is a String; you can use URL helpers like + # # posts_path + # + # link_to(body, url_options = {}, html_options = {}) + # # url_options, except :method, is passed to url_for + # + # link_to(options = {}, html_options = {}) do + # # name + # end + # + # link_to(url, html_options = {}) do + # # name + # end + # + # link_to(active_record_model) + # + # ==== Options + # * :data - This option can be used to add custom data attributes. + # + # ==== Examples + # + # Because it relies on +url_for+, +link_to+ supports both older-style controller/action/id arguments + # and newer RESTful routes. Current \Rails style favors RESTful routes whenever possible, so base + # your application on resources and use + # + # link_to "Profile", profile_path(@profile) + # # => Profile + # + # or the even pithier + # + # link_to "Profile", @profile + # # => Profile + # + # in place of the older more verbose, non-resource-oriented + # + # link_to "Profile", controller: "profiles", action: "show", id: @profile + # # => Profile + # + # Similarly, + # + # link_to "Profiles", profiles_path + # # => Profiles + # + # is better than + # + # link_to "Profiles", controller: "profiles" + # # => Profiles + # + # When name is +nil+ the href is presented instead + # + # link_to nil, "http://example.com" + # # => http://www.example.com + # + # More concise yet, when +name+ is an Active Record model that defines a + # +to_s+ method returning a default value or a model instance attribute + # + # link_to @profile + # # => Eileen + # + # You can use a block as well if your link target is hard to fit into the name parameter. ERB example: + # + # <%= link_to(@profile) do %> + # <%= @profile.name %> -- Check it out! + # <% end %> + # # => + # David -- Check it out! + # + # + # Classes and ids for CSS are easy to produce: + # + # link_to "Articles", articles_path, id: "news", class: "article" + # # => Articles + # + # Be careful when using the older argument style, as an extra literal hash is needed: + # + # link_to "Articles", { controller: "articles" }, id: "news", class: "article" + # # => Articles + # + # Leaving the hash off gives the wrong link: + # + # link_to "WRONG!", controller: "articles", id: "news", class: "article" + # # => WRONG! + # + # +link_to+ can also produce links with anchors or query strings: + # + # link_to "Comment wall", profile_path(@profile, anchor: "wall") + # # => Comment wall + # + # link_to "Ruby on Rails search", controller: "searches", query: "ruby on rails" + # # => Ruby on Rails search + # + # link_to "Nonsense search", searches_path(foo: "bar", baz: "quux") + # # => Nonsense search + # + # You can set any link attributes such as target, rel, type: + # + # link_to "External link", "http://www.rubyonrails.org/", target: "_blank", rel: "nofollow" + # # => External link + # + # ==== Turbo + # + # Rails 7 ships with Turbo enabled by default. Turbo provides the following +:data+ options: + # + # * turbo_method: symbol of HTTP verb - Performs a Turbo link visit + # with the given HTTP verb. Forms are recommended when performing non-+GET+ requests. + # Only use data-turbo-method where a form is not possible. + # + # * turbo_confirm: "question?" - Adds a confirmation dialog to the link with the + # given value. + # + # {Consult the Turbo Handbook for more information on the options + # above.}[https://turbo.hotwired.dev/handbook/drive#performing-visits-with-a-different-method] + # + # ===== \Examples + # + # link_to "Delete profile", @profile, data: { turbo_method: :delete } + # # => Delete profile + # + # link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } + # # => Visit Other Site + # + # source://actionview//lib/action_view/helpers/url_helper.rb#198 + def link_to(name = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Creates a link tag of the given +name+ using a URL created by the set of + # +options+ if +condition+ is true, otherwise only the name is + # returned. To specialize the default behavior, you can pass a block that + # accepts the name or the full argument list for +link_to_if+. + # + # ==== Examples + # <%= link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) %> + # # If the user isn't logged in... + # # => Login + # + # <%= + # link_to_if(@current_user.nil?, "Login", { controller: "sessions", action: "new" }) do + # link_to(@current_user.login, { controller: "accounts", action: "show", id: @current_user }) + # end + # %> + # # If the user isn't logged in... + # # => Login + # # If they are logged in... + # # => my_username + # + # source://actionview//lib/action_view/helpers/url_helper.rb#438 + 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#415 + 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#391 + 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#488 + 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#693 + 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#642 + def sms_to(phone_number, name = T.unsafe(nil), html_options = T.unsafe(nil), &block); end + + # Basic implementation of url_for to allow use helpers without routes existence + # + # source://actionview//lib/action_view/helpers/url_helper.rb#38 + def url_for(options = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/helpers/url_helper.rb#50 + def _back_url; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#55 + def _filtered_referrer; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#736 + def add_method_to_attributes!(html_options, method); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#707 + def convert_options_to_data_attributes(options, html_options); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/url_helper.rb#730 + def link_to_remote_options?(options); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#747 + def method_for_options(options); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/helpers/url_helper.rb#765 + def method_not_get_method?(method); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#786 + def method_tag(method); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#834 + 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#808 + def to_form_params(attribute, namespace = T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#770 + def token_tag(token = T.unsafe(nil), form_options: T.unsafe(nil)); end + + # source://actionview//lib/action_view/helpers/url_helper.rb#722 + def url_target(name, options); end + + class << self + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + def button_to_generates_button_tag; end + + # source://actionview//lib/action_view/helpers/url_helper.rb#35 + def button_to_generates_button_tag=(val); end + end +end + +# This helper may be included in any class that includes the +# URL helpers of a routes (routes.url_helpers). Some methods +# provided here will only work in the context of a request +# (link_to_unless_current, for instance), which must be provided +# as a method called #request on the context. +# +# source://actionview//lib/action_view/helpers/url_helper.rb#23 +ActionView::Helpers::UrlHelper::BUTTON_TAG_METHOD_VERBS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/helpers/url_helper.rb#29 +module ActionView::Helpers::UrlHelper::ClassMethods + # source://actionview//lib/action_view/helpers/url_helper.rb#30 + def _url_for_modules; end +end + +# source://actionview//lib/action_view/helpers/url_helper.rb#757 +ActionView::Helpers::UrlHelper::STRINGIFIED_COMMON_METHODS = T.let(T.unsafe(nil), Hash) + +# This is a class to fix I18n global state. Whenever you provide I18n.locale during a request, +# it will trigger the lookup_context and consequently expire the cache. +# +# source://actionview//lib/action_view/rendering.rb#8 +class ActionView::I18nProxy < ::I18n::Config + # @return [I18nProxy] a new instance of I18nProxy + # + # source://actionview//lib/action_view/rendering.rb#11 + def initialize(original_config, lookup_context); end + + # source://actionview//lib/action_view/rendering.rb#17 + def locale; end + + # source://actionview//lib/action_view/rendering.rb#21 + def locale=(value); end + + # source://actionview//lib/action_view/rendering.rb#9 + def lookup_context; end + + # source://actionview//lib/action_view/rendering.rb#9 + def original_config; end +end + +# = Action View \Layouts +# +# Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in +# repeated setups. The inclusion pattern has pages that look like this: +# +# <%= render "application/header" %> +# Hello World +# <%= render "application/footer" %> +# +# This approach is a decent way of keeping common structures isolated from the changing content, but it's verbose +# and if you ever want to change the structure of these two includes, you'll have to change all the templates. +# +# With layouts, you can flip it around and have the common structure know where to insert changing content. This means +# that the header and footer are only mentioned in one place, like this: +# +# // The header part of this layout +# <%= yield %> +# // The footer part of this layout +# +# And then you have content pages that look like this: +# +# hello world +# +# At rendering time, the content page is computed and then inserted in the layout, like this: +# +# // The header part of this layout +# hello world +# // The footer part of this layout +# +# == Accessing shared variables +# +# Layouts have access to variables specified in the content pages and vice versa. This allows you to have layouts with +# references that won't materialize before rendering time: +# +#

    <%= @page_title %>

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

    Welcome

    +# Off-world colonies offers you a chance to start a new life +# +# == Layout assignment +# +# You can either specify a layout declaratively (using the #layout class method) or give +# it the same name as your controller, and place it in app/views/layouts. +# If a subclass does not have a layout specified, it inherits its layout using normal Ruby inheritance. +# +# For instance, if you have PostsController and a template named app/views/layouts/posts.html.erb, +# that template will be used for all actions in PostsController and controllers inheriting +# from PostsController. +# +# If you use a module, for instance Weblog::PostsController, you will need a template named +# app/views/layouts/weblog/posts.html.erb. +# +# Since all your controllers inherit from ApplicationController, they will use +# app/views/layouts/application.html.erb if no other layout is specified +# or provided. +# +# == Inheritance Examples +# +# class BankController < ActionController::Base +# # bank.html.erb exists +# +# class ExchangeController < BankController +# # exchange.html.erb exists +# +# class CurrencyController < BankController +# +# class InformationController < BankController +# layout "information" +# +# class TellerController < InformationController +# # teller.html.erb exists +# +# class EmployeeController < InformationController +# # employee.html.erb exists +# layout nil +# +# class VaultController < BankController +# layout :access_level_layout +# +# class TillController < BankController +# layout false +# +# In these examples, we have three implicit lookup scenarios: +# * The +BankController+ uses the "bank" layout. +# * The +ExchangeController+ uses the "exchange" layout. +# * The +CurrencyController+ inherits the layout from BankController. +# +# However, when a layout is explicitly set, the explicitly set layout wins: +# * The +InformationController+ uses the "information" layout, explicitly set. +# * The +TellerController+ also uses the "information" layout, because the parent explicitly set it. +# * The +EmployeeController+ uses the "employee" layout, because it set the layout to +nil+, resetting the parent configuration. +# * The +VaultController+ chooses a layout dynamically by calling the access_level_layout method. +# * The +TillController+ does not use a layout at all. +# +# == Types of layouts +# +# Layouts are basically just regular templates, but the name of this template needs not be specified statically. Sometimes +# you want to alternate layouts depending on runtime information, such as whether someone is logged in or not. This can +# be done either by specifying a method reference as a symbol or using an inline method (as a proc). +# +# The method reference is the preferred approach to variable layouts and is used like this: +# +# class WeblogController < ActionController::Base +# layout :writers_and_readers +# +# def index +# # fetching posts +# end +# +# private +# def writers_and_readers +# logged_in? ? "writer_layout" : "reader_layout" +# end +# end +# +# Now when a new request for the index action is processed, the layout will vary depending on whether the person accessing +# is logged in or not. +# +# If you want to use an inline method, such as a proc, do something like this: +# +# class WeblogController < ActionController::Base +# layout proc { |controller| controller.logged_in? ? "writer_layout" : "reader_layout" } +# end +# +# If an argument isn't given to the proc, it's evaluated in the context of +# the current controller anyway. +# +# class WeblogController < ActionController::Base +# layout proc { logged_in? ? "writer_layout" : "reader_layout" } +# end +# +# Of course, the most common way of specifying a layout is still just as a plain template name: +# +# class WeblogController < ActionController::Base +# layout "weblog_standard" +# end +# +# The template will be looked always in app/views/layouts/ folder. But you can point +# layouts folder direct also. layout "layouts/demo" is the same as layout "demo". +# +# Setting the layout to +nil+ forces it to be looked up in the filesystem and falls back to the parent behavior if none exists. +# Setting it to +nil+ is useful to re-enable template lookup overriding a previous configuration set in the parent: +# +# class ApplicationController < ActionController::Base +# layout "application" +# end +# +# class PostsController < ApplicationController +# # Will use "application" layout +# end +# +# class CommentsController < ApplicationController +# # Will search for "comments" layout and fall back to "application" layout +# layout nil +# end +# +# == Conditional layouts +# +# If you have a layout that by default is applied to all the actions of a controller, you still have the option of rendering +# a given action or set of actions without a layout, or restricting a layout to only a single action or a set of actions. The +# :only and :except options can be passed to the layout call. For example: +# +# class WeblogController < ActionController::Base +# layout "weblog_standard", except: :rss +# +# # ... +# +# end +# +# This will assign "weblog_standard" as the WeblogController's layout for all actions except for the +rss+ action, which will +# be rendered directly, without wrapping a layout around the rendered view. +# +# Both the :only and :except condition can accept an arbitrary number of method references, so +# except: [ :rss, :text_only ] is valid, as is except: :rss. +# +# == Using a different layout in the action render call +# +# If most of your actions use the same layout, it makes perfect sense to define a controller-wide layout as described above. +# Sometimes you'll have exceptions where one action wants to use a different layout than the rest of the controller. +# You can do this by passing a :layout option to the render call. For example: +# +# class WeblogController < ActionController::Base +# layout "weblog_standard" +# +# def help +# render action: "help", layout: "help" +# end +# end +# +# This will override the controller-wide "weblog_standard" layout, and will render the help action with the "help" layout instead. +# +# source://actionview//lib/action_view/layouts.rb#205 +module ActionView::Layouts + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + include ::ActionView::ViewPaths + include ::ActionView::Rendering + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + mixes_in_class_methods ::ActionView::Rendering::ClassMethods + mixes_in_class_methods ::ActionView::Layouts::ClassMethods + + # source://actionview//lib/action_view/layouts.rb#361 + def initialize(*_arg0); end + + # source://actionview//lib/action_view/layouts.rb#350 + def _process_render_template_options(options); end + + # source://actionview//lib/action_view/layouts.rb#359 + 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, keys, require_layout = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/layouts.rb#430 + def _include_layout?(options); end + + # This will be overwritten by _write_layout_method + # + # source://actionview//lib/action_view/layouts.rb#382 + def _layout(*_arg0); end + + # Determine the layout for a given name, taking into account the name type. + # + # ==== Parameters + # * name - The name of the template + # + # source://actionview//lib/action_view/layouts.rb#388 + def _layout_for_option(name); end + + # source://actionview//lib/action_view/layouts.rb#401 + def _normalize_layout(value); end + + module GeneratedClassMethods + def _layout; end + def _layout=(value); end + def _layout?; end + def _layout_conditions; end + def _layout_conditions=(value); end + def _layout_conditions?; end + end + + module GeneratedInstanceMethods + def _layout_conditions; end + def _layout_conditions?; end + end +end + +# source://actionview//lib/action_view/layouts.rb#217 +module ActionView::Layouts::ClassMethods + # Creates a _layout method to be called by _default_layout . + # + # If a layout is not explicitly mentioned then look for a layout with the controller's name. + # if nothing is found then try same procedure to find super class's layout. + # + # source://actionview//lib/action_view/layouts.rb#283 + def _write_layout_method; end + + # source://actionview//lib/action_view/layouts.rb#218 + def inherited(klass); end + + # Specify the layout to use for this class. + # + # If the specified layout is a: + # String:: the String is the template name + # Symbol:: call the method specified by the symbol + # Proc:: call the passed Proc + # false:: There is no layout + # true:: raise an ArgumentError + # nil:: Force default layout behavior with inheritance + # + # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+, or +nil+ + # with the same meaning as described above. + # + # ==== Parameters + # + # * layout - The layout to use. + # + # ==== Options (conditions) + # + # * +:only+ - A list of actions to apply this layout to. + # * +:except+ - Apply this layout to all actions but this one. + # + # source://actionview//lib/action_view/layouts.rb#269 + def layout(layout, conditions = T.unsafe(nil)); end + + private + + # If no layout is supplied, look for a template named the return + # value of this method. + # + # ==== Returns + # * String - A template name + # + # source://actionview//lib/action_view/layouts.rb#345 + def _implied_layout_name; end +end + +# This module is mixed in if layout conditions are provided. This means +# that if no layout conditions are used, this method is not used +# +# source://actionview//lib/action_view/layouts.rb#225 +module ActionView::Layouts::ClassMethods::LayoutConditions + private + + # Determines whether the current action has a layout definition by + # checking the action name against the :only and :except conditions + # set by the layout method. + # + # ==== Returns + # * Boolean - True if the action has a layout definition, false otherwise. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/layouts.rb#233 + def _conditional_layout?; end +end + +# source://actionview//lib/action_view/log_subscriber.rb#6 +class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber + include ::ActionView::LogSubscriber::Utils + + # @return [LogSubscriber] a new instance of LogSubscriber + # + # source://actionview//lib/action_view/log_subscriber.rb#9 + def initialize; end + + # source://actionview//lib/action_view/log_subscriber.rb#42 + def render_collection(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#34 + def render_layout(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#23 + def render_partial(event); end + + # source://actionview//lib/action_view/log_subscriber.rb#14 + def render_template(event); end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#118 + def cache_message(payload); end + + # source://actionview//lib/action_view/log_subscriber.rb#110 + def render_count(payload); end + + class << self + # source://actionview//lib/action_view/log_subscriber.rb#102 + def attach_to(*_arg0); end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#21 + def __class_attr_log_levels; end + + # source://actionview//lib/action_view/log_subscriber.rb#21 + def __class_attr_log_levels=(new_value); end + end +end + +# source://actionview//lib/action_view/log_subscriber.rb#73 +class ActionView::LogSubscriber::Start + include ::ActionView::LogSubscriber::Utils + + # source://actionview//lib/action_view/log_subscriber.rb#94 + def finish(name, id, payload); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/log_subscriber.rb#97 + def silenced?(_); end + + # source://actionview//lib/action_view/log_subscriber.rb#76 + def start(name, id, payload); end +end + +# source://actionview//lib/action_view/log_subscriber.rb#54 +module ActionView::LogSubscriber::Utils + # source://actionview//lib/action_view/log_subscriber.rb#55 + def logger; end + + private + + # source://actionview//lib/action_view/log_subscriber.rb#60 + def from_rails_root(string); end + + # source://actionview//lib/action_view/log_subscriber.rb#66 + def rails_root; end +end + +# source://actionview//lib/action_view/log_subscriber.rb#7 +ActionView::LogSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# = Action View Lookup Context +# +# LookupContext is the object responsible for holding all information +# required for looking up templates, i.e. view paths and details. +# LookupContext is also responsible for generating a key, given to +# view paths, used in the resolver cache lookup. Since this key is generated +# only once during the request, it speeds up all cache accesses. +# +# source://actionview//lib/action_view/lookup_context.rb#15 +class ActionView::LookupContext + include ::ActionView::LookupContext::Accessors + include ::ActionView::LookupContext::DetailsCache + include ::ActionView::LookupContext::ViewPaths + + # @return [LookupContext] a new instance of LookupContext + # + # source://actionview//lib/action_view/lookup_context.rb#232 + def initialize(view_paths, details = T.unsafe(nil), prefixes = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#242 + def digest_cache; end + + # Override formats= to expand ["*/*"] values and automatically + # add :html as fallback to :js. + # + # source://actionview//lib/action_view/lookup_context.rb#263 + def formats=(values); end + + # Override locale to return a symbol instead of array. + # + # source://actionview//lib/action_view/lookup_context.rb#283 + def locale; end + + # Overload locale= to also set the I18n.locale. If the current I18n.config object responds + # to original_config, it means that it has a copy of the original I18n configuration and it's + # acting as proxy, which we need to skip. + # + # source://actionview//lib/action_view/lookup_context.rb#290 + def locale=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#16 + def prefixes; end + + # source://actionview//lib/action_view/lookup_context.rb#16 + def prefixes=(_arg0); end + + # source://actionview//lib/action_view/lookup_context.rb#246 + def with_prepended_formats(formats); end + + private + + # source://actionview//lib/action_view/lookup_context.rb#253 + def initialize_details(target, details); end + + class << self + # source://actionview//lib/action_view/lookup_context.rb#21 + def register_detail(name, &block); end + + # source://actionview//lib/action_view/lookup_context.rb#18 + def registered_details; end + + # source://actionview//lib/action_view/lookup_context.rb#18 + def registered_details=(_arg0); end + end +end + +# Holds accessors for the registered details. +# +# source://actionview//lib/action_view/lookup_context.rb#39 +module ActionView::LookupContext::Accessors + # source://actionview//lib/action_view/lookup_context.rb#25 + def default_formats; end + + # source://actionview//lib/action_view/lookup_context.rb#25 + def default_handlers; end + + # source://actionview//lib/action_view/lookup_context.rb#25 + def default_locale; end + + # source://actionview//lib/action_view/lookup_context.rb#25 + def default_variants; end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def formats; end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def formats=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def handlers; end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def handlers=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def locale; end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def locale=(value); end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def variants; end + + # source://actionview//lib/action_view/lookup_context.rb#26 + def variants=(value); end +end + +# source://actionview//lib/action_view/lookup_context.rb#40 +ActionView::LookupContext::Accessors::DEFAULT_PROCS = T.let(T.unsafe(nil), Hash) + +# Add caching behavior on top of Details. +# +# source://actionview//lib/action_view/lookup_context.rb#98 +module ActionView::LookupContext::DetailsCache + # Returns the value of attribute cache. + # + # source://actionview//lib/action_view/lookup_context.rb#99 + def cache; end + + # Sets the attribute cache + # + # @param value the value to set the attribute cache to. + # + # source://actionview//lib/action_view/lookup_context.rb#99 + def cache=(_arg0); end + + # Calculate the details key. Remove the handlers from calculation to improve performance + # since the user cannot modify it explicitly. + # + # source://actionview//lib/action_view/lookup_context.rb#103 + def details_key; end + + # Temporary skip passing the details_key forward. + # + # source://actionview//lib/action_view/lookup_context.rb#108 + def disable_cache; end + + private + + # source://actionview//lib/action_view/lookup_context.rb#116 + def _set_detail(key, value); end +end + +# source://actionview//lib/action_view/lookup_context.rb#54 +class ActionView::LookupContext::DetailsKey + # source://actionview//lib/action_view/lookup_context.rb#55 + def eql?(_arg0); end + + class << self + # source://actionview//lib/action_view/lookup_context.rb#77 + def clear; end + + # source://actionview//lib/action_view/lookup_context.rb#65 + def details_cache_key(details); end + + # source://actionview//lib/action_view/lookup_context.rb#61 + def digest_cache(details); end + + # source://actionview//lib/action_view/lookup_context.rb#86 + def digest_caches; end + + # source://actionview//lib/action_view/lookup_context.rb#90 + def view_context_class; end + end +end + +# Helpers related to template lookup using the lookup context information. +# +# source://actionview//lib/action_view/lookup_context.rb#125 +module ActionView::LookupContext::ViewPaths + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#148 + def any?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#153 + def any_templates?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#155 + def append_view_paths(paths); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#141 + def exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end + + # source://actionview//lib/action_view/lookup_context.rb#128 + def find(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#135 + def find_all(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/lookup_context.rb#133 + def find_template(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute html_fallback_for_js. + # + # source://actionview//lib/action_view/lookup_context.rb#126 + def html_fallback_for_js; end + + # source://actionview//lib/action_view/lookup_context.rb#159 + def prepend_view_paths(paths); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/lookup_context.rb#146 + def template_exists?(name, prefixes = T.unsafe(nil), partial = T.unsafe(nil), keys = T.unsafe(nil), **options); end + + # Returns the value of attribute view_paths. + # + # source://actionview//lib/action_view/lookup_context.rb#126 + def view_paths; end + + private + + # Whenever setting view paths, makes a copy so that we can manipulate them in + # instance objects as we wish. + # + # source://actionview//lib/action_view/lookup_context.rb#166 + def build_view_paths(paths); end + + # Compute details hash and key according to user options (e.g. passed from #render). + # + # source://actionview//lib/action_view/lookup_context.rb#175 + def detail_args_for(options); end + + # source://actionview//lib/action_view/lookup_context.rb#188 + def detail_args_for_any; end + + # Fix when prefix is specified as part of the template name + # + # source://actionview//lib/action_view/lookup_context.rb#209 + def normalize_name(name, prefixes); end +end + +# source://actionview//lib/action_view/template/error.rb#41 +class ActionView::MissingTemplate < ::ActionView::ActionViewError + include ::DidYouMean::Correctable + + # @return [MissingTemplate] a new instance of MissingTemplate + # + # source://actionview//lib/action_view/template/error.rb#44 + 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#104 + def corrections; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template/error.rb#42 + def partial; end + + # Returns the value of attribute path. + # + # source://actionview//lib/action_view/template/error.rb#42 + def path; end + + # Returns the value of attribute paths. + # + # source://actionview//lib/action_view/template/error.rb#42 + def paths; end + + # Returns the value of attribute prefixes. + # + # source://actionview//lib/action_view/template/error.rb#42 + def prefixes; end +end + +# source://actionview//lib/action_view/template/error.rb#71 +class ActionView::MissingTemplate::Results + # @return [Results] a new instance of Results + # + # source://actionview//lib/action_view/template/error.rb#74 + def initialize(size); end + + # source://actionview//lib/action_view/template/error.rb#91 + def add(path, score); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/error.rb#83 + def should_record?(score); end + + # source://actionview//lib/action_view/template/error.rb#79 + def to_a; end +end + +# source://actionview//lib/action_view/template/error.rb#72 +class ActionView::MissingTemplate::Results::Result < ::Struct + # Returns the value of attribute path + # + # @return [Object] the current value of path + # + # source://actionview//lib/action_view/template/error.rb#72 + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + # + # source://actionview//lib/action_view/template/error.rb#72 + def path=(_); end + + # Returns the value of attribute score + # + # @return [Object] the current value of score + # + # source://actionview//lib/action_view/template/error.rb#72 + def score; end + + # Sets the attribute score + # + # @param value [Object] the value to set the attribute score to. + # @return [Object] the newly set value + # + # source://actionview//lib/action_view/template/error.rb#72 + def score=(_); end + + class << self + # source://actionview//lib/action_view/template/error.rb#72 + def [](*_arg0); end + + # source://actionview//lib/action_view/template/error.rb#72 + def inspect; end + + # source://actionview//lib/action_view/template/error.rb#72 + def keyword_init?; end + + # source://actionview//lib/action_view/template/error.rb#72 + def members; end + + # source://actionview//lib/action_view/template/error.rb#72 + def new(*_arg0); end + end +end + +# source://actionview//lib/action_view/model_naming.rb#4 +module ActionView::ModelNaming + # Converts the given object to an Active Model compliant one. + # + # source://actionview//lib/action_view/model_naming.rb#6 + def convert_to_model(object); end + + # source://actionview//lib/action_view/model_naming.rb#10 + def model_name_from_record_or_class(record_or_class); end +end + +# source://actionview//lib/action_view/renderer/object_renderer.rb#4 +class ActionView::ObjectRenderer < ::ActionView::PartialRenderer + include ::ActionView::AbstractRenderer::ObjectRendering + + # @return [ObjectRenderer] a new instance of ObjectRenderer + # + # source://actionview//lib/action_view/renderer/object_renderer.rb#7 + def initialize(lookup_context, options); end + + # source://actionview//lib/action_view/renderer/object_renderer.rb#19 + def render_object_derive_partial(object, context, block); end + + # source://actionview//lib/action_view/renderer/object_renderer.rb#13 + def render_object_with_partial(object, partial, context, block); end + + private + + # source://actionview//lib/action_view/renderer/object_renderer.rb#29 + def render_partial_template(view, locals, template, layout, block); end + + # source://actionview//lib/action_view/renderer/object_renderer.rb#25 + def template_keys(path); end +end + +# Used as a buffer for views +# +# The main difference between this and ActiveSupport::SafeBuffer +# is for the methods `<<` and `safe_expr_append=` the inputs are +# checked for nil before they are assigned and `to_s` is called on +# the input. For example: +# +# obuf = ActionView::OutputBuffer.new "hello" +# obuf << 5 +# puts obuf # => "hello5" +# +# sbuf = ActiveSupport::SafeBuffer.new "hello" +# sbuf << 5 +# puts sbuf # => "hello\u0005" +# +# source://actionview//lib/action_view/buffers.rb#21 +class ActionView::OutputBuffer + # @return [OutputBuffer] a new instance of OutputBuffer + # + # source://actionview//lib/action_view/buffers.rb#22 + def initialize(buffer = T.unsafe(nil)); end + + # source://actionview//lib/action_view/buffers.rb#42 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#81 + def ==(other); end + + # source://actionview//lib/action_view/buffers.rb#54 + def append=(value); end + + # source://actionview//lib/action_view/buffers.rb#27 + def blank?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#72 + def capture(*args); end + + # source://actionview//lib/action_view/buffers.rb#53 + def concat(value); end + + # source://actionview//lib/action_view/buffers.rb#27 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def encode!(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def encoding(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#27 + def force_encoding(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#32 + def html_safe; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/buffers.rb#38 + def html_safe?; end + + # source://actionview//lib/action_view/buffers.rb#27 + def length(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/buffers.rb#85 + def raw; end + + # Returns the value of attribute raw_buffer. + # + # source://actionview//lib/action_view/buffers.rb#89 + def raw_buffer; end + + # source://actionview//lib/action_view/buffers.rb#60 + def safe_append=(value); end + + # source://actionview//lib/action_view/buffers.rb#56 + def safe_concat(value); end + + # source://actionview//lib/action_view/buffers.rb#62 + def safe_expr_append=(val); end + + # source://actionview//lib/action_view/buffers.rb#29 + def to_s; end + + # source://actionview//lib/action_view/buffers.rb#34 + def to_str; end + + private + + # source://actionview//lib/action_view/buffers.rb#68 + def initialize_copy(other); end +end + +# source://actionview//lib/action_view/flows.rb#6 +class ActionView::OutputFlow + # @return [OutputFlow] a new instance of OutputFlow + # + # source://actionview//lib/action_view/flows.rb#9 + def initialize; end + + # Called by content_for + # + # source://actionview//lib/action_view/flows.rb#24 + def append(key, value); end + + # Called by content_for + # + # source://actionview//lib/action_view/flows.rb#27 + 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 variants of a partial +# +# The :variants option can be used to render a different template variant of a partial. For instance: +# +# <%= render partial: "account", variants: :mobile %> +# +# This will render _account.html+mobile.erb. This option also accepts multiple variants +# like so: +# +# <%= render partial: "account", variants: [:desktop, :mobile] %> +# +# This will look for the following templates and render the first one that exists: +# * _account.html+desktop.erb +# * _account.html+mobile.erb +# * _account.html.erb +# +# == \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#236 +class ActionView::PartialRenderer < ::ActionView::AbstractRenderer + include ::ActionView::CollectionCaching + + # @return [PartialRenderer] a new instance of PartialRenderer + # + # source://actionview//lib/action_view/renderer/partial_renderer.rb#239 + def initialize(lookup_context, options); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#237 + def collection_cache; end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#237 + def collection_cache=(val); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#246 + def render(partial, context, block); end + + private + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#278 + def find_template(path, locals); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#261 + def render_partial_template(view, locals, template, layout, block); end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#257 + def template_keys(_); end + + class << self + # source://actionview//lib/action_view/renderer/partial_renderer.rb#237 + def collection_cache; end + + # source://actionview//lib/action_view/renderer/partial_renderer.rb#237 + def collection_cache=(val); end + end +end + +# source://actionview//lib/action_view/path_registry.rb#4 +module ActionView::PathRegistry + class << self + # source://actionview//lib/action_view/path_registry.rb#53 + def all_file_system_resolvers; end + + # source://actionview//lib/action_view/path_registry.rb#47 + def all_resolvers; end + + # source://actionview//lib/action_view/path_registry.rb#22 + def cast_file_system_resolvers(paths); end + + # Returns the value of attribute file_system_resolver_hooks. + # + # source://actionview//lib/action_view/path_registry.rb#11 + def file_system_resolver_hooks; end + + # source://actionview//lib/action_view/path_registry.rb#14 + def get_view_paths(klass); end + + # source://actionview//lib/action_view/path_registry.rb#18 + def set_view_paths(klass, paths); end + end +end + +# = Action View PathSet +# +# This class is used to store and access paths in Action View. A number of +# operations are defined so that you can search among the paths in this +# set and also perform operations on other +PathSet+ objects. +# +# A +LookupContext+ will use a +PathSet+ to store the paths in its context. +# +# source://actionview//lib/action_view/path_set.rb#11 +class ActionView::PathSet + include ::Enumerable + + # @return [PathSet] a new instance of PathSet + # + # source://actionview//lib/action_view/path_set.rb#18 + def initialize(paths = T.unsafe(nil)); end + + # source://actionview//lib/action_view/path_set.rb#35 + def +(other); end + + # source://actionview//lib/action_view/path_set.rb#16 + def [](*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#31 + def compact; end + + # source://actionview//lib/action_view/path_set.rb#16 + def each(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/path_set.rb#53 + def exists?(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#40 + def find(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#45 + def find_all(path, prefixes, partial, details, details_key, locals); end + + # source://actionview//lib/action_view/path_set.rb#16 + def include?(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute paths. + # + # source://actionview//lib/action_view/path_set.rb#14 + def paths; end + + # source://actionview//lib/action_view/path_set.rb#16 + def size(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/path_set.rb#27 + def to_ary; end + + private + + # source://actionview//lib/action_view/path_set.rb#22 + def initialize_copy(other); end + + # source://actionview//lib/action_view/path_set.rb#58 + def search_combinations(prefixes); end + + # source://actionview//lib/action_view/path_set.rb#67 + def typecast(paths); end +end + +# source://actionview//lib/action_view/buffers.rb#92 +class ActionView::RawOutputBuffer + # @return [RawOutputBuffer] a new instance of RawOutputBuffer + # + # source://actionview//lib/action_view/buffers.rb#93 + def initialize(buffer); end + + # source://actionview//lib/action_view/buffers.rb#97 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#103 + def raw; end +end + +# source://actionview//lib/action_view/buffers.rb#150 +class ActionView::RawStreamingBuffer + # @return [RawStreamingBuffer] a new instance of RawStreamingBuffer + # + # source://actionview//lib/action_view/buffers.rb#151 + def initialize(buffer); end + + # source://actionview//lib/action_view/buffers.rb#155 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#161 + def raw; end +end + +# = Action View \Record \Identifier +# +# RecordIdentifier encapsulates methods used by various ActionView helpers +# to associate records with DOM elements. +# +# Consider for example the following code that form of post: +# +# <%= form_with(model: post) do |f| %> +# <%= f.text_field :body %> +# <% end %> +# +# When +post+ is a new, unsaved ActiveRecord::Base instance, the resulting HTML +# is: +# +#
    +# +#
    +# +# When +post+ is a persisted ActiveRecord::Base instance, the resulting HTML +# is: +# +#
    +# +#
    +# +# In both cases, the +id+ and +class+ of the wrapping DOM element are +# automatically generated, following naming conventions encapsulated by the +# RecordIdentifier methods #dom_id and #dom_class: +# +# dom_id(Post) # => "new_post" +# dom_class(Post) # => "post" +# dom_id(Post.new) # => "new_post" +# dom_class(Post.new) # => "post" +# dom_id(Post.find 42) # => "post_42" +# dom_class(Post.find 42) # => "post" +# +# Note that these methods do not strictly require +Post+ to be a subclass of +# ActiveRecord::Base. +# Any +Post+ class will work as long as its instances respond to +to_key+ +# and +model_name+, given that +model_name+ responds to +param_key+. +# For instance: +# +# class Post +# attr_accessor :to_key +# +# def model_name +# OpenStruct.new param_key: 'post' +# end +# +# def self.find(id) +# new.tap { |post| post.to_key = [id] } +# end +# end +# +# source://actionview//lib/action_view/record_identifier.rb#60 +module ActionView::RecordIdentifier + include ::ActionView::ModelNaming + extend ::ActionView::RecordIdentifier + extend ::ActionView::ModelNaming + + # The DOM class convention is to use the singular form of an object or class. + # + # dom_class(post) # => "post" + # dom_class(Person) # => "person" + # + # If you need to address multiple instances of the same class in the same view, you can prefix the dom_class: + # + # dom_class(post, :edit) # => "edit_post" + # dom_class(Person, :edit) # => "edit_person" + # + # source://actionview//lib/action_view/record_identifier.rb#78 + def dom_class(record_or_class, prefix = T.unsafe(nil)); end + + # The DOM id convention is to use the singular form of an object or class with the id following an underscore. + # If no id is found, prefix with "new_" instead. + # + # dom_id(Post.find(45)) # => "post_45" + # dom_id(Post) # => "new_post" + # + # If you need to address multiple instances of the same class in the same view, you can prefix the dom_id: + # + # dom_id(Post.find(45), :edit) # => "edit_post_45" + # dom_id(Post, :custom) # => "custom_post" + # + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/record_identifier.rb#93 + def dom_id(record_or_class, prefix = T.unsafe(nil)); end + + # The DOM target convention is to concatenate any number of parameters into a string. + # Records are passed through dom_id, while string and symbols are retained. + # + # dom_target(Post.find(45)) # => "post_45" + # dom_target(Post.find(45), :edit) # => "post_45_edit" + # dom_target(Post.find(45), :edit, :special) # => "post_45_edit_special" + # dom_target(Post.find(45), Comment.find(1)) # => "post_45_comment_1" + # + # source://actionview//lib/action_view/record_identifier.rb#111 + def dom_target(*objects); 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#134 + def record_key_for_dom_id(record); end +end + +# source://actionview//lib/action_view/record_identifier.rb#66 +ActionView::RecordIdentifier::JOIN = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/record_identifier.rb#67 +ActionView::RecordIdentifier::NEW = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/render_parser.rb#4 +module ActionView::RenderParser; end + +# source://actionview//lib/action_view/render_parser.rb#5 +ActionView::RenderParser::ALL_KNOWN_KEYS = T.let(T.unsafe(nil), Array) + +# source://actionview//lib/action_view/render_parser.rb#8 +class ActionView::RenderParser::Base + # @return [Base] a new instance of Base + # + # source://actionview//lib/action_view/render_parser.rb#9 + def initialize(name, code); end + + private + + # source://actionview//lib/action_view/render_parser.rb#15 + def directory; end + + # source://actionview//lib/action_view/render_parser.rb#19 + def partial_to_virtual_path(render_type, partial_path); end +end + +# source://actionview//lib/action_view/render_parser.rb#37 +ActionView::RenderParser::Default = ActionView::RenderParser::PrismRenderParser + +# source://actionview//lib/action_view/render_parser/prism_render_parser.rb#5 +class ActionView::RenderParser::PrismRenderParser < ::ActionView::RenderParser::Base + # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#6 + def render_calls; end + + private + + # Accept a call node and return a hash of options for the render call. + # If it doesn't match the expected format, return nil. + # + # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#43 + def render_call_options(node); end + + # Accept the node that is being passed in the position of the template + # and return the template name and whether or not it is an object + # template. + # + # source://actionview//lib/action_view/render_parser/prism_render_parser.rb#97 + def render_call_template(node); end +end + +# source://actionview//lib/action_view/render_parser.rb#6 +ActionView::RenderParser::RENDER_TYPE_KEYS = T.let(T.unsafe(nil), Array) + +# = Action View \Renderer +# +# This is the main entry point for rendering. It basically delegates +# to other objects like TemplateRenderer and PartialRenderer which +# actually renders the template. +# +# The Renderer will parse the options from the +render+ or +render_body+ +# method and render a partial or a template based on the options. The +# +TemplateRenderer+ and +PartialRenderer+ objects are wrappers which do all +# the setup and logic necessary to render a view and a new object is created +# each time +render+ is called. +# +# source://actionview//lib/action_view/renderer/renderer.rb#15 +class ActionView::Renderer + # @return [Renderer] a new instance of Renderer + # + # source://actionview//lib/action_view/renderer/renderer.rb#18 + def initialize(lookup_context); end + + # source://actionview//lib/action_view/renderer/renderer.rb#52 + def cache_hits; end + + # Returns the value of attribute lookup_context. + # + # source://actionview//lib/action_view/renderer/renderer.rb#16 + def lookup_context; end + + # Sets the attribute lookup_context + # + # @param value the value to set the attribute lookup_context to. + # + # source://actionview//lib/action_view/renderer/renderer.rb#16 + def lookup_context=(_arg0); end + + # Main render entry point shared by Action View and Action Controller. + # + # source://actionview//lib/action_view/renderer/renderer.rb#23 + def render(context, options); end + + # Render but returns a valid Rack body. If fibers are defined, we return + # a streaming body that renders the template piece by piece. + # + # Note that partials are not supported to be rendered with streaming, + # so in such cases, we just wrap them in an array. + # + # source://actionview//lib/action_view/renderer/renderer.rb#40 + def render_body(context, options); end + + # source://actionview//lib/action_view/renderer/renderer.rb#48 + def render_partial(context, options, &block); end + + # source://actionview//lib/action_view/renderer/renderer.rb#27 + def render_to_object(context, options); end + + private + + # source://actionview//lib/action_view/renderer/renderer.rb#103 + def collection_from_object(object); end + + # source://actionview//lib/action_view/renderer/renderer.rb#96 + def collection_from_options(options); end + + # source://actionview//lib/action_view/renderer/renderer.rb#61 + def render_partial_to_object(context, options, &block); end + + # source://actionview//lib/action_view/renderer/renderer.rb#57 + def render_template_to_object(context, options); end +end + +# source://actionview//lib/action_view/rendering.rb#26 +module ActionView::Rendering + extend ::ActiveSupport::Concern + include ::ActionView::ViewPaths + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + mixes_in_class_methods ::ActionView::Rendering::ClassMethods + + # source://actionview//lib/action_view/rendering.rb#32 + def initialize; end + + # Override process to set up I18n proxy. + # + # source://actionview//lib/action_view/rendering.rb#38 + def process(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/rendering.rb#119 + def render_to_body(options = T.unsafe(nil)); end + + # source://actionview//lib/action_view/rendering.rb#30 + def rendered_format; end + + # An instance of a view class. The default view class is ActionView::Base. + # + # The view class must have the following methods: + # + # * View.new(lookup_context, assigns, controller) — Create a new + # ActionView instance for a controller and we can also pass the arguments. + # + # * View#render(option) — Returns String with the rendered template. + # + # Override this method in a module to change the default behavior. + # + # source://actionview//lib/action_view/rendering.rb#109 + def view_context; end + + # source://actionview//lib/action_view/rendering.rb#95 + def view_context_class; end + + # Returns an object that is able to render templates. + # + # source://actionview//lib/action_view/rendering.rb#114 + def view_renderer; end + + private + + # Normalize args by converting render "foo" to render action: "foo" and + # render "foo/bar" to render template: "foo/bar". + # + # source://actionview//lib/action_view/rendering.rb#153 + def _normalize_args(action = T.unsafe(nil), options = T.unsafe(nil)); end + + # Assign the rendered format to look up context. + # + # source://actionview//lib/action_view/rendering.rb#146 + def _process_format(format); end + + # Normalize options. + # + # source://actionview//lib/action_view/rendering.rb#177 + def _process_render_template_options(options); end + + # Find and render a template based on the options given. + # + # source://actionview//lib/action_view/rendering.rb#127 + def _render_template(options); end +end + +# source://actionview//lib/action_view/rendering.rb#45 +module ActionView::Rendering::ClassMethods + # source://actionview//lib/action_view/rendering.rb#49 + def _helpers; end + + # source://actionview//lib/action_view/rendering.rb#46 + def _routes; end + + # source://actionview//lib/action_view/rendering.rb#59 + def build_view_context_class(klass, supports_path, routes, helpers); end + + # source://actionview//lib/action_view/rendering.rb#76 + def eager_load!; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/rendering.rb#52 + def inherit_view_context_class?; end + + # source://actionview//lib/action_view/rendering.rb#82 + def view_context_class; end +end + +# = Action View Resolver +# +# source://actionview//lib/action_view/template/resolver.rb#11 +class ActionView::Resolver + # source://actionview//lib/action_view/template/resolver.rb#69 + def all_template_paths; end + + # source://actionview//lib/action_view/template/resolver.rb#64 + def built_templates; end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching; end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching=(val); end + + # source://actionview//lib/action_view/template/resolver.rb#79 + def caching?(&_arg0); end + + # source://actionview//lib/action_view/template/resolver.rb#56 + def clear_cache; end + + # Normalizes the arguments and passes it on to find_templates. + # + # source://actionview//lib/action_view/template/resolver.rb#60 + def find_all(name, prefix = T.unsafe(nil), partial = T.unsafe(nil), details = T.unsafe(nil), key = T.unsafe(nil), locals = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/template/resolver.rb#75 + def _find_all(name, prefix, partial, details, key, locals); end + + # This is what child classes implement. No defaults are needed + # because Resolver guarantees that the arguments are present and + # normalized. + # + # @raise [NotImplementedError] + # + # source://actionview//lib/action_view/template/resolver.rb#84 + def find_templates(name, prefix, partial, details, locals = T.unsafe(nil)); end + + class << self + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching; end + + # source://actionview//lib/action_view/template/resolver.rb#50 + def caching=(val); end + + # source://actionview//lib/action_view/template/resolver.rb#53 + def caching?; end + end +end + +# source://actionview//lib/action_view/template/resolver.rb#12 +class ActionView::Resolver::PathParser + # source://actionview//lib/action_view/template/resolver.rb#15 + def build_path_regex; end + + # source://actionview//lib/action_view/template/resolver.rb#36 + def parse(path); end +end + +# source://actionview//lib/action_view/template/resolver.rb#13 +class ActionView::Resolver::PathParser::ParsedPath < ::Struct + # Returns the value of attribute details + # + # @return [Object] the current value of details + # + # source://actionview//lib/action_view/template/resolver.rb#13 + def details; end + + # Sets the attribute details + # + # @param value [Object] the value to set the attribute details to. + # @return [Object] the newly set value + # + # source://actionview//lib/action_view/template/resolver.rb#13 + def details=(_); end + + # Returns the value of attribute path + # + # @return [Object] the current value of path + # + # source://actionview//lib/action_view/template/resolver.rb#13 + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + # + # source://actionview//lib/action_view/template/resolver.rb#13 + def path=(_); end + + class << self + # source://actionview//lib/action_view/template/resolver.rb#13 + def [](*_arg0); end + + # source://actionview//lib/action_view/template/resolver.rb#13 + def inspect; end + + # source://actionview//lib/action_view/template/resolver.rb#13 + def keyword_init?; end + + # source://actionview//lib/action_view/template/resolver.rb#13 + def members; end + + # source://actionview//lib/action_view/template/resolver.rb#13 + def new(*_arg0); end + end +end + +# source://actionview//lib/action_view/buffers.rb#108 +class ActionView::StreamingBuffer + # @return [StreamingBuffer] a new instance of StreamingBuffer + # + # source://actionview//lib/action_view/buffers.rb#109 + def initialize(block); end + + # source://actionview//lib/action_view/buffers.rb#113 + def <<(value); end + + # source://actionview//lib/action_view/buffers.rb#119 + def append=(value); end + + # Returns the value of attribute block. + # + # source://actionview//lib/action_view/buffers.rb#147 + def block; end + + # source://actionview//lib/action_view/buffers.rb#126 + def capture; end + + # source://actionview//lib/action_view/buffers.rb#118 + def concat(value); end + + # source://actionview//lib/action_view/buffers.rb#139 + def html_safe; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/buffers.rb#135 + def html_safe?; end + + # source://actionview//lib/action_view/buffers.rb#143 + def raw; end + + # source://actionview//lib/action_view/buffers.rb#124 + def safe_append=(value); end + + # source://actionview//lib/action_view/buffers.rb#121 + def safe_concat(value); end +end + +# source://actionview//lib/action_view/flows.rb#30 +class ActionView::StreamingFlow < ::ActionView::OutputFlow + # @return [StreamingFlow] a new instance of StreamingFlow + # + # source://actionview//lib/action_view/flows.rb#31 + def initialize(view, fiber); end + + # Appends the contents for the given key. This is called + # by providing and resuming back to the fiber, + # if that's the key it's waiting for. + # + # source://actionview//lib/action_view/flows.rb#65 + def append!(key, value); end + + # Try to get stored content. If the content + # is not available and we're inside the layout fiber, + # then it will begin waiting for the given key and yield. + # + # source://actionview//lib/action_view/flows.rb#43 + def get(key); end + + private + + # @return [Boolean] + # + # source://actionview//lib/action_view/flows.rb#71 + def inside_fiber?; end +end + +# == TODO +# +# * Support streaming from child templates, partials and so on. +# * Rack::Cache needs to support streaming bodies +# +# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#12 +class ActionView::StreamingTemplateRenderer < ::ActionView::TemplateRenderer + # For streaming, instead of rendering a given a template, we return a Body + # object that responds to each. This object is initialized with a block + # that knows how to render the template. + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#51 + 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#63 + def delayed_render(buffer, template, layout, view, locals); end +end + +# A valid Rack::Body (i.e. it responds to each). +# It is initialized with a block that, when called, starts +# rendering the template. +# +# source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#13 +class ActionView::StreamingTemplateRenderer::Body + # @return [Body] a new instance of Body + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#14 + def initialize(&start); end + + # Returns the complete body as a string. + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#29 + def body; end + + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#18 + def each(&block); end + + private + + # This is the same logging logic as in ShowExceptions middleware. + # + # source://actionview//lib/action_view/renderer/streaming_template_renderer.rb#37 + def log_error(exception); end +end + +# source://actionview//lib/action_view/template/error.rb#30 +class ActionView::StrictLocalsError < ::ArgumentError + # @return [StrictLocalsError] a new instance of StrictLocalsError + # + # source://actionview//lib/action_view/template/error.rb#31 + def initialize(argument_error, template); end +end + +# source://actionview//lib/action_view/structured_event_subscriber.rb#6 +class ActionView::StructuredEventSubscriber < ::ActiveSupport::StructuredEventSubscriber + include ::ActionView::StructuredEventSubscriber::Utils + + # @return [StructuredEventSubscriber] a new instance of StructuredEventSubscriber + # + # source://actionview//lib/action_view/structured_event_subscriber.rb#9 + def initialize; end + + # source://actionview//lib/action_view/structured_event_subscriber.rb#44 + def render_collection(event); end + + # source://actionview//lib/action_view/structured_event_subscriber.rb#35 + def render_layout(event); end + + # source://actionview//lib/action_view/structured_event_subscriber.rb#24 + def render_partial(event); end + + # source://actionview//lib/action_view/structured_event_subscriber.rb#14 + def render_template(event); end + + class << self + # source://actionview//lib/action_view/structured_event_subscriber.rb#88 + def attach_to(*_arg0); end + end +end + +# source://actionview//lib/action_view/structured_event_subscriber.rb#73 +class ActionView::StructuredEventSubscriber::Start + include ::ActionView::StructuredEventSubscriber::Utils + + # source://actionview//lib/action_view/structured_event_subscriber.rb#84 + def finish(name, id, payload); end + + # source://actionview//lib/action_view/structured_event_subscriber.rb#76 + def start(name, id, payload); end +end + +# source://actionview//lib/action_view/structured_event_subscriber.rb#56 +module ActionView::StructuredEventSubscriber::Utils + private + + # source://actionview//lib/action_view/structured_event_subscriber.rb#58 + def from_rails_root(string); end + + # source://actionview//lib/action_view/structured_event_subscriber.rb#66 + def rails_root; end +end + +# source://actionview//lib/action_view/structured_event_subscriber.rb#7 +ActionView::StructuredEventSubscriber::VIEWS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/error.rb#256 +class ActionView::SyntaxErrorInTemplate < ::ActionView::Template::Error + # @return [SyntaxErrorInTemplate] a new instance of SyntaxErrorInTemplate + # + # source://actionview//lib/action_view/template/error.rb#257 + def initialize(template, offending_code_string); end + + # source://actionview//lib/action_view/template/error.rb#272 + def annotated_source_code; end + + # source://actionview//lib/action_view/template/error.rb#262 + def message; end +end + +# = Action View \Template +# +# source://actionview//lib/action_view/template.rb#7 +class ActionView::Template + extend ::ActiveSupport::Autoload + extend ::ActionView::Template::Handlers + + # @return [Template] a new instance of Template + # + # source://actionview//lib/action_view/template.rb#199 + def initialize(source, identifier, handler, locals:, format: T.unsafe(nil), variant: T.unsafe(nil), virtual_path: T.unsafe(nil)); end + + # This method is responsible for properly setting the encoding of the + # source. Until this point, we assume that the source is BINARY data. + # If no additional information is supplied, we assume the encoding is + # the same as Encoding.default_external. + # + # The user can also specify the encoding via a comment on the first + # with any template engine, as we process out the encoding comment + # before passing the source on to the template engine, leaving a + # blank line in its stead. + # + # source://actionview//lib/action_view/template.rb#321 + def encode!; end + + # Returns the value of attribute format. + # + # source://actionview//lib/action_view/template.rb#195 + def format; end + + # Returns the value of attribute handler. + # + # source://actionview//lib/action_view/template.rb#194 + def handler; end + + # Returns the value of attribute identifier. + # + # source://actionview//lib/action_view/template.rb#194 + def identifier; end + + # source://actionview//lib/action_view/template.rb#300 + def inspect; end + + # The locals this template has been or will be compiled for, or nil if this + # is a strict locals template. + # + # source://actionview//lib/action_view/template.rb#223 + def locals; end + + # Exceptions are marshalled when using the parallel test runner with DRb, so we need + # to ensure that references to the template object can be marshalled as well. This means forgoing + # the marshalling of the compiler mutex and instantiating that again on unmarshalling. + # + # source://actionview//lib/action_view/template.rb#387 + def marshal_dump; end + + # source://actionview//lib/action_view/template.rb#391 + def marshal_load(array); end + + # source://actionview//lib/action_view/template.rb#396 + def method_name; end + + # Render a template. If the template was not compiled yet, it is done + # exactly before rendering. + # + # This method is instrumented as "!render_template.action_view". Notice that + # we use a bang in this instrumentation because you don't want to + # consume this in production. This is only slow if it's being listened to. + # + # source://actionview//lib/action_view/template.rb#271 + def render(view, locals, buffer = T.unsafe(nil), implicit_locals: T.unsafe(nil), add_to_stack: T.unsafe(nil), &block); end + + # source://actionview//lib/action_view/template.rb#296 + def short_identifier; end + + # source://actionview//lib/action_view/template.rb#304 + def source; end + + # source://actionview//lib/action_view/template.rb#231 + def spot(location); end + + # This method is responsible for marking a template as having strict locals + # which means the template can only accept the locals defined in a magic + # comment. For example, if your template accepts the locals +title+ and + # +comment_count+, add the following to your template file: + # + # <%# locals: (title: "Default title", comment_count: 0) %> + # + # Strict locals are useful for validating template arguments and for + # specifying defaults. + # + # source://actionview//lib/action_view/template.rb#366 + def strict_locals!; end + + # Returns whether a template is using strict locals. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#380 + def strict_locals?; end + + # Returns whether the underlying handler supports streaming. If so, + # a streaming buffer *may* be passed when it starts rendering. + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template.rb#261 + def supports_streaming?; end + + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # source://actionview//lib/action_view/template.rb#251 + def translate_location(backtrace_location, spot); end + + # source://actionview//lib/action_view/template.rb#292 + def type; end + + # Returns the value of attribute variable. + # + # source://actionview//lib/action_view/template.rb#195 + def variable; end + + # Returns the value of attribute variant. + # + # source://actionview//lib/action_view/template.rb#195 + def variant; end + + # Returns the value of attribute virtual_path. + # + # source://actionview//lib/action_view/template.rb#195 + def virtual_path; end + + private + + # Among other things, this method is responsible for properly setting + # the encoding of the compiled template. + # + # If the template engine handles encodings, we send the encoded + # String to the engine without further processing. This allows + # the template engine to support additional mechanisms for + # + # Otherwise, after we figure out the correct encoding, we then + # encode the source into Encoding.default_internal. + # In general, this means that templates will be UTF-8 inside of Rails, + # regardless of the original source encoding. + # + # source://actionview//lib/action_view/template.rb#500 + 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#418 + def compile!(view); end + + # This method compiles the source of the template. The compilation of templates + # involves setting strict_locals! if applicable, encoding the template, and setting + # frozen string literal. + # + # source://actionview//lib/action_view/template.rb#443 + def compiled_source; end + + # source://actionview//lib/action_view/template.rb#405 + def find_node_by_id(node, node_id); end + + # source://actionview//lib/action_view/template.rb#549 + def handle_render_error(view, e); end + + # source://actionview//lib/action_view/template.rb#574 + def identifier_method_name; end + + # source://actionview//lib/action_view/template.rb#578 + def instrument(action, &block); end + + # source://actionview//lib/action_view/template.rb#586 + def instrument_payload; end + + # source://actionview//lib/action_view/template.rb#582 + def instrument_render_template(&block); end + + # source://actionview//lib/action_view/template.rb#561 + def locals_code; end + + # source://actionview//lib/action_view/template.rb#541 + def offset; end + + class << self + # source://actionview//lib/action_view/template.rb#180 + def frozen_string_literal; end + + # source://actionview//lib/action_view/template.rb#180 + def frozen_string_literal=(_arg0); end + + # source://actionview//lib/action_view/template.rb#184 + def mime_types_implementation=(implementation); end + end +end + +# The Template::Error exception is raised when the compilation or rendering of the template +# fails. This exception then gathers a bunch of intimate details and uses it to report a +# precise exception message. +# +# source://actionview//lib/action_view/template/error.rb#165 +class ActionView::Template::Error < ::ActionView::ActionViewError + # @return [Error] a new instance of Error + # + # source://actionview//lib/action_view/template/error.rb#173 + def initialize(template); end + + # source://actionview//lib/action_view/template/error.rb#231 + def annotated_source_code; end + + # source://actionview//lib/action_view/template/error.rb#182 + def backtrace; end + + # source://actionview//lib/action_view/template/error.rb#186 + def backtrace_locations; end + + # Override to prevent #cause resetting during re-raise. + # + # source://actionview//lib/action_view/template/error.rb#169 + def cause; end + + # source://actionview//lib/action_view/template/error.rb#190 + def file_name; end + + # source://actionview//lib/action_view/template/error.rb#223 + def line_number; end + + # source://actionview//lib/action_view/template/error.rb#203 + def source_extract(indentation = T.unsafe(nil)); end + + # source://actionview//lib/action_view/template/error.rb#194 + def sub_template_message; end + + # source://actionview//lib/action_view/template/error.rb#218 + def sub_template_of(template_path); end + + # Returns the value of attribute template. + # + # source://actionview//lib/action_view/template/error.rb#171 + def template; end + + private + + # source://actionview//lib/action_view/template/error.rb#244 + def formatted_code_for(source_code, line_counter, indent); end + + # source://actionview//lib/action_view/template/error.rb#236 + def source_location; end +end + +# source://actionview//lib/action_view/template/error.rb#166 +ActionView::Template::Error::SOURCE_CODE_RADIUS = T.let(T.unsafe(nil), Integer) + +# = Action View HTML Template +# +# source://actionview//lib/action_view/template/html.rb#6 +class ActionView::Template::HTML + # @return [HTML] a new instance of HTML + # + # source://actionview//lib/action_view/template/html.rb#9 + def initialize(string, type); end + + # source://actionview//lib/action_view/template/html.rb#28 + def format; end + + # source://actionview//lib/action_view/template/html.rb#14 + def identifier; end + + # source://actionview//lib/action_view/template/html.rb#18 + def inspect; end + + # source://actionview//lib/action_view/template/html.rb#24 + def render(*args); end + + # source://actionview//lib/action_view/template/html.rb#20 + def to_str; end + + # source://actionview//lib/action_view/template/html.rb#7 + def type; end +end + +# = Action View Template Handlers +# +# source://actionview//lib/action_view/template/handlers.rb#6 +module ActionView::Template::Handlers + # source://actionview//lib/action_view/template/handlers.rb#61 + def handler_for_extension(extension); end + + # source://actionview//lib/action_view/template/handlers.rb#56 + def register_default_template_handler(extension, klass); end + + # Register an object that knows how to handle template files with the given + # extensions. This can be used to implement new template types. + # The handler must respond to +:call+, which will be passed the template + # and should return the rendered template as a String. + # + # @raise [ArgumentError] + # + # source://actionview//lib/action_view/template/handlers.rb#31 + def register_template_handler(*extensions, handler); end + + # source://actionview//lib/action_view/template/handlers.rb#52 + def registered_template_handler(extension); end + + # source://actionview//lib/action_view/template/handlers.rb#48 + def template_handler_extensions; end + + # Opposite to register_template_handler. + # + # source://actionview//lib/action_view/template/handlers.rb#40 + def unregister_template_handler(*extensions); end + + class << self + # @private + # + # source://actionview//lib/action_view/template/handlers.rb#12 + def extended(base); end + + # source://actionview//lib/action_view/template/handlers.rb#23 + def extensions; end + end +end + +# source://actionview//lib/action_view/template/handlers/builder.rb#5 +class ActionView::Template::Handlers::Builder + # source://actionview//lib/action_view/template/handlers/builder.rb#8 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format; end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def default_format?; end + + private + + # source://actionview//lib/action_view/template/handlers/builder.rb#17 + def require_engine; end + + class << self + # source://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 + + private + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def __class_attr_default_format; end + + # source://actionview//lib/action_view/template/handlers/builder.rb#6 + def __class_attr_default_format=(new_value); end + end +end + +# source://actionview//lib/action_view/template/handlers/erb.rb#9 +class ActionView::Template::Handlers::ERB + # source://actionview//lib/action_view/template/handlers/erb.rb#65 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#37 + def handles_encoding?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines=(_arg0); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines?; end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#33 + def supports_streaming?; end + + # Translate an error location returned by ErrorHighlight to the correct + # source location inside the template. + # + # source://actionview//lib/action_view/template/handlers/erb.rb#43 + def translate_location(spot, _backtrace_location, source); end + + private + + # Return the offset between the error lineno and the source lineno. + # Searches in reverse from the backtrace lineno so we have a better + # chance of finding the correct line + # + # The compiled template is likely to be longer than the source. + # Use the difference between the compiled and source sizes to + # determine the earliest line that could contain the highlight. + # + # @raise [LocationParsingError] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#119 + def find_lineno_offset(compiled, source_lines, highlight, error_lineno); end + + # Find which token in the source template spans the byte range that + # contains the error_column, then return the offset compared to the + # original source template. + # + # Iterate consecutive pairs of CODE or TEXT tokens, requiring + # a match of the first token before matching either token. + # + # For example, if we want to find tokens A, B, C, we do the following: + # 1. Find a match for A: test error_column or advance scanner. + # 2. Find a match for B or A: + # a. If B: start over with next token set (B, C). + # b. If A: test error_column or advance scanner. + # c. Otherwise: Advance 1 byte + # + # Prioritize matching the next token over the current token once + # a match for the current token has been found. This is to prevent + # the current token from looping past the next token if they both + # match (i.e. if the current token is a single space character). + # + # @raise [LocationParsingError] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#152 + def find_offset(compiled, source_tokens, error_column); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#177 + def offset_source_tokens(source_tokens); end + + # @raise [WrongEncodingError] + # + # source://actionview//lib/action_view/template/handlers/erb.rb#97 + def valid_encoding(string, encoding); end + + class << self + # source://actionview//lib/action_view/template/handlers/erb.rb#29 + def call(template, source); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def erb_implementation?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def erb_trim_mode?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def escape_ignore_list?; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines=(value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def strip_trailing_newlines?; end + + private + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def __class_attr_erb_implementation; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#17 + def __class_attr_erb_implementation=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def __class_attr_erb_trim_mode; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#14 + def __class_attr_erb_trim_mode=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def __class_attr_escape_ignore_list; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#20 + def __class_attr_escape_ignore_list=(new_value); end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def __class_attr_strip_trailing_newlines; end + + # source://actionview//lib/action_view/template/handlers/erb.rb#23 + def __class_attr_strip_trailing_newlines=(new_value); end + end +end + +# source://actionview//lib/action_view/template/handlers/erb.rb#25 +ActionView::Template::Handlers::ERB::ENCODING_TAG = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#9 +class ActionView::Template::Handlers::ERB::Erubi < ::Erubi::Engine + # @return [Erubi] a new instance of Erubi + # + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#11 + def initialize(input, properties = T.unsafe(nil)); end + + private + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#65 + def add_code(code); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#47 + def add_expression(indicator, code); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#70 + def add_postamble(_); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#30 + def add_text(text); end + + # source://actionview//lib/action_view/template/handlers/erb/erubi.rb#75 + def flush_newline_if_pending(src); end +end + +# source://actionview//lib/action_view/template/handlers/erb/erubi.rb#45 +ActionView::Template::Handlers::ERB::Erubi::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template/handlers/erb.rb#27 +class ActionView::Template::Handlers::ERB::LocationParsingError < ::StandardError; end + +# source://actionview//lib/action_view/template/handlers/html.rb#5 +class ActionView::Template::Handlers::Html < ::ActionView::Template::Handlers::Raw + # source://actionview//lib/action_view/template/handlers/html.rb#6 + def call(template, source); end +end + +# source://actionview//lib/action_view/template/handlers/raw.rb#5 +class ActionView::Template::Handlers::Raw + # source://actionview//lib/action_view/template/handlers/raw.rb#6 + def call(template, source); end +end + +# source://actionview//lib/action_view/template/inline.rb#7 +class ActionView::Template::Inline < ::ActionView::Template + # source://actionview//lib/action_view/template/inline.rb#16 + def compile(mod); end +end + +# This finalizer is needed (and exactly with a proc inside another proc) +# otherwise templates leak in development. +# +# source://actionview//lib/action_view/template/inline.rb#8 +ActionView::Template::Inline::Finalizer = T.let(T.unsafe(nil), Proc) + +# source://actionview//lib/action_view/template.rb#308 +ActionView::Template::LEADING_ENCODING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://actionview//lib/action_view/template.rb#197 +ActionView::Template::NONE = T.let(T.unsafe(nil), Object) + +# source://actionview//lib/action_view/template.rb#558 +ActionView::Template::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# = Action View RawFile Template +# +# source://actionview//lib/action_view/template/raw_file.rb#6 +class ActionView::Template::RawFile + # @return [RawFile] a new instance of RawFile + # + # source://actionview//lib/action_view/template/raw_file.rb#9 + def initialize(filename); end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def format; end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def format=(_arg0); end + + # source://actionview//lib/action_view/template/raw_file.rb#16 + def identifier; end + + # source://actionview//lib/action_view/template/raw_file.rb#20 + def render(*args); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template/raw_file.rb#24 + def supports_streaming?; end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def type; end + + # source://actionview//lib/action_view/template/raw_file.rb#7 + def type=(_arg0); end +end + +# = Action View Renderable Template for objects that respond to #render_in +# +# source://actionview//lib/action_view/template/renderable.rb#6 +class ActionView::Template::Renderable + # @return [Renderable] a new instance of Renderable + # + # source://actionview//lib/action_view/template/renderable.rb#7 + def initialize(renderable); end + + # source://actionview//lib/action_view/template/renderable.rb#25 + def format; end + + # source://actionview//lib/action_view/template/renderable.rb#11 + def identifier; end + + # source://actionview//lib/action_view/template/renderable.rb#15 + def render(context, *args); end +end + +# source://actionview//lib/action_view/template.rb#10 +ActionView::Template::STRICT_LOCALS_REGEX = T.let(T.unsafe(nil), Regexp) + +# SimpleType is mostly just a stub implementation for when Action View +# is used without Action Dispatch. +# +# source://actionview//lib/action_view/template/types.rb#9 +class ActionView::Template::SimpleType + # @return [SimpleType] a new instance of SimpleType + # + # source://actionview//lib/action_view/template/types.rb#29 + def initialize(symbol); end + + # source://actionview//lib/action_view/template/types.rb#43 + def ==(type); end + + # source://actionview//lib/action_view/template/types.rb#38 + def ref; end + + # Returns the value of attribute symbol. + # + # source://actionview//lib/action_view/template/types.rb#27 + def symbol; end + + # source://actionview//lib/action_view/template/types.rb#33 + def to_s; end + + # source://actionview//lib/action_view/template/types.rb#36 + def to_str; end + + # source://actionview//lib/action_view/template/types.rb#41 + def to_sym; end + + class << self + # source://actionview//lib/action_view/template/types.rb#14 + def [](type); end + + # Returns the value of attribute symbols. + # + # source://actionview//lib/action_view/template/types.rb#12 + def symbols; end + + # :nodoc + # + # @return [Boolean] + # + # source://actionview//lib/action_view/template/types.rb#22 + def valid_symbols?(symbols); end + end +end + +# source://actionview//lib/action_view/template/sources.rb#5 +module ActionView::Template::Sources + extend ::ActiveSupport::Autoload +end + +# source://actionview//lib/action_view/template/sources/file.rb#6 +class ActionView::Template::Sources::File + # @return [File] a new instance of File + # + # source://actionview//lib/action_view/template/sources/file.rb#7 + def initialize(filename); end + + # source://actionview//lib/action_view/template/sources/file.rb#11 + def to_s; end +end + +# = Action View Text Template +# +# source://actionview//lib/action_view/template/text.rb#6 +class ActionView::Template::Text + # @return [Text] a new instance of Text + # + # source://actionview//lib/action_view/template/text.rb#9 + def initialize(string); end + + # source://actionview//lib/action_view/template/text.rb#27 + def format; end + + # source://actionview//lib/action_view/template/text.rb#13 + def identifier; end + + # source://actionview//lib/action_view/template/text.rb#17 + 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#48 +ActionView::Template::Types = ActionView::Template::SimpleType + +# 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#254 +ActionView::TemplateError = ActionView::Template::Error + +# = Action View \TemplatePath +# +# Represents a template path within ActionView's lookup and rendering system, +# like "users/show" +# +# TemplatePath makes it convenient to convert between separate name, prefix, +# partial arguments and the virtual path. +# +# source://actionview//lib/action_view/template_path.rb#11 +class ActionView::TemplatePath + # @return [TemplatePath] a new instance of TemplatePath + # + # source://actionview//lib/action_view/template_path.rb#47 + def initialize(name, prefix, partial, virtual); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_path.rb#64 + def ==(other); end + + # @return [Boolean] + # + # source://actionview//lib/action_view/template_path.rb#61 + def eql?(other); end + + # source://actionview//lib/action_view/template_path.rb#57 + def hash; end + + # Returns the value of attribute name. + # + # source://actionview//lib/action_view/template_path.rb#12 + def name; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template_path.rb#12 + def partial; end + + # Returns the value of attribute partial. + # + # source://actionview//lib/action_view/template_path.rb#13 + def partial?; end + + # Returns the value of attribute prefix. + # + # source://actionview//lib/action_view/template_path.rb#12 + def prefix; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#55 + def to_s; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#54 + def to_str; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#12 + def virtual; end + + # Returns the value of attribute virtual. + # + # source://actionview//lib/action_view/template_path.rb#14 + def virtual_path; end + + class << self + # Convert name, prefix, and partial into a TemplatePath + # + # source://actionview//lib/action_view/template_path.rb#43 + def build(name, prefix, partial); end + + # Build a TemplatePath form a virtual path + # + # source://actionview//lib/action_view/template_path.rb#28 + def parse(virtual); end + + # Convert name, prefix, and partial into a virtual path string + # + # source://actionview//lib/action_view/template_path.rb#17 + def virtual(name, prefix, partial); end + end +end + +# source://actionview//lib/action_view/renderer/template_renderer.rb#4 +class ActionView::TemplateRenderer < ::ActionView::AbstractRenderer + # source://actionview//lib/action_view/renderer/template_renderer.rb#5 + def render(context, options); end + + private + + # Determine the template to be rendered using the given options. + # + # source://actionview//lib/action_view/renderer/template_renderer.rb#16 + def determine_template(options); end + + # This is the method which actually finds the layout using details in the lookup + # context object. If no layout is found, it checks if at least a layout with + # the given name exists across all details before raising the error. + # + # source://actionview//lib/action_view/renderer/template_renderer.rb#88 + def find_layout(layout, keys, formats); end + + # Renders the given template. A string representing the layout can be + # supplied as well. + # + # source://actionview//lib/action_view/renderer/template_renderer.rb#58 + def render_template(view, template, layout_name, locals); end + + # source://actionview//lib/action_view/renderer/template_renderer.rb#71 + def render_with_layout(view, template, path, locals); end + + # source://actionview//lib/action_view/renderer/template_renderer.rb#92 + def resolve_layout(layout, keys, formats); end +end + +# source://actionview//lib/action_view/unbound_template.rb#6 +class ActionView::UnboundTemplate + # @return [UnboundTemplate] a new instance of UnboundTemplate + # + # source://actionview//lib/action_view/unbound_template.rb#10 + def initialize(source, identifier, details:, virtual_path:); end + + # source://actionview//lib/action_view/unbound_template.rb#20 + def bind_locals(locals); end + + # source://actionview//lib/action_view/unbound_template.rb#44 + def built_templates; end + + # Returns the value of attribute details. + # + # source://actionview//lib/action_view/unbound_template.rb#7 + def details; end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def format(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def handler(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def locale(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/unbound_template.rb#8 + def variant(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute virtual_path. + # + # source://actionview//lib/action_view/unbound_template.rb#7 + def virtual_path; end + + private + + # source://actionview//lib/action_view/unbound_template.rb#49 + def build_template(locals); end + + # source://actionview//lib/action_view/unbound_template.rb#63 + def normalize_locals(locals); end +end + +# source://actionview//lib/action_view/gem_version.rb#9 +module ActionView::VERSION; end + +# source://actionview//lib/action_view/gem_version.rb#10 +ActionView::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/gem_version.rb#11 +ActionView::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/gem_version.rb#13 +ActionView::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) + +# source://actionview//lib/action_view/gem_version.rb#15 +ActionView::VERSION::STRING = T.let(T.unsafe(nil), String) + +# source://actionview//lib/action_view/gem_version.rb#12 +ActionView::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://actionview//lib/action_view/view_paths.rb#4 +module ActionView::ViewPaths + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActionView::ViewPaths::ClassMethods + + # The prefixes used in render "foo" shortcuts. + # + # source://actionview//lib/action_view/view_paths.rb#81 + def _prefixes; end + + # source://actionview//lib/action_view/view_paths.rb#11 + def any_templates?(*_arg0, **_arg1, &_arg2); end + + # Append a path to the list of view paths for the current LookupContext. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#103 + def append_view_path(path); end + + # source://actionview//lib/action_view/view_paths.rb#93 + def details_for_lookup; end + + # source://actionview//lib/action_view/view_paths.rb#11 + def formats(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def formats=(arg); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def locale(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def locale=(arg); end + + # LookupContext is the object responsible for holding all + # information required for looking up templates, i.e. view paths and + # details. Check ActionView::LookupContext for more information. + # + # source://actionview//lib/action_view/view_paths.rb#88 + def lookup_context; end + + # Prepend a path to the list of view paths for the current LookupContext. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#113 + def prepend_view_path(path); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def template_exists?(*_arg0, **_arg1, &_arg2); end + + # source://actionview//lib/action_view/view_paths.rb#11 + def view_paths(*_arg0, **_arg1, &_arg2); end +end + +# source://actionview//lib/action_view/view_paths.rb#14 +module ActionView::ViewPaths::ClassMethods + # source://actionview//lib/action_view/view_paths.rb#31 + def _build_view_paths(paths); end + + # source://actionview//lib/action_view/view_paths.rb#23 + def _prefixes; end + + # source://actionview//lib/action_view/view_paths.rb#15 + def _view_paths; end + + # source://actionview//lib/action_view/view_paths.rb#19 + def _view_paths=(paths); end + + # Append a path to the list of view paths for this controller. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#44 + def append_view_path(path); end + + # Prepend a path to the list of view paths for this controller. + # + # ==== Parameters + # * path - If a String is provided, it gets converted into + # the default view path. You may also provide a custom view path + # (see ActionView::PathSet for more information) + # + # source://actionview//lib/action_view/view_paths.rb#54 + def prepend_view_path(path); end + + # A list of all of the default view paths for this controller. + # + # source://actionview//lib/action_view/view_paths.rb#59 + def view_paths; end + + # Set the view paths. + # + # ==== Parameters + # * paths - If a PathSet is provided, use that; + # otherwise, process the parameter into a PathSet. + # + # source://actionview//lib/action_view/view_paths.rb#68 + def view_paths=(paths); end + + private + + # Override this method in your controller if you want to change paths prefixes for finding views. + # Prefixes defined here will still be added to parents' ._prefixes. + # + # source://actionview//lib/action_view/view_paths.rb#75 + def local_prefixes; end +end + +# source://actionview//lib/action_view/template/error.rb#14 +class ActionView::WrongEncodingError < ::ActionView::EncodingError + # @return [WrongEncodingError] a new instance of WrongEncodingError + # + # source://actionview//lib/action_view/template/error.rb#15 + def initialize(string, encoding); end + + # source://actionview//lib/action_view/template/error.rb#19 + def message; end +end + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end diff --git a/sorbet/rbi/gems/activesupport@7.0.4.rbi b/sorbet/rbi/gems/activesupport@7.0.4.rbi deleted file mode 100644 index 25e89de..0000000 --- a/sorbet/rbi/gems/activesupport@7.0.4.rbi +++ /dev/null @@ -1,3696 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `activesupport` gem. -# Please instead update this file by running `bin/tapioca gem activesupport`. - -::RUBY19 = T.let(T.unsafe(nil), TrueClass) - -module ActiveSupport - extend ::ActiveSupport::LazyLoadHooks - extend ::ActiveSupport::Autoload - - def parse_json_times; end - def parse_json_times=(val); end - def test_order; end - def test_order=(val); end - def test_parallelization_threshold; end - def test_parallelization_threshold=(val); end - - class << self - def cache_format_version; end - def cache_format_version=(value); end - def eager_load!; end - def error_reporter; end - def error_reporter=(_arg0); end - def escape_html_entities_in_json(*_arg0, &_arg1); end - def escape_html_entities_in_json=(arg); end - def gem_version; end - def json_encoder(*_arg0, &_arg1); end - def json_encoder=(arg); end - def parse_json_times; end - def parse_json_times=(val); end - def test_order; end - def test_order=(val); end - def test_parallelization_threshold; end - def test_parallelization_threshold=(val); end - def time_precision(*_arg0, &_arg1); end - def time_precision=(arg); end - def to_time_preserves_timezone; end - def to_time_preserves_timezone=(value); end - def use_standard_json_time_format(*_arg0, &_arg1); end - def use_standard_json_time_format=(arg); end - def utc_to_local_returns_utc_offset_times; end - def utc_to_local_returns_utc_offset_times=(value); end - def version; end - end -end - -module ActiveSupport::ActionableError - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods - - class << self - def actions(error); end - 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 - -module ActiveSupport::ActionableError::ClassMethods - def action(name, &block); end -end - -class ActiveSupport::ActionableError::NonActionable < ::StandardError; end - -class ActiveSupport::ArrayInquirer < ::Array - def any?(*candidates); end - - private - - def method_missing(name, *args); end - def respond_to_missing?(name, include_private = T.unsafe(nil)); end -end - -module ActiveSupport::Autoload - def autoload(const_name, path = T.unsafe(nil)); end - def autoload_at(path); end - def autoload_under(path); end - def autoloads; end - def eager_autoload; end - def eager_load!; end - - class << self - def extended(base); end - end -end - -class ActiveSupport::BacktraceCleaner - def initialize; end - - def add_filter(&block); end - def add_silencer(&block); end - def clean(backtrace, kind = T.unsafe(nil)); end - def filter(backtrace, kind = T.unsafe(nil)); end - def remove_filters!; end - def remove_silencers!; end - - private - - def add_gem_filter; end - def add_gem_silencer; end - def add_stdlib_silencer; end - def filter_backtrace(backtrace); end - def noise(backtrace); end - def silence(backtrace); end -end - -ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) - -module ActiveSupport::Benchmarkable - def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end -end - -module ActiveSupport::BigDecimalWithDefaultFormat - def to_s(format = T.unsafe(nil)); end -end - -module ActiveSupport::Cache - class << self - def expand_cache_key(key, namespace = T.unsafe(nil)); end - def format_version; end - def format_version=(_arg0); end - def lookup_store(store = T.unsafe(nil), *parameters); end - - private - - def retrieve_cache_key(key); end - def retrieve_store_class(store); end - end -end - -module ActiveSupport::Cache::Coders - class << self - def [](version); end - end -end - -module ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - - def load(payload); end -end - -ActiveSupport::Cache::Coders::MARK_61 = T.let(T.unsafe(nil), String) -ActiveSupport::Cache::Coders::MARK_70_COMPRESSED = T.let(T.unsafe(nil), String) -ActiveSupport::Cache::Coders::MARK_70_UNCOMPRESSED = T.let(T.unsafe(nil), String) - -module ActiveSupport::Cache::Coders::Rails61Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails61Coder - - def dump(entry); end - def dump_compressed(entry, threshold); end -end - -module ActiveSupport::Cache::Coders::Rails70Coder - include ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Loader - extend ::ActiveSupport::Cache::Coders::Rails70Coder - - def dump(entry); end - def dump_compressed(entry, threshold); end -end - -ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) - -class ActiveSupport::Cache::Entry - def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end - - def bytesize; end - def compressed(compress_threshold); end - def compressed?; end - def dup_value!; end - def expired?; end - def expires_at; end - def expires_at=(value); end - def local?; end - def mismatched?(version); end - def pack; end - def value; end - def version; end - - private - - def uncompress(value); end - - class << self - def unpack(members); end - end -end - -class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store - def initialize(cache_path, **options); end - - def cache_path; end - def cleanup(options = T.unsafe(nil)); end - def clear(options = T.unsafe(nil)); end - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - def delete_matched(matcher, options = T.unsafe(nil)); end - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - - private - - def delete_empty_directories(dir); end - def delete_entry(key, **options); end - def ensure_cache_path(path); end - def file_path_key(path); end - def lock_file(file_name, &block); end - def modify_value(name, amount, options); end - def normalize_key(key, options); end - def read_entry(key, **options); end - def read_serialized_entry(key, **_arg1); end - def search_dir(dir, &callback); end - def write_entry(key, entry, **options); end - def write_serialized_entry(key, payload, **options); end - - class << self - def supports_cache_versioning?; end - end -end - -ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) -ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) -ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) -ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) - -class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store - def initialize(options = T.unsafe(nil)); end - - def cleanup(options = T.unsafe(nil)); end - def clear(options = T.unsafe(nil)); end - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - def delete_matched(matcher, options = T.unsafe(nil)); end - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - def inspect; end - def prune(target_size, max_time = T.unsafe(nil)); end - def pruning?; end - def synchronize(&block); end - - private - - def cached_size(key, payload); end - def default_coder; end - def delete_entry(key, **options); end - def modify_value(name, amount, options); end - def read_entry(key, **options); end - def write_entry(key, entry, **options); end - - class << self - def supports_cache_versioning?; end - end -end - -module ActiveSupport::Cache::MemoryStore::DupCoder - extend ::ActiveSupport::Cache::MemoryStore::DupCoder - - def dump(entry); end - def dump_compressed(entry, threshold); end - def load(entry); end -end - -ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) - -module ActiveSupport::Cache::NullCoder - extend ::ActiveSupport::Cache::NullCoder - - def dump(entry); end - def dump_compressed(entry, threshold); end - def load(payload); end -end - -class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store - include ::ActiveSupport::Cache::Strategy::LocalCache - - private - - def read_entry(key, **s); end - def write_entry(key, entry, **_arg2); end - - class << self - def supports_cache_versioning?; end - end -end - -ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) - -class ActiveSupport::Cache::Store - def initialize(options = T.unsafe(nil)); end - - def cleanup(options = T.unsafe(nil)); end - def clear(options = T.unsafe(nil)); end - def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - def delete(name, options = T.unsafe(nil)); end - def delete_matched(matcher, options = T.unsafe(nil)); end - def delete_multi(names, options = T.unsafe(nil)); end - def exist?(name, options = T.unsafe(nil)); end - def fetch(name, options = T.unsafe(nil), &block); end - def fetch_multi(*names); end - def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end - def logger; end - def logger=(val); end - def mute; end - def new_entry(value, options = T.unsafe(nil)); end - def options; end - def read(name, options = T.unsafe(nil)); end - def read_multi(*names); end - def silence; end - def silence!; end - def silence?; end - def write(name, value, options = T.unsafe(nil)); end - def write_multi(hash, options = T.unsafe(nil)); end - - private - - def default_coder; end - def delete_entry(key, **options); end - def delete_multi_entries(entries, **options); end - def deserialize_entry(payload); end - def expanded_key(key); end - def expanded_version(key); end - def get_entry_value(entry, name, options); end - def handle_expired_entry(entry, key, options); end - def instrument(operation, key, options = T.unsafe(nil)); end - def key_matcher(pattern, options); end - def merged_options(call_options); end - def namespace_key(key, options = T.unsafe(nil)); end - def normalize_key(key, options = T.unsafe(nil)); end - def normalize_options(options); end - def normalize_version(key, options = T.unsafe(nil)); end - def read_entry(key, **options); end - def read_multi_entries(names, **options); end - def save_block_result_to_cache(name, options); end - def serialize_entry(entry, **options); end - def write_entry(key, entry, **options); end - def write_multi_entries(hash, **options); end - - class << self - def logger; end - def logger=(val); end - - private - - def ensure_connection_pool_added!; end - def retrieve_pool_options(options); end - end -end - -module ActiveSupport::Cache::Strategy; end - -module ActiveSupport::Cache::Strategy::LocalCache - def cleanup(**options); end - def clear(**options); end - def decrement(name, amount = T.unsafe(nil), **options); end - def delete_matched(matcher, options = T.unsafe(nil)); end - def increment(name, amount = T.unsafe(nil), **options); end - def middleware; end - def with_local_cache(&block); end - - private - - def bypass_local_cache(&block); end - def delete_entry(key, **_arg1); end - def local_cache; end - def local_cache_key; end - def read_multi_entries(keys, **options); end - def read_serialized_entry(key, raw: T.unsafe(nil), **options); end - def use_temporary_local_cache(temporary_cache); end - def write_cache_value(name, value, **options); end - def write_serialized_entry(key, payload, **_arg2); end -end - -module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry - - def cache_for(local_cache_key); end - def set_cache_for(local_cache_key, value); end -end - -class ActiveSupport::Cache::Strategy::LocalCache::LocalStore - def initialize; end - - def clear(options = T.unsafe(nil)); end - def delete_entry(key); end - def fetch_entry(key); end - def read_entry(key); end - def read_multi_entries(keys); end - def write_entry(key, entry); end -end - -ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) - -class ActiveSupport::CachingKeyGenerator - def initialize(key_generator); end - - def generate_key(*args); end -end - -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 - - def run_callbacks(kind); end - - private - - 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 - -ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) - -module ActiveSupport::Callbacks::CallTemplate - class << self - def build(filter, callback); end - end -end - -class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 - def initialize(block); end - - def expand(target, value, block); end - def inverted_lambda; end - def make_lambda; end -end - -class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 - def initialize(block); end - - def expand(target, value, block); end - def inverted_lambda; end - def make_lambda; end -end - -class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 - def initialize(block); end - - def expand(target, value, block); end - def inverted_lambda; end - def make_lambda; end -end - -class ActiveSupport::Callbacks::CallTemplate::MethodCall - def initialize(method); end - - def expand(target, value, block); end - def inverted_lambda; end - def make_lambda; end -end - -class ActiveSupport::Callbacks::CallTemplate::ObjectCall - def initialize(target, method); end - - def expand(target, value, block); end - def inverted_lambda; end - def make_lambda; end -end - -class ActiveSupport::Callbacks::CallTemplate::ProcCall - def initialize(target); end - - def expand(target, value, block); end - def inverted_lambda; end - def make_lambda; end -end - -class ActiveSupport::Callbacks::Callback - def initialize(name, filter, kind, options, chain_config); end - - def apply(callback_sequence); end - def chain_config; end - def current_scopes; end - def duplicates?(other); end - def filter; end - def kind; end - def kind=(_arg0); end - def matches?(_kind, _filter); end - def merge_conditional_options(chain, if_option:, unless_option:); end - def name; end - def name=(_arg0); end - - private - - def check_conditionals(conditionals); end - def conditions_lambdas; end - - class << self - def build(chain, filter, kind, options); end - end -end - -ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -class ActiveSupport::Callbacks::CallbackChain - include ::Enumerable - - def initialize(name, config); end - - def append(*callbacks); end - def clear; end - def compile; end - def config; end - def delete(o); end - def each(&block); end - def empty?; end - def index(o); end - def insert(index, o); end - def name; end - def prepend(*callbacks); end - - protected - - def chain; end - - private - - def append_one(callback); end - def default_terminator; end - def initialize_copy(other); end - def prepend_one(callback); end - def remove_duplicates(callback); end -end - -class ActiveSupport::Callbacks::CallbackSequence - def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end - - def after(&after); end - def around(call_template, user_conditions); end - def before(&before); end - def expand_call_template(arg, block); end - def final?; end - def invoke_after(arg); end - def invoke_before(arg); end - def nested; end - def skip?(arg); end -end - -module ActiveSupport::Callbacks::ClassMethods - def __update_callbacks(name); end - def define_callbacks(*names); end - def normalize_callback_params(filters, block); end - def reset_callbacks(name); end - def set_callback(name, *filter_list, &block); end - def skip_callback(name, *filter_list, &block); end - - protected - - def get_callbacks(name); end - def set_callbacks(name, callbacks); end -end - -module ActiveSupport::Callbacks::Conditionals; end - -class ActiveSupport::Callbacks::Conditionals::Value - def initialize(&block); end - - def call(target, value); end -end - -module ActiveSupport::Callbacks::Filters; end - -class ActiveSupport::Callbacks::Filters::After - class << self - def build(callback_sequence, user_callback, user_conditions, chain_config); end - - private - - def conditional(callback_sequence, user_callback, user_conditions); end - def halting(callback_sequence, user_callback); end - def halting_and_conditional(callback_sequence, user_callback, user_conditions); end - def simple(callback_sequence, user_callback); end - end -end - -class ActiveSupport::Callbacks::Filters::Before - class << self - def build(callback_sequence, user_callback, user_conditions, chain_config, filter, name); end - - private - - def halting(callback_sequence, user_callback, halted_lambda, filter, name); end - def halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name); end - end -end - -class ActiveSupport::Callbacks::Filters::Environment < ::Struct - def halted; end - def halted=(_); end - def target; end - def target=(_); end - def value; end - def value=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class ActiveSupport::CodeGenerator - def initialize(owner, path, line); end - - def define_cached_method(name, namespace:, as: T.unsafe(nil), &block); end - def execute; end - - class << self - def batch(owner, path, line); end - end -end - -class ActiveSupport::CodeGenerator::MethodSet - def initialize(namespace); end - - def apply(owner, path, line); end - def define_cached_method(name, as: T.unsafe(nil)); end -end - -ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) - -module ActiveSupport::Concern - def append_features(base); end - def class_methods(&class_methods_module_definition); end - def included(base = T.unsafe(nil), &block); end - def prepend_features(base); end - def prepended(base = T.unsafe(nil), &block); end - - class << self - def extended(base); end - end -end - -class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError - def initialize; end -end - -class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError - def initialize; end -end - -module ActiveSupport::Concurrency; end - -class ActiveSupport::Concurrency::ShareLock - include ::MonitorMixin - - def initialize; end - - def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - def raw_state; end - def sharing; end - def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end - def start_sharing; end - def stop_exclusive(compatible: T.unsafe(nil)); end - def stop_sharing; end - def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end - - private - - def busy_for_exclusive?(purpose); end - def busy_for_sharing?(purpose); end - def eligible_waiters?(compatible); end - def wait_for(method, &block); end -end - -module ActiveSupport::Configurable - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveSupport::Configurable::ClassMethods - - def config; end -end - -module ActiveSupport::Configurable::ClassMethods - def config; end - def configure; end - - private - - 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 - -class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions - def compile_methods!; end - - class << self - def compile_methods!(keys); end - end -end - -class ActiveSupport::ConfigurationFile - def initialize(content_path); end - - def parse(context: T.unsafe(nil), **options); end - - private - - def read(content_path); end - def render(context); end - - class << self - def parse(content_path, **options); end - end -end - -class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end - -class ActiveSupport::CurrentAttributes - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - def initialize; end - - def __callbacks; end - def __callbacks?; end - def _reset_callbacks; end - def _run_reset_callbacks(&block); end - def attributes; end - def attributes=(_arg0); end - def reset; end - def set(set_attributes); end - - private - - def assign_attributes(new_attributes); end - def compute_attributes(keys); end - - class << self - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _reset_callbacks; end - def _reset_callbacks=(value); end - def after_reset(&block); end - def attribute(*names); end - def before_reset(&block); end - def clear_all; end - def instance; end - def reset(*_arg0, &_arg1); end - def reset_all; end - def resets(&block); end - def set(*_arg0, &_arg1); end - - private - - def current_instances; end - def current_instances_key; end - def generated_attribute_methods; end - def method_missing(name, *args, &block); end - def respond_to_missing?(name, _); end - end -end - -module ActiveSupport::Dependencies - class << self - def _autoloaded_tracked_classes; end - def _autoloaded_tracked_classes=(_arg0); end - def _eager_load_paths; end - def _eager_load_paths=(_arg0); end - def autoload_once_paths; end - def autoload_once_paths=(_arg0); end - def autoload_paths; end - def autoload_paths=(_arg0); end - def autoloader; end - def autoloader=(_arg0); end - def clear; end - def eager_load?(path); end - def interlock; end - def interlock=(_arg0); end - def load_interlock(&block); end - def run_interlock(&block); end - def search_for_file(relpath); end - def unload_interlock(&block); end - end -end - -class ActiveSupport::Dependencies::Interlock - def initialize; end - - def done_running; end - def done_unloading; end - def loading(&block); end - def permit_concurrent_loads(&block); end - def raw_state(&block); end - def running(&block); end - def start_running; end - def start_unloading; end - def unloading(&block); end -end - -module ActiveSupport::Dependencies::RequireDependency - def require_dependency(filename); end -end - -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 - - def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end - - def deprecation_horizon; end - def deprecation_horizon=(_arg0); end - - class << self - def allow(*_arg0, &_arg1); end - def behavior(*_arg0, &_arg1); end - def behavior=(arg); end - def debug(*_arg0, &_arg1); end - def debug=(arg); end - def deprecate_methods(*_arg0, &_arg1); end - def deprecation_horizon(*_arg0, &_arg1); end - def deprecation_horizon=(arg); end - def disallowed_behavior(*_arg0, &_arg1); end - def disallowed_behavior=(arg); end - def disallowed_warnings(*_arg0, &_arg1); end - def disallowed_warnings=(arg); end - def gem_name(*_arg0, &_arg1); end - def gem_name=(arg); end - def silence(*_arg0, &_arg1); end - def silenced(*_arg0, &_arg1); end - def silenced=(arg); end - end -end - -module ActiveSupport::Deprecation::Behavior - def behavior; end - def behavior=(behavior); end - def debug; end - def debug=(_arg0); end - def disallowed_behavior; end - def disallowed_behavior=(behavior); end - - private - - def arity_coerce(behavior); end -end - -ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) - -module ActiveSupport::Deprecation::DeprecatedConstantAccessor - class << self - def included(base); end - end -end - -class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module - def initialize(old_const, new_const, deprecator = T.unsafe(nil), message: T.unsafe(nil)); end - - def class; end - def hash(*_arg0, &_arg1); end - def inspect; end - def instance_methods(*_arg0, &_arg1); end - def name(*_arg0, &_arg1); end - def respond_to?(*_arg0, &_arg1); end - - private - - def const_missing(name); end - def method_missing(called, *args, &block); end - def target; end - - class << self - def new(*args, **options, &block); end - end -end - -class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy - def initialize(instance, method, var = T.unsafe(nil), deprecator = T.unsafe(nil)); end - - private - - def target; end - def warn(callstack, called, args); end -end - -class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy - def initialize(object, message, deprecator = T.unsafe(nil)); end - - private - - def target; end - def warn(callstack, called, args); end -end - -class ActiveSupport::Deprecation::DeprecationProxy - def inspect; end - - private - - def method_missing(called, *args, &block); end - - class << self - def new(*args, &block); end - end -end - -module ActiveSupport::Deprecation::Disallowed - def disallowed_warnings; end - def disallowed_warnings=(_arg0); end - - private - - def deprecation_disallowed?(message); end - def explicitly_allowed?(message); end -end - -module ActiveSupport::Deprecation::InstanceDelegator - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - mixes_in_class_methods ::ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - - class << self - def included(base); end - end -end - -module ActiveSupport::Deprecation::InstanceDelegator::ClassMethods - def include(included_module); end - def method_added(method_name); end -end - -module ActiveSupport::Deprecation::InstanceDelegator::OverrideDelegators - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end -end - -module ActiveSupport::Deprecation::MethodWrapper - def deprecate_methods(target_module, *method_names); end -end - -module ActiveSupport::Deprecation::Reporting - def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end - def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end - def gem_name; end - def gem_name=(_arg0); end - def silence(&block); end - def silenced; end - def silenced=(_arg0); end - def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end - - private - - def _extract_callstack(callstack); end - def deprecated_method_warning(method_name, message = T.unsafe(nil)); end - def deprecation_caller_message(callstack); end - def deprecation_message(callstack, message = T.unsafe(nil)); end - def extract_callstack(callstack); end - def ignored_callstack(path); end -end - -ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) -class ActiveSupport::DeprecationException < ::StandardError; end - -module ActiveSupport::DescendantsTracker - def descendants; end - def direct_descendants; end - def inherited(base); end - def subclasses; end - - class << self - def clear(classes); end - def descendants(klass); end - def direct_descendants(klass); end - def disable_clear!; end - def native?; end - def store_inherited(klass, descendant); end - def subclasses(klass); end - - private - - def accumulate_descendants(klass, acc); end - end -end - -class ActiveSupport::DescendantsTracker::DescendantsArray - include ::Enumerable - - def initialize; end - - def <<(klass); end - def cleanup!; end - def each; end - def refs_size; end - def reject!; end - - private - - def initialize_copy(orig); end -end - -class ActiveSupport::Digest - class << self - def hash_digest_class; end - def hash_digest_class=(klass); end - def hexdigest(arg); end - end -end - -class ActiveSupport::Duration - def initialize(value, parts, variable = T.unsafe(nil)); end - - def %(other); end - def *(other); end - def +(other); end - def +@; end - def -(other); end - def -@; end - def /(other); end - def <=>(other); end - def ==(other); end - def _parts; end - def after(time = T.unsafe(nil)); end - def ago(time = T.unsafe(nil)); end - def as_json(options = T.unsafe(nil)); end - def before(time = T.unsafe(nil)); end - def coerce(other); end - def encode_with(coder); end - def eql?(other); end - def from_now(time = T.unsafe(nil)); end - def hash; end - def in_days; end - def in_hours; end - def in_minutes; end - def in_months; end - def in_seconds; end - def in_weeks; end - def in_years; end - def init_with(coder); end - def inspect; end - def instance_of?(klass); end - def is_a?(klass); end - def iso8601(precision: T.unsafe(nil)); end - def kind_of?(klass); end - def parts; end - def since(time = T.unsafe(nil)); end - def to_i; end - def to_s; end - def until(time = T.unsafe(nil)); end - def value; end - def variable?; end - - private - - def method_missing(method, *args, &block); end - def raise_type_error(other); end - def respond_to_missing?(method, _); end - def sum(sign, time = T.unsafe(nil)); end - - class << self - def ===(other); end - def build(value); end - def days(value); end - def hours(value); end - def minutes(value); end - def months(value); end - def parse(iso8601duration); end - def seconds(value); end - def weeks(value); end - def years(value); end - - private - - def calculate_total_seconds(parts); end - end -end - -class ActiveSupport::Duration::ISO8601Parser - def initialize(string); end - - def mode; end - def mode=(_arg0); end - def parse!; end - def parts; end - def scanner; end - def sign; end - def sign=(_arg0); end - - private - - def finished?; end - def number; end - def raise_parsing_error(reason = T.unsafe(nil)); end - def scan(pattern); end - def validate!; end -end - -ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) -ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) -ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) -ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) -ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) -ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) -ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) -class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end -ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) -ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) -ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) -ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) -ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) - -class ActiveSupport::Duration::ISO8601Serializer - def initialize(duration, precision: T.unsafe(nil)); end - - def serialize; end - - private - - def format_seconds(seconds); end - def normalize; end - def week_mixed_with_date?(parts); end -end - -ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) -ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) -ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) -ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) -ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) -ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) -ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) -ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) -ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) - -class ActiveSupport::Duration::Scalar < ::Numeric - def initialize(value); end - - def %(other); end - def *(other); end - def +(other); end - def -(other); end - def -@; end - def /(other); end - def <=>(other); end - def coerce(other); end - def to_f(*_arg0, &_arg1); end - def to_i(*_arg0, &_arg1); end - def to_s(*_arg0, &_arg1); end - def value; end - def variable?; end - - private - - def calculate(op, other); end - def raise_type_error(other); end -end - -ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) -module ActiveSupport::EnumerableCoreExt; end - -module ActiveSupport::EnumerableCoreExt::Constants - private - - def const_missing(name); end -end - -ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError - -class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer - def initialize(env); end - - def development?; end - def production?; end - def test?; end -end - -ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) - -class ActiveSupport::ErrorReporter - def initialize(*subscribers, logger: T.unsafe(nil)); end - - def handle(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil)); end - def logger; end - def logger=(_arg0); end - def record(error_class = T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil)); end - def report(error, handled:, severity: T.unsafe(nil), context: T.unsafe(nil)); end - def set_context(*_arg0, &_arg1); end - def subscribe(subscriber); end -end - -ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) - -module ActiveSupport::ExecutionContext - class << self - def []=(key, value); end - def after_change(&block); end - def clear; end - def set(**options); end - def to_h; end - - private - - def store; end - end -end - -class ActiveSupport::ExecutionWrapper - include ::ActiveSupport::Callbacks - extend ::ActiveSupport::Callbacks::ClassMethods - extend ::ActiveSupport::DescendantsTracker - - def __callbacks; end - def __callbacks?; end - def _complete_callbacks; end - def _run_callbacks; end - def _run_complete_callbacks(&block); end - def _run_run_callbacks(&block); end - def complete; end - def complete!; end - def run; end - def run!; end - - private - - def hook_state; end - - class << self - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _complete_callbacks; end - def _complete_callbacks=(value); end - def _run_callbacks; end - def _run_callbacks=(value); end - def active?; end - def active_key; end - def error_reporter; end - def perform; end - def register_hook(hook, outer: T.unsafe(nil)); end - def run!(reset: T.unsafe(nil)); end - def to_complete(*args, &block); end - def to_run(*args, &block); end - def wrap; end - end -end - -class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct - def after(target); end - def before(target); end - def hook; end - def hook=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) - -class ActiveSupport::ExecutionWrapper::RunHook < ::Struct - def before(target); end - def hook; end - def hook=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end - -class ActiveSupport::FileUpdateChecker - def initialize(files, dirs = T.unsafe(nil), &block); end - - def execute; end - def execute_if_updated; end - def updated?; end - - private - - def compile_ext(array); end - def compile_glob(hash); end - def escape(key); end - def max_mtime(paths); end - def updated_at(paths); end - def watched; end -end - -module ActiveSupport::ForkTracker - class << self - def after_fork(&block); end - def check!; end - def hook!; end - def unregister(callback); end - end -end - -module ActiveSupport::ForkTracker::CoreExt - def fork(*_arg0, &_arg1); end -end - -module ActiveSupport::ForkTracker::CoreExtPrivate; end - -module ActiveSupport::ForkTracker::ModernCoreExt - def _fork; end -end - -module ActiveSupport::Gzip - class << self - def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end - def decompress(source); end - end -end - -class ActiveSupport::Gzip::Stream < ::StringIO - def initialize(*_arg0); end - - def close; end -end - -module ActiveSupport::HtmlSafeTranslation - extend ::ActiveSupport::HtmlSafeTranslation - - def translate(key, **options); end - - private - - def html_escape_translation_options(options); end - def html_safe_translation(translation); end - def html_safe_translation_key?(key); end - def i18n_option?(name); end -end - -module ActiveSupport::Inflector - extend ::ActiveSupport::Inflector - - def camelize(term, uppercase_first_letter = T.unsafe(nil)); end - def classify(table_name); end - def constantize(camel_cased_word); end - def dasherize(underscored_word); end - def deconstantize(path); end - def demodulize(path); end - def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end - def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end - def inflections(locale = T.unsafe(nil)); end - def ordinal(number); end - def ordinalize(number); end - def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end - def pluralize(word, locale = T.unsafe(nil)); end - def safe_constantize(camel_cased_word); end - def singularize(word, locale = T.unsafe(nil)); end - def tableize(class_name); end - def titleize(word, keep_id_suffix: T.unsafe(nil)); end - def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end - def underscore(camel_cased_word); end - def upcase_first(string); end - - private - - def apply_inflections(word, rules, locale = T.unsafe(nil)); end - def const_regexp(camel_cased_word); end -end - -ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) - -class ActiveSupport::Inflector::Inflections - def initialize; end - - def acronym(word); end - def acronyms; end - def acronyms_camelize_regex; end - def acronyms_underscore_regex; end - def clear(scope = T.unsafe(nil)); end - def human(rule, replacement); end - def humans; end - def irregular(singular, plural); end - def plural(rule, replacement); end - def plurals; end - def singular(rule, replacement); end - def singulars; end - def uncountable(*words); end - def uncountables; end - - private - - def define_acronym_regex_patterns; end - def initialize_dup(orig); end - - class << self - def instance(locale = T.unsafe(nil)); end - def instance_or_fallback(locale); end - end -end - -class ActiveSupport::Inflector::Inflections::Uncountables < ::Array - def initialize; end - - def <<(*word); end - def add(words); end - def delete(entry); end - def uncountable?(str); end - - private - - def to_regex(string); end -end - -class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions - def initialize(parent = T.unsafe(nil)); end - - def inheritable_copy; end -end - -module ActiveSupport::IsolatedExecutionState - class << self - def [](key); end - def []=(key, value); end - def clear; end - def delete(key); end - def isolation_level; end - def isolation_level=(level); end - def key?(key); end - def share_with(other); end - def unique_id; end - - private - - def current; end - def current_fiber; end - def current_thread; end - end -end - -module ActiveSupport::JSON - class << self - def decode(json); end - def encode(value, options = T.unsafe(nil)); end - def parse_error; end - - private - - def convert_dates_from(data); end - end -end - -ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) -ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) - -module ActiveSupport::JSON::Encoding - class << self - def escape_html_entities_in_json; end - def escape_html_entities_in_json=(_arg0); end - def json_encoder; end - def json_encoder=(_arg0); end - def time_precision; end - def time_precision=(_arg0); end - def use_standard_json_time_format; end - def use_standard_json_time_format=(_arg0); end - end -end - -class ActiveSupport::JSON::Encoding::JSONGemEncoder - def initialize(options = T.unsafe(nil)); end - - def encode(value); end - def options; end - - private - - def jsonify(value); end - def stringify(jsonified); end -end - -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) -ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) - -class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String - def to_json(*_arg0); end - def to_s; end -end - -class ActiveSupport::KeyGenerator - def initialize(secret, options = T.unsafe(nil)); end - - def generate_key(salt, key_size = T.unsafe(nil)); end - - class << self - def hash_digest_class; end - def hash_digest_class=(klass); end - end -end - -module ActiveSupport::LazyLoadHooks - def on_load(name, options = T.unsafe(nil), &block); end - def run_load_hooks(name, base = T.unsafe(nil)); end - - private - - def execute_hook(name, base, options, block); end - def with_execution_control(name, block, once); end - - class << self - def extended(base); end - end -end - -class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber - def colorize_logging; end - def colorize_logging=(val); end - def debug(progname = T.unsafe(nil), &block); end - def error(progname = T.unsafe(nil), &block); end - def fatal(progname = T.unsafe(nil), &block); end - def finish(name, id, payload); end - def info(progname = T.unsafe(nil), &block); end - def logger; end - def publish_event(event); end - def start(name, id, payload); end - def unknown(progname = T.unsafe(nil), &block); end - def warn(progname = T.unsafe(nil), &block); end - - private - - def color(text, color, bold = T.unsafe(nil)); end - def log_exception(name, e); end - - class << self - def colorize_logging; end - def colorize_logging=(val); end - def flush_all!; end - def log_subscribers; end - def logger; end - def logger=(_arg0); end - - private - - def fetch_public_methods(subscriber, inherit_all); end - end -end - -ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::BOLD = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::CLEAR = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) -ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) - -class ActiveSupport::Logger < ::Logger - include ::ActiveSupport::LoggerSilence - include ::ActiveSupport::LoggerThreadSafeLevel - - def initialize(*args, **kwargs); end - - def silencer; end - def silencer=(val); end - - class << self - def broadcast(logger); end - def logger_outputs_to?(logger, *sources); end - def silencer; end - def silencer=(val); end - end -end - -class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter - def call(severity, timestamp, progname, msg); end -end - -module ActiveSupport::LoggerSilence - extend ::ActiveSupport::Concern - include ::ActiveSupport::LoggerThreadSafeLevel - - def silence(severity = T.unsafe(nil)); end -end - -module ActiveSupport::LoggerThreadSafeLevel - extend ::ActiveSupport::Concern - - def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end - def debug?; end - def error?; end - def fatal?; end - def info?; end - def level; end - def local_level; end - def local_level=(level); end - def log_at(level); end - def unknown?; end - def warn?; end -end - -class ActiveSupport::MessageEncryptor - include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Encryptor - - def encrypt_and_sign(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - - private - - def _decrypt(encrypted_message, purpose); end - def _encrypt(value, **metadata_options); end - def aead_mode?; end - def new_cipher; end - def resolve_verifier; end - def verifier; end - - class << self - def default_cipher; end - def key_len(cipher = T.unsafe(nil)); end - def use_authenticated_message_encryption; end - def use_authenticated_message_encryption=(val); end - end -end - -class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end - -module ActiveSupport::MessageEncryptor::NullSerializer - class << self - def dump(value); end - def load(value); end - end -end - -module ActiveSupport::MessageEncryptor::NullVerifier - class << self - def generate(value); end - def verify(value); end - end -end - -ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError - -class ActiveSupport::MessageVerifier - include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::Messages::Rotator::Verifier - - def generate(value, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - def valid_message?(signed_message); end - def verify(*args, **options); end - - private - - def decode(data); end - def digest_length_in_hex; end - def digest_matches_data?(digest, data); end - def encode(data); end - def generate_digest(data); end - def get_data_and_digest_from(signed_message); end - def separator_index_for(signed_message); end -end - -class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end -ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) -ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) -module ActiveSupport::Messages; end - -class ActiveSupport::Messages::Metadata - def initialize(message, expires_at = T.unsafe(nil), purpose = T.unsafe(nil)); end - - def as_json(options = T.unsafe(nil)); end - def verify(purpose); end - - private - - def fresh?; end - def match?(purpose); end - def parse_expires_at(expires_at); end - - class << self - def verify(message, purpose); end - def wrap(message, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end - - private - - def decode(message); end - def encode(message); end - def extract_metadata(message); end - def pick_expiry(expires_at, expires_in); end - end -end - -module ActiveSupport::Messages::Rotator - def initialize(*secrets, on_rotation: T.unsafe(nil), **options); end - - def rotate(*secrets, **options); end - - private - - def run_rotations(on_rotation); end -end - -module ActiveSupport::Messages::Rotator::Encryptor - include ::ActiveSupport::Messages::Rotator - - def decrypt_and_verify(*args, on_rotation: T.unsafe(nil), **options); end - - private - - def build_rotation(secret = T.unsafe(nil), sign_secret = T.unsafe(nil), options); end -end - -module ActiveSupport::Messages::Rotator::Verifier - include ::ActiveSupport::Messages::Rotator - - def verified(*args, on_rotation: T.unsafe(nil), **options); end - - private - - def build_rotation(secret = T.unsafe(nil), options); end -end - -module ActiveSupport::Multibyte - class << self - def proxy_class; end - def proxy_class=(klass); end - end -end - -class ActiveSupport::Multibyte::Chars - include ::Comparable - - def initialize(string); end - - def <=>(*_arg0, &_arg1); end - def =~(*_arg0, &_arg1); end - def acts_like_string?(*_arg0, &_arg1); end - def as_json(options = T.unsafe(nil)); end - def compose; end - def decompose; end - def grapheme_length; end - def limit(limit); end - def match?(*_arg0, &_arg1); end - def method_missing(method, *args, &block); end - def reverse; end - def reverse!(*args); end - def slice!(*args); end - def split(*args); end - def tidy_bytes(force = T.unsafe(nil)); end - def tidy_bytes!(*args); end - def titlecase; end - def titleize; end - def to_s; end - def to_str; end - def wrapped_string; end - - private - - def chars(string); end - def respond_to_missing?(method, include_private); end -end - -module ActiveSupport::Multibyte::Unicode - extend ::ActiveSupport::Multibyte::Unicode - - def compose(codepoints); end - def decompose(type, codepoints); end - def tidy_bytes(string, force = T.unsafe(nil)); end - - private - - def recode_windows1252_chars(string); end -end - -ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) - -module ActiveSupport::Notifications - class << self - def instrument(name, payload = T.unsafe(nil)); end - def instrumenter; end - def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - def notifier; end - def notifier=(_arg0); end - def publish(name, *args); end - def publish_event(event); end - def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end - def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - def unsubscribe(subscriber_or_name); end - - private - - def registry; end - end -end - -class ActiveSupport::Notifications::Event - def initialize(name, start, ending, transaction_id, payload); end - - def <<(event); end - def allocations; end - def children; end - def cpu_time; end - def duration; end - def end; end - def finish!; end - def idle_time; end - def name; end - def parent_of?(event); end - def payload; end - def payload=(_arg0); end - def record; end - def start!; end - def time; end - def transaction_id; end - - private - - def now; end - def now_allocations; end - def now_cpu; end -end - -class ActiveSupport::Notifications::Fanout - include ::Mutex_m - - def initialize; end - - def finish(name, id, payload, listeners = T.unsafe(nil)); end - def iterate_guarding_exceptions(listeners); end - def listeners_for(name); end - def listening?(name); end - def lock; end - def locked?; end - def publish(name, *args); end - def publish_event(event); end - def start(name, id, payload); end - def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - def synchronize(&block); end - def try_lock; end - def unlock; end - def unsubscribe(subscriber_or_name); end - def wait; end -end - -module ActiveSupport::Notifications::Fanout::Subscribers - class << self - def new(pattern, listener, monotonic); end - end -end - -class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - def finish(name, id, payload); end - def publish_event(event); end - def start(name, id, payload); end - - private - - def build_event(name, id, payload); end -end - -class ActiveSupport::Notifications::Fanout::Subscribers::Evented - def initialize(pattern, delegate); end - - def finish(name, id, payload); end - def pattern; end - def publish(name, *args); end - def publish_event(event); end - def start(name, id, payload); end - def subscribed_to?(name); end - def unsubscribe!(name); end -end - -class ActiveSupport::Notifications::Fanout::Subscribers::Matcher - def initialize(pattern); end - - def ===(name); end - def exclusions; end - def pattern; end - def unsubscribe!(name); end - - class << self - def wrap(pattern); end - end -end - -class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages - def ===(name); end - def unsubscribe!(*_arg0); end -end - -class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - def finish(name, id, payload); end - def publish(name, *args); end - def start(name, id, payload); end -end - -class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented - def finish(name, id, payload); end - def publish(name, *args); end - def start(name, id, payload); end -end - -class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError - def initialize(exceptions); end - - def exceptions; end -end - -class ActiveSupport::Notifications::Instrumenter - def initialize(notifier); end - - def finish(name, payload); end - def finish_with_state(listeners_state, name, payload); end - def id; end - def instrument(name, payload = T.unsafe(nil)); end - def new_event(name, payload = T.unsafe(nil)); end - def start(name, payload); end - - private - - def unique_id; end -end - -module ActiveSupport::NumberHelper - extend ::ActiveSupport::Autoload - extend ::ActiveSupport::NumberHelper - - def number_to_currency(number, options = T.unsafe(nil)); end - def number_to_delimited(number, options = T.unsafe(nil)); end - def number_to_human(number, options = T.unsafe(nil)); end - def number_to_human_size(number, options = T.unsafe(nil)); end - def number_to_percentage(number, options = T.unsafe(nil)); end - def number_to_phone(number, options = T.unsafe(nil)); end - def number_to_rounded(number, options = T.unsafe(nil)); end -end - -class ActiveSupport::NumberHelper::NumberConverter - def initialize(number, options); end - - def execute; end - def namespace; end - def namespace=(_arg0); end - def namespace?; end - def number; end - def opts; end - def validate_float; end - def validate_float=(_arg0); end - def validate_float?; end - - private - - def default_format_options; end - def default_value(key); end - def format_options; end - def i18n_format_options; end - def options; end - def translate_in_locale(key, **i18n_options); end - def translate_number_value_with_default(key, **i18n_options); end - def valid_float?; end - - class << self - def convert(number, options); end - def namespace; end - def namespace=(value); end - def namespace?; end - def validate_float; end - def validate_float=(value); end - def validate_float?; end - end -end - -ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) - -class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - private - - def i18n_opts; end - def options; end - - class << self - def namespace; end - end -end - -class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - private - - def delimiter_pattern; end - def parts; end - - class << self - def validate_float; end - end -end - -ActiveSupport::NumberHelper::NumberToDelimitedConverter::DEFAULT_DELIMITER_REGEX = T.let(T.unsafe(nil), Regexp) - -class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - private - - def calculate_exponent(units); end - def determine_unit(units, exponent); end - def format; end - def unit_exponents(units); end - - class << self - def namespace; end - def validate_float; end - end -end - -ActiveSupport::NumberHelper::NumberToHumanConverter::DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) -ActiveSupport::NumberHelper::NumberToHumanConverter::INVERTED_DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) - -class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - private - - def base; end - def conversion_format; end - def exponent; end - def smaller_than_base?; end - def storage_unit_key; end - def unit; end - - class << self - def namespace; end - def validate_float; end - end -end - -ActiveSupport::NumberHelper::NumberToHumanSizeConverter::STORAGE_UNITS = T.let(T.unsafe(nil), Array) - -class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - class << self - def namespace; end - end -end - -class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - private - - def convert_to_phone_number(number); end - def convert_with_area_code(number); end - def convert_without_area_code(number); end - def country_code(code); end - def delimiter; end - def phone_ext(ext); end - def regexp_pattern(default_pattern); end - def start_with_delimiter?(number); end -end - -class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::NumberHelper::NumberConverter - def convert; end - - private - - def format_number(number); end - def strip_insignificant_zeros; end - - class << self - def namespace; end - def validate_float; end - end -end - -class ActiveSupport::NumberHelper::RoundingHelper - def initialize(options); end - - def digit_count(number); end - def options; end - def round(number); end - - private - - def absolute_precision(number); end - def convert_to_decimal(number); end -end - -class ActiveSupport::OptionMerger - def initialize(context, options); end - - private - - def method_missing(method, *arguments, &block); end - def respond_to_missing?(*arguments); end -end - -class ActiveSupport::OrderedHash < ::Hash - def encode_with(coder); end - def extractable_options?; end - def nested_under_indifferent_access; end - def reject(*args, &block); end - def select(*args, &block); end - def to_yaml_type; end -end - -class ActiveSupport::OrderedOptions < ::Hash - def [](key); end - def []=(key, value); end - def extractable_options?; end - def inspect; end - def method_missing(name, *args); end - - protected - - def _get(_arg0); end - - private - - def respond_to_missing?(name, include_private); end -end - -module ActiveSupport::PerThreadRegistry - def instance; end - - private - - def method_missing(name, *args, &block); end - - class << self - def extended(object); end - end -end - -class ActiveSupport::ProxyObject < ::BasicObject - def raise(*args); end -end - -class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper - def initialize; end - - def _class_unload_callbacks; end - def _prepare_callbacks; end - def _run_class_unload_callbacks(&block); end - def _run_prepare_callbacks(&block); end - def check; end - def check=(_arg0); end - def check?; end - def class_unload!(&block); end - def complete!; end - def executor; end - def executor=(_arg0); end - def executor?; end - def release_unload_lock!; end - def require_unload_lock!; end - def run!; end - - class << self - def __callbacks; end - def _class_unload_callbacks; end - def _class_unload_callbacks=(value); end - def _prepare_callbacks; end - def _prepare_callbacks=(value); end - def after_class_unload(*args, &block); end - def before_class_unload(*args, &block); end - def check; end - def check!; end - def check=(value); end - def check?; end - def executor; end - def executor=(value); end - def executor?; end - def prepare!; end - def reload!; end - def reloaded!; end - def run!(reset: T.unsafe(nil)); end - def to_prepare(*args, &block); end - def wrap; end - end -end - -module ActiveSupport::Rescuable - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods - - def handler_for_rescue(exception); end - 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 - -module ActiveSupport::Rescuable::ClassMethods - def handler_for_rescue(exception, object: T.unsafe(nil)); end - def rescue_from(*klasses, with: T.unsafe(nil), &block); end - def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end - - private - - def constantize_rescue_handler_class(class_or_name); end - def find_rescue_handler(exception); end -end - -module ActiveSupport::RubyFeatures; end - -class ActiveSupport::SafeBuffer < ::String - def initialize(str = T.unsafe(nil)); end - - def %(args); end - def *(*_arg0); end - def +(other); end - def <<(value); end - def [](*args); end - def []=(*args); end - def capitalize(*args, &block); end - def capitalize!(*args); end - def chomp(*args, &block); end - def chomp!(*args); end - def chop(*args, &block); end - def chop!(*args); end - def clone_empty; end - def concat(value); end - def delete(*args, &block); end - def delete!(*args); end - def delete_prefix(*args, &block); end - def delete_prefix!(*args); end - def delete_suffix(*args, &block); end - def delete_suffix!(*args); end - def downcase(*args, &block); end - def downcase!(*args); end - def encode_with(coder); end - def gsub(*args, &block); end - def gsub!(*args, &block); end - def html_safe?; end - def insert(index, value); end - def lstrip(*args, &block); end - def lstrip!(*args); end - def next(*args, &block); end - def next!(*args); end - def prepend(value); end - def replace(value); end - def reverse(*args, &block); end - def reverse!(*args); end - def rstrip(*args, &block); end - def rstrip!(*args); end - def safe_concat(value); end - def scrub(*args, &block); end - def scrub!(*args); end - def slice(*args, &block); end - def slice!(*args); end - def squeeze(*args, &block); end - def squeeze!(*args); end - def strip(*args, &block); end - def strip!(*args); end - def sub(*args, &block); end - def sub!(*args, &block); end - def succ(*args, &block); end - def succ!(*args); end - def swapcase(*args, &block); end - def swapcase!(*args); end - def to_param; end - def to_s; end - def tr(*args, &block); end - def tr!(*args); end - def tr_s(*args, &block); end - def tr_s!(*args); end - def unicode_normalize(*args, &block); end - def unicode_normalize!(*args); end - def upcase(*args, &block); end - def upcase!(*args); end - - private - - def explicit_html_escape_interpolated_argument(arg); end - def implicit_html_escape_interpolated_argument(arg); end - def initialize_copy(other); end - def original_concat(*_arg0); end - def set_block_back_references(block, match_data); end -end - -class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError - def initialize; end -end - -ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) -ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) - -class ActiveSupport::SecureCompareRotator - include ::ActiveSupport::Messages::Rotator - include ::ActiveSupport::SecurityUtils - - def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end - - private - - def build_rotation(previous_value, _options); end -end - -class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end - -module ActiveSupport::SecurityUtils - private - - def fixed_length_secure_compare(a, b); end - def secure_compare(a, b); end - - class << self - def fixed_length_secure_compare(a, b); end - def secure_compare(a, b); end - end -end - -class ActiveSupport::StringInquirer < ::String - private - - def method_missing(method_name, *arguments); end - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -class ActiveSupport::Subscriber - def initialize; end - - def finish(name, id, payload); end - def patterns; end - def publish_event(event); end - def start(name, id, payload); end - - private - - def event_stack; end - - class << self - def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end - def detach_from(namespace, notifier = T.unsafe(nil)); end - def method_added(event); end - def subscribers; end - - private - - def add_event_subscriber(event); end - def fetch_public_methods(subscriber, inherit_all); end - def find_attached_subscriber; end - def invalid_event?(event); end - def namespace; end - def notifier; end - def pattern_subscribed?(pattern); end - def prepare_pattern(event); end - def remove_event_subscriber(event); end - def subscriber; end - end -end - -module ActiveSupport::TaggedLogging - def clear_tags!(*_arg0, &_arg1); end - def flush; end - def pop_tags(*_arg0, &_arg1); end - def push_tags(*_arg0, &_arg1); end - def tagged(*tags); end - - class << self - def new(logger); end - end -end - -module ActiveSupport::TaggedLogging::Formatter - def call(severity, timestamp, progname, msg); end - def clear_tags!; end - def current_tags; end - def pop_tags(size = T.unsafe(nil)); end - def push_tags(*tags); end - def tagged(*tags); end - def tags_text; end -end - -module ActiveSupport::TaggedLogging::LocalTagStorage - def current_tags; end - def current_tags=(_arg0); end - - class << self - def extended(base); end - end -end - -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 - - def __callbacks; end - def __callbacks?; end - def _run_setup_callbacks(&block); end - def _run_teardown_callbacks(&block); end - def _setup_callbacks; end - def _teardown_callbacks; end - def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - def assert_not_empty(obj, msg = T.unsafe(nil)); end - def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - def assert_not_nil(obj, msg = T.unsafe(nil)); end - def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - def assert_not_respond_to(obj, meth, msg = T.unsafe(nil)); end - def assert_not_same(exp, act, msg = T.unsafe(nil)); end - def assert_raise(*exp); end - def file_fixture_path; end - def file_fixture_path?; end - def inspect; end - def method_name; end - - class << self - def __callbacks; end - def __callbacks=(value); end - def __callbacks?; end - def _setup_callbacks; end - def _setup_callbacks=(value); end - def _teardown_callbacks; end - def _teardown_callbacks=(value); end - def file_fixture_path; end - def file_fixture_path=(value); end - def file_fixture_path?; end - def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil), threshold: T.unsafe(nil)); end - def parallelize_setup(&block); end - def parallelize_teardown(&block); end - def test_order; end - def test_order=(new_order); end - end -end - -ActiveSupport::TestCase::Assertion = Minitest::Assertion -module ActiveSupport::Testing; end - -module ActiveSupport::Testing::Assertions - def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end - def assert_difference(expression, *args, &block); end - def assert_no_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), &block); end - def assert_no_difference(expression, message = T.unsafe(nil), &block); end - def assert_not(object, message = T.unsafe(nil)); end - def assert_nothing_raised; end - - private - - def _assert_nothing_raised_or_warn(assertion, &block); end -end - -ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) - -module ActiveSupport::Testing::ConstantLookup - extend ::ActiveSupport::Concern - - mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods -end - -module ActiveSupport::Testing::ConstantLookup::ClassMethods - def determine_constant_from_test_name(test_name); end -end - -module ActiveSupport::Testing::Declarative - def test(name, &block); end -end - -module ActiveSupport::Testing::Deprecation - def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end - def assert_not_deprecated(deprecator = T.unsafe(nil), &block); end - def collect_deprecations(deprecator = T.unsafe(nil)); end -end - -module ActiveSupport::Testing::FileFixtures - extend ::ActiveSupport::Concern - include GeneratedInstanceMethods - - mixes_in_class_methods GeneratedClassMethods - - 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 - -module ActiveSupport::Testing::Isolation - include ::ActiveSupport::Testing::Isolation::Forking - - def run; end - - class << self - def forking_env?; end - def included(klass); end - end -end - -module ActiveSupport::Testing::Isolation::Forking - def run_in_isolation(&blk); end -end - -module ActiveSupport::Testing::Isolation::Subprocess - def run_in_isolation(&blk); end -end - -ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) - -class ActiveSupport::Testing::Parallelization - def initialize(worker_count); end - - def <<(work); end - def after_fork_hooks; end - def run_cleanup_hooks; end - def shutdown; end - def size; end - def start; end - - class << self - def after_fork_hook(&blk); end - def after_fork_hooks; end - def run_cleanup_hook(&blk); end - def run_cleanup_hooks; end - end -end - -class ActiveSupport::Testing::Parallelization::Server - include ::DRb::DRbUndumped - - def initialize; end - - def <<(o); end - def active_workers?; end - def interrupt; end - def pop; end - def record(reporter, result); end - def shutdown; end - def start_worker(worker_id); end - def stop_worker(worker_id); end -end - -class ActiveSupport::Testing::Parallelization::Worker - def initialize(number, url); end - - def after_fork; end - def perform_job(job); end - def run_cleanup; end - def safe_record(reporter, result); end - def start; end - def work_from_queue; end - - private - - def add_setup_exception(result); end - def set_process_title(status); end -end - -class ActiveSupport::Testing::ParallelizeExecutor - def initialize(size:, with:, threshold: T.unsafe(nil)); end - - def <<(work); end - def parallelize_with; end - def shutdown; end - def size; end - def start; end - def threshold; end - - private - - def build_parallel_executor; end - def execution_info; end - def parallel_executor; end - def parallelize; end - def parallelized?; end - def should_parallelize?; end - def show_execution_info; end - def tests_count; end -end - -module ActiveSupport::Testing::SetupAndTeardown - def after_teardown; end - def before_setup; end - - class << self - def prepended(klass); end - end -end - -module ActiveSupport::Testing::SetupAndTeardown::ClassMethods - def setup(*args, &block); end - def teardown(*args, &block); end -end - -class ActiveSupport::Testing::SimpleStubs - def initialize; end - - def stub_object(object, method_name, &block); end - def stubbed?; end - def stubbing(object, method_name); end - def unstub_all!; end - - private - - def unstub_object(stub); end -end - -class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct - def method_name; end - def method_name=(_); end - def object; end - def object=(_); end - def original_method; end - def original_method=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module ActiveSupport::Testing::TaggedLogging - def before_setup; end - def tagged_logger=(_arg0); end - - private - - def tagged_logger; end -end - -module ActiveSupport::Testing::TimeHelpers - def after_teardown; end - def freeze_time(&block); end - def travel(duration, &block); end - def travel_back; end - def travel_to(date_or_time); end - def unfreeze_time; end - - private - - def in_block; end - def in_block=(_arg0); end - def simple_stubs; end -end - -class ActiveSupport::TimeWithZone - include ::DateAndTime::Compatibility - include ::Comparable - - def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end - - def +(other); end - def -(other); end - def <=>(other); end - def acts_like_time?; end - def advance(options); end - def after?(_arg0); end - def ago(other); end - def as_json(options = T.unsafe(nil)); end - def before?(_arg0); end - def between?(min, max); end - def blank?; end - def change(options); end - def comparable_time; end - def day; end - def dst?; end - def encode_with(coder); end - def eql?(other); end - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - def freeze; end - def future?; end - def getgm; end - def getlocal(utc_offset = T.unsafe(nil)); end - def getutc; end - def gmt?; end - def gmt_offset; end - def gmtime; end - def gmtoff; end - def hash; end - def hour; end - def httpdate; end - def in(other); end - def in_time_zone(new_zone = T.unsafe(nil)); end - def init_with(coder); end - def inspect; end - def is_a?(klass); end - def isdst; end - def iso8601(fraction_digits = T.unsafe(nil)); end - def kind_of?(klass); end - def localtime(utc_offset = T.unsafe(nil)); end - def marshal_dump; end - def marshal_load(variables); end - def mday; end - def method_missing(sym, *args, &block); end - def min; end - def mon; end - def month; end - def next_day?; end - def nsec; end - def past?; end - def period; end - def prev_day?; end - def respond_to?(sym, include_priv = T.unsafe(nil)); end - def rfc2822; end - def rfc3339(fraction_digits = T.unsafe(nil)); end - def rfc822; end - def sec; end - def since(other); end - def strftime(format); end - def time; end - def time_zone; end - def to_a; end - def to_date; end - def to_datetime; end - def to_f; end - def to_formatted_s(format = T.unsafe(nil)); end - def to_fs(format = T.unsafe(nil)); end - def to_i; end - def to_r; end - def to_s(format = T.unsafe(nil)); end - def to_time; end - def today?; end - def tomorrow?; end - def tv_sec; end - def usec; end - def utc; end - def utc?; end - def utc_offset; end - def wday; end - def xmlschema(fraction_digits = T.unsafe(nil)); end - def yday; end - def year; end - def yesterday?; end - def zone; end - - private - - def duration_of_variable_length?(obj); end - def get_period_and_ensure_valid_local_time(period); end - def incorporate_utc_offset(time, offset); end - def respond_to_missing?(sym, include_priv); end - def transfer_time_values_to_utc_constructor(time); end - def wrap_with_time_zone(time); end - - class << self - def name; end - end -end - -ActiveSupport::TimeWithZone::NOT_SET = T.let(T.unsafe(nil), Object) -ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) -ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) - -class ActiveSupport::TimeZone - include ::Comparable - - def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end - - def <=>(zone); end - def =~(re); end - def at(*args); end - def encode_with(coder); end - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - def init_with(coder); end - def iso8601(str); end - def local(*args); end - def local_to_utc(time, dst = T.unsafe(nil)); end - def match?(re); end - def name; end - def now; end - def parse(str, now = T.unsafe(nil)); end - def period_for_local(time, dst = T.unsafe(nil)); end - def period_for_utc(time); end - def periods_for_local(time); end - def rfc3339(str); end - def strptime(str, format, now = T.unsafe(nil)); end - def to_s; end - def today; end - def tomorrow; end - def tzinfo; end - def utc_offset; end - def utc_to_local(time); end - def yesterday; end - - private - - def parts_to_time(parts, now); end - def time_now; end - - class << self - def [](arg); end - def all; end - def clear; end - def country_zones(country_code); end - def create(*_arg0); end - def find_tzinfo(name); end - def new(name); end - def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end - def us_zones; end - - private - - def load_country_zones(code); end - def zones_map; end - end -end - -ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) -ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) -ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) - -module ActiveSupport::ToJsonWithActiveSupportEncoder - def to_json(options = T.unsafe(nil)); end -end - -module ActiveSupport::Tryable - def try(*args, &block); end - def try!(*args, &block); end -end - -module ActiveSupport::VERSION; end -ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) -ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) -ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) -ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer) - -module ActiveSupport::XmlMini - extend ::ActiveSupport::XmlMini - - def backend; end - def backend=(name); end - def depth; end - def depth=(_arg0); end - def parse(*_arg0, &_arg1); end - def rename_key(key, options = T.unsafe(nil)); end - def to_tag(key, value, options); end - def with_backend(name); end - - private - - def _dasherize(key); end - def _parse_binary(bin, entity); end - def _parse_file(file, entity); end - def cast_backend_name_to_module(name); end - def current_thread_backend; end - def current_thread_backend=(name); end -end - -ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) -ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) - -module ActiveSupport::XmlMini::FileLike - def content_type; end - def content_type=(_arg0); end - def original_filename; end - def original_filename=(_arg0); end -end - -ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) -ActiveSupport::XmlMini::TYPE_NAMES = T.let(T.unsafe(nil), Hash) - -module ActiveSupport::XmlMini_REXML - extend ::ActiveSupport::XmlMini_REXML - - def parse(data); end - - private - - def collapse(element, depth); end - def empty_content?(element); end - def get_attributes(element); end - def merge!(hash, key, value); end - def merge_element!(hash, element, depth); end - def merge_texts!(hash, element); end - def require_rexml; end -end - -ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) - -class Array - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Array - - def as_json(options = T.unsafe(nil)); end - def compact_blank!; end - def excluding(*elements); end - def extract_options!; end - def fifth; end - def forty_two; end - def fourth; end - def from(position); end - def including(*elements); end - def second; end - def second_to_last; end - def sum(init = T.unsafe(nil), &block); end - def third; end - def third_to_last; end - def to(position); end - def to_formatted_s(format = T.unsafe(nil)); end - def to_fs(format = T.unsafe(nil)); end - def to_param; end - def to_query(key); end - def to_sentence(options = T.unsafe(nil)); end - def to_xml(options = T.unsafe(nil)); end - def without(*elements); end - - class << self - def wrap(object); end - end -end - -class BigDecimal < ::Numeric - include ::ActiveSupport::BigDecimalWithDefaultFormat - - def as_json(options = T.unsafe(nil)); end -end - -BigDecimal::EXCEPTION_NaN = T.let(T.unsafe(nil), Integer) -BigDecimal::VERSION = T.let(T.unsafe(nil), String) - -class Class < ::Module - 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 - def descendants; end - def subclasses; end -end - -class Date - include ::Comparable - include ::DateAndTime::Zones - include ::DateAndTime::Calculations - - def +(other); end - def -(other); end - def <=>(other); end - def acts_like_date?; end - def advance(options); end - def ago(seconds); end - def as_json(options = T.unsafe(nil)); end - def at_beginning_of_day; end - def at_end_of_day; end - def at_midday; end - def at_middle_of_day; end - def at_midnight; end - def at_noon; end - def beginning_of_day; end - def change(options); end - def compare_with_coercion(other); end - def end_of_day; end - def in(seconds); end - def inspect; end - def midday; end - def middle_of_day; end - def midnight; end - def minus_with_duration(other); end - def noon; end - def plus_with_duration(other); end - def readable_inspect; end - def since(seconds); end - def to_formatted_s(format = T.unsafe(nil)); end - def to_fs(format = T.unsafe(nil)); end - def to_time(form = T.unsafe(nil)); end - def xmlschema; end - - class << self - def beginning_of_week; end - def beginning_of_week=(week_start); end - def beginning_of_week_default; end - def beginning_of_week_default=(_arg0); end - def current; end - def find_beginning_of_week!(week_start); end - def tomorrow; end - def yesterday; end - end -end - -Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) -Date::VERSION = T.let(T.unsafe(nil), String) -module DateAndTime; end - -module DateAndTime::Calculations - def after?(date_or_time); end - def all_day; end - def all_month; end - def all_quarter; end - def all_week(start_day = T.unsafe(nil)); end - def all_year; end - def at_beginning_of_month; end - def at_beginning_of_quarter; end - def at_beginning_of_week(start_day = T.unsafe(nil)); end - def at_beginning_of_year; end - def at_end_of_month; end - def at_end_of_quarter; end - def at_end_of_week(start_day = T.unsafe(nil)); end - def at_end_of_year; end - def before?(date_or_time); end - def beginning_of_month; end - def beginning_of_quarter; end - def beginning_of_week(start_day = T.unsafe(nil)); end - def beginning_of_year; end - def days_ago(days); end - def days_since(days); end - def days_to_week_start(start_day = T.unsafe(nil)); end - def end_of_month; end - def end_of_quarter; end - def end_of_week(start_day = T.unsafe(nil)); end - def end_of_year; end - def future?; end - def last_month; end - def last_quarter; end - def last_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end - def last_weekday; end - def last_year; end - def monday; end - def months_ago(months); end - def months_since(months); end - def next_day?; end - def next_occurring(day_of_week); end - def next_quarter; end - def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end - def next_weekday; end - def on_weekday?; end - def on_weekend?; end - def past?; end - def prev_day?; end - def prev_occurring(day_of_week); end - def prev_quarter; end - def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end - def prev_weekday; end - def sunday; end - def today?; end - def tomorrow; end - def tomorrow?; end - def weeks_ago(weeks); end - def weeks_since(weeks); end - def years_ago(years); end - def years_since(years); end - def yesterday; end - def yesterday?; end - - private - - def copy_time_to(other); end - def days_span(day); end - def first_hour(date_or_time); end - def last_hour(date_or_time); end -end - -DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) -DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) - -module DateAndTime::Compatibility - def preserve_timezone; end - def utc_to_local_returns_utc_offset_times; end - - class << self - def preserve_timezone; end - def preserve_timezone=(val); end - def utc_to_local_returns_utc_offset_times; end - def utc_to_local_returns_utc_offset_times=(val); end - end -end - -module DateAndTime::Zones - def in_time_zone(zone = T.unsafe(nil)); end - - private - - def time_with_zone(time, zone); end -end - -class DateTime < ::Date - def <=>(other); end - def advance(options); end - def ago(seconds); end - def as_json(options = T.unsafe(nil)); end - def at_beginning_of_day; end - def at_beginning_of_hour; end - def at_beginning_of_minute; end - def at_end_of_day; end - def at_end_of_hour; end - def at_end_of_minute; end - def at_midday; end - def at_middle_of_day; end - def at_midnight; end - def at_noon; end - def beginning_of_day; end - def beginning_of_hour; end - def beginning_of_minute; end - def change(options); end - def end_of_day; end - def end_of_hour; end - def end_of_minute; end - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - def getgm; end - def getlocal(utc_offset = T.unsafe(nil)); end - def getutc; end - def gmtime; end - def in(seconds); end - def inspect; end - def localtime(utc_offset = T.unsafe(nil)); end - def midday; end - def middle_of_day; end - def midnight; end - def noon; end - def nsec; end - def readable_inspect; end - def seconds_since_midnight; end - def seconds_until_end_of_day; end - def since(seconds); end - def subsec; end - def to_f; end - def to_formatted_s(format = T.unsafe(nil)); end - def to_fs(format = T.unsafe(nil)); end - def to_i; end - def usec; end - def utc; end - def utc?; end - def utc_offset; end - - private - - def offset_in_seconds; end - def seconds_since_unix_epoch; end - - class << self - 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 - def current; end - end -end - -module ERB::Util - private - - def h(s); end - def html_escape(s); end - def html_escape_once(s); end - def json_escape(s); end - def unwrapped_html_escape(s); end - def xml_name_escape(name); end - - class << self - def h(s); end - def html_escape(s); end - def html_escape_once(s); end - def json_escape(s); end - def unwrapped_html_escape(s); end - def xml_name_escape(name); end - end -end - -ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) -ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) -ERB::Util::JSON_ESCAPE = T.let(T.unsafe(nil), Hash) -ERB::Util::JSON_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp) -ERB::Util::TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) -ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) -ERB::Util::TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) -ERB::Util::TAG_NAME_START_REGEXP_SET = T.let(T.unsafe(nil), String) - -module Enumerable - extend ::ActiveSupport::EnumerableCoreExt::Constants - - def as_json(options = T.unsafe(nil)); end - def compact_blank; end - def exclude?(object); end - def excluding(*elements); end - def in_order_of(key, series); end - def including(*elements); end - def index_by; end - def index_with(default = T.unsafe(nil)); end - def many?; end - def maximum(key); end - def minimum(key); end - def pick(*keys); end - def pluck(*keys); end - def sole; end - def sum(identity = T.unsafe(nil), &block); end - def without(*elements); end -end - -class Enumerable::SoleItemExpectedError < ::StandardError; end - -class Exception - def as_json(options = T.unsafe(nil)); end -end - -class FalseClass - include ::JSON::Ext::Generator::GeneratorMethods::FalseClass - - def as_json(options = T.unsafe(nil)); end - def blank?; end - def to_param; end -end - -class Float < ::Numeric - include ::JSON::Ext::Generator::GeneratorMethods::Float - - def as_json(options = T.unsafe(nil)); end -end - -class Hash - include ::Enumerable - include ::JSON::Ext::Generator::GeneratorMethods::Hash - - def as_json(options = T.unsafe(nil)); end - def assert_valid_keys(*valid_keys); end - def compact_blank; end - def compact_blank!; end - def deep_merge(other_hash, &block); end - def deep_merge!(other_hash, &block); end - def deep_stringify_keys; end - def deep_stringify_keys!; end - def deep_symbolize_keys; end - def deep_symbolize_keys!; end - def deep_transform_keys(&block); end - def deep_transform_keys!(&block); end - def except(*keys); end - def except!(*keys); end - def extract!(*keys); end - def extractable_options?; end - def slice!(*keys); end - def stringify_keys; end - def stringify_keys!; end - def symbolize_keys; end - def symbolize_keys!; end - def to_options; end - def to_options!; end - def to_param(namespace = T.unsafe(nil)); end - def to_query(namespace = T.unsafe(nil)); end - - private - - def _deep_transform_keys_in_object(object, &block); end - def _deep_transform_keys_in_object!(object, &block); end -end - -class IO - include ::Enumerable - include ::File::Constants - - def as_json(options = T.unsafe(nil)); end -end - -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 - -class IPAddr - include ::Comparable - - def as_json(options = T.unsafe(nil)); end -end - -module Kernel - private - - def enable_warnings(&block); end - def silence_warnings(&block); end - def suppress(*exception_classes); end - def with_warnings(flag); end - - class << self - def enable_warnings(&block); end - def silence_warnings(&block); end - def suppress(*exception_classes); end - def with_warnings(flag); end - end -end - -class Module - include ::Module::Concerning - - def alias_attribute(new_name, old_name); end - def anonymous?; end - def as_json(options = T.unsafe(nil)); end - def attr_internal(*attrs); end - def attr_internal_accessor(*attrs); end - def attr_internal_reader(*attrs); end - def attr_internal_writer(*attrs); end - 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 - def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end - def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end - def deprecate(*method_names); end - 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 - def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end - def method_visibility(method); end - def module_parent; end - def module_parent_name; end - def module_parents; end - def redefine_method(method, &block); end - def redefine_singleton_method(method, &block); end - def remove_possible_method(method); end - def remove_possible_singleton_method(method); end - def silence_redefinition_of_method(method); end - 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 - def thread_cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - 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 - def thread_mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end - - private - - def attr_internal_define(attr_name, type); end - def attr_internal_ivar_name(attr); end - - class << self - def attr_internal_naming_format; end - def attr_internal_naming_format=(_arg0); end - end -end - -module Module::Concerning - def concern(topic, &module_definition); end - def concerning(topic, prepend: T.unsafe(nil), &block); end -end - -Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) -Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) -class Module::DelegationError < ::NoMethodError; end -Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) - -class NameError < ::StandardError - include ::DidYouMean::Correctable -end - -class NilClass - include ::JSON::Ext::Generator::GeneratorMethods::NilClass - - def as_json(options = T.unsafe(nil)); end - def blank?; end - def to_param; end - def try(*_arg0); end - def try!(*_arg0); end -end - -class Numeric - include ::Comparable - - def as_json(options = T.unsafe(nil)); end - def blank?; end - def byte; end - def bytes; end - def day; end - def days; end - def exabyte; end - def exabytes; end - def fortnight; end - def fortnights; end - def gigabyte; end - def gigabytes; end - def hour; end - def hours; end - def html_safe?; end - def in_milliseconds; end - def kilobyte; end - def kilobytes; end - def megabyte; end - def megabytes; end - def minute; end - def minutes; end - def petabyte; end - def petabytes; end - def second; end - def seconds; end - def terabyte; end - def terabytes; end - def week; end - def weeks; end -end - -Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) -Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) -Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) -Numeric::MEGABYTE = T.let(T.unsafe(nil), Integer) -Numeric::PETABYTE = T.let(T.unsafe(nil), Integer) -Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) - -class Object < ::BasicObject - include ::ActiveSupport::ToJsonWithActiveSupportEncoder - include ::ActiveSupport::Dependencies::RequireDependency - include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate - include ::Kernel - include ::JSON::Ext::Generator::GeneratorMethods::Object - include ::PP::ObjectMixin - include ::ActiveSupport::Tryable - - def acts_like?(duck); end - def as_json(options = T.unsafe(nil)); end - def blank?; end - def html_safe?; end - def in?(another_object); end - def instance_values; end - def instance_variable_names; end - def presence; end - def presence_in(another_object); end - def present?; end - def to_param; end - def to_query(key); end - def with_options(options, &block); end -end - -class Pathname - def as_json(options = T.unsafe(nil)); end -end - -class Process::Status - def as_json(options = T.unsafe(nil)); end -end - -class Range - include ::Enumerable - - def as_json(options = T.unsafe(nil)); end - def sum(identity = T.unsafe(nil)); end -end - -class Regexp - def as_json(options = T.unsafe(nil)); end -end - -Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) - -class Regexp::Token < ::Struct - def conditional_level; end - def conditional_level=(_); end - def length; end - def level; end - def level=(_); end - def next; end - def next=(_arg0); end - def offset; end - def previous; end - def previous=(_arg0); end - def set_level; end - def set_level=(_); end - def te; end - def te=(_); end - def text; end - def text=(_); end - def token; end - def token=(_); end - def ts; end - def ts=(_); end - def type; end - def type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend - - def acts_like_string?; end - def as_json(options = T.unsafe(nil)); end - def at(position); end - def blank?; end - def camelcase(first_letter = T.unsafe(nil)); end - def camelize(first_letter = T.unsafe(nil)); end - def classify; end - def constantize; end - def dasherize; end - def deconstantize; end - def demodulize; end - def exclude?(string); end - def first(limit = T.unsafe(nil)); end - def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end - def from(position); end - def html_safe; end - def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end - def in_time_zone(zone = T.unsafe(nil)); end - def indent(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end - def indent!(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end - def inquiry; end - def is_utf8?; end - def last(limit = T.unsafe(nil)); end - def mb_chars; end - def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end - def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end - def remove(*patterns); end - def remove!(*patterns); end - def safe_constantize; end - def singularize(locale = T.unsafe(nil)); end - def squish; end - def squish!; end - def strip_heredoc; end - def tableize; end - def titlecase(keep_id_suffix: T.unsafe(nil)); end - def titleize(keep_id_suffix: T.unsafe(nil)); end - def to(position); end - def to_date; end - def to_datetime; end - def to_time(form = T.unsafe(nil)); end - def truncate(truncate_at, options = T.unsafe(nil)); end - def truncate_bytes(truncate_at, omission: T.unsafe(nil)); end - def truncate_words(words_count, options = T.unsafe(nil)); end - def underscore; end - def upcase_first; end -end - -String::BLANK_RE = T.let(T.unsafe(nil), Regexp) -String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) - -class Struct - include ::Enumerable - - def as_json(options = T.unsafe(nil)); end -end - -Struct::Group = Etc::Group -Struct::HTMLElementDescription = Struct -Struct::Passwd = Etc::Passwd -Struct::Tms = Process::Tms - -class Symbol - include ::Comparable - - def as_json(options = T.unsafe(nil)); end -end - -class Time - include ::Comparable - include ::DateAndTime::Zones - include ::DateAndTime::Calculations - - def +(other); end - def -(other); end - def <=>(other); end - def acts_like_time?; end - def advance(options); end - def ago(seconds); end - def as_json(options = T.unsafe(nil)); end - def at_beginning_of_day; end - def at_beginning_of_hour; end - def at_beginning_of_minute; end - def at_end_of_day; end - def at_end_of_hour; end - def at_end_of_minute; end - def at_midday; end - def at_middle_of_day; end - def at_midnight; end - def at_noon; end - def beginning_of_day; end - def beginning_of_hour; end - def beginning_of_minute; end - def blank?; end - def ceil(precision = T.unsafe(nil)); end - def change(options); end - def compare_with_coercion(other); end - def end_of_day; end - def end_of_hour; end - def end_of_minute; end - def eql?(other); end - def eql_with_coercion(other); end - def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end - def in(seconds); end - def midday; end - def middle_of_day; end - def midnight; end - def minus_with_coercion(other); end - def minus_with_duration(other); end - def minus_without_coercion(other); end - def next_day(days = T.unsafe(nil)); end - def next_month(months = T.unsafe(nil)); end - def next_year(years = T.unsafe(nil)); end - def noon; end - def plus_with_duration(other); end - def prev_day(days = T.unsafe(nil)); end - def prev_month(months = T.unsafe(nil)); end - def prev_year(years = T.unsafe(nil)); end - def sec_fraction; end - def seconds_since_midnight; end - def seconds_until_end_of_day; end - def since(seconds); end - def to_formatted_s(format = T.unsafe(nil)); end - def to_fs(format = T.unsafe(nil)); end - - class << self - def ===(other); end - def at(*args, **kwargs); end - def at_with_coercion(*args, **kwargs); end - def current; end - def days_in_month(month, year = T.unsafe(nil)); end - def days_in_year(year = T.unsafe(nil)); end - def find_zone(time_zone); end - def find_zone!(time_zone); end - def rfc3339(str); end - def use_zone(time_zone); end - def zone; end - def zone=(time_zone); end - def zone_default; end - def zone_default=(_arg0); end - end -end - -Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) -Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) - -class TrueClass - include ::JSON::Ext::Generator::GeneratorMethods::TrueClass - - def as_json(options = T.unsafe(nil)); end - def blank?; end - def to_param; end -end - -class URI::Generic - include ::URI::RFC2396_REGEXP - include ::URI - - def as_json(options = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/activesupport@8.1.2.rbi b/sorbet/rbi/gems/activesupport@8.1.2.rbi new file mode 100644 index 0000000..06fdd34 --- /dev/null +++ b/sorbet/rbi/gems/activesupport@8.1.2.rbi @@ -0,0 +1,20981 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `activesupport` gem. +# Please instead update this file by running `bin/tapioca gem activesupport`. + + +# :include: ../README.rdoc +# +# source://activesupport//lib/active_support/delegation.rb#3 +module ActiveSupport + extend ::ActiveSupport::LazyLoadHooks + extend ::ActiveSupport::Autoload + + # source://activesupport//lib/active_support.rb#114 + def filter_parameters; end + + # source://activesupport//lib/active_support.rb#114 + def filter_parameters=(val); end + + # source://activesupport//lib/active_support.rb#106 + def parallelize_test_databases; end + + # source://activesupport//lib/active_support.rb#106 + def parallelize_test_databases=(val); 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#104 + def test_order; end + + # source://activesupport//lib/active_support.rb#104 + def test_order=(val); end + + # source://activesupport//lib/active_support.rb#105 + def test_parallelization_threshold; end + + # source://activesupport//lib/active_support.rb#105 + def test_parallelization_threshold=(val); end + + class << self + # source://activesupport//lib/active_support.rb#116 + def cache_format_version; end + + # source://activesupport//lib/active_support.rb#120 + def cache_format_version=(value); end + + # source://activesupport//lib/active_support/deprecator.rb#4 + def deprecator; end + + # source://activesupport//lib/active_support.rb#98 + def eager_load!; end + + # source://activesupport//lib/active_support.rb#109 + def error_reporter; end + + # source://activesupport//lib/active_support.rb#109 + 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 + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_js_separators_in_json(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_js_separators_in_json=(arg); end + + # source://activesupport//lib/active_support.rb#112 + def event_reporter; end + + # source://activesupport//lib/active_support.rb#112 + def event_reporter=(_arg0); end + + # source://activesupport//lib/active_support.rb#114 + def filter_parameters; end + + # source://activesupport//lib/active_support.rb#114 + def filter_parameters=(val); 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.rb#106 + def parallelize_test_databases; end + + # source://activesupport//lib/active_support.rb#106 + def parallelize_test_databases=(val); 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#104 + def test_order; end + + # source://activesupport//lib/active_support.rb#104 + def test_order=(val); end + + # source://activesupport//lib/active_support.rb#105 + def test_parallelization_threshold; end + + # source://activesupport//lib/active_support.rb#105 + 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#124 + def to_time_preserves_timezone; end + + # source://activesupport//lib/active_support.rb#131 + 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#139 + def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support.rb#143 + def utc_to_local_returns_utc_offset_times=(value); end + + # Returns the currently loaded version of Active Support as a +Gem::Version+. + # + # source://activesupport//lib/active_support/version.rb#7 + def version; end + end +end + +# = Actionable Errors +# +# Actionable errors lets you define actions to resolve an error. +# +# To make an error actionable, include the +ActiveSupport::ActionableError+ +# module and invoke the +action+ class macro to define the action. An action +# needs a name and a block to execute. +# +# source://activesupport//lib/active_support/actionable_error.rb#11 +module ActiveSupport::ActionableError + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::ActionableError::ClassMethods + + class << self + # source://activesupport//lib/active_support/actionable_error.rb#20 + def actions(error); end + + # source://activesupport//lib/active_support/actionable_error.rb#29 + def dispatch(error, name); end + end + + module GeneratedClassMethods + def _actions; end + def _actions=(value); end + def _actions?; end + end + + module GeneratedInstanceMethods + def _actions; end + def _actions=(value); end + def _actions?; end + end +end + +# source://activesupport//lib/active_support/actionable_error.rb#35 +module ActiveSupport::ActionableError::ClassMethods + # Defines an action that can resolve the error. + # + # class PendingMigrationError < MigrationError + # include ActiveSupport::ActionableError + # + # action "Run pending migrations" do + # ActiveRecord::Tasks::DatabaseTasks.migrate + # end + # end + # + # source://activesupport//lib/active_support/actionable_error.rb#45 + def action(name, &block); end +end + +# source://activesupport//lib/active_support/actionable_error.rb#14 +class ActiveSupport::ActionableError::NonActionable < ::StandardError; end + +# = \Array Inquirer +# +# Wrapping an array in an +ArrayInquirer+ gives a friendlier way to check +# its string-like contents: +# +# variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) +# +# variants.phone? # => true +# variants.tablet? # => true +# variants.desktop? # => false +# +# source://activesupport//lib/active_support/array_inquirer.rb#14 +class ActiveSupport::ArrayInquirer < ::Array + # Passes each element of +candidates+ collection to ArrayInquirer collection. + # The method returns true if any element from the ArrayInquirer collection + # is equal to the stringified or symbolized form of any element in the +candidates+ collection. + # + # If +candidates+ collection is not given, method returns true. + # + # variants = ActiveSupport::ArrayInquirer.new([:phone, :tablet]) + # + # variants.any? # => true + # variants.any?(:phone, :tablet) # => true + # variants.any?('phone', 'desktop') # => true + # variants.any?(:desktop, :watch) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#27 + def any?(*candidates); end + + private + + # source://activesupport//lib/active_support/array_inquirer.rb#42 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/array_inquirer.rb#38 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# = Active Support \Autoload +# +# Autoload and eager load conveniences for your library. +# +# This module allows you to define autoloads based on +# \Rails conventions (i.e. no need to define the path +# it is automatically guessed based on the filename) +# and also define a set of constants that needs to be +# eager loaded: +# +# module MyLib +# extend ActiveSupport::Autoload +# +# autoload :Model +# +# eager_autoload do +# autoload :Cache +# end +# end +# +# Then your library can be eager loaded by simply calling: +# +# MyLib.eager_load! +# +# source://activesupport//lib/active_support/dependencies/autoload.rb#29 +module ActiveSupport::Autoload + # source://activesupport//lib/active_support/dependencies/autoload.rb#30 + def autoload(const_name, path = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#51 + def autoload_at(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#44 + def autoload_under(path); end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#58 + def eager_autoload; end + + # source://activesupport//lib/active_support/dependencies/autoload.rb#65 + def eager_load!; end +end + +# = Backtrace Cleaner +# +# Backtraces often include many lines that are not relevant for the context +# under review. This makes it hard to find the signal amongst the backtrace +# noise, and adds debugging time. With a BacktraceCleaner, filters and +# silencers are used to remove the noisy lines, so that only the most relevant +# lines remain. +# +# Filters are used to modify lines of data, while silencers are used to remove +# lines entirely. The typical filter use case is to remove lengthy path +# information from the start of each line, and view file paths relevant to the +# app directory instead of the file system root. The typical silencer use case +# is to exclude the output of a noisy library from the backtrace, so that you +# can focus on the rest. +# +# bc = ActiveSupport::BacktraceCleaner.new +# root = "#{Rails.root}/" +# bc.add_filter { |line| line.delete_prefix(root) } # strip the Rails.root prefix +# bc.add_silencer { |line| /puma|rubygems/.match?(line) } # skip any lines from puma or rubygems +# bc.clean(exception.backtrace) # perform the cleanup +# +# To reconfigure an existing BacktraceCleaner (like the default one in \Rails) +# and show as much data as possible, you can always call +# BacktraceCleaner#remove_silencers!, which will restore the +# backtrace to a pristine state. If you need to reconfigure an existing +# BacktraceCleaner so that it does not filter or modify the paths of any lines +# of the backtrace, you can call BacktraceCleaner#remove_filters! +# These two methods will give you a completely untouched backtrace. +# +# Inspired by the Quiet Backtrace gem by thoughtbot. +# +# source://activesupport//lib/active_support/backtrace_cleaner.rb#34 +class ActiveSupport::BacktraceCleaner + # @return [BacktraceCleaner] a new instance of BacktraceCleaner + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#35 + def initialize; end + + # Adds a filter from the block provided. Each line in the backtrace will be + # mapped against this filter. + # + # # Will turn "/my/rails/root/app/models/person.rb" into "app/models/person.rb" + # root = "#{Rails.root}/" + # backtrace_cleaner.add_filter { |line| line.delete_prefix(root) } + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#154 + 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#163 + def add_silencer(&block); end + + # Returns the backtrace after all filters and silencers have been run + # against it. Filters run first, then silencers. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#45 + def clean(backtrace, kind = T.unsafe(nil)); end + + # Returns the frame with all filters applied. + # returns +nil+ if the frame was silenced. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#73 + def clean_frame(frame, kind = T.unsafe(nil)); end + + # Given an array of Thread::Backtrace::Location objects, returns an array + # with the clean ones: + # + # clean_locations = backtrace_cleaner.clean_locations(caller_locations) + # + # Filters and silencers receive strings as usual. However, the +path+ + # attributes of the locations in the returned array are the original, + # unfiltered ones, since locations are immutable. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#67 + def clean_locations(locations, 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#57 + def filter(backtrace, kind = T.unsafe(nil)); end + + # Returns the first clean frame of the caller's backtrace, or +nil+. + # + # Frames are strings. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#94 + def first_clean_frame(kind = T.unsafe(nil)); end + + # Returns the first clean location of the caller's call stack, or +nil+. + # + # Locations are Thread::Backtrace::Location objects. Since they are + # immutable, their +path+ attributes are the original ones, but filters + # are applied internally so silencers can still rely on them. + # + # source://activesupport//lib/active_support/backtrace_cleaner.rb#113 + def first_clean_location(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#177 + 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#170 + def remove_silencers!; end + + private + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#198 + def add_core_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#189 + def add_gem_filter; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#202 + def add_gem_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#206 + def add_stdlib_silencer; end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#210 + def filter_backtrace(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#184 + def initialize_copy(_other); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#226 + def noise(backtrace); end + + # source://activesupport//lib/active_support/backtrace_cleaner.rb#218 + def silence(backtrace); end +end + +# source://activesupport//lib/active_support/backtrace_cleaner.rb#182 +ActiveSupport::BacktraceCleaner::FORMATTED_GEMS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/benchmark.rb#4 +module ActiveSupport::Benchmark + class << self + # Benchmark realtime in the specified time unit. By default, + # the returned unit is in seconds. + # + # ActiveSupport::Benchmark.realtime { sleep 0.1 } + # # => 0.10007 + # + # ActiveSupport::Benchmark.realtime(:float_millisecond) { sleep 0.1 } + # # => 100.07 + # + # `unit` can be any of the values accepted by Ruby's `Process.clock_gettime`. + # + # source://activesupport//lib/active_support/benchmark.rb#15 + def realtime(unit = T.unsafe(nil), &block); end + end +end + +# = \Benchmarkable +# +# source://activesupport//lib/active_support/benchmarkable.rb#7 +module ActiveSupport::Benchmarkable + # Allows you to measure the execution time of a block in a template and + # records the result to the log. Wrap this block around expensive operations + # or possible bottlenecks to get a time reading for the operation. For + # example, let's say you thought your file processing method was taking too + # long; you could wrap it in a benchmark block. + # + # <% benchmark 'Process data files' do %> + # <%= expensive_files_operation %> + # <% end %> + # + # That would add something like "Process data files (345.2ms)" to the log, + # which you can then use to compare timings when optimizing your code. + # + # You may give an optional logger level (:debug, :info, + # :warn, :error) as the :level option. The + # default logger level value is :info. + # + # <% benchmark 'Low-level files', level: :debug do %> + # <%= lowlevel_files_operation %> + # <% end %> + # + # Finally, you can pass true as the third argument to silence all log + # activity (other than the timing information) from inside the block. This + # is great for boiling down a noisy block to just a single statement that + # produces one log line: + # + # <% benchmark 'Process data files', level: :info, silence: true do %> + # <%= expensive_and_chatty_files_operation %> + # <% end %> + # + # source://activesupport//lib/active_support/benchmarkable.rb#37 + def benchmark(message = T.unsafe(nil), options = T.unsafe(nil), &block); end +end + +# source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#7 +module ActiveSupport::BigDecimalWithDefaultFormat + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end +end + +# = Active Support Broadcast Logger +# +# The Broadcast logger is a logger used to write messages to multiple IO. It is commonly used +# in development to display messages on STDOUT and also write them to a file (development.log). +# With the Broadcast logger, you can broadcast your logs to a unlimited number of sinks. +# +# The BroadcastLogger acts as a standard logger and all methods you are used to are available. +# However, all the methods on this logger will propagate and be delegated to the other loggers +# that are part of the broadcast. +# +# Broadcasting your logs. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# Add a logger to the broadcast. +# +# stdout_logger = Logger.new(STDOUT) +# broadcast = BroadcastLogger.new(stdout_logger) +# file_logger = Logger.new("development.log") +# broadcast.broadcast_to(file_logger) +# +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# Modifying the log level for all broadcasted loggers. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# +# broadcast.level = Logger::FATAL # Modify the log level for the whole broadcast. +# +# Stop broadcasting log to a sink. +# +# stdout_logger = Logger.new(STDOUT) +# file_logger = Logger.new("development.log") +# broadcast = BroadcastLogger.new(stdout_logger, file_logger) +# broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file. +# +# broadcast.stop_broadcasting_to(file_logger) +# broadcast.info("Hello world!") # Writes the log *only* to STDOUT. +# +# At least one sink has to be part of the broadcast. Otherwise, your logs will not +# be written anywhere. For instance: +# +# broadcast = BroadcastLogger.new +# broadcast.info("Hello world") # The log message will appear nowhere. +# +# If you are adding a custom logger with custom methods to the broadcast, +# the `BroadcastLogger` will proxy them and return the raw value, or an array +# of raw values, depending on how many loggers in the broadcasts responded to +# the method: +# +# class MyLogger < ::Logger +# def loggable? +# true +# end +# end +# +# logger = BroadcastLogger.new +# logger.loggable? # => A NoMethodError exception is raised because no loggers in the broadcasts could respond. +# +# logger.broadcast_to(MyLogger.new(STDOUT)) +# logger.loggable? # => true +# logger.broadcast_to(MyLogger.new(STDOUT)) +# puts logger.broadcasts # => [MyLogger, MyLogger] +# logger.loggable? # [true, true] +# +# source://activesupport//lib/active_support/broadcast_logger.rb#74 +class ActiveSupport::BroadcastLogger + include ::ActiveSupport::LoggerSilence + include ::ActiveSupport::LoggerThreadSafeLevel + + # @return [BroadcastLogger] a new instance of BroadcastLogger + # + # source://activesupport//lib/active_support/broadcast_logger.rb#81 + def initialize(*loggers); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def <<(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def add(*_arg0, **_arg1, &_arg2); end + + # Add logger(s) to the broadcast. + # + # broadcast_logger = ActiveSupport::BroadcastLogger.new + # broadcast_logger.broadcast_to(Logger.new(STDOUT), Logger.new(STDERR)) + # + # source://activesupport//lib/active_support/broadcast_logger.rb#92 + def broadcast_to(*loggers); end + + # Returns all the logger that are part of this broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#78 + def broadcasts; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def close(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def debug(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::DEBUG+ for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#146 + def debug!; end + + # True if the log level allows entries with severity +Logger::DEBUG+ to be written + # to at least one broadcast. False otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#141 + def debug?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def error(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::ERROR+ for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#179 + def error!; end + + # True if the log level allows entries with severity +Logger::ERROR+ to be written + # to at least one broadcast. False otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#174 + def error?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def fatal(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::FATAL+ for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#190 + def fatal!; end + + # True if the log level allows entries with severity +Logger::FATAL+ to be written + # to at least one broadcast. False otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#185 + def fatal?; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def formatter(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def formatter=(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def info(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::INFO+ for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#157 + def info!; end + + # True if the log level allows entries with severity +Logger::INFO+ to be written + # to at least one broadcast. False otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#152 + def info?; end + + # Returns the lowest level of all the loggers in the broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#135 + def level; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def level=(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#113 + def local_level; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#107 + def local_level=(level); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def log(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute progname. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#79 + def progname; end + + # Sets the attribute progname + # + # @param value the value to set the attribute progname to. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#79 + def progname=(_arg0); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def sev_threshold=(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#75 + def silencer; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#75 + def silencer=(val); end + + # Remove a logger from the broadcast. When a logger is removed, messages sent to + # the broadcast will no longer be written to its sink. + # + # sink = Logger.new(STDOUT) + # broadcast_logger = ActiveSupport::BroadcastLogger.new + # + # broadcast_logger.stop_broadcasting_to(sink) + # + # source://activesupport//lib/active_support/broadcast_logger.rb#103 + def stop_broadcasting_to(logger); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def unknown(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#127 + def warn(*_arg0, **_arg1, &_arg2); end + + # Sets the log level to +Logger::WARN+ for the whole broadcast. + # + # source://activesupport//lib/active_support/broadcast_logger.rb#168 + def warn!; end + + # True if the log level allows entries with severity +Logger::WARN+ to be written + # to at least one broadcast. False otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#163 + def warn?; end + + private + + # source://activesupport//lib/active_support/broadcast_logger.rb#202 + def dispatch(method, *args, **kwargs, &block); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#194 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/broadcast_logger.rb#222 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/broadcast_logger.rb#234 + def respond_to_missing?(method, include_all); end + + class << self + # source://activesupport//lib/active_support/broadcast_logger.rb#75 + def silencer; end + + # source://activesupport//lib/active_support/broadcast_logger.rb#75 + def silencer=(val); end + end +end + +# source://activesupport//lib/active_support/broadcast_logger.rb#121 +ActiveSupport::BroadcastLogger::LOGGER_METHODS = T.let(T.unsafe(nil), Array) + +# See ActiveSupport::Cache::Store for documentation. +# +# source://activesupport//lib/active_support/cache/entry.rb#6 +module ActiveSupport::Cache + class << self + # Expands out the +key+ argument into a key that can be used for the + # cache store. Optionally accepts a namespace, and all keys will be + # scoped within that namespace. + # + # If the +key+ argument provided is an array, or responds to +to_a+, then + # each of elements in the array will be turned into parameters/keys and + # concatenated into a single key. For example: + # + # ActiveSupport::Cache.expand_cache_key([:foo, :bar]) # => "foo/bar" + # ActiveSupport::Cache.expand_cache_key([:foo, :bar], "namespace") # => "namespace/foo/bar" + # + # The +key+ argument can also respond to +cache_key+ or +to_param+. + # + # source://activesupport//lib/active_support/cache.rb#113 + def expand_cache_key(key, namespace = T.unsafe(nil)); end + + # Returns the value of attribute format_version. + # + # source://activesupport//lib/active_support/cache.rb#60 + 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#60 + 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#87 + def lookup_store(store = T.unsafe(nil), *parameters); end + + private + + # source://activesupport//lib/active_support/cache.rb#125 + 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#137 + def retrieve_store_class(store); end + end +end + +# source://activesupport//lib/active_support/cache/coder.rb#7 +class ActiveSupport::Cache::Coder + # @return [Coder] a new instance of Coder + # + # source://activesupport//lib/active_support/cache/coder.rb#8 + def initialize(serializer, compressor, legacy_serializer: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/coder.rb#14 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/coder.rb#20 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache/coder.rb#48 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/cache/coder.rb#136 + def dump_version(version); end + + # source://activesupport//lib/active_support/cache/coder.rb#144 + def load_version(dumped_version); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#121 + def signature?(dumped); end + + # source://activesupport//lib/active_support/cache/coder.rb#129 + def try_compress(string, threshold); end + + # source://activesupport//lib/active_support/cache/coder.rb#125 + def type_for_string(value); end +end + +# source://activesupport//lib/active_support/cache/coder.rb#76 +ActiveSupport::Cache::Coder::COMPRESSED_FLAG = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#98 +class ActiveSupport::Cache::Coder::LazyEntry < ::ActiveSupport::Cache::Entry + # @return [LazyEntry] a new instance of LazyEntry + # + # source://activesupport//lib/active_support/cache/coder.rb#99 + def initialize(serializer, compressor, payload, **options); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/coder.rb#114 + def mismatched?(version); end + + # source://activesupport//lib/active_support/cache/coder.rb#106 + def value; end +end + +# source://activesupport//lib/active_support/cache/coder.rb#84 +ActiveSupport::Cache::Coder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#68 +ActiveSupport::Cache::Coder::OBJECT_DUMP_TYPE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#80 +ActiveSupport::Cache::Coder::PACKED_EXPIRES_AT_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#78 +ActiveSupport::Cache::Coder::PACKED_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#79 +ActiveSupport::Cache::Coder::PACKED_TYPE_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#82 +ActiveSupport::Cache::Coder::PACKED_VERSION_INDEX = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/coder.rb#81 +ActiveSupport::Cache::Coder::PACKED_VERSION_LENGTH_TEMPLATE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#66 +ActiveSupport::Cache::Coder::SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/coder.rb#96 +ActiveSupport::Cache::Coder::STRING_DESERIALIZERS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/coder.rb#70 +ActiveSupport::Cache::Coder::STRING_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/coder.rb#86 +class ActiveSupport::Cache::Coder::StringDeserializer + # @return [StringDeserializer] a new instance of StringDeserializer + # + # source://activesupport//lib/active_support/cache/coder.rb#87 + def initialize(encoding); end + + # source://activesupport//lib/active_support/cache/coder.rb#91 + def load(payload); end +end + +# source://activesupport//lib/active_support/cache.rb#47 +ActiveSupport::Cache::DEFAULT_COMPRESS_LIMIT = T.let(T.unsafe(nil), Integer) + +# Raised by coders when the cache entry can't be deserialized. +# This error is treated as a cache miss. +# +# source://activesupport//lib/active_support/cache.rb#51 +class ActiveSupport::Cache::DeserializationError < ::StandardError; end + +# This class is used to represent cache entries. Cache entries have a value, an optional +# expiration time, and an optional version. The expiration time is used to support the :race_condition_ttl option +# on the cache. The version is used to support the :version option on the cache for rejecting +# mismatches. +# +# Since cache entries in most instances will be serialized, the internals of this class are highly optimized +# using short instance variable names that are lazily defined. +# +# source://activesupport//lib/active_support/cache/entry.rb#14 +class ActiveSupport::Cache::Entry + # Creates a new cache entry for the specified value. Options supported are + # +:compressed+, +:version+, +:expires_at+ and +:expires_in+. + # + # @return [Entry] a new instance of Entry + # + # source://activesupport//lib/active_support/cache/entry.rb#25 + def initialize(value, compressed: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), expires_at: T.unsafe(nil), **_arg5); end + + # Returns the size of the cached value. This could be less than + # value.bytesize if the data is compressed. + # + # source://activesupport//lib/active_support/cache/entry.rb#61 + def bytesize; end + + # source://activesupport//lib/active_support/cache/entry.rb#76 + def compressed(compress_threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#72 + def compressed?; end + + # Duplicates the value in a class. This is used by cache implementations that don't natively + # serialize entries to protect against accidental cache modifications. + # + # source://activesupport//lib/active_support/cache/entry.rb#106 + def dup_value!; end + + # Checks if the entry is expired. The +expires_in+ parameter can override + # the value set when the entry was created. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#43 + def expired?; end + + # source://activesupport//lib/active_support/cache/entry.rb#47 + def expires_at; end + + # source://activesupport//lib/active_support/cache/entry.rb#51 + def expires_at=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#100 + def local?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/entry.rb#37 + def mismatched?(version); end + + # source://activesupport//lib/active_support/cache/entry.rb#116 + def pack; end + + # source://activesupport//lib/active_support/cache/entry.rb#33 + def value; end + + # Returns the value of attribute version. + # + # source://activesupport//lib/active_support/cache/entry.rb#21 + def version; end + + private + + # source://activesupport//lib/active_support/cache/entry.rb#127 + def marshal_load(payload); end + + # source://activesupport//lib/active_support/cache/entry.rb#123 + def uncompress(value); end + + class << self + # source://activesupport//lib/active_support/cache/entry.rb#16 + def unpack(members); end + end +end + +# = \File \Cache \Store +# +# A cache store implementation which stores everything on the filesystem. +# +# source://activesupport//lib/active_support/cache/file_store.rb#12 +class ActiveSupport::Cache::FileStore < ::ActiveSupport::Cache::Store + # @return [FileStore] a new instance of FileStore + # + # source://activesupport//lib/active_support/cache/file_store.rb#20 + def initialize(cache_path, **options); end + + # Returns the value of attribute cache_path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#13 + def cache_path; end + + # Preemptively iterates through all stored keys and removes the ones which have expired. + # + # source://activesupport//lib/active_support/cache/file_store.rb#40 + def cleanup(options = T.unsafe(nil)); end + + # Deletes all items from the cache. In this case it deletes all the entries in the specified + # file store directory except for .keep or .gitkeep. Be careful which directory is specified in your + # config file when using +FileStore+ because everything in that directory will be deleted. + # + # source://activesupport//lib/active_support/cache/file_store.rb#33 + def clear(options = T.unsafe(nil)); end + + # Decrement a cached integer value. Returns the updated value. + # + # If the key is unset, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.decrement("baz") # => 4 + # + # source://activesupport//lib/active_support/cache/file_store.rb#80 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#89 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increment a cached integer value. Returns the updated value. + # + # If the key is unset, it starts from +0+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.increment("baz") # => 6 + # + # source://activesupport//lib/active_support/cache/file_store.rb#60 + def increment(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#101 + def inspect; end + + private + + # Delete empty directories in the cache. + # + # source://activesupport//lib/active_support/cache/file_store.rb#195 + def delete_empty_directories(dir); end + + # source://activesupport//lib/active_support/cache/file_store.rb#131 + def delete_entry(key, **options); end + + # Make sure a file path's directories exist. + # + # source://activesupport//lib/active_support/cache/file_store.rb#204 + def ensure_cache_path(path); end + + # Translate a file path into a key. + # + # source://activesupport//lib/active_support/cache/file_store.rb#189 + def file_path_key(path); end + + # Lock a file for a block so only one process can modify it at a time. + # + # source://activesupport//lib/active_support/cache/file_store.rb#148 + def lock_file(file_name, &block); end + + # Modifies the amount of an integer value that is stored in the cache. + # If the key is not found it is created and set to +amount+. + # + # source://activesupport//lib/active_support/cache/file_store.rb#222 + def modify_value(name, amount, options); end + + # Translate a key into a file path. + # + # source://activesupport//lib/active_support/cache/file_store.rb#162 + def normalize_key(key, options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#106 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#113 + def read_serialized_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/file_store.rb#208 + def search_dir(dir, &callback); end + + # source://activesupport//lib/active_support/cache/file_store.rb#120 + def write_entry(key, entry, **options); end + + # source://activesupport//lib/active_support/cache/file_store.rb#124 + def write_serialized_entry(key, payload, **options); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/file_store.rb#26 + def supports_cache_versioning?; end + end +end + +# source://activesupport//lib/active_support/cache/file_store.rb#15 +ActiveSupport::Cache::FileStore::DIR_FORMATTER = T.let(T.unsafe(nil), String) + +# max filename size on file system is 255, minus room for timestamp, pid, and random characters appended by Tempfile (used by atomic write) +# +# source://activesupport//lib/active_support/cache/file_store.rb#16 +ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# max is 1024, plus some room +# +# source://activesupport//lib/active_support/cache/file_store.rb#17 +ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache/file_store.rb#18 +ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array) + +# = Memory \Cache \Store +# +# A cache store implementation which stores everything into memory in the +# same process. If you're running multiple Ruby on \Rails server processes +# (which is the case if you're using Phusion Passenger or puma clustered mode), +# then this means that \Rails server process instances won't be able +# to share cache data with each other and this may not be the most +# appropriate cache in that scenario. +# +# This cache has a bounded size specified by the +:size+ options to the +# initializer (default is 32Mb). When the cache exceeds the allotted size, +# a cleanup will occur which tries to prune the cache down to three quarters +# of the maximum size by removing the least recently used entries. +# +# Unlike other Cache store implementations, +MemoryStore+ does not compress +# values by default. +MemoryStore+ does not benefit from compression as much +# as other Store implementations, as it does not send data over a network. +# However, when compression is enabled, it still pays the full cost of +# compression in terms of cpu use. +# +# +MemoryStore+ is thread-safe. +# +# source://activesupport//lib/active_support/cache/memory_store.rb#28 +class ActiveSupport::Cache::MemoryStore < ::ActiveSupport::Cache::Store + include ::ActiveSupport::Cache::Strategy::LocalCache + + # @return [MemoryStore] a new instance of MemoryStore + # + # source://activesupport//lib/active_support/cache/memory_store.rb#75 + 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#103 + 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#95 + def clear(options = T.unsafe(nil)); end + + # Decrement a cached integer value. Returns the updated value. + # + # If the key is unset or has expired, it will be set to +-amount+. + # + # cache.decrement("foo") # => -1 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.decrement("baz") # => 4 + # + # source://activesupport//lib/active_support/cache/memory_store.rb#168 + def decrement(name, amount = T.unsafe(nil), **options); end + + # Deletes cache entries if the cache key matches a given pattern. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#175 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Increment a cached integer value. Returns the updated value. + # + # If the key is unset, it will be set to +amount+: + # + # cache.increment("foo") # => 1 + # cache.increment("bar", 100) # => 100 + # + # To set a specific value, call #write: + # + # cache.write("baz", 5) + # cache.increment("baz") # => 6 + # + # source://activesupport//lib/active_support/cache/memory_store.rb#151 + def increment(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#187 + 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#116 + 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#135 + 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#193 + def synchronize(&block); end + + private + + # source://activesupport//lib/active_support/cache/memory_store.rb#200 + def cached_size(key, payload); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#233 + def delete_entry(key, **_arg1); end + + # Modifies the amount of an integer value that is stored in the cache. + # If the key is not found it is created and set to +amount+. + # + # source://activesupport//lib/active_support/cache/memory_store.rb#243 + def modify_value(name, amount, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#204 + def read_entry(key, **options); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#216 + def write_entry(key, entry, **options); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/memory_store.rb#90 + def supports_cache_versioning?; end + end +end + +# source://activesupport//lib/active_support/cache/memory_store.rb#31 +module ActiveSupport::Cache::MemoryStore::DupCoder + extend ::ActiveSupport::Cache::MemoryStore::DupCoder + + # source://activesupport//lib/active_support/cache/memory_store.rb#34 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#42 + def dump_compressed(entry, threshold); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#47 + def load(entry); end + + private + + # source://activesupport//lib/active_support/cache/memory_store.rb#58 + def dump_value(value); end + + # source://activesupport//lib/active_support/cache/memory_store.rb#66 + def load_value(string); end +end + +# source://activesupport//lib/active_support/cache/memory_store.rb#56 +ActiveSupport::Cache::MemoryStore::DupCoder::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/memory_store.rb#198 +ActiveSupport::Cache::MemoryStore::PER_ENTRY_OVERHEAD = T.let(T.unsafe(nil), Integer) + +# = Null \Cache \Store +# +# A cache store implementation which doesn't actually store anything. Useful in +# development and test environments where you don't want caching turned on but +# need to go through the caching interface. +# +# This cache does implement the local cache strategy, so values will actually +# be cached inside blocks that utilize this strategy. See +# ActiveSupport::Cache::Strategy::LocalCache for more details. +# +# source://activesupport//lib/active_support/cache/null_store.rb#14 +class ActiveSupport::Cache::NullStore < ::ActiveSupport::Cache::Store + include ::ActiveSupport::Cache::Strategy::LocalCache + + # source://activesupport//lib/active_support/cache/null_store.rb#25 + def cleanup(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/null_store.rb#22 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/null_store.rb#31 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/null_store.rb#34 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/null_store.rb#28 + def increment(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/null_store.rb#37 + def inspect; end + + private + + # source://activesupport//lib/active_support/cache/null_store.rb#57 + def delete_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/null_store.rb#42 + def read_entry(key, **s); end + + # source://activesupport//lib/active_support/cache/null_store.rb#46 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/null_store.rb#49 + def write_entry(key, entry, **_arg2); end + + # source://activesupport//lib/active_support/cache/null_store.rb#53 + def write_serialized_entry(key, payload, **_arg2); end + + class << self + # Advertise cache versioning support. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/null_store.rb#18 + def supports_cache_versioning?; end + end +end + +# Mapping of canonical option names to aliases that a store will recognize. +# +# source://activesupport//lib/active_support/cache.rb#43 +ActiveSupport::Cache::OPTION_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#8 +module ActiveSupport::Cache::SerializerWithFallback + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#17 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#39 + def marshal_load(payload); end + + class << self + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#9 + def [](format); end + end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#66 +module ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#88 + def _load(marked); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#73 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#77 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#94 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#71 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_COMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#70 +ActiveSupport::Cache::SerializerWithFallback::Marshal70WithFallback::MARK_UNCOMPRESSED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#99 +module ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#109 + def _load(dumped); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#105 + def dump(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#113 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#103 +ActiveSupport::Cache::SerializerWithFallback::Marshal71WithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#118 +module ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::MessagePackWithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#126 + def _load(dumped); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#122 + def dump(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#130 + def dumped?(dumped); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#135 + def available?; end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#45 +module ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback + include ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback + extend ::ActiveSupport::Cache::SerializerWithFallback::PassthroughWithFallback + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#57 + def _load(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#49 + def dump(entry); end + + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#53 + def dump_compressed(entry, threshold); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#61 + def dumped?(dumped); end +end + +# source://activesupport//lib/active_support/cache/serializer_with_fallback.rb#144 +ActiveSupport::Cache::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# = Active Support \Cache \Store +# +# An abstract cache store class. There are multiple cache store +# implementations, each having its own additional features. See the classes +# under the ActiveSupport::Cache module, e.g. +# ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most +# popular cache store for large production websites. +# +# Some implementations may not support all methods beyond the basic cache +# methods of #fetch, #write, #read, #exist?, and #delete. +# +# +ActiveSupport::Cache::Store+ can store any Ruby object that is supported +# by its +coder+'s +dump+ and +load+ methods. +# +# cache = ActiveSupport::Cache::MemoryStore.new +# +# cache.read('city') # => nil +# cache.write('city', "Duckburgh") # => true +# cache.read('city') # => "Duckburgh" +# +# cache.write('not serializable', Proc.new {}) # => TypeError +# +# Keys are always translated into Strings and are case sensitive. When an +# object is specified as a key and has a +cache_key+ method defined, this +# method will be called to define the key. Otherwise, the +to_param+ +# method will be called. Hashes and Arrays can also be used as keys. The +# elements will be delimited by slashes, and the elements within a Hash +# will be sorted by key so they are consistent. +# +# cache.read('city') == cache.read(:city) # => true +# +# Nil values can be cached. +# +# If your cache is on a shared infrastructure, you can define a namespace +# for your cache entries. If a namespace is defined, it will be prefixed on +# to every key. The namespace can be either a static value or a Proc. If it +# is a Proc, it will be invoked when each key is evaluated so that you can +# use application logic to invalidate keys. +# +# cache.namespace = -> { @last_mod_time } # Set the namespace to a variable +# @last_mod_time = Time.now # Invalidate the entire cache by changing namespace +# +# source://activesupport//lib/active_support/cache.rb#190 +class ActiveSupport::Cache::Store + # Creates a new cache. + # + # ==== Options + # + # [+:namespace+] + # Sets the namespace for the cache. This option is especially useful if + # your application shares a cache with other applications. + # + # [+:serializer+] + # The serializer for cached values. Must respond to +dump+ and +load+. + # + # The default serializer depends on the cache format version (set via + # +config.active_support.cache_format_version+ when using Rails). The + # default serializer for each format version includes a fallback + # mechanism to deserialize values from any format version. This behavior + # makes it easy to migrate between format versions without invalidating + # the entire cache. + # + # You can also specify serializer: :message_pack to use a + # preconfigured serializer based on ActiveSupport::MessagePack. The + # +:message_pack+ serializer includes the same deserialization fallback + # mechanism, allowing easy migration from (or to) the default + # serializer. The +:message_pack+ serializer may improve performance, + # but it requires the +msgpack+ gem. + # + # [+:compressor+] + # The compressor for serialized cache values. Must respond to +deflate+ + # and +inflate+. + # + # The default compressor is +Zlib+. To define a new custom compressor + # that also decompresses old cache entries, you can check compressed + # values for Zlib's "\x78" signature: + # + # module MyCompressor + # def self.deflate(dumped) + # # compression logic... (make sure result does not start with "\x78"!) + # end + # + # def self.inflate(compressed) + # if compressed.start_with?("\x78") + # Zlib.inflate(compressed) + # else + # # decompression logic... + # end + # end + # end + # + # ActiveSupport::Cache.lookup_store(:redis_cache_store, compressor: MyCompressor) + # + # [+:coder+] + # The coder for serializing and (optionally) compressing cache entries. + # Must respond to +dump+ and +load+. + # + # The default coder composes the serializer and compressor, and includes + # some performance optimizations. If you only need to override the + # serializer or compressor, you should specify the +:serializer+ or + # +:compressor+ options instead. + # + # If the store can handle cache entries directly, you may also specify + # coder: nil to omit the serializer, compressor, and coder. For + # example, if you are using ActiveSupport::Cache::MemoryStore and can + # guarantee that cache values will not be mutated, you can specify + # coder: nil to avoid the overhead of safeguarding against + # mutation. + # + # The +:coder+ option is mutually exclusive with the +:serializer+ and + # +:compressor+ options. Specifying them together will raise an + # +ArgumentError+. + # + # Any other specified options are treated as default options for the + # relevant cache operations, such as #read, #write, and #fetch. + # + # @return [Store] a new instance of Store + # + # source://activesupport//lib/active_support/cache.rb#300 + 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#785 + 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#795 + 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#750 + def decrement(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # Deletes an entry in the cache. Returns +true+ if an entry is deleted + # and +false+ otherwise. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#686 + 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#732 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # Deletes multiple entries in the cache. Returns the number of deleted + # entries. + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#699 + 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#713 + 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 second. + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1) + # + # cache.write("foo", "original value") + # val_1 = nil + # val_2 = nil + # p cache.read("foo") # => "original value" + # + # sleep 1 # wait until the cache expires + # + # t1 = Thread.new do + # # fetch does the following: + # # 1. gets an recent expired entry + # # 2. extends the expiry by 2 seconds (race_condition_ttl) + # # 3. regenerates the new value + # val_1 = cache.fetch("foo", race_condition_ttl: 2) do + # sleep 1 + # "new value 1" + # end + # end + # + # # Wait until t1 extends the expiry of the entry + # # but before generating the new value + # sleep 0.1 + # + # val_2 = cache.fetch("foo", race_condition_ttl: 2) do + # # This block won't be executed because t1 extended the expiry + # "new value 2" + # end + # + # t1.join + # + # p val_1 # => "new value 1" + # p val_2 # => "original value" + # p cache.fetch("foo") # => "new value 1" + # + # # The entry requires 3 seconds to expire (expires_in + race_condition_ttl) + # # We have waited 2 seconds already (sleep(1) + t1.join) thus we need to wait 1 + # # more second to see the entry expire. + # sleep 1 + # + # p cache.fetch("foo") # => nil + # + # ==== Dynamic Options + # + # In some cases it may be necessary to dynamically compute options based + # on the cached value. To support this, an ActiveSupport::Cache::WriteOptions + # instance is passed as the second argument to the block. For example: + # + # cache.fetch("authentication-token:#{user.id}") do |key, options| + # token = authenticate_to_service + # options.expires_at = token.expires_at + # token + # end + # + # source://activesupport//lib/active_support/cache.rb#452 + def fetch(name, options = T.unsafe(nil), &block); end + + # Fetches data from the cache, using the given keys. If there is data in + # the cache with the given keys, then that data is returned. Otherwise, + # the supplied block is called for each key for which there was no data, + # and the result will be written to the cache and returned. + # Therefore, you need to pass a block that returns the data to be written + # to the cache. If you do not want to write the cache when the cache is + # not found, use #read_multi. + # + # Returns a hash with the data for each of the names. For example: + # + # cache.write("bim", "bam") + # cache.fetch_multi("bim", "unknown_key") do |key| + # "Fallback value for key: #{key}" + # end + # # => { "bim" => "bam", + # # "unknown_key" => "Fallback value for key: unknown_key" } + # + # You may also specify additional options via the +options+ argument. See #fetch for details. + # Other options are passed to the underlying cache implementation. For example: + # + # cache.fetch_multi("fizz", expires_in: 5.seconds) do |key| + # "buzz" + # end + # # => {"fizz"=>"buzz"} + # cache.read("fizz") + # # => "buzz" + # sleep(6) + # cache.read("fizz") + # # => nil + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#603 + 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#741 + def increment(name, amount = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache.rb#197 + def logger; end + + # source://activesupport//lib/active_support/cache.rb#197 + def logger=(val); end + + # Silences the logger within a block. + # + # source://activesupport//lib/active_support/cache.rb#330 + def mute; end + + # Get the current namespace + # + # source://activesupport//lib/active_support/cache.rb#800 + def namespace; end + + # Set the current namespace. Note, this will be ignored if custom + # options are passed to cache wills with a namespace key. + # + # source://activesupport//lib/active_support/cache.rb#806 + def namespace=(namespace); end + + # source://activesupport//lib/active_support/cache.rb#723 + def new_entry(value, options = T.unsafe(nil)); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/cache.rb#200 + def options; end + + # source://activesupport//lib/active_support/cache.rb#198 + def raise_on_invalid_cache_expiration_time; end + + # source://activesupport//lib/active_support/cache.rb#198 + def raise_on_invalid_cache_expiration_time=(val); end + + # Reads data from the cache, using the given key. If there is data in + # the cache with the given key, then that data is returned. Otherwise, + # +nil+ is returned. + # + # Note, if data was written with the :expires_in or + # :version options, both of these conditions are applied before + # the data is returned. + # + # ==== Options + # + # * +:namespace+ - Replace the store namespace for this call. + # * +:version+ - Specifies a version for the cache entry. If the cached + # version does not match the requested version, the read will be treated + # as a cache miss. This feature is used to support recyclable cache keys. + # + # Other options will be handled by the specific cache store implementation. + # + # source://activesupport//lib/active_support/cache.rb#506 + def read(name, options = T.unsafe(nil)); end + + # Reads a counter that was set by #increment / #decrement. + # + # cache.write_counter("foo", 1) + # cache.read_counter("foo") # => 1 + # cache.increment("foo") + # cache.read_counter("foo") # => 2 + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#762 + def read_counter(name, **options); 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#544 + def read_multi(*names); end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#200 + def silence; end + + # Silences the logger. + # + # source://activesupport//lib/active_support/cache.rb#324 + def silence!; end + + # Returns the value of attribute silence. + # + # source://activesupport//lib/active_support/cache.rb#201 + def silence?; end + + # Writes the value to the cache with the key. The value must be supported + # by the +coder+'s +dump+ and +load+ methods. + # + # Returns +true+ if the write succeeded, +nil+ if there was an error talking + # to the cache backend, or +false+ if the write failed for another reason. + # + # By default, cache entries larger than 1kB are compressed. Compression + # allows more data to be stored in the same memory footprint, leading to + # fewer cache evictions and higher hit rates. + # + # ==== Options + # + # * compress: false - Disables compression of the cache entry. + # + # * +:compress_threshold+ - The compression threshold, specified in bytes. + # \Cache entries larger than this threshold will be compressed. Defaults + # to +1.kilobyte+. + # + # * +:expires_in+ - Sets a relative expiration time for the cache entry, + # specified in seconds. +:expire_in+ and +:expired_in+ are aliases for + # +:expires_in+. + # + # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes) + # cache.write(key, value, expires_in: 1.minute) # Set a lower value for one entry + # + # * +:expires_at+ - Sets an absolute expiration time for the cache entry. + # + # cache = ActiveSupport::Cache::MemoryStore.new + # cache.write(key, value, expires_at: Time.now.at_end_of_hour) + # + # * +:version+ - Specifies a version for the cache entry. When reading + # from the cache, if the cached version does not match the requested + # version, the read will be treated as a cache miss. This feature is + # used to support recyclable cache keys. + # + # * +:unless_exist+ - Prevents overwriting an existing cache entry. + # + # Other options will be handled by the specific cache store implementation. + # + # source://activesupport//lib/active_support/cache.rb#672 + def write(name, value, options = T.unsafe(nil)); end + + # Writes a counter that can then be modified by #increment / #decrement. + # + # cache.write_counter("foo", 1) + # cache.read_counter("foo") # => 1 + # cache.increment("foo") + # cache.read_counter("foo") # => 2 + # + # Options are passed to the underlying cache implementation. + # + # source://activesupport//lib/active_support/cache.rb#775 + def write_counter(name, value, **options); end + + # Cache Storage API to write multiple values at once. + # + # source://activesupport//lib/active_support/cache.rb#559 + def write_multi(hash, options = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/cache.rb#1074 + def _instrument(operation, multi: T.unsafe(nil), options: T.unsafe(nil), **payload, &block); end + + # source://activesupport//lib/active_support/cache.rb#811 + def default_serializer; end + + # Deletes an entry from the cache implementation. Subclasses must + # implement this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#897 + 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#903 + def delete_multi_entries(entries, **options); end + + # source://activesupport//lib/active_support/cache.rb#862 + def deserialize_entry(payload, **_arg1); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/cache.rb#984 + def expand_and_namespace_key(key, options = T.unsafe(nil)); 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#1037 + def expanded_key(key); end + + # source://activesupport//lib/active_support/cache.rb#1058 + def expanded_version(key); end + + # source://activesupport//lib/active_support/cache.rb#1111 + def get_entry_value(entry, name, options); end + + # source://activesupport//lib/active_support/cache.rb#1095 + def handle_expired_entry(entry, key, options); end + + # source://activesupport//lib/active_support/cache.rb#937 + def handle_invalid_expires_in(message); end + + # source://activesupport//lib/active_support/cache.rb#1066 + def instrument(operation, key, options = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/cache.rb#1070 + def instrument_multi(operation, keys, options = T.unsafe(nil), &block); end + + # Adds the namespace defined in the options to a pattern designed to + # match keys. Implementations that support delete_matched should call + # this method to translate a pattern that matches names into one that + # matches namespaced keys. + # + # source://activesupport//lib/active_support/cache.rb#826 + def key_matcher(pattern, options); end + + # Merges the default options with ones specific to a method call. + # + # source://activesupport//lib/active_support/cache.rb#908 + 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#1012 + def namespace_key(key, call_options = T.unsafe(nil)); end + + # Expands, namespaces and truncates the cache key. + # Raises an exception when the key is +nil+ or an empty string. + # May be overridden by cache stores to do additional normalization. + # + # source://activesupport//lib/active_support/cache.rb#979 + def normalize_key(key, options = T.unsafe(nil)); end + + # Normalize aliased options to their canonical form + # + # source://activesupport//lib/active_support/cache.rb#948 + def normalize_options(options); end + + # source://activesupport//lib/active_support/cache.rb#1054 + 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#843 + 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#870 + def read_multi_entries(names, **options); end + + # source://activesupport//lib/active_support/cache.rb#1116 + def save_block_result_to_cache(name, key, options); end + + # source://activesupport//lib/active_support/cache.rb#853 + def serialize_entry(entry, **options); end + + # source://activesupport//lib/active_support/cache.rb#991 + def truncate_key(key); end + + # source://activesupport//lib/active_support/cache.rb#959 + def validate_options(options); end + + # Writes an entry to the cache implementation. Subclasses must implement + # this method. + # + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/cache.rb#849 + 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#889 + def write_multi_entries(hash, **options); end + + class << self + # source://activesupport//lib/active_support/cache.rb#197 + def logger; end + + # source://activesupport//lib/active_support/cache.rb#197 + def logger=(val); end + + # source://activesupport//lib/active_support/cache.rb#198 + def raise_on_invalid_cache_expiration_time; end + + # source://activesupport//lib/active_support/cache.rb#198 + def raise_on_invalid_cache_expiration_time=(val); end + + private + + # source://activesupport//lib/active_support/cache.rb#205 + def retrieve_pool_options(options); end + end +end + +# Default +ConnectionPool+ options +# +# source://activesupport//lib/active_support/cache.rb#192 +ActiveSupport::Cache::Store::DEFAULT_POOL_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Keys are truncated with the Active Support digest if they exceed the limit. +# +# source://activesupport//lib/active_support/cache.rb#195 +ActiveSupport::Cache::Store::MAX_KEY_SIZE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/cache.rb#53 +module ActiveSupport::Cache::Strategy; end + +# = Local \Cache \Strategy +# +# Caches that implement LocalCache will be backed by an in-memory cache for the +# duration of a block. Repeated calls to the cache for the same key will hit the +# in-memory cache for faster access. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#13 +module ActiveSupport::Cache::Strategy::LocalCache + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#98 + def cleanup(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#92 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#117 + def decrement(name, amount = T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#104 + def delete_matched(matcher, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#124 + def fetch_multi(*names, &block); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#110 + def increment(name, amount = T.unsafe(nil), **options); end + + # The current local cache. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#82 + def local_cache; 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#88 + def middleware; end + + # Set a new local cache. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#72 + def new_local_cache; end + + # Unset the current local cache. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#77 + def unset_local_cache; end + + # Use a local cache for the duration of block. + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#67 + def with_local_cache(&block); end + + private + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#230 + def bypass_local_cache(&block); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#211 + def delete_entry(key, **_arg1); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#226 + def local_cache_key; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#173 + def read_multi_entries(names, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#159 + def read_serialized_entry(key, raw: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#234 + def use_temporary_local_cache(temporary_cache); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#216 + def write_cache_value(name, value, **options); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#202 + def write_serialized_entry(key, payload, **_arg2); end +end + +# Class for storing and registering the local caches. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#17 +module ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry + extend ::ActiveSupport::Cache::Strategy::LocalCache::LocalCacheRegistry + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#20 + def cache_for(local_cache_key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#25 + def set_cache_for(local_cache_key, value); end +end + +# = Local \Cache \Store +# +# Simple memory backed cache. This cache is not thread safe and is intended only +# for serving as a temporary memory cache for a single thread. +# +# source://activesupport//lib/active_support/cache/strategy/local_cache.rb#35 +class ActiveSupport::Cache::Strategy::LocalCache::LocalStore + # @return [LocalStore] a new instance of LocalStore + # + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#36 + def initialize; end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#40 + def clear(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#57 + def delete_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#61 + def fetch_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#44 + def read_entry(key); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#48 + def read_multi_entries(keys); end + + # source://activesupport//lib/active_support/cache/strategy/local_cache.rb#52 + def write_entry(key, entry); end +end + +# These options mean something to all cache implementations. Individual cache +# implementations may support additional options. +# +# source://activesupport//lib/active_support/cache.rb#26 +ActiveSupport::Cache::UNIVERSAL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Enables the dynamic configuration of Cache entry options while ensuring +# that conflicting options are not both set. When a block is given to +# ActiveSupport::Cache::Store#fetch, the second argument will be an +# instance of +WriteOptions+. +# +# source://activesupport//lib/active_support/cache.rb#1132 +class ActiveSupport::Cache::WriteOptions + # @return [WriteOptions] a new instance of WriteOptions + # + # source://activesupport//lib/active_support/cache.rb#1133 + def initialize(options); end + + # source://activesupport//lib/active_support/cache.rb#1157 + def expires_at; end + + # Sets the Cache entry's +expires_at+ value. If an +expires_in+ option was + # previously set, this will unset it since +expires_at+ and +expires_in+ + # cannot both be set. + # + # source://activesupport//lib/active_support/cache.rb#1164 + def expires_at=(expires_at); end + + # source://activesupport//lib/active_support/cache.rb#1145 + def expires_in; end + + # Sets the Cache entry's +expires_in+ value. If an +expires_at+ option was + # previously set, this will unset it since +expires_in+ and +expires_at+ + # cannot both be set. + # + # source://activesupport//lib/active_support/cache.rb#1152 + def expires_in=(expires_in); end + + # source://activesupport//lib/active_support/cache.rb#1137 + def version; end + + # source://activesupport//lib/active_support/cache.rb#1141 + def version=(version); end +end + +# = Caching Key Generator +# +# CachingKeyGenerator is a wrapper around KeyGenerator which allows users to avoid +# re-executing the key generation process when it's called using the same +salt+ and +# +key_size+. +# +# source://activesupport//lib/active_support/key_generator.rb#55 +class ActiveSupport::CachingKeyGenerator + # @return [CachingKeyGenerator] a new instance of CachingKeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#56 + def initialize(key_generator); end + + # Returns a derived key suitable for use. + # + # source://activesupport//lib/active_support/key_generator.rb#62 + def generate_key(*args); end +end + +# = Active Support \Callbacks +# +# \Callbacks are code hooks that are run at key points in an object's life cycle. +# The typical use case is to have a base class define a set of callbacks +# relevant to the other functionality it supplies, so that subclasses can +# install callbacks that enhance or modify the base functionality without +# needing to override or redefine methods of the base class. +# +# Mixing in this module allows you to define the events in the object's +# life cycle that will support callbacks (via ClassMethods#define_callbacks), +# set the instance methods, procs, or callback objects to be called (via +# ClassMethods#set_callback), and run the installed callbacks at the +# appropriate times (via +run_callbacks+). +# +# By default callbacks are halted by throwing +:abort+. +# See ClassMethods#define_callbacks for details. +# +# Three kinds of callbacks are supported: before callbacks, run before a +# certain event; after callbacks, run after the event; and around callbacks, +# blocks that surround the event, triggering it when they yield. Callback code +# can be contained in instance methods, procs or lambdas, or callback objects +# that respond to certain predetermined methods. See ClassMethods#set_callback +# for details. +# +# class Record +# include ActiveSupport::Callbacks +# define_callbacks :save +# +# def save +# run_callbacks :save do +# puts "- save" +# end +# end +# end +# +# class PersonRecord < Record +# set_callback :save, :before, :saving_message +# def saving_message +# puts "saving..." +# end +# +# set_callback :save, :after do |object| +# puts "saved" +# end +# end +# +# person = PersonRecord.new +# person.save +# +# Output: +# saving... +# - save +# saved +# +# source://activesupport//lib/active_support/callbacks.rb#65 +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#97 + def run_callbacks(kind, type = T.unsafe(nil)); end + + private + + # A hook invoked every time a before callback is halted. + # This can be overridden in ActiveSupport::Callbacks implementors in order + # to provide better debugging/logging. + # + # source://activesupport//lib/active_support/callbacks.rb#150 + def halted_callback_hook(filter, name); end + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + end + + module GeneratedInstanceMethods + def __callbacks; end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#73 +ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES = T.let(T.unsafe(nil), Array) + +# A future invocation of user-supplied code (either as a callback, +# or a condition filter). +# +# source://activesupport//lib/active_support/callbacks.rb#337 +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#495 + def build(filter, callback); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#396 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec0 + # @return [InstanceExec0] a new instance of InstanceExec0 + # + # source://activesupport//lib/active_support/callbacks.rb#397 + def initialize(block); end + + # source://activesupport//lib/active_support/callbacks.rb#401 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#411 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#405 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#418 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec1 + # @return [InstanceExec1] a new instance of InstanceExec1 + # + # source://activesupport//lib/active_support/callbacks.rb#419 + def initialize(block); end + + # source://activesupport//lib/active_support/callbacks.rb#423 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#433 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#427 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#440 +class ActiveSupport::Callbacks::CallTemplate::InstanceExec2 + # @return [InstanceExec2] a new instance of InstanceExec2 + # + # source://activesupport//lib/active_support/callbacks.rb#441 + def initialize(block); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/callbacks.rb#445 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#457 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#450 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#338 +class ActiveSupport::Callbacks::CallTemplate::MethodCall + # @return [MethodCall] a new instance of MethodCall + # + # source://activesupport//lib/active_support/callbacks.rb#339 + 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#356 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#366 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#360 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#373 +class ActiveSupport::Callbacks::CallTemplate::ObjectCall + # @return [ObjectCall] a new instance of ObjectCall + # + # source://activesupport//lib/active_support/callbacks.rb#374 + def initialize(target, method); end + + # source://activesupport//lib/active_support/callbacks.rb#379 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#389 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#383 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#465 +class ActiveSupport::Callbacks::CallTemplate::ProcCall + # @return [ProcCall] a new instance of ProcCall + # + # source://activesupport//lib/active_support/callbacks.rb#466 + def initialize(target); end + + # source://activesupport//lib/active_support/callbacks.rb#470 + def expand(target, value, block); end + + # source://activesupport//lib/active_support/callbacks.rb#480 + def inverted_lambda; end + + # source://activesupport//lib/active_support/callbacks.rb#474 + def make_lambda; end +end + +# source://activesupport//lib/active_support/callbacks.rb#231 +class ActiveSupport::Callbacks::Callback + # @return [Callback] a new instance of Callback + # + # source://activesupport//lib/active_support/callbacks.rb#246 + def initialize(name, filter, kind, options, chain_config); end + + # Wraps code with filter + # + # source://activesupport//lib/active_support/callbacks.rb#300 + def apply(callback_sequence); end + + # Returns the value of attribute chain_config. + # + # source://activesupport//lib/active_support/callbacks.rb#244 + def chain_config; end + + # source://activesupport//lib/active_support/callbacks.rb#282 + def compiled; end + + # source://activesupport//lib/active_support/callbacks.rb#304 + def current_scopes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#273 + def duplicates?(other); end + + # Returns the value of attribute filter. + # + # source://activesupport//lib/active_support/callbacks.rb#244 + def filter; end + + # Returns the value of attribute kind. + # + # source://activesupport//lib/active_support/callbacks.rb#243 + def kind; end + + # Sets the attribute kind + # + # @param value the value to set the attribute kind to. + # + # source://activesupport//lib/active_support/callbacks.rb#243 + def kind=(_arg0); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#269 + def matches?(_kind, _filter); end + + # source://activesupport//lib/active_support/callbacks.rb#257 + def merge_conditional_options(chain, if_option:, unless_option:); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#243 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://activesupport//lib/active_support/callbacks.rb#243 + def name=(_arg0); end + + private + + # source://activesupport//lib/active_support/callbacks.rb#312 + def check_conditionals(conditionals); end + + # source://activesupport//lib/active_support/callbacks.rb#327 + def conditions_lambdas; end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#232 + def build(chain, filter, kind, options); end + end +end + +# source://activesupport//lib/active_support/callbacks.rb#309 +ActiveSupport::Callbacks::Callback::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/callbacks.rb#568 +class ActiveSupport::Callbacks::CallbackChain + include ::Enumerable + + # @return [CallbackChain] a new instance of CallbackChain + # + # source://activesupport//lib/active_support/callbacks.rb#573 + def initialize(name, config); end + + # source://activesupport//lib/active_support/callbacks.rb#633 + def append(*callbacks); end + + # source://activesupport//lib/active_support/callbacks.rb#601 + def clear; end + + # source://activesupport//lib/active_support/callbacks.rb#615 + def compile(type); end + + # Returns the value of attribute config. + # + # source://activesupport//lib/active_support/callbacks.rb#571 + def config; end + + # source://activesupport//lib/active_support/callbacks.rb#595 + def delete(o); end + + # source://activesupport//lib/active_support/callbacks.rb#585 + def each(&block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#587 + def empty?; end + + # source://activesupport//lib/active_support/callbacks.rb#586 + def index(o); end + + # source://activesupport//lib/active_support/callbacks.rb#589 + def insert(index, o); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#571 + def name; end + + # source://activesupport//lib/active_support/callbacks.rb#637 + def prepend(*callbacks); end + + protected + + # Returns the value of attribute chain. + # + # source://activesupport//lib/active_support/callbacks.rb#642 + def chain; end + + private + + # source://activesupport//lib/active_support/callbacks.rb#645 + def append_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#608 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/callbacks.rb#652 + def prepend_one(callback); end + + # source://activesupport//lib/active_support/callbacks.rb#659 + def remove_duplicates(callback); end +end + +# source://activesupport//lib/active_support/callbacks.rb#675 +ActiveSupport::Callbacks::CallbackChain::DEFAULT_TERMINATOR = T.let(T.unsafe(nil), ActiveSupport::Callbacks::CallbackChain::DefaultTerminator) + +# source://activesupport//lib/active_support/callbacks.rb#665 +class ActiveSupport::Callbacks::CallbackChain::DefaultTerminator + # source://activesupport//lib/active_support/callbacks.rb#666 + def call(target, result_lambda); 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#519 +class ActiveSupport::Callbacks::CallbackSequence + # @return [CallbackSequence] a new instance of CallbackSequence + # + # source://activesupport//lib/active_support/callbacks.rb#520 + def initialize(nested = T.unsafe(nil), call_template = T.unsafe(nil), user_conditions = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/callbacks.rb#535 + def after(after); end + + # source://activesupport//lib/active_support/callbacks.rb#541 + def around(call_template, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#529 + def before(before); end + + # source://activesupport//lib/active_support/callbacks.rb#555 + def expand_call_template(arg, block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#551 + def final?; end + + # source://activesupport//lib/active_support/callbacks.rb#563 + def invoke_after(arg); end + + # source://activesupport//lib/active_support/callbacks.rb#559 + def invoke_before(arg); end + + # Returns the value of attribute nested. + # + # source://activesupport//lib/active_support/callbacks.rb#549 + def nested; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/callbacks.rb#545 + def skip?(arg); end +end + +# source://activesupport//lib/active_support/callbacks.rb#678 +module ActiveSupport::Callbacks::ClassMethods + # This is used internally to append, prepend and skip callbacks to the + # CallbackChain. + # + # source://activesupport//lib/active_support/callbacks.rb#688 + 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#903 + def define_callbacks(*names); end + + # source://activesupport//lib/active_support/callbacks.rb#679 + def normalize_callback_params(filters, block); end + + # Remove all set callbacks for the given event. + # + # source://activesupport//lib/active_support/callbacks.rb#813 + 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#739 + def set_callback(name, *filter_list, &block); end + + # Skip a previously set callback. Like #set_callback, :if or + # :unless options may be passed in order to control when the + # callback is skipped. + # + # Note: this example uses +PersonRecord+ and +#saving_message+, which you + # can see defined here[rdoc-ref:ActiveSupport::Callbacks] + # + # class Writer < PersonRecord + # attr_accessor :age + # skip_callback :save, :before, :saving_message, if: -> { age > 18 } + # end + # + # When if option returns true, callback is skipped. + # + # writer = Writer.new + # writer.age = 20 + # writer.save + # + # Output: + # - save + # saved + # + # When if option returns false, callback is NOT skipped. + # + # young_writer = Writer.new + # young_writer.age = 17 + # young_writer.save + # + # Output: + # saving... + # - save + # saved + # + # An ArgumentError will be raised if the callback has not + # already been set (unless the :raise option is set to false). + # + # source://activesupport//lib/active_support/callbacks.rb#788 + def skip_callback(name, *filter_list, &block); end + + protected + + # source://activesupport//lib/active_support/callbacks.rb#939 + def get_callbacks(name); end + + # source://activesupport//lib/active_support/callbacks.rb#943 + def set_callbacks(name, callbacks); end +end + +# source://activesupport//lib/active_support/callbacks.rb#153 +module ActiveSupport::Callbacks::Conditionals; end + +# source://activesupport//lib/active_support/callbacks.rb#154 +class ActiveSupport::Callbacks::Conditionals::Value + # @return [Value] a new instance of Value + # + # source://activesupport//lib/active_support/callbacks.rb#155 + def initialize(&block); end + + # source://activesupport//lib/active_support/callbacks.rb#158 + def call(target, value); end +end + +# source://activesupport//lib/active_support/callbacks.rb#162 +module ActiveSupport::Callbacks::Filters; end + +# source://activesupport//lib/active_support/callbacks.rb#194 +class ActiveSupport::Callbacks::Filters::After + # @return [After] a new instance of After + # + # source://activesupport//lib/active_support/callbacks.rb#196 + def initialize(user_callback, user_conditions, chain_config); end + + # source://activesupport//lib/active_support/callbacks.rb#214 + def apply(callback_sequence); end + + # source://activesupport//lib/active_support/callbacks.rb#202 + def call(env); end + + # Returns the value of attribute halting. + # + # source://activesupport//lib/active_support/callbacks.rb#195 + def halting; end + + # Returns the value of attribute user_callback. + # + # source://activesupport//lib/active_support/callbacks.rb#195 + def user_callback; end + + # Returns the value of attribute user_conditions. + # + # source://activesupport//lib/active_support/callbacks.rb#195 + def user_conditions; end +end + +# source://activesupport//lib/active_support/callbacks.rb#219 +class ActiveSupport::Callbacks::Filters::Around + # @return [Around] a new instance of Around + # + # source://activesupport//lib/active_support/callbacks.rb#220 + def initialize(user_callback, user_conditions); end + + # source://activesupport//lib/active_support/callbacks.rb#225 + def apply(callback_sequence); end +end + +# source://activesupport//lib/active_support/callbacks.rb#165 +class ActiveSupport::Callbacks::Filters::Before + # @return [Before] a new instance of Before + # + # source://activesupport//lib/active_support/callbacks.rb#166 + def initialize(user_callback, user_conditions, chain_config, filter, name); end + + # source://activesupport//lib/active_support/callbacks.rb#189 + def apply(callback_sequence); end + + # source://activesupport//lib/active_support/callbacks.rb#173 + def call(env); end + + # Returns the value of attribute filter. + # + # source://activesupport//lib/active_support/callbacks.rb#171 + def filter; end + + # Returns the value of attribute halted_lambda. + # + # source://activesupport//lib/active_support/callbacks.rb#171 + def halted_lambda; end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/callbacks.rb#171 + def name; end + + # Returns the value of attribute user_callback. + # + # source://activesupport//lib/active_support/callbacks.rb#171 + def user_callback; end + + # Returns the value of attribute user_conditions. + # + # source://activesupport//lib/active_support/callbacks.rb#171 + def user_conditions; end +end + +# source://activesupport//lib/active_support/callbacks.rb#163 +class ActiveSupport::Callbacks::Filters::Environment < ::Struct + # Returns the value of attribute halted + # + # @return [Object] the current value of halted + # + # source://activesupport//lib/active_support/callbacks.rb#163 + def halted; end + + # Sets the attribute halted + # + # @param value [Object] the value to set the attribute halted to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/callbacks.rb#163 + def halted=(_); end + + # Returns the value of attribute target + # + # @return [Object] the current value of target + # + # source://activesupport//lib/active_support/callbacks.rb#163 + def target; end + + # Sets the attribute target + # + # @param value [Object] the value to set the attribute target to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/callbacks.rb#163 + def target=(_); end + + # Returns the value of attribute value + # + # @return [Object] the current value of value + # + # source://activesupport//lib/active_support/callbacks.rb#163 + def value; end + + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/callbacks.rb#163 + def value=(_); end + + class << self + # source://activesupport//lib/active_support/callbacks.rb#163 + def [](*_arg0); end + + # source://activesupport//lib/active_support/callbacks.rb#163 + def inspect; end + + # source://activesupport//lib/active_support/callbacks.rb#163 + def keyword_init?; end + + # source://activesupport//lib/active_support/callbacks.rb#163 + def members; end + + # source://activesupport//lib/active_support/callbacks.rb#163 + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/class_attribute.rb#4 +module ActiveSupport::ClassAttribute + class << self + # source://activesupport//lib/active_support/class_attribute.rb#6 + def redefine(owner, name, namespaced_name, value); end + + # source://activesupport//lib/active_support/class_attribute.rb#26 + def redefine_method(owner, name, private: T.unsafe(nil), &block); end + end +end + +# source://activesupport//lib/active_support/code_generator.rb#4 +class ActiveSupport::CodeGenerator + # @return [CodeGenerator] a new instance of CodeGenerator + # + # source://activesupport//lib/active_support/code_generator.rb#53 + def initialize(owner, path, line); end + + # @yield [@sources] + # + # source://activesupport//lib/active_support/code_generator.rb#61 + def class_eval; end + + # source://activesupport//lib/active_support/code_generator.rb#65 + def define_cached_method(canonical_name, namespace:, as: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/code_generator.rb#69 + def execute; end + + class << self + # source://activesupport//lib/active_support/code_generator.rb#41 + def batch(owner, path, line); end + end +end + +# source://activesupport//lib/active_support/code_generator.rb#5 +class ActiveSupport::CodeGenerator::MethodSet + # @return [MethodSet] a new instance of MethodSet + # + # source://activesupport//lib/active_support/code_generator.rb#8 + def initialize(namespace); end + + # source://activesupport//lib/active_support/code_generator.rb#28 + def apply(owner, path, line); end + + # source://activesupport//lib/active_support/code_generator.rb#15 + def define_cached_method(canonical_name, as: T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/code_generator.rb#6 +ActiveSupport::CodeGenerator::MethodSet::METHOD_CACHES = T.let(T.unsafe(nil), Hash) + +# = Active Support \Concern +# +# A typical module looks like this: +# +# module M +# def self.included(base) +# base.extend ClassMethods +# base.class_eval do +# scope :disabled, -> { where(disabled: true) } +# end +# end +# +# module ClassMethods +# ... +# end +# end +# +# By using +ActiveSupport::Concern+ the above module could instead be +# written as: +# +# require "active_support/concern" +# +# module M +# extend ActiveSupport::Concern +# +# included do +# scope :disabled, -> { where(disabled: true) } +# end +# +# class_methods do +# ... +# end +# end +# +# Moreover, it gracefully handles module dependencies. Given a +Foo+ module +# and a +Bar+ module which depends on the former, we would typically write the +# following: +# +# module Foo +# def self.included(base) +# base.class_eval do +# def self.method_injected_by_foo +# ... +# end +# end +# end +# end +# +# module Bar +# def self.included(base) +# base.method_injected_by_foo +# end +# end +# +# class Host +# include Foo # We need to include this dependency for Bar +# include Bar # Bar is the module that Host really needs +# end +# +# But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We +# could try to hide these from +Host+ directly including +Foo+ in +Bar+: +# +# module Bar +# include Foo +# def self.included(base) +# base.method_injected_by_foo +# end +# end +# +# class Host +# include Bar +# end +# +# Unfortunately this won't work, since when +Foo+ is included, its base +# is the +Bar+ module, not the +Host+ class. With +ActiveSupport::Concern+, +# module dependencies are properly resolved: +# +# require "active_support/concern" +# +# module Foo +# extend ActiveSupport::Concern +# included do +# def self.method_injected_by_foo +# ... +# end +# end +# end +# +# module Bar +# extend ActiveSupport::Concern +# include Foo +# +# included do +# self.method_injected_by_foo +# end +# end +# +# class Host +# include Bar # It works, now Bar takes care of its dependencies +# end +# +# === Prepending concerns +# +# Just like include, concerns also support prepend with a corresponding +# prepended do callback. module ClassMethods or class_methods do are +# prepended as well. +# +# prepend is also used for any dependencies. +# +# source://activesupport//lib/active_support/concern.rb#112 +module ActiveSupport::Concern + # source://activesupport//lib/active_support/concern.rb#129 + def append_features(base); end + + # Define class methods from given block. + # You can define private class methods as well. + # + # module Example + # extend ActiveSupport::Concern + # + # class_methods do + # def foo; puts 'foo'; end + # + # private + # def bar; puts 'bar'; end + # end + # end + # + # class Buzz + # include Example + # end + # + # Buzz.foo # => "foo" + # Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError) + # + # source://activesupport//lib/active_support/concern.rb#209 + def class_methods(&class_methods_module_definition); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +included+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#158 + def included(base = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/concern.rb#142 + def prepend_features(base); end + + # Evaluate given block in context of base class, + # so that you can write class macros here. + # When you define more than one +prepended+ block, it raises an exception. + # + # source://activesupport//lib/active_support/concern.rb#175 + def prepended(base = T.unsafe(nil), &block); end + + class << self + # source://activesupport//lib/active_support/concern.rb#125 + def extended(base); end + end +end + +# source://activesupport//lib/active_support/concern.rb#113 +class ActiveSupport::Concern::MultipleIncludedBlocks < ::StandardError + # @return [MultipleIncludedBlocks] a new instance of MultipleIncludedBlocks + # + # source://activesupport//lib/active_support/concern.rb#114 + def initialize; end +end + +# source://activesupport//lib/active_support/concern.rb#119 +class ActiveSupport::Concern::MultiplePrependBlocks < ::StandardError + # @return [MultiplePrependBlocks] a new instance of MultiplePrependBlocks + # + # source://activesupport//lib/active_support/concern.rb#120 + def initialize; end +end + +# source://activesupport//lib/active_support/concurrency/share_lock.rb#6 +module ActiveSupport::Concurrency; end + +# A share/exclusive lock, otherwise known as a read/write lock. +# +# https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock +# +# source://activesupport//lib/active_support/concurrency/share_lock.rb#10 +class ActiveSupport::Concurrency::ShareLock + include ::MonitorMixin + + # @return [ShareLock] a new instance of ShareLock + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#49 + def initialize; end + + # Execute the supplied block while holding the Exclusive lock. If + # +no_wait+ is set and the lock is not immediately available, + # returns +nil+ without yielding. Otherwise, returns the result of + # the block. + # + # See +start_exclusive+ for other options. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#147 + def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end + + # We track Thread objects, instead of just using counters, because + # we need exclusive locks to be reentrant, and we need to be able + # to upgrade share locks to exclusive. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#17 + def raw_state; end + + # Execute the supplied block while holding the Share lock. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#158 + def sharing; end + + # Returns false if +no_wait+ is set and the lock is not + # immediately available. Otherwise, returns true after the lock + # has been acquired. + # + # +purpose+ and +compatible+ work together; while this thread is + # waiting for the exclusive lock, it will yield its share (if any) + # to any other attempt whose +purpose+ appears in this attempt's + # +compatible+ list. This allows a "loose" upgrade, which, being + # less strict, prevents some classes of deadlocks. + # + # For many resources, loose upgrades are sufficient: if a thread + # is awaiting a lock, it is not running any other code. With + # +purpose+ matching, it is possible to yield only to other + # threads whose activity will not interfere. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#75 + def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#113 + def start_sharing; end + + # Relinquish the exclusive lock. Must only be called by the thread + # that called start_exclusive (and currently holds the lock). + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#95 + def stop_exclusive(compatible: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#130 + def stop_sharing; end + + # Temporarily give up all held Share locks while executing the + # supplied block, allowing any +compatible+ exclusive lock request + # to proceed. + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#170 + def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end + + private + + # Must be called within synchronize + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#203 + def busy_for_exclusive?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#208 + def busy_for_sharing?(purpose); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/concurrency/share_lock.rb#213 + def eligible_waiters?(compatible); end + + # source://activesupport//lib/active_support/concurrency/share_lock.rb#217 + def wait_for(method, &block); end +end + +# = Active Support \Configurable +# +# Configurable provides a config method to store and retrieve +# configuration options as an OrderedOptions. +# +# source://activesupport//lib/active_support/configurable.rb#17 +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#189 + def config; end +end + +# source://activesupport//lib/active_support/configurable.rb#35 +module ActiveSupport::Configurable::ClassMethods + # Reads and writes attributes from a configuration OrderedOptions. + # + # require "active_support/configurable" + # + # class User + # include ActiveSupport::Configurable + # end + # + # 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#49 + def config; end + + # Configure values from within the passed block. + # + # require "active_support/configurable" + # + # class User + # include ActiveSupport::Configurable + # end + # + # User.allowed_access # => nil + # + # User.configure do |config| + # config.allowed_access = true + # end + # + # User.allowed_access # => true + # + # @yield [config] + # + # source://activesupport//lib/active_support/configurable.rb#73 + 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#145 + def config_accessor(*names, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/configurable.rb#166 + def inherited(subclass); end +end + +# source://activesupport//lib/active_support/configurable.rb#20 +class ActiveSupport::Configurable::Configuration < ::ActiveSupport::InheritableOptions + # source://activesupport//lib/active_support/configurable.rb#21 + 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#26 + def compile_methods!(keys); end + end +end + +# Reads a YAML configuration file, evaluating any ERB, then +# parsing the resulting YAML. +# +# Warns in case of YAML confusing characters, like invisible +# non-breaking spaces. +# +# source://activesupport//lib/active_support/configuration_file.rb#9 +class ActiveSupport::ConfigurationFile + # @return [ConfigurationFile] a new instance of ConfigurationFile + # + # source://activesupport//lib/active_support/configuration_file.rb#12 + def initialize(content_path); end + + # source://activesupport//lib/active_support/configuration_file.rb#21 + def parse(context: T.unsafe(nil), **options); end + + private + + # source://activesupport//lib/active_support/configuration_file.rb#44 + def read(content_path); end + + # source://activesupport//lib/active_support/configuration_file.rb#54 + def render(context); end + + class << self + # source://activesupport//lib/active_support/configuration_file.rb#17 + def parse(content_path, **options); end + end +end + +# source://activesupport//lib/active_support/configuration_file.rb#10 +class ActiveSupport::ConfigurationFile::FormatError < ::StandardError; end + +# Provides a DSL for declaring a continuous integration workflow that can be run either locally or in the cloud. +# Each step is timed, reports success/error, and is aggregated into a collective report that reports total runtime, +# as well as whether the entire run was successful or not. +# +# Example: +# +# ActiveSupport::ContinuousIntegration.run do +# step "Setup", "bin/setup --skip-server" +# step "Style: Ruby", "bin/rubocop" +# step "Security: Gem audit", "bin/bundler-audit" +# step "Tests: Rails", "bin/rails test test:system" +# +# if success? +# step "Signoff: Ready for merge and deploy", "gh signoff" +# else +# failure "Skipping signoff; CI failed.", "Fix the issues and try again." +# end +# end +# +# Starting with Rails 8.1, a default `bin/ci` and `config/ci.rb` file are created to provide out-of-the-box CI. +# +# source://activesupport//lib/active_support/continuous_integration.rb#24 +class ActiveSupport::ContinuousIntegration + # @return [ContinuousIntegration] a new instance of ContinuousIntegration + # + # source://activesupport//lib/active_support/continuous_integration.rb#64 + def initialize; end + + # Echo text to the terminal in the color corresponding to the type of the text. + # + # Examples: + # + # echo "This is going to be green!", type: :success + # echo "This is going to be red!", type: :error + # + # See ActiveSupport::ContinuousIntegration::COLORS for a complete list of options. + # + # source://activesupport//lib/active_support/continuous_integration.rb#111 + def echo(text, type:); end + + # Display an error heading with the title and optional subtitle to reflect that the run failed. + # + # source://activesupport//lib/active_support/continuous_integration.rb#86 + def failure(title, subtitle = T.unsafe(nil)); end + + # Display a colorized heading followed by an optional subtitle. + # + # Examples: + # + # heading "Smoke Testing", "End-to-end tests verifying key functionality", padding: false + # heading "Skipping video encoding tests", "Install FFmpeg to run these tests", type: :error + # + # See ActiveSupport::ContinuousIntegration::COLORS for a complete list of options. + # + # source://activesupport//lib/active_support/continuous_integration.rb#98 + def heading(heading, subtitle = T.unsafe(nil), type: T.unsafe(nil), padding: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/continuous_integration.rb#116 + def report(title, &block); end + + # Returns the value of attribute results. + # + # source://activesupport//lib/active_support/continuous_integration.rb#33 + def results; end + + # Declare a step with a title and a command. The command can either be given as a single string or as multiple + # strings that will be passed to `system` as individual arguments (and therefore correctly escaped for paths etc). + # + # Examples: + # + # step "Setup", "bin/setup" + # step "Single test", "bin/rails", "test", "--name", "test_that_is_one" + # + # source://activesupport//lib/active_support/continuous_integration.rb#75 + def step(title, *command); end + + # Returns true if all steps were successful. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/continuous_integration.rb#81 + def success?; end + + private + + # source://activesupport//lib/active_support/continuous_integration.rb#141 + def colorize(text, type); end + + # source://activesupport//lib/active_support/continuous_integration.rb#134 + def timing; end + + class << self + # Perform a CI run. Execute each step, show their results and runtime, and exit with a non-zero status if there are any failures. + # + # Pass an optional title, subtitle, and a block that declares the steps to be executed. + # + # Sets the CI environment variable to "true" to allow for conditional behavior in the app, like enabling eager loading and disabling logging. + # + # Example: + # + # ActiveSupport::ContinuousIntegration.run do + # step "Setup", "bin/setup --skip-server" + # step "Style: Ruby", "bin/rubocop" + # step "Security: Gem audit", "bin/bundler-audit" + # step "Tests: Rails", "bin/rails test test:system" + # + # if success? + # step "Signoff: Ready for merge and deploy", "gh signoff" + # else + # failure "Skipping signoff; CI failed.", "Fix the issues and try again." + # end + # end + # + # source://activesupport//lib/active_support/continuous_integration.rb#55 + def run(title = T.unsafe(nil), subtitle = T.unsafe(nil), &block); end + end +end + +# source://activesupport//lib/active_support/continuous_integration.rb#25 +ActiveSupport::ContinuousIntegration::COLORS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#6 +module ActiveSupport::CoreExt; end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#7 +module ActiveSupport::CoreExt::ERBUtil + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#28 + def h(s); end + + # A utility method for escaping HTML tag characters. + # This method is also aliased as h. + # + # puts html_escape('is a > 0 & a < 10?') + # # => is a > 0 & a < 10? + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def html_escape(s); end + + # HTML escapes strings but doesn't wrap them with an ActiveSupport::SafeBuffer. + # This method is not for public consumption! Seriously! + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#18 + def unwrapped_html_escape(s); end +end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#31 +module ActiveSupport::CoreExt::ERBUtilPrivate + include ::ActiveSupport::CoreExt::ERBUtil + + private + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#33 + def h(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#33 + def html_escape(s); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#33 + def unwrapped_html_escape(s); end +end + +# = Current Attributes +# +# Abstract super class that provides a thread-isolated attributes singleton, which resets automatically +# before and after each request. This allows you to keep all the per-request attributes easily +# available to the whole system. +# +# The following full app-like example demonstrates how to use a Current class to +# facilitate easy access to the global, per-request attributes without passing them deeply +# around everywhere: +# +# # app/models/current.rb +# class Current < ActiveSupport::CurrentAttributes +# attribute :account, :user +# attribute :request_id, :user_agent, :ip_address +# +# resets { Time.zone = nil } +# +# def user=(user) +# super +# self.account = user.account +# Time.zone = user.time_zone +# end +# end +# +# # app/controllers/concerns/authentication.rb +# module Authentication +# extend ActiveSupport::Concern +# +# included do +# before_action :authenticate +# end +# +# private +# def authenticate +# if authenticated_user = User.find_by(id: cookies.encrypted[:user_id]) +# Current.user = authenticated_user +# else +# redirect_to new_session_url +# end +# end +# end +# +# # app/controllers/concerns/set_current_request_details.rb +# module SetCurrentRequestDetails +# extend ActiveSupport::Concern +# +# included do +# before_action do +# Current.request_id = request.uuid +# Current.user_agent = request.user_agent +# Current.ip_address = request.ip +# end +# end +# end +# +# class ApplicationController < ActionController::Base +# include Authentication +# include SetCurrentRequestDetails +# end +# +# class MessagesController < ApplicationController +# def create +# Current.account.messages.create(message_params) +# end +# end +# +# class Message < ApplicationRecord +# belongs_to :creator, default: -> { Current.user } +# after_create { |message| Event.create(record: message) } +# end +# +# class Event < ApplicationRecord +# before_create do +# self.request_id = Current.request_id +# self.user_agent = Current.user_agent +# self.ip_address = Current.ip_address +# end +# end +# +# A word of caution: It's easy to overdo a global singleton like Current and tangle your model as a result. +# Current should only be used for a few, top-level globals, like account, user, and request details. +# The attributes stuck in Current should be used by more or less all actions on all requests. If you start +# sticking controller-specific attributes in there, you're going to create a mess. +# +# source://activesupport//lib/active_support/current_attributes.rb#93 +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#186 + def initialize; end + + # source://activesupport//lib/active_support/current_attributes.rb#94 + def __callbacks; end + + # source://activesupport//lib/active_support/current_attributes.rb#95 + def _reset_callbacks; end + + # source://activesupport//lib/active_support/current_attributes.rb#95 + def _run_reset_callbacks; end + + # source://activesupport//lib/active_support/current_attributes.rb#95 + def _run_reset_callbacks!(&block); end + + # 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 + + # source://activesupport//lib/active_support/current_attributes.rb#186 + def defaults; end + + # source://activesupport//lib/active_support/current_attributes.rb#186 + def defaults?; end + + # Reset all attributes. Should be called before and after actions, when used as a per-request singleton. + # + # source://activesupport//lib/active_support/current_attributes.rb#186 + 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#186 + def set(attributes, &block); end + + private + + # source://activesupport//lib/active_support/current_attributes.rb#186 + def resolve_defaults; end + + class << self + # source://activesupport//lib/active_support/current_attributes.rb#94 + def __callbacks; end + + # source://activesupport//lib/active_support/current_attributes.rb#94 + def __callbacks=(value); end + + # source://activesupport//lib/active_support/current_attributes.rb#95 + def _reset_callbacks; end + + # source://activesupport//lib/active_support/current_attributes.rb#95 + def _reset_callbacks=(value); end + + # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#153 + def after_reset(*methods, &block); end + + # Declares one or more attributes that will be given both class and instance accessor methods. + # + # ==== Options + # + # * :default - The default value for the attributes. If the value + # is a proc or lambda, it will be called whenever an instance is + # constructed. Otherwise, the value will be duplicated with +#dup+. + # Default values are re-assigned when the attributes are reset. + # + # source://activesupport//lib/active_support/current_attributes.rb#115 + def attribute(*names, default: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/current_attributes.rb#197 + def attributes(&_arg0); end + + # source://activesupport//lib/active_support/current_attributes.rb#197 + def attributes=(arg); end + + # Calls this callback before #reset is called on the instance. Used for resetting external collaborators that depend on current values. + # + # source://activesupport//lib/active_support/current_attributes.rb#145 + def before_reset(*methods, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#157 + def clear_all; end + + # source://activesupport//lib/active_support/current_attributes.rb#201 + def defaults; end + + # source://activesupport//lib/active_support/current_attributes.rb#201 + def defaults=(value); end + + # source://activesupport//lib/active_support/current_attributes.rb#201 + def defaults?; end + + # Returns singleton instance for this class in this thread. If none exists, one is created. + # + # source://activesupport//lib/active_support/current_attributes.rb#103 + def instance; end + + # source://activesupport//lib/active_support/current_attributes.rb#155 + def reset(*_arg0, **_arg1, &_arg2); end + + # Calls this callback after #reset is called on the instance. Used for resetting external collaborators, like Time.zone. + # + # source://activesupport//lib/active_support/current_attributes.rb#150 + def resets(*methods, &block); end + + # source://activesupport//lib/active_support/current_attributes.rb#155 + def set(*_arg0, **_arg1, &_arg2); end + + private + + # source://activesupport//lib/active_support/current_attributes.rb#94 + def __class_attr___callbacks; end + + # source://activesupport//lib/active_support/current_attributes.rb#94 + def __class_attr___callbacks=(new_value); end + + # source://activesupport//lib/active_support/current_attributes.rb#201 + def __class_attr_defaults; end + + # source://activesupport//lib/active_support/current_attributes.rb#201 + def __class_attr_defaults=(new_value); end + + # source://activesupport//lib/active_support/current_attributes.rb#169 + def current_instances; end + + # source://activesupport//lib/active_support/current_attributes.rb#173 + def current_instances_key; end + + # source://activesupport//lib/active_support/current_attributes.rb#165 + def generated_attribute_methods; end + + # @private + # + # source://activesupport//lib/active_support/current_attributes.rb#185 + def method_added(name); end + + # source://activesupport//lib/active_support/current_attributes.rb#177 + def method_missing(name, *_arg1, **_arg2, &_arg3); 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/current_attributes.rb#97 +ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/current_attributes.rb#99 +ActiveSupport::CurrentAttributes::NOT_SET = T.let(T.unsafe(nil), Object) + +# Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class +# to provide a merge!(other, &block) method. +# +# source://activesupport//lib/active_support/deep_mergeable.rb#6 +module ActiveSupport::DeepMergeable + # Returns a new instance with the values from +other+ merged recursively. + # + # class Hash + # include ActiveSupport::DeepMergeable + # end + # + # hash_1 = { a: true, b: { c: [1, 2, 3] } } + # hash_2 = { a: false, b: { x: [3, 4, 5] } } + # + # hash_1.deep_merge(hash_2) + # # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # + # A block can be provided to merge non-DeepMergeable values: + # + # hash_1 = { a: 100, b: 200, c: { c1: 100 } } + # hash_2 = { b: 250, c: { c1: 200 } } + # + # hash_1.deep_merge(hash_2) do |key, this_val, other_val| + # this_val + other_val + # end + # # => { a: 100, b: 450, c: { c1: 300 } } + # + # source://activesupport//lib/active_support/deep_mergeable.rb#29 + def deep_merge(other, &block); end + + # Same as #deep_merge, but modifies +self+. + # + # source://activesupport//lib/active_support/deep_mergeable.rb#34 + def deep_merge!(other, &block); end + + # Returns true if +other+ can be deep merged into +self+. Classes may + # override this method to restrict or expand the domain of deep mergeable + # values. Defaults to checking that +other+ is of type +self.class+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/deep_mergeable.rb#49 + def deep_merge?(other); end +end + +# source://activesupport//lib/active_support/delegation.rb#14 +module ActiveSupport::Delegation + class << self + # source://activesupport//lib/active_support/delegation.rb#21 + def generate(owner, methods, location: T.unsafe(nil), to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), nilable: T.unsafe(nil), private: T.unsafe(nil), as: T.unsafe(nil), signature: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/delegation.rb#150 + def generate_method_missing(owner, target, allow_nil: T.unsafe(nil)); end + end +end + +# source://activesupport//lib/active_support/delegation.rb#18 +ActiveSupport::Delegation::RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# source://activesupport//lib/active_support/delegation.rb#15 +ActiveSupport::Delegation::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array) + +# Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ +# option is not used. +# +# source://activesupport//lib/active_support/delegation.rb#6 +class ActiveSupport::DelegationError < ::NoMethodError + class << self + # source://activesupport//lib/active_support/delegation.rb#8 + def nil_target(method_name, target); end + end +end + +# source://activesupport//lib/active_support/dependencies/interlock.rb#6 +module ActiveSupport::Dependencies + class << self + # source://activesupport//lib/active_support/dependencies.rb#66 + def _autoloaded_tracked_classes; end + + # source://activesupport//lib/active_support/dependencies.rb#66 + def _autoloaded_tracked_classes=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#60 + def _eager_load_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#60 + def _eager_load_paths=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#53 + def autoload_once_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#53 + def autoload_once_paths=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#47 + def autoload_paths; end + + # source://activesupport//lib/active_support/dependencies.rb#47 + def autoload_paths=(_arg0); end + + # source://activesupport//lib/active_support/dependencies.rb#73 + def autoloader; end + + # source://activesupport//lib/active_support/dependencies.rb#73 + 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#80 + def clear; end + + # Private method that helps configuring the autoloaders. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/dependencies.rb#98 + def eager_load?(path); end + + # source://activesupport//lib/active_support/dependencies.rb#9 + def interlock; end + + # source://activesupport//lib/active_support/dependencies.rb#9 + 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#23 + def load_interlock(&block); end + + # Execute the supplied block without interference from any + # concurrent loads. + # + # source://activesupport//lib/active_support/dependencies.rb#16 + def run_interlock(&block); end + + # Private method used by require_dependency. + # + # source://activesupport//lib/active_support/dependencies.rb#88 + 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#35 + 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#37 + def done_running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#29 + 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#45 + def permit_concurrent_loads(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#50 + def raw_state(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#41 + def running(&block); end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#33 + def start_running; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#25 + def start_unloading; end + + # source://activesupport//lib/active_support/dependencies/interlock.rb#21 + def unloading(&block); end +end + +# source://activesupport//lib/active_support/dependencies/require_dependency.rb#3 +module ActiveSupport::Dependencies::RequireDependency + # Warning: This method is obsolete. The semantics of the autoloader + # match Ruby's and you do not need to be defensive with load order anymore. + # Just refer to classes and modules normally. + # + # Engines that do not control the mode in which their parent application runs + # should call +require_dependency+ where needed in case the runtime mode is + # +:classic+. + # + # source://activesupport//lib/active_support/dependencies/require_dependency.rb#11 + def require_dependency(filename); end +end + +# = Active Support \Deprecation +# +# \Deprecation specifies the API used by \Rails to deprecate methods, instance variables, objects, and constants. It's +# also available for gems or applications. +# +# For a gem, use Deprecation.new to create a Deprecation object and store it in your module or class (in order for +# users to be able to configure it). +# +# module MyLibrary +# def self.deprecator +# @deprecator ||= ActiveSupport::Deprecation.new("2.0", "MyLibrary") +# end +# end +# +# For a Railtie or Engine, you may also want to add it to the application's deprecators, so that the application's +# configuration can be applied to it. +# +# module MyLibrary +# class Railtie < Rails::Railtie +# initializer "my_library.deprecator" do |app| +# app.deprecators[:my_library] = MyLibrary.deprecator +# end +# end +# end +# +# With the above initializer, configuration settings like the following will affect +MyLibrary.deprecator+: +# +# # in config/environments/test.rb +# config.active_support.deprecation = :raise +# +# source://activesupport//lib/active_support/deprecation.rb#33 +class ActiveSupport::Deprecation + include ::ActiveSupport::Deprecation::Behavior + include ::ActiveSupport::Deprecation::Reporting + include ::ActiveSupport::Deprecation::Disallowed + include ::ActiveSupport::Deprecation::MethodWrapper + + # It accepts two parameters on initialization. The first is a version of library + # and the second is a library name. + # + # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') + # + # @return [Deprecation] a new instance of Deprecation + # + # source://activesupport//lib/active_support/deprecation.rb#71 + def initialize(deprecation_horizon = T.unsafe(nil), gem_name = T.unsafe(nil)); end + + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#65 + def deprecation_horizon; end + + # The version number in which the deprecated behavior will be removed, by default. + # + # source://activesupport//lib/active_support/deprecation.rb#65 + def deprecation_horizon=(_arg0); end + + class << self + # source://activesupport//lib/active_support/deprecation.rb#60 + def _instance; end + end +end + +# Behavior module allows to determine how to display deprecation messages. +# You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ +# constant. Available behaviors are: +# +# [+:raise+] Raise ActiveSupport::DeprecationException. +# [+:stderr+] Log all deprecation warnings to $stderr. +# [+:log+] Log all deprecation warnings to +Rails.logger+. +# [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. +# [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. +# [+:silence+] Do nothing. On \Rails, set config.active_support.report_deprecations = false to disable all behaviors. +# +# Setting behaviors only affects deprecations that happen after boot time. +# For more information you can read the documentation of the #behavior= method. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#69 +module ActiveSupport::Deprecation::Behavior + # Returns the current behavior or if one isn't set, defaults to +:stderr+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#74 + def behavior; end + + # Sets the behavior to the specified value. Can be a single value, array, + # or an object that responds to +call+. + # + # Available behaviors: + # + # [+:raise+] Raise ActiveSupport::DeprecationException. + # [+:stderr+] Log all deprecation warnings to $stderr. + # [+:log+] Log all deprecation warnings to +Rails.logger+. + # [+:notify+] Use ActiveSupport::Notifications to notify +deprecation.rails+. + # [+:report+] Use ActiveSupport::ErrorReporter to report deprecations. + # [+:silence+] Do nothing. + # + # Setting behaviors only affects deprecations that happen after boot time. + # Deprecation warnings raised by gems are not affected by this setting + # because they happen before \Rails boots up. + # + # deprecator = ActiveSupport::Deprecation.new + # deprecator.behavior = :stderr + # deprecator.behavior = [:stderr, :log] + # deprecator.behavior = MyCustomHandler + # deprecator.behavior = ->(message, callstack, deprecation_horizon, gem_name) { + # # custom stuff + # } + # + # If you are using \Rails, you can set + # config.active_support.report_deprecations = false to disable + # all deprecation behaviors. This is similar to the +:silence+ option but + # more performant. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#111 + def behavior=(behavior); end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 + def debug; end + + # Whether to print a backtrace along with the warning. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#71 + def debug=(_arg0); end + + # Returns the current behavior for disallowed deprecations or if one isn't set, defaults to +:raise+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#79 + def disallowed_behavior; end + + # Sets the behavior for disallowed deprecations (those configured by + # ActiveSupport::Deprecation#disallowed_warnings=) to the specified + # value. As with #behavior=, this can be a single value, array, or an + # object that responds to +call+. + # + # source://activesupport//lib/active_support/deprecation/behaviors.rb#119 + def disallowed_behavior=(behavior); end + + private + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#124 + def arity_coerce(behavior); end + + # source://activesupport//lib/active_support/deprecation/behaviors.rb#143 + def arity_of_callable(callable); end +end + +# Default warning behaviors per Rails.env. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#13 +ActiveSupport::Deprecation::DEFAULT_BEHAVIORS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/deprecation/constant_accessor.rb#5 +module ActiveSupport::Deprecation::DeprecatedConstantAccessor + class << self + # @private + # + # source://activesupport//lib/active_support/deprecation/constant_accessor.rb#6 + def included(base); end + end +end + +# DeprecatedConstantProxy transforms a constant into a deprecated one. It takes the full names of an old +# (deprecated) constant and of a new constant (both in string form) and a deprecator. The deprecated constant now +# returns the value of the new one. +# +# PLANETS = %w(mercury venus earth mars jupiter saturn uranus neptune pluto) +# +# # (In a later update, the original implementation of `PLANETS` has been removed.) +# +# PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) +# PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new("PLANETS", "PLANETS_POST_2006", ActiveSupport::Deprecation.new) +# +# PLANETS.map { |planet| planet.capitalize } +# # => DEPRECATION WARNING: PLANETS is deprecated! Use PLANETS_POST_2006 instead. +# (Backtrace information…) +# ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#120 +class ActiveSupport::Deprecation::DeprecatedConstantProxy < ::Module + # @return [DeprecatedConstantProxy] a new instance of DeprecatedConstantProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#128 + def initialize(old_const, new_const, deprecator, message: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#158 + def append_features(base); end + + # Returns the class of the new constant. + # + # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) + # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') + # PLANETS.class # => Array + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#154 + def class; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#168 + def extended(base); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def hash(*_arg0, **_arg1, &_arg2); end + + # Don't give a deprecation warning on inspect since test/unit and error + # logs rely on it for diagnostics. + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#141 + def inspect; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def instance_methods(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def name(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#163 + def prepend_features(base); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#147 + def respond_to?(*_arg0, **_arg1, &_arg2); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#178 + def const_missing(name); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#183 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#174 + def target; end + + class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#121 + def new(*args, **options, &block); end + end +end + +# DeprecatedInstanceVariableProxy transforms an instance variable into a deprecated one. It takes an instance of a +# class, a method on that class, an instance variable, and a deprecator as the last argument. +# +# Trying to use the deprecated instance variable will result in a deprecation warning, pointing to the method as a +# replacement. +# +# class Example +# def initialize +# @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request, :@request, ActiveSupport::Deprecation.new) +# @_request = :special_request +# end +# +# def request +# @_request +# end +# +# def old_request +# @request +# end +# end +# +# example = Example.new +# # => # +# +# example.old_request.to_s +# # => DEPRECATION WARNING: @request is deprecated! Call request.to_s instead of +# @request.to_s +# (Backtrace information…) +# "special_request" +# +# example.request.to_s +# # => "special_request" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#87 +class ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedInstanceVariableProxy] a new instance of DeprecatedInstanceVariableProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#88 + def initialize(instance, method, var = T.unsafe(nil), deprecator:); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#96 + def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#100 + def warn(callstack, called, args); end +end + +# DeprecatedObjectProxy transforms an object into a deprecated one. It takes an object, a deprecation message, and +# a deprecator. +# +# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated", ActiveSupport::Deprecation.new) +# # => # +# +# deprecated_object.to_s +# DEPRECATION WARNING: This object is now deprecated. +# (Backtrace) +# # => "#" +# +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#38 +class ActiveSupport::Deprecation::DeprecatedObjectProxy < ::ActiveSupport::Deprecation::DeprecationProxy + # @return [DeprecatedObjectProxy] a new instance of DeprecatedObjectProxy + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#39 + def initialize(object, message, deprecator); end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#46 + def target; end + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#50 + def warn(callstack, called, args); end +end + +# source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#5 +class ActiveSupport::Deprecation::DeprecationProxy + # Don't give a deprecation warning on inspect since test/unit and error + # logs rely on it for diagnostics. + # + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#17 + def inspect; end + + private + + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#22 + def method_missing(called, *args, &block); end + + class << self + # source://activesupport//lib/active_support/deprecation/proxy_wrappers.rb#6 + def new(*args, **kwargs, &block); end + end +end + +# A managed collection of deprecators. Configuration methods, such as +# #behavior=, affect all deprecators in the collection. Additionally, the +# #silence method silences all deprecators in the collection for the +# duration of a given block. +# +# source://activesupport//lib/active_support/deprecation/deprecators.rb#9 +class ActiveSupport::Deprecation::Deprecators + # @return [Deprecators] a new instance of Deprecators + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#10 + def initialize; end + + # Returns a deprecator added to this collection via #[]=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#16 + def [](name); end + + # Adds a given +deprecator+ to this collection. The deprecator will be + # immediately configured with any options previously set on this + # collection. + # + # deprecators = ActiveSupport::Deprecation::Deprecators.new + # deprecators.debug = true + # + # foo_deprecator = ActiveSupport::Deprecation.new("2.0", "Foo") + # foo_deprecator.debug # => false + # + # deprecators[:foo] = foo_deprecator + # deprecators[:foo].debug # => true + # foo_deprecator.debug # => true + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#34 + def []=(name, deprecator); end + + # Sets the deprecation warning behavior for all deprecators in this + # collection. + # + # See ActiveSupport::Deprecation#behavior=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#60 + def behavior=(behavior); end + + # Sets the debug flag for all deprecators in this collection. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#52 + def debug=(debug); end + + # Sets the disallowed deprecation warning behavior for all deprecators in + # this collection. + # + # See ActiveSupport::Deprecation#disallowed_behavior=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#68 + def disallowed_behavior=(disallowed_behavior); end + + # Sets the disallowed deprecation warnings for all deprecators in this + # collection. + # + # See ActiveSupport::Deprecation#disallowed_warnings=. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#76 + def disallowed_warnings=(disallowed_warnings); end + + # Iterates over all deprecators in this collection. If no block is given, + # returns an +Enumerator+. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#41 + def each(&block); end + + # Silences all deprecators in this collection for the duration of the + # given block. + # + # See ActiveSupport::Deprecation#silence. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#84 + def silence(&block); end + + # Sets the silenced flag for all deprecators in this collection. + # + # source://activesupport//lib/active_support/deprecation/deprecators.rb#47 + def silenced=(silenced); end + + private + + # source://activesupport//lib/active_support/deprecation/deprecators.rb#97 + def apply_options(deprecator); end + + # source://activesupport//lib/active_support/deprecation/deprecators.rb#92 + def set_option(name, value); end +end + +# source://activesupport//lib/active_support/deprecation/disallowed.rb#5 +module ActiveSupport::Deprecation::Disallowed + # Returns the configured criteria used to identify deprecation messages + # which should be treated as disallowed. + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#21 + def disallowed_warnings; end + + # Sets the criteria used to identify deprecation messages which should be + # disallowed. Can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings.) These are compared against + # the text of the generated deprecation warning. + # + # Additionally the scalar symbol +:all+ may be used to treat all + # deprecations as disallowed. + # + # Deprecations matching a substring or regular expression will be handled + # using the configured Behavior#disallowed_behavior rather than + # Behavior#behavior. + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#17 + def disallowed_warnings=(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#26 + def deprecation_disallowed?(message); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/disallowed.rb#39 + def explicitly_allowed?(message); end +end + +# source://activesupport//lib/active_support/deprecation.rb#57 +ActiveSupport::Deprecation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://activesupport//lib/active_support/deprecation/method_wrappers.rb#8 +module ActiveSupport::Deprecation::MethodWrapper + # Declare that a method has been deprecated. + # + # class Fred + # def aaa; end + # def bbb; end + # def ccc; end + # def ddd; end + # def eee; end + # end + # + # deprecator = ActiveSupport::Deprecation.new('next-release', 'MyGem') + # + # deprecator.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead') + # # => Fred + # + # Fred.new.aaa + # # DEPRECATION WARNING: aaa is deprecated and will be removed from MyGem next-release. (called from irb_binding at (irb):10) + # # => nil + # + # Fred.new.bbb + # # DEPRECATION WARNING: bbb is deprecated and will be removed from MyGem next-release (use zzz instead). (called from irb_binding at (irb):11) + # # => nil + # + # Fred.new.ccc + # # DEPRECATION WARNING: ccc is deprecated and will be removed from MyGem next-release (use Bar#ccc instead). (called from irb_binding at (irb):12) + # # => nil + # + # source://activesupport//lib/active_support/deprecation/method_wrappers.rb#35 + def deprecate_methods(target_module, *method_names); end +end + +# source://activesupport//lib/active_support/deprecation/reporting.rb#7 +module ActiveSupport::Deprecation::Reporting + # Allow previously disallowed deprecation warnings within the block. + # allowed_warnings can be an array containing strings, symbols, or regular + # expressions. (Symbols are treated as strings). These are compared against + # the text of deprecation warning messages generated within the block. + # Matching warnings will be exempt from the rules set by + # ActiveSupport::Deprecation#disallowed_warnings. + # + # The optional if: argument accepts a truthy/falsy value or an object that + # responds to .call. If truthy, then matching warnings will be allowed. + # If falsey then the method yields to the block without allowing the warning. + # + # deprecator = ActiveSupport::Deprecation.new + # deprecator.disallowed_behavior = :raise + # deprecator.disallowed_warnings = [ + # "something broke" + # ] + # + # deprecator.warn('something broke!') + # # => ActiveSupport::DeprecationException + # + # deprecator.allow ['something broke'] do + # deprecator.warn('something broke!') + # end + # # => nil + # + # deprecator.allow ['something broke'], if: Rails.env.production? do + # deprecator.warn('something broke!') + # end + # # => ActiveSupport::DeprecationException for dev/test, nil for production + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#89 + def allow(allowed_warnings = T.unsafe(nil), if: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#48 + def begin_silence; end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#99 + def deprecation_warning(deprecated_method_name, message = T.unsafe(nil), caller_backtrace = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#52 + def end_silence; end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 + def gem_name; end + + # Name of gem where method is deprecated + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#11 + def gem_name=(_arg0); end + + # Silence deprecation warnings within the block. + # + # deprecator = ActiveSupport::Deprecation.new + # deprecator.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # deprecator.silence do + # deprecator.warn('something broke!') + # end + # # => nil + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#41 + def silence(&block); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#56 + def silenced; end + + # Whether to print a message (silent mode) + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#9 + def silenced=(_arg0); end + + # Outputs a deprecation warning to the output configured by + # ActiveSupport::Deprecation#behavior. + # + # ActiveSupport::Deprecation.new.warn('something broke!') + # # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)" + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#18 + def warn(message = T.unsafe(nil), callstack = T.unsafe(nil)); end + + private + + # Outputs a deprecation warning message + # + # deprecated_method_warning(:method_name) + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}" + # deprecated_method_warning(:method_name, :another_method) + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)" + # deprecated_method_warning(:method_name, "Optional message") + # # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)" + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#115 + def deprecated_method_warning(method_name, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#129 + def deprecation_caller_message(callstack); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#124 + def deprecation_message(callstack, message = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/deprecation/reporting.rb#140 + def extract_callstack(callstack); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/deprecation/reporting.rb#157 + def ignored_callstack?(path); end +end + +# source://activesupport//lib/active_support/deprecation/reporting.rb#154 +ActiveSupport::Deprecation::Reporting::LIB_DIR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/deprecation/reporting.rb#152 +ActiveSupport::Deprecation::Reporting::RAILS_GEM_ROOT = T.let(T.unsafe(nil), String) + +# Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. +# You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. +# +# source://activesupport//lib/active_support/deprecation/behaviors.rb#8 +class ActiveSupport::DeprecationException < ::StandardError; end + +# = Active Support Descendants Tracker +# +# This module provides an internal implementation to track descendants +# which is faster than iterating through +ObjectSpace+. +# +# However Ruby 3.1 provide a fast native +Class#subclasses+ method, +# so if you know your code won't be executed on older rubies, including +# +ActiveSupport::DescendantsTracker+ does not provide any benefit. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#14 +module ActiveSupport::DescendantsTracker + # source://activesupport//lib/active_support/descendants_tracker.rb#107 + def descendants; end + + class << self + # source://activesupport//lib/active_support/descendants_tracker.rb#78 + def clear(classes); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#102 + def descendants(klass); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#69 + def disable_clear!; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#89 + def reject!(classes); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#98 + def subclasses(klass); end + end +end + +# source://activesupport//lib/active_support/descendants_tracker.rb#58 +module ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + # source://activesupport//lib/active_support/descendants_tracker.rb#63 + def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#59 + def subclasses; end +end + +# On TruffleRuby `ObjectSpace::WeakMap` keys are strong references. +# So we use `object_id` as a key and the actual object as a value. +# +# JRuby for now doesn't have Class#descendant, but when it will, it will likely +# have the same WeakMap semantic than Truffle so we future proof this as much as possible. +# +# source://activesupport//lib/active_support/descendants_tracker.rb#20 +class ActiveSupport::DescendantsTracker::WeakSet < ::ObjectSpace::WeakMap + # source://activesupport//lib/active_support/descendants_tracker.rb#23 + def <<(object); end + + # source://activesupport//lib/active_support/descendants_tracker.rb#21 + def to_a; end +end + +# source://activesupport//lib/active_support/digest.rb#6 +class ActiveSupport::Digest + class << self + # source://activesupport//lib/active_support/digest.rb#8 + def hash_digest_class; end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/digest.rb#12 + def hash_digest_class=(klass); end + + # source://activesupport//lib/active_support/digest.rb#17 + def hexdigest(arg); end + end +end + +# = Active Support \Duration +# +# Provides accurate date and time measurements using Date#advance and +# Time#advance, respectively. It mainly supports the methods on Numeric. +# +# 1.month.ago # equivalent to Time.now.advance(months: -1) +# +# source://activesupport//lib/active_support/duration.rb#14 +class ActiveSupport::Duration + # @return [Duration] a new instance of Duration + # + # source://activesupport//lib/active_support/duration.rb#226 + def initialize(value, parts, variable = T.unsafe(nil)); end + + # Returns the modulo of this Duration by another Duration or Numeric. + # Numeric values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#312 + def %(other); end + + # Multiplies this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#287 + def *(other); end + + # Adds another Duration or a Numeric to this Duration. Numeric values + # are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#268 + def +(other); end + + # source://activesupport//lib/active_support/duration.rb#326 + def +@; end + + # Subtracts another Duration or a Numeric from this Duration. Numeric + # values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#282 + def -(other); end + + # source://activesupport//lib/active_support/duration.rb#322 + def -@; end + + # Divides this Duration by a Numeric and returns a new Duration. + # + # source://activesupport//lib/active_support/duration.rb#298 + def /(other); end + + # Compares one Duration with another or a Numeric to this Duration. + # Numeric values are treated as seconds. + # + # source://activesupport//lib/active_support/duration.rb#258 + def <=>(other); end + + # Returns +true+ if +other+ is also a Duration instance with the + # same +value+, or if other == value. + # + # source://activesupport//lib/active_support/duration.rb#341 + def ==(other); end + + # source://activesupport//lib/active_support/duration.rb#481 + def _parts; end + + # source://activesupport//lib/active_support/duration.rb#224 + def abs(&_arg0); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#440 + def after(time = T.unsafe(nil)); end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#444 + def ago(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#459 + def as_json(options = T.unsafe(nil)); end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#448 + def before(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#245 + def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#467 + def encode_with(coder); end + + # Returns +true+ if +other+ is also a Duration instance, which has the + # same parts as this one. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#426 + def eql?(other); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#439 + def from_now(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#430 + def hash; end + + # Returns the amount of days a duration covers as a float + # + # 12.hours.in_days # => 0.5 + # + # source://activesupport//lib/active_support/duration.rb#399 + def in_days; end + + # Returns the amount of hours a duration covers as a float + # + # 1.day.in_hours # => 24.0 + # + # source://activesupport//lib/active_support/duration.rb#392 + def in_hours; end + + # Returns the amount of minutes a duration covers as a float + # + # 1.day.in_minutes # => 1440.0 + # + # source://activesupport//lib/active_support/duration.rb#385 + def in_minutes; end + + # Returns the amount of months a duration covers as a float + # + # 9.weeks.in_months # => 2.07 + # + # source://activesupport//lib/active_support/duration.rb#413 + def in_months; end + + # Returns the number of seconds that this Duration represents. + # + # 1.minute.to_i # => 60 + # 1.hour.to_i # => 3600 + # 1.day.to_i # => 86400 + # + # Note that this conversion makes some assumptions about the + # duration of some periods, e.g. months are always 1/12 of year + # and years are 365.2425 days: + # + # # equivalent to (1.year / 12).to_i + # 1.month.to_i # => 2629746 + # + # # equivalent to 365.2425.days.to_i + # 1.year.to_i # => 31556952 + # + # In such cases, Ruby's core + # Date[https://docs.ruby-lang.org/en/master/Date.html] and + # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#380 + def in_seconds; end + + # Returns the amount of weeks a duration covers as a float + # + # 2.months.in_weeks # => 8.696 + # + # source://activesupport//lib/active_support/duration.rb#406 + def in_weeks; end + + # Returns the amount of years a duration covers as a float + # + # 30.days.in_years # => 0.082 + # + # source://activesupport//lib/active_support/duration.rb#420 + def in_years; end + + # source://activesupport//lib/active_support/duration.rb#463 + def init_with(coder); end + + # source://activesupport//lib/active_support/duration.rb#450 + def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#335 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#330 + def is_a?(klass); end + + # Build ISO 8601 Duration string for this duration. + # The +precision+ parameter can be used to limit seconds' precision of duration. + # + # source://activesupport//lib/active_support/duration.rb#473 + def iso8601(precision: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#333 + def kind_of?(klass); end + + # source://activesupport//lib/active_support/duration.rb#224 + def negative?(&_arg0); end + + # Returns a copy of the parts hash that defines the duration. + # + # 5.minutes.parts # => {:minutes=>5} + # 3.years.parts # => {:years=>3} + # + # source://activesupport//lib/active_support/duration.rb#241 + def parts; end + + # source://activesupport//lib/active_support/duration.rb#224 + def positive?(&_arg0); end + + # Calculates a new Time or Date that is as far in the future + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#436 + def since(time = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration.rb#224 + def to_f(&_arg0); end + + # Returns the number of seconds that this Duration represents. + # + # 1.minute.to_i # => 60 + # 1.hour.to_i # => 3600 + # 1.day.to_i # => 86400 + # + # Note that this conversion makes some assumptions about the + # duration of some periods, e.g. months are always 1/12 of year + # and years are 365.2425 days: + # + # # equivalent to (1.year / 12).to_i + # 1.month.to_i # => 2629746 + # + # # equivalent to 365.2425.days.to_i + # 1.year.to_i # => 31556952 + # + # In such cases, Ruby's core + # Date[https://docs.ruby-lang.org/en/master/Date.html] and + # Time[https://docs.ruby-lang.org/en/master/Time.html] should be used for precision + # date and time arithmetic. + # + # source://activesupport//lib/active_support/duration.rb#377 + def to_i; end + + # Returns the amount of seconds a duration covers as a string. + # For more information check to_i method. + # + # 1.day.to_s # => "86400" + # + # source://activesupport//lib/active_support/duration.rb#353 + def to_s; end + + # Calculates a new Time or Date that is as far in the past + # as this Duration represents. + # + # source://activesupport//lib/active_support/duration.rb#447 + def until(time = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#133 + def value; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#477 + def variable?; end + + # source://activesupport//lib/active_support/duration.rb#224 + def zero?(&_arg0); end + + private + + # source://activesupport//lib/active_support/duration.rb#516 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#520 + def raise_type_error(other); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#512 + def respond_to_missing?(method, _); end + + # source://activesupport//lib/active_support/duration.rb#486 + def sum(sign, time = T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/duration.rb#149 + def ===(other); end + + # Creates a new Duration from a seconds value that is converted + # to the individual parts: + # + # ActiveSupport::Duration.build(31556952).parts # => {:years=>1} + # ActiveSupport::Duration.build(2716146).parts # => {:months=>1, :days=>1} + # + # source://activesupport//lib/active_support/duration.rb#189 + def build(value); end + + # source://activesupport//lib/active_support/duration.rb#167 + def days(value); end + + # source://activesupport//lib/active_support/duration.rb#163 + def hours(value); end + + # source://activesupport//lib/active_support/duration.rb#159 + def minutes(value); end + + # source://activesupport//lib/active_support/duration.rb#175 + def months(value); end + + # Creates a new Duration from string formatted according to ISO 8601 Duration. + # + # See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. + # This method allows negative parts to be present in pattern. + # If invalid string is provided, it will raise +ActiveSupport::Duration::ISO8601Parser::ParsingError+. + # + # source://activesupport//lib/active_support/duration.rb#144 + def parse(iso8601duration); end + + # source://activesupport//lib/active_support/duration.rb#155 + def seconds(value); end + + # source://activesupport//lib/active_support/duration.rb#171 + def weeks(value); end + + # source://activesupport//lib/active_support/duration.rb#179 + def years(value); end + + private + + # source://activesupport//lib/active_support/duration.rb#217 + def calculate_total_seconds(parts); end + end +end + +# Parses a string formatted according to ISO 8601 Duration into the hash. +# +# See {ISO 8601}[https://en.wikipedia.org/wiki/ISO_8601#Durations] for more information. +# +# This parser allows negative parts to be present in pattern. +# +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#12 +class ActiveSupport::Duration::ISO8601Parser + # @return [ISO8601Parser] a new instance of ISO8601Parser + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#34 + def initialize(string); end + + # Returns the value of attribute mode. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def mode; end + + # Sets the attribute mode + # + # @param value the value to set the attribute mode to. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def mode=(_arg0); end + + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#41 + def parse!; end + + # Returns the value of attribute parts. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 + def parts; end + + # Returns the value of attribute scanner. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#31 + def scanner; end + + # Returns the value of attribute sign. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def sign; end + + # Sets the attribute sign + # + # @param value the value to set the attribute sign to. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#32 + def sign=(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#83 + def finished?; end + + # Parses number which can be a float with either comma or period. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#88 + def number; end + + # @raise [ParsingError] + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#96 + def raise_parsing_error(reason = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#92 + def scan(pattern); end + + # Checks for various semantic errors as stated in ISO 8601 standard. + # + # source://activesupport//lib/active_support/duration/iso8601_parser.rb#101 + def validate!; end +end + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#17 +ActiveSupport::Duration::ISO8601Parser::COMMA = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#22 +ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#28 +ActiveSupport::Duration::ISO8601Parser::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#20 +ActiveSupport::Duration::ISO8601Parser::DATE_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#25 +ActiveSupport::Duration::ISO8601Parser::DATE_TO_PART = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#16 +ActiveSupport::Duration::ISO8601Parser::PERIOD = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#15 +ActiveSupport::Duration::ISO8601Parser::PERIOD_OR_COMMA = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#13 +class ActiveSupport::Duration::ISO8601Parser::ParsingError < ::ArgumentError; end + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#19 +ActiveSupport::Duration::ISO8601Parser::SIGN_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#23 +ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENT = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#29 +ActiveSupport::Duration::ISO8601Parser::TIME_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#21 +ActiveSupport::Duration::ISO8601Parser::TIME_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/duration/iso8601_parser.rb#26 +ActiveSupport::Duration::ISO8601Parser::TIME_TO_PART = T.let(T.unsafe(nil), Hash) + +# Serializes duration to string according to ISO 8601 Duration format. +# +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#6 +class ActiveSupport::Duration::ISO8601Serializer + # @return [ISO8601Serializer] a new instance of ISO8601Serializer + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#9 + def initialize(duration, precision: T.unsafe(nil)); end + + # Builds and returns output string. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#15 + def serialize; end + + private + + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#55 + def format_seconds(seconds); end + + # Return pair of duration's parts and whole duration sign. + # Parts are summarized (as they can become repetitive due to addition, etc). + # Zero parts are removed as not significant. + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#38 + def normalize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration/iso8601_serializer.rb#51 + def week_mixed_with_date?(parts); end +end + +# source://activesupport//lib/active_support/duration/iso8601_serializer.rb#7 +ActiveSupport::Duration::ISO8601Serializer::DATE_COMPONENTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#130 +ActiveSupport::Duration::PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/duration.rb#120 +ActiveSupport::Duration::PARTS_IN_SECONDS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/duration.rb#115 +ActiveSupport::Duration::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#114 +ActiveSupport::Duration::SECONDS_PER_HOUR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#113 +ActiveSupport::Duration::SECONDS_PER_MINUTE = T.let(T.unsafe(nil), Integer) + +# 1/12 of a gregorian year +# +# source://activesupport//lib/active_support/duration.rb#117 +ActiveSupport::Duration::SECONDS_PER_MONTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#116 +ActiveSupport::Duration::SECONDS_PER_WEEK = T.let(T.unsafe(nil), Integer) + +# length of a gregorian year (365.2425 days) +# +# source://activesupport//lib/active_support/duration.rb#118 +ActiveSupport::Duration::SECONDS_PER_YEAR = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/duration.rb#15 +class ActiveSupport::Duration::Scalar < ::Numeric + # @return [Scalar] a new instance of Scalar + # + # source://activesupport//lib/active_support/duration.rb#19 + def initialize(value); end + + # source://activesupport//lib/active_support/duration.rb#85 + def %(other); end + + # source://activesupport//lib/active_support/duration.rb#66 + def *(other); end + + # source://activesupport//lib/active_support/duration.rb#41 + def +(other); end + + # source://activesupport//lib/active_support/duration.rb#53 + def -(other); end + + # source://activesupport//lib/active_support/duration.rb#27 + def -@; end + + # source://activesupport//lib/active_support/duration.rb#77 + def /(other); end + + # source://activesupport//lib/active_support/duration.rb#31 + def <=>(other); end + + # source://activesupport//lib/active_support/duration.rb#23 + def coerce(other); end + + # source://activesupport//lib/active_support/duration.rb#17 + def to_f(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#17 + def to_i(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/duration.rb#17 + def to_s(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute value. + # + # source://activesupport//lib/active_support/duration.rb#16 + def value; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/duration.rb#93 + def variable?; end + + private + + # source://activesupport//lib/active_support/duration.rb#98 + def calculate(op, other); end + + # @raise [TypeError] + # + # source://activesupport//lib/active_support/duration.rb#108 + def raise_type_error(other); end +end + +# source://activesupport//lib/active_support/duration.rb#131 +ActiveSupport::Duration::VARIABLE_PARTS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/editor.rb#6 +class ActiveSupport::Editor + # @return [Editor] a new instance of Editor + # + # source://activesupport//lib/active_support/editor.rb#48 + def initialize(url_pattern); end + + # source://activesupport//lib/active_support/editor.rb#52 + def url_for(path, line); end + + class << self + # Returns the current editor pattern if it is known. + # First check for the `RAILS_EDITOR` environment variable, and if it's + # missing, check for the `EDITOR` environment variable. + # + # source://activesupport//lib/active_support/editor.rb#28 + def current; end + + # source://activesupport//lib/active_support/editor.rb#39 + def find(name); end + + # Registers a URL pattern for opening file in a given editor. + # This allows Rails to generate clickable links to control known editors. + # + # Example: + # + # ActiveSupport::Editor.register("myeditor", "myeditor://%s:%d") + # + # source://activesupport//lib/active_support/editor.rb#17 + def register(name, url_pattern, aliases: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/editor.rb#43 + def reset; end + end +end + +# source://activesupport//lib/active_support/core_ext/enumerable.rb#4 +module ActiveSupport::EnumerableCoreExt; end + +# source://activesupport//lib/active_support/core_ext/enumerable.rb#5 +module ActiveSupport::EnumerableCoreExt::Constants + private + + # source://activesupport//lib/active_support/core_ext/enumerable.rb#7 + def const_missing(name); end +end + +# HACK: For performance reasons, Enumerable shouldn't have any constants of its own. +# So we move SoleItemExpectedError into ActiveSupport::EnumerableCoreExt. +# +# source://activesupport//lib/active_support/core_ext/enumerable.rb#25 +ActiveSupport::EnumerableCoreExt::SoleItemExpectedError = Enumerable::SoleItemExpectedError + +# source://activesupport//lib/active_support/environment_inquirer.rb#9 +class ActiveSupport::EnvironmentInquirer < ::ActiveSupport::StringInquirer + # @raise [ArgumentError] + # @return [EnvironmentInquirer] a new instance of EnvironmentInquirer + # + # source://activesupport//lib/active_support/environment_inquirer.rb#15 + def initialize(env); end + + # source://activesupport//lib/active_support/environment_inquirer.rb#28 + def development?; end + + # Returns true if we're in the development or test environment. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/environment_inquirer.rb#36 + def local?; end + + # source://activesupport//lib/active_support/environment_inquirer.rb#28 + def production?; end + + # source://activesupport//lib/active_support/environment_inquirer.rb#28 + def test?; end +end + +# Optimization for the three default environments, so this inquirer doesn't need to rely on +# the slower delegation through method_missing that StringInquirer would normally entail. +# +# source://activesupport//lib/active_support/environment_inquirer.rb#10 +ActiveSupport::EnvironmentInquirer::DEFAULT_ENVIRONMENTS = T.let(T.unsafe(nil), Array) + +# Environments that'll respond true for #local? +# +# source://activesupport//lib/active_support/environment_inquirer.rb#13 +ActiveSupport::EnvironmentInquirer::LOCAL_ENVIRONMENTS = T.let(T.unsafe(nil), Array) + +# = Active Support \Error Reporter +# +# +ActiveSupport::ErrorReporter+ is a common interface for error reporting services. +# +# To rescue and report any unhandled error, you can use the #handle method: +# +# Rails.error.handle do +# do_something! +# end +# +# If an error is raised, it will be reported and swallowed. +# +# Alternatively, if you want to report the error but not swallow it, you can use #record: +# +# Rails.error.record do +# do_something! +# end +# +# Both methods can be restricted to handle only a specific error class: +# +# maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } +# +# source://activesupport//lib/active_support/error_reporter.rb#26 +class ActiveSupport::ErrorReporter + # @return [ErrorReporter] a new instance of ErrorReporter + # + # source://activesupport//lib/active_support/error_reporter.rb#35 + def initialize(*subscribers, logger: T.unsafe(nil)); end + + # Add a middleware to modify the error context before it is sent to subscribers. + # + # Middleware is added to a stack of callables run on an error's execution context + # before passing to subscribers. Allows creation of entries in error context that + # are shared by all subscribers. + # + # A context middleware receives the same parameters as #report. + # It must return a hash - the middleware stack returns the hash after it has + # run through all middlewares. A middleware can mutate or replace the hash. + # + # Rails.error.add_middleware(-> (error, context) { context.merge({ foo: :bar }) }) + # + # source://activesupport//lib/active_support/error_reporter.rb#218 + def add_middleware(middleware); end + + # Returns the value of attribute debug_mode. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + def debug_mode; end + + # Sets the attribute debug_mode + # + # @param value the value to set the attribute debug_mode to. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + def debug_mode=(_arg0); end + + # Prevent a subscriber from being notified of errors for the + # duration of the block. You may pass in the subscriber itself, or its class. + # + # This can be helpful for error reporting service integrations, when they wish + # to handle any errors higher in the stack. + # + # source://activesupport//lib/active_support/error_reporter.rb#186 + def disable(subscriber); end + + # Evaluates the given block, reporting and swallowing any unhandled error. + # If no error is raised, returns the return value of the block. Otherwise, + # returns the result of +fallback.call+, or +nil+ if +fallback+ is not + # specified. + # + # # Will report a TypeError to all subscribers and return nil. + # Rails.error.handle do + # 1 + '1' + # end + # + # Can be restricted to handle only specific error classes: + # + # maybe_tags = Rails.error.handle(Redis::BaseError) { redis.get("tags") } + # + # ==== Options + # + # * +:severity+ - This value is passed along to subscribers to indicate how + # important the error report is. Can be +:error+, +:warning+, or +:info+. + # Defaults to +:warning+. + # + # * +:context+ - Extra information that is passed along to subscribers. For + # example: + # + # Rails.error.handle(context: { section: "admin" }) do + # # ... + # end + # + # * +:fallback+ - A callable that provides +handle+'s return value when an + # unhandled error is raised. For example: + # + # user = Rails.error.handle(fallback: -> { User.anonymous }) do + # User.find_by(params) + # end + # + # * +:source+ - This value is passed along to subscribers to indicate the + # source of the error. Subscribers can use this value to ignore certain + # errors. Defaults to "application". + # + # source://activesupport//lib/active_support/error_reporter.rb#79 + def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil)); end + + # Returns the value of attribute logger. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://activesupport//lib/active_support/error_reporter.rb#31 + def logger=(_arg0); end + + # Evaluates the given block, reporting and re-raising any unhandled error. + # If no error is raised, returns the return value of the block. + # + # # Will report a TypeError to all subscribers and re-raise it. + # Rails.error.record do + # 1 + '1' + # end + # + # Can be restricted to handle only specific error classes: + # + # tags = Rails.error.record(Redis::BaseError) { redis.get("tags") } + # + # ==== Options + # + # * +:severity+ - This value is passed along to subscribers to indicate how + # important the error report is. Can be +:error+, +:warning+, or +:info+. + # Defaults to +:error+. + # + # * +:context+ - Extra information that is passed along to subscribers. For + # example: + # + # Rails.error.record(context: { section: "admin" }) do + # # ... + # end + # + # * +:source+ - This value is passed along to subscribers to indicate the + # source of the error. Subscribers can use this value to ignore certain + # errors. Defaults to "application". + # + # source://activesupport//lib/active_support/error_reporter.rb#115 + def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # Report an error directly to subscribers. You can use this method when the + # block-based #handle and #record methods are not suitable. + # + # Rails.error.report(error) + # + # The +error+ argument must be an instance of Exception. + # + # Rails.error.report(Exception.new("Something went wrong")) + # + # Otherwise you can use #unexpected to report an error which does accept a + # string argument. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/error_reporter.rb#233 + def report(error, handled: T.unsafe(nil), severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # Update the execution context that is accessible to error subscribers. Any + # context passed to #handle, #record, or #report will be merged with the + # context set here. + # + # Rails.error.set_context(section: "checkout", user_id: @user.id) + # + # source://activesupport//lib/active_support/error_reporter.rb#202 + def set_context(*_arg0, **_arg1, &_arg2); end + + # Register a new error subscriber. The subscriber must respond to + # + # report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String) + # + # The +report+ method should never raise an error. + # + # source://activesupport//lib/active_support/error_reporter.rb#162 + def subscribe(subscriber); end + + # Either report the given error when in production, or raise it when in development or test. + # + # When called in production, after the error is reported, this method will return + # nil and execution will continue. + # + # When called in development, the original error is wrapped in a different error class to ensure + # it's not being rescued higher in the stack and will be surfaced to the developer. + # + # This method is intended for reporting violated assertions about preconditions, or similar + # cases that can and should be gracefully handled in production, but that aren't supposed to happen. + # + # The error can be either an exception instance or a String. + # + # example: + # + # def edit + # if published? + # Rails.error.unexpected("[BUG] Attempting to edit a published article, that shouldn't be possible") + # return false + # end + # # ... + # end + # + # source://activesupport//lib/active_support/error_reporter.rb#146 + def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end + + # Unregister an error subscriber. Accepts either a subscriber or a class. + # + # subscriber = MyErrorSubscriber.new + # Rails.error.subscribe(subscriber) + # + # Rails.error.unsubscribe(subscriber) + # # or + # Rails.error.unsubscribe(MyErrorSubscriber) + # + # source://activesupport//lib/active_support/error_reporter.rb#177 + def unsubscribe(subscriber); end + + private + + # source://activesupport//lib/active_support/error_reporter.rb#278 + def ensure_backtrace(error); end +end + +# source://activesupport//lib/active_support/error_reporter.rb#29 +ActiveSupport::ErrorReporter::DEFAULT_RESCUE = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/error_reporter.rb#28 +ActiveSupport::ErrorReporter::DEFAULT_SOURCE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/error_reporter.rb#298 +class ActiveSupport::ErrorReporter::ErrorContextMiddlewareStack + # @return [ErrorContextMiddlewareStack] a new instance of ErrorContextMiddlewareStack + # + # source://activesupport//lib/active_support/error_reporter.rb#299 + def initialize; end + + # Run all middlewares in the stack + # + # source://activesupport//lib/active_support/error_reporter.rb#313 + def execute(error, handled:, severity:, context:, source:); end + + # Add a middleware to the error context stack. + # + # source://activesupport//lib/active_support/error_reporter.rb#304 + def use(middleware); end +end + +# source://activesupport//lib/active_support/error_reporter.rb#27 +ActiveSupport::ErrorReporter::SEVERITIES = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/error_reporter.rb#33 +class ActiveSupport::ErrorReporter::UnexpectedError < ::Exception; end + +# source://activesupport//lib/active_support/event_reporter.rb#49 +class ActiveSupport::EventContext + class << self + # source://activesupport//lib/active_support/event_reporter.rb#65 + def clear; end + + # source://activesupport//lib/active_support/event_reporter.rb#54 + def context; end + + # source://activesupport//lib/active_support/event_reporter.rb#58 + def set_context(context_hash); end + end +end + +# source://activesupport//lib/active_support/event_reporter.rb#50 +ActiveSupport::EventContext::EMPTY_CONTEXT = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/event_reporter.rb#51 +ActiveSupport::EventContext::FIBER_KEY = T.let(T.unsafe(nil), Symbol) + +# = Active Support \Event Reporter +# +# +ActiveSupport::EventReporter+ provides an interface for reporting structured events to subscribers. +# +# To report an event, you can use the +notify+ method: +# +# Rails.event.notify("user_created", { id: 123 }) +# # Emits event: +# # { +# # name: "user_created", +# # payload: { id: 123 }, +# # timestamp: 1738964843208679035, +# # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } +# # } +# +# The +notify+ API can receive either an event name and a payload hash, or an event object. Names are coerced to strings. +# +# === Event Objects +# +# If an event object is passed to the +notify+ API, it will be passed through to subscribers as-is, and the name of the +# object's class will be used as the event name. +# +# class UserCreatedEvent +# def initialize(id:, name:) +# @id = id +# @name = name +# end +# +# def serialize +# { +# id: @id, +# name: @name +# } +# end +# end +# +# Rails.event.notify(UserCreatedEvent.new(id: 123, name: "John Doe")) +# # Emits event: +# # { +# # name: "UserCreatedEvent", +# # payload: #, +# # timestamp: 1738964843208679035, +# # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } +# # } +# +# An event is any Ruby object representing a schematized event. While payload hashes allow arbitrary, +# implicitly-structured data, event objects are intended to enforce a particular schema. +# +# Subscribers are responsible for serializing event objects. +# +# === Subscribers +# +# Subscribers must implement the +emit+ method, which will be called with the event hash. +# +# The event hash has the following keys: +# +# name: String (The name of the event) +# payload: Hash, Object (The payload of the event, or the event object itself) +# tags: Hash (The tags of the event) +# context: Hash (The context of the event) +# timestamp: Float (The timestamp of the event, in nanoseconds) +# source_location: Hash (The source location of the event, containing the filepath, lineno, and label) +# +# Subscribers are responsible for encoding events to their desired format before emitting them to their +# target destination, such as a streaming platform, a log device, or an alerting service. +# +# class JSONEventSubscriber +# def emit(event) +# json_data = JSON.generate(event) +# LogExporter.export(json_data) +# end +# end +# +# class LogSubscriber +# def emit(event) +# payload = event[:payload].map { |key, value| "#{key}=#{value}" }.join(" ") +# source_location = event[:source_location] +# log = "[#{event[:name]}] #{payload} at #{source_location[:filepath]}:#{source_location[:lineno]}" +# Rails.logger.info(log) +# end +# end +# +# Note that event objects are passed through to subscribers as-is, and may need to be serialized before being encoded: +# +# class UserCreatedEvent +# def initialize(id:, name:) +# @id = id +# @name = name +# end +# +# def serialize +# { +# id: @id, +# name: @name +# } +# end +# end +# +# class LogSubscriber +# def emit(event) +# payload = event[:payload] +# json_data = JSON.generate(payload.serialize) +# LogExporter.export(json_data) +# end +# end +# +# ==== Filtered Subscriptions +# +# Subscribers can be configured with an optional filter proc to only receive a subset of events: +# +# # Only receive events with names starting with "user." +# Rails.event.subscribe(user_subscriber) { |event| event[:name].start_with?("user.") } +# +# # Only receive events with specific payload types +# Rails.event.subscribe(audit_subscriber) { |event| event[:payload].is_a?(AuditEvent) } +# +# === Debug Events +# +# You can use the +debug+ method to report an event that will only be reported if the +# event reporter is in debug mode: +# +# Rails.event.debug("my_debug_event", { foo: "bar" }) +# +# === Tags +# +# To add additional context to an event, separate from the event payload, you can add +# tags via the +tagged+ method: +# +# Rails.event.tagged("graphql") do +# Rails.event.notify("user_created", { id: 123 }) +# end +# +# # Emits event: +# # { +# # name: "user_created", +# # payload: { id: 123 }, +# # tags: { graphql: true }, +# # context: {}, +# # timestamp: 1738964843208679035, +# # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } +# # } +# +# === Context Store +# +# You may want to attach metadata to every event emitted by the reporter. While tags +# provide domain-specific context for a series of events, context is scoped to the job / request +# and should be used for metadata associated with the execution context. +# Context can be set via the +set_context+ method: +# +# Rails.event.set_context(request_id: "abcd123", user_agent: "TestAgent") +# Rails.event.notify("user_created", { id: 123 }) +# +# # Emits event: +# # { +# # name: "user_created", +# # payload: { id: 123 }, +# # tags: {}, +# # context: { request_id: "abcd123", user_agent: "TestAgent" }, +# # timestamp: 1738964843208679035, +# # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } +# # } +# +# Context is reset automatically before and after each request. +# +# A custom context store can be configured via +config.active_support.event_reporter_context_store+. +# +# # config/application.rb +# config.active_support.event_reporter_context_store = CustomContextStore +# +# class CustomContextStore +# class << self +# def context +# # Return the context. +# end +# +# def set_context(context_hash) +# # Append context_hash to the existing context store. +# end +# +# def clear +# # Delete the stored context. +# end +# end +# end +# +# The Event Reporter standardizes on symbol keys for all payload data, tags, and context store entries. +# String keys are automatically converted to symbols for consistency. +# +# Rails.event.notify("user.created", { "id" => 123 }) +# # Emits event: +# # { +# # name: "user.created", +# # payload: { id: 123 }, +# # } +# +# === Security +# +# When reporting events, Hash-based payloads are automatically filtered to remove sensitive data based on {Rails.application.filter_parameters}[https://guides.rubyonrails.org/configuring.html#config-filter-parameters]. +# +# If an {event object}[rdoc-ref:EventReporter@Event+Objects] is given instead, subscribers will need to filter sensitive data themselves, e.g. with ActiveSupport::ParameterFilter. +# +# source://activesupport//lib/active_support/event_reporter.rb#271 +class ActiveSupport::EventReporter + # @return [EventReporter] a new instance of EventReporter + # + # source://activesupport//lib/active_support/event_reporter.rb#286 + def initialize(*subscribers, raise_on_error: T.unsafe(nil)); end + + # Clears all context data. + # + # source://activesupport//lib/active_support/event_reporter.rb#525 + def clear_context; end + + # Returns the current context data. + # + # source://activesupport//lib/active_support/event_reporter.rb#530 + def context; end + + # Report an event only when in debug mode. For example: + # + # Rails.event.debug("sql.query", { sql: "SELECT * FROM users" }) + # + # ==== Arguments + # + # * +:payload+ - The event payload when using string/symbol event names. + # + # * +:caller_depth+ - The stack depth to use for source location (default: 1). + # + # * +:kwargs+ - Additional payload data when using string/symbol event names. + # + # source://activesupport//lib/active_support/event_reporter.rb#435 + def debug(name_or_object, payload = T.unsafe(nil), caller_depth: T.unsafe(nil), **kwargs); end + + # source://activesupport//lib/active_support/event_reporter.rb#276 + def debug_mode=(_arg0); end + + # Check if debug mode is currently enabled. Debug mode is enabled on the reporter + # via +with_debug+, and in local environments. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/event_reporter.rb#420 + def debug_mode?; end + + # Reports an event to all registered subscribers. An event name and payload can be provided: + # + # Rails.event.notify("user.created", { id: 123 }) + # # Emits event: + # # { + # # name: "user.created", + # # payload: { id: 123 }, + # # tags: {}, + # # context: {}, + # # timestamp: 1738964843208679035, + # # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } + # # } + # + # Alternatively, an event object can be provided: + # + # Rails.event.notify(UserCreatedEvent.new(id: 123)) + # # Emits event: + # # { + # # name: "UserCreatedEvent", + # # payload: #, + # # tags: {}, + # # context: {}, + # # timestamp: 1738964843208679035, + # # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } + # # } + # + # ==== Arguments + # + # * +:payload+ - The event payload when using string/symbol event names. + # + # * +:caller_depth+ - The stack depth to use for source location (default: 1). + # + # * +:kwargs+ - Additional payload data when using string/symbol event names. + # + # source://activesupport//lib/active_support/event_reporter.rb#363 + def notify(name_or_object, payload = T.unsafe(nil), caller_depth: T.unsafe(nil), **kwargs); end + + # Sets whether to raise an error if a subscriber raises an error during + # event emission, or when unexpected arguments are passed to +notify+. + # + # source://activesupport//lib/active_support/event_reporter.rb#274 + def raise_on_error=(_arg0); end + + # source://activesupport//lib/active_support/event_reporter.rb#534 + def reload_payload_filter; end + + # Sets context data that will be included with all events emitted by the reporter. + # Context data should be scoped to the job or request, and is reset automatically + # before and after each request and job. + # + # Rails.event.set_context(user_agent: "TestAgent") + # Rails.event.set_context(job_id: "abc123") + # Rails.event.tagged("graphql") do + # Rails.event.notify("user_created", { id: 123 }) + # end + # + # # Emits event: + # # { + # # name: "user_created", + # # payload: { id: 123 }, + # # tags: { graphql: true }, + # # context: { user_agent: "TestAgent", job_id: "abc123" }, + # # timestamp: 1738964843208679035 + # # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } + # # } + # + # source://activesupport//lib/active_support/event_reporter.rb#520 + def set_context(context); end + + # Registers a new event subscriber. The subscriber must respond to + # + # emit(event: Hash) + # + # The event hash will have the following keys: + # + # name: String (The name of the event) + # payload: Hash, Object (The payload of the event, or the event object itself) + # tags: Hash (The tags of the event) + # context: Hash (The context of the event) + # timestamp: Float (The timestamp of the event, in nanoseconds) + # source_location: Hash (The source location of the event, containing the filepath, lineno, and label) + # + # An optional filter proc can be provided to only receive a subset of events: + # + # Rails.event.subscribe(subscriber) { |event| event[:name].start_with?("user.") } + # Rails.event.subscribe(subscriber) { |event| event[:payload].is_a?(UserEvent) } + # + # source://activesupport//lib/active_support/event_reporter.rb#311 + def subscribe(subscriber, &filter); end + + # :nodoc + # + # source://activesupport//lib/active_support/event_reporter.rb#278 + def subscribers; end + + # Add tags to events to supply additional context. Tags operate in a stack-oriented manner, + # so all events emitted within the block inherit the same set of tags. For example: + # + # Rails.event.tagged("graphql") do + # Rails.event.notify("user.created", { id: 123 }) + # end + # + # # Emits event: + # # { + # # name: "user.created", + # # payload: { id: 123 }, + # # tags: { graphql: true }, + # # context: {}, + # # timestamp: 1738964843208679035, + # # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } + # # } + # + # Tags can be provided as arguments or as keyword arguments, and can be nested: + # + # Rails.event.tagged("graphql") do + # # Other code here... + # Rails.event.tagged(section: "admin") do + # Rails.event.notify("user.created", { id: 123 }) + # end + # end + # + # # Emits event: + # # { + # # name: "user.created", + # # payload: { id: 123 }, + # # tags: { section: "admin", graphql: true }, + # # context: {}, + # # timestamp: 1738964843208679035, + # # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } + # # } + # + # The +tagged+ API can also receive a tag object: + # + # graphql_tag = GraphqlTag.new(operation_name: "user_created", operation_type: "mutation") + # Rails.event.tagged(graphql_tag) do + # Rails.event.notify("user.created", { id: 123 }) + # end + # + # # Emits event: + # # { + # # name: "user.created", + # # payload: { id: 123 }, + # # tags: { "GraphqlTag": # }, + # # context: {}, + # # timestamp: 1738964843208679035, + # # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } + # # } + # + # source://activesupport//lib/active_support/event_reporter.rb#497 + def tagged(*args, **kwargs, &block); end + + # Unregister an event subscriber. Accepts either a subscriber or a class. + # + # subscriber = MyEventSubscriber.new + # Rails.event.subscribe(subscriber) + # + # Rails.event.unsubscribe(subscriber) + # # or + # Rails.event.unsubscribe(MyEventSubscriber) + # + # source://activesupport//lib/active_support/event_reporter.rb#326 + def unsubscribe(subscriber); end + + # Temporarily enables debug mode for the duration of the block. + # Calls to +debug+ will only be reported if debug mode is enabled. + # + # Rails.event.with_debug do + # Rails.event.debug("sql.query", { sql: "SELECT * FROM users" }) + # end + # + # source://activesupport//lib/active_support/event_reporter.rb#410 + def with_debug; end + + private + + # source://activesupport//lib/active_support/event_reporter.rb#544 + def context_store; end + + # source://activesupport//lib/active_support/event_reporter.rb#579 + def handle_unexpected_args(name_or_object, payload, kwargs); end + + # source://activesupport//lib/active_support/event_reporter.rb#548 + def payload_filter; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/event_reporter.rb#540 + def raise_on_error?; end + + # source://activesupport//lib/active_support/event_reporter.rb#555 + def resolve_name(name_or_object); end + + # source://activesupport//lib/active_support/event_reporter.rb#564 + def resolve_payload(name_or_object, payload, **kwargs); end + + class << self + # source://activesupport//lib/active_support/event_reporter.rb#281 + def context_store; end + + # source://activesupport//lib/active_support/event_reporter.rb#281 + def context_store=(_arg0); end + end +end + +# source://activesupport//lib/active_support/execution_context.rb#4 +module ActiveSupport::ExecutionContext + class << self + # source://activesupport//lib/active_support/execution_context.rb#69 + def []=(key, value); end + + # source://activesupport//lib/active_support/execution_context.rb#40 + def after_change(&block); end + + # source://activesupport//lib/active_support/execution_context.rb#96 + def clear; end + + # source://activesupport//lib/active_support/execution_context.rb#100 + def current_attributes_instances; end + + # Returns the value of attribute nestable. + # + # source://activesupport//lib/active_support/execution_context.rb#38 + def nestable; end + + # Sets the attribute nestable + # + # @param value the value to set the attribute nestable to. + # + # source://activesupport//lib/active_support/execution_context.rb#38 + def nestable=(_arg0); end + + # source://activesupport//lib/active_support/execution_context.rb#87 + def pop; end + + # source://activesupport//lib/active_support/execution_context.rb#78 + def push; 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#46 + def set(**options); end + + # source://activesupport//lib/active_support/execution_context.rb#74 + def to_h; end + + private + + # source://activesupport//lib/active_support/execution_context.rb#105 + def record; end + end +end + +# source://activesupport//lib/active_support/execution_context.rb#5 +class ActiveSupport::ExecutionContext::Record + # @return [Record] a new instance of Record + # + # source://activesupport//lib/active_support/execution_context.rb#8 + def initialize; end + + # Returns the value of attribute current_attributes_instances. + # + # source://activesupport//lib/active_support/execution_context.rb#6 + def current_attributes_instances; end + + # source://activesupport//lib/active_support/execution_context.rb#21 + def pop; end + + # source://activesupport//lib/active_support/execution_context.rb#14 + def push; end + + # Returns the value of attribute store. + # + # source://activesupport//lib/active_support/execution_context.rb#6 + def store; end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#7 +class ActiveSupport::ExecutionWrapper + include ::ActiveSupport::Callbacks + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + + # source://activesupport//lib/active_support/execution_wrapper.rb#8 + def __callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#15 + def _complete_callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#14 + def _run_callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#15 + def _run_complete_callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#15 + def _run_complete_callbacks!(&block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#14 + def _run_run_callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#14 + def _run_run_callbacks!(&block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#141 + def complete; end + + # Complete this in-flight execution. This method *must* be called + # exactly once on the result of any call to +run!+. + # + # Where possible, prefer +wrap+. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#135 + def complete!; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#127 + def run; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#122 + def run!; end + + private + + # source://activesupport//lib/active_support/execution_wrapper.rb#146 + def hook_state; end + + class << self + # source://activesupport//lib/active_support/execution_wrapper.rb#8 + def __callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#8 + def __callbacks=(value); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#15 + def _complete_callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#15 + def _complete_callbacks=(value); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#14 + def _run_callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#14 + def _run_callbacks=(value); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/execution_wrapper.rb#118 + def active?; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#114 + def active_key; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#110 + def error_reporter; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#100 + def perform; end + + # Register an object to be invoked during both the +run+ and + # +complete+ steps. + # + # +hook.complete+ will be passed the value returned from +hook.run+, + # and will only be invoked if +run+ has previously been called. + # (Mostly, this means it won't be invoked if an exception occurs in + # a preceding +to_run+ block; all ordinary +to_complete+ blocks are + # invoked in that situation.) + # + # source://activesupport//lib/active_support/execution_wrapper.rb#50 + def register_hook(hook, outer: T.unsafe(nil)); end + + # Run this execution. + # + # Returns an instance, whose +complete!+ method *must* be invoked + # after the work has been performed. + # + # Where possible, prefer +wrap+. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#66 + def run!(reset: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#21 + def to_complete(*args, &block); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#17 + def to_run(*args, &block); end + + # Perform the work in the supplied block as an execution. + # + # source://activesupport//lib/active_support/execution_wrapper.rb#86 + def wrap(source: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/execution_wrapper.rb#8 + def __class_attr___callbacks; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#8 + def __class_attr___callbacks=(new_value); end + end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#32 +class ActiveSupport::ExecutionWrapper::CompleteHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#39 + def after(target); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#33 + def before(target); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook + # + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def hook=(_); end + + class << self + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def [](*_arg0); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def inspect; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def keyword_init?; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def members; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#32 + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/execution_wrapper.rb#10 +ActiveSupport::ExecutionWrapper::Null = T.let(T.unsafe(nil), Object) + +# source://activesupport//lib/active_support/execution_wrapper.rb#25 +class ActiveSupport::ExecutionWrapper::RunHook < ::Struct + # source://activesupport//lib/active_support/execution_wrapper.rb#26 + def before(target); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook + # + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def hook=(_); end + + class << self + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def [](*_arg0); end + + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def inspect; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def keyword_init?; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def members; end + + # source://activesupport//lib/active_support/execution_wrapper.rb#25 + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/executor.rb#6 +class ActiveSupport::Executor < ::ActiveSupport::ExecutionWrapper; end + +# = \File Update Checker +# +# FileUpdateChecker specifies the API used by \Rails to watch files +# and control reloading. The API depends on four methods: +# +# * +initialize+ which expects two parameters and one block as +# described below. +# +# * +updated?+ which returns a boolean if there were updates in +# the filesystem or not. +# +# * +execute+ which executes the given block on initialization +# and updates the latest watched files and timestamp. +# +# * +execute_if_updated+ which just executes the block if it was updated. +# +# After initialization, a call to +execute_if_updated+ must execute +# the block only if there was really a change in the filesystem. +# +# This class is used by \Rails to reload the I18n framework whenever +# they are changed upon a new request. +# +# i18n_reloader = ActiveSupport::FileUpdateChecker.new(paths) do +# I18n.reload! +# end +# +# ActiveSupport::Reloader.to_prepare do +# i18n_reloader.execute_if_updated +# end +# +# source://activesupport//lib/active_support/file_update_checker.rb#35 +class ActiveSupport::FileUpdateChecker + # It accepts two parameters on initialization. The first is an array + # of files and the second is an optional hash of directories. The hash must + # have directories as keys and the value is an array of extensions to be + # watched under that directory. + # + # This method must also receive a block that will be called once a path + # changes. The array of files and list of directories cannot be changed + # after FileUpdateChecker has been initialized. + # + # @return [FileUpdateChecker] a new instance of FileUpdateChecker + # + # source://activesupport//lib/active_support/file_update_checker.rb#44 + def initialize(files, dirs = T.unsafe(nil), &block); end + + # Executes the given block and updates the latest watched files and + # timestamp. + # + # source://activesupport//lib/active_support/file_update_checker.rb#85 + def execute; end + + # Execute the block given if updated. + # + # source://activesupport//lib/active_support/file_update_checker.rb#95 + 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#66 + def updated?; end + + private + + # source://activesupport//lib/active_support/file_update_checker.rb#160 + def compile_ext(array); end + + # source://activesupport//lib/active_support/file_update_checker.rb#147 + def compile_glob(hash); end + + # source://activesupport//lib/active_support/file_update_checker.rb#156 + 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#125 + def max_mtime(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#114 + def updated_at(paths); end + + # source://activesupport//lib/active_support/file_update_checker.rb#106 + def watched; end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#4 +module ActiveSupport::ForkTracker + class << self + # source://activesupport//lib/active_support/fork_tracker.rb#31 + def after_fork(&block); end + + # source://activesupport//lib/active_support/fork_tracker.rb#19 + def after_fork_callback; end + + # source://activesupport//lib/active_support/fork_tracker.rb#27 + def hook!; end + + # source://activesupport//lib/active_support/fork_tracker.rb#36 + def unregister(callback); end + end +end + +# source://activesupport//lib/active_support/fork_tracker.rb#5 +module ActiveSupport::ForkTracker::CoreExt + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def _fork; end +end + +# = Active Support \Gzip +# +# A convenient wrapper for the zlib standard library that allows +# compression/decompression of strings with gzip. +# +# gzip = ActiveSupport::Gzip.compress('compress me!') +# # => "\x1F\x8B\b\x00o\x8D\xCDO\x00\x03K\xCE\xCF-(J-.V\xC8MU\x04\x00R>n\x83\f\x00\x00\x00" +# +# ActiveSupport::Gzip.decompress(gzip) +# # => "compress me!" +# +# source://activesupport//lib/active_support/gzip.rb#17 +module ActiveSupport::Gzip + class << self + # Compresses a string using gzip. + # + # source://activesupport//lib/active_support/gzip.rb#32 + def compress(source, level = T.unsafe(nil), strategy = T.unsafe(nil)); end + + # Decompresses a gzipped string. + # + # source://activesupport//lib/active_support/gzip.rb#27 + def decompress(source); end + end +end + +# source://activesupport//lib/active_support/gzip.rb#18 +class ActiveSupport::Gzip::Stream < ::StringIO + # @return [Stream] a new instance of Stream + # + # source://activesupport//lib/active_support/gzip.rb#19 + def initialize(*_arg0); end + + # source://activesupport//lib/active_support/gzip.rb#23 + def close; end +end + +# source://activesupport//lib/active_support/html_safe_translation.rb#4 +module ActiveSupport::HtmlSafeTranslation + extend ::ActiveSupport::HtmlSafeTranslation + + # @return [Boolean] + # + # source://activesupport//lib/active_support/html_safe_translation.rb#30 + def html_safe_translation_key?(key); end + + # source://activesupport//lib/active_support/html_safe_translation.rb#7 + def translate(key, **options); end + + private + + # source://activesupport//lib/active_support/html_safe_translation.rb#35 + def html_escape_translation_options(options); end + + # source://activesupport//lib/active_support/html_safe_translation.rb#48 + def html_safe_translation(translation); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/html_safe_translation.rb#43 + def i18n_option?(name); end +end + +# = Active Support \Inflector +# +# The Inflector transforms words from singular to plural, class names to table +# names, modularized class names to ones without, and class names to foreign +# keys. The default inflections for pluralization, singularization, and +# uncountable words are kept in inflections.rb. +# +# The \Rails core team has stated patches for the inflections library will not +# be accepted in order to avoid breaking legacy applications which may be +# relying on errant inflections. If you discover an incorrect inflection and +# require it for your application or wish to define rules for languages other +# than English, please correct or add them yourself (explained below). +# +# source://activesupport//lib/active_support/inflector/inflections.rb#8 +module ActiveSupport::Inflector + extend ::ActiveSupport::Inflector + + # Converts strings to UpperCamelCase. + # If the +uppercase_first_letter+ parameter is set to false, then produces + # lowerCamelCase. + # + # Also converts '/' to '::' which is useful for converting + # paths to namespaces. + # + # camelize('active_model') # => "ActiveModel" + # camelize('active_model', false) # => "activeModel" + # camelize('active_model/errors') # => "ActiveModel::Errors" + # camelize('active_model/errors', false) # => "activeModel::Errors" + # + # As a rule of thumb you can think of +camelize+ as the inverse of + # #underscore, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#70 + def camelize(term, uppercase_first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like \Rails does for table + # names to models. Note that this returns a string and not a Class. (To + # convert to an actual class follow +classify+ with #constantize.) + # + # classify('ham_and_eggs') # => "HamAndEgg" + # classify('posts') # => "Post" + # + # Singular names are not handled correctly: + # + # classify('calculus') # => "Calculu" + # + # source://activesupport//lib/active_support/inflector/methods.rb#218 + def classify(table_name); end + + # Tries to find a constant with the name specified in the argument string. + # + # constantize('Module') # => Module + # constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # constantize('C') # => 'outside', same as ::C + # end + # + # NameError is raised when the name is not in CamelCase or the constant is + # unknown. + # + # source://activesupport//lib/active_support/inflector/methods.rb#289 + def constantize(camel_cased_word); end + + # Replaces underscores with dashes in the string. + # + # dasherize('puni_puni') # => "puni-puni" + # + # source://activesupport//lib/active_support/inflector/methods.rb#226 + def dasherize(underscored_word); end + + # Removes the rightmost segment from the constant expression in the string. + # + # deconstantize('Net::HTTP') # => "Net" + # deconstantize('::Net::HTTP') # => "::Net" + # deconstantize('String') # => "" + # deconstantize('::String') # => "" + # deconstantize('') # => "" + # + # See also #demodulize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#256 + def deconstantize(path); end + + # Removes the module part from the expression in the string. + # + # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" + # demodulize('Inflections') # => "Inflections" + # demodulize('::Inflections') # => "Inflections" + # demodulize('') # => "" + # + # See also #deconstantize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#238 + def demodulize(path); end + + # Converts the first character in the string to lowercase. + # + # downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix" + # downcase_first('I') # => "i" + # downcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#175 + def downcase_first(string); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # foreign_key('Message') # => "message_id" + # foreign_key('Message', false) # => "messageid" + # foreign_key('Admin::Post') # => "post_id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#267 + def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Tweaks an attribute name for display to end users. + # + # Specifically, performs these transformations: + # + # * Applies human inflection rules to the argument. + # * Deletes leading underscores, if any. + # * Removes an "_id" suffix if present. + # * Replaces underscores with spaces, if any. + # * Downcases all words except acronyms. + # * Capitalizes the first word. + # The capitalization of the first word can be turned off by setting the + # +:capitalize+ option to false (default is true). + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true (default is false). + # + # humanize('employee_salary') # => "Employee salary" + # humanize('author_id') # => "Author" + # humanize('author_id', capitalize: false) # => "author" + # humanize('_id') # => "Id" + # humanize('author_id', keep_id_suffix: true) # => "Author id" + # + # If "SSL" was defined to be an acronym: + # + # humanize('ssl_error') # => "SSL error" + # + # source://activesupport//lib/active_support/inflector/methods.rb#135 + def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Yields a singleton instance of Inflector::Inflections so you can specify + # additional inflector rules. If passed an optional locale, rules for other + # languages can be specified. If not specified, defaults to :en. + # Only rules for English are provided. + # + # ActiveSupport::Inflector.inflections(:en) do |inflect| + # inflect.uncountable 'rails' + # end + # + # source://activesupport//lib/active_support/inflector/inflections.rb#282 + def inflections(locale = T.unsafe(nil)); end + + # Returns the suffix that should be added to a number to denote the position + # in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinal(1) # => "st" + # ordinal(2) # => "nd" + # ordinal(1002) # => "nd" + # ordinal(1003) # => "rd" + # ordinal(-11) # => "th" + # ordinal(-1021) # => "st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#334 + def ordinal(number); end + + # Turns a number into an ordinal string used to denote the position in an + # ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinalize(1) # => "1st" + # ordinalize(2) # => "2nd" + # ordinalize(1002) # => "1002nd" + # ordinalize(1003) # => "1003rd" + # ordinalize(-11) # => "-11th" + # ordinalize(-1021) # => "-1021st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#347 + def ordinalize(number); end + + # Replaces special characters in a string so that it may be used as part of + # a 'pretty' URL. + # + # parameterize("Donald E. Knuth") # => "donald-e-knuth" + # parameterize("^très|Jolie-- ") # => "tres-jolie" + # + # To use a custom separator, override the +separator+ argument. + # + # parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth" + # parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie" + # + # To preserve the case of the characters in a string, use the +preserve_case+ argument. + # + # parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth" + # parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie" + # + # It preserves dashes and underscores unless they are used as separators: + # + # parameterize("^très|Jolie__ ") # => "tres-jolie__" + # parameterize("^très|Jolie-- ", separator: "_") # => "tres_jolie--" + # parameterize("^très_Jolie-- ", separator: ".") # => "tres_jolie--" + # + # If the optional parameter +locale+ is specified, + # the word will be parameterized as a word of that language. + # By default, this parameter is set to nil and it will use + # the configured I18n.locale. + # + # source://activesupport//lib/active_support/inflector/transliterate.rb#123 + def parameterize(string, separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # If passed an optional +locale+ parameter, the word will be + # pluralized using rules defined for that language. By default, + # this parameter is set to :en. + # + # pluralize('post') # => "posts" + # pluralize('octopus') # => "octopi" + # pluralize('sheep') # => "sheep" + # pluralize('words') # => "words" + # pluralize('CamelOctopus') # => "CamelOctopi" + # pluralize('ley', :es) # => "leyes" + # + # source://activesupport//lib/active_support/inflector/methods.rb#33 + def pluralize(word, locale = T.unsafe(nil)); end + + # Tries to find a constant with the name specified in the argument string. + # + # safe_constantize('Module') # => Module + # safe_constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # safe_constantize('C') # => 'outside', same as ::C + # end + # + # +nil+ is returned when the name is not in CamelCase or the constant (or + # part of it) is unknown. + # + # safe_constantize('blargle') # => nil + # safe_constantize('UnknownModule') # => nil + # safe_constantize('UnknownModule::Foo::Bar') # => nil + # + # source://activesupport//lib/active_support/inflector/methods.rb#315 + def safe_constantize(camel_cased_word); end + + # The reverse of #pluralize, returns the singular form of a word in a + # string. + # + # If passed an optional +locale+ parameter, the word will be + # singularized using rules defined for that language. By default, + # this parameter is set to :en. + # + # singularize('posts') # => "post" + # singularize('octopi') # => "octopus" + # singularize('sheep') # => "sheep" + # singularize('word') # => "word" + # singularize('CamelOctopi') # => "CamelOctopus" + # singularize('leyes', :es) # => "ley" + # + # source://activesupport//lib/active_support/inflector/methods.rb#50 + def singularize(word, locale = T.unsafe(nil)); end + + # Creates the name of a table like \Rails does for models to table names. + # This method uses the #pluralize method on the last word in the string. + # + # tableize('RawScaledScorer') # => "raw_scaled_scorers" + # tableize('ham_and_egg') # => "ham_and_eggs" + # tableize('fancyCategory') # => "fancy_categories" + # + # source://activesupport//lib/active_support/inflector/methods.rb#204 + def tableize(class_name); end + + # Capitalizes all the words and replaces some characters in the string to + # create a nicer looking title. +titleize+ is meant for creating pretty + # output. It is not used in the \Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # titleize('man from the boondocks') # => "Man From The Boondocks" + # titleize('x-men: the last stand') # => "X Men: The Last Stand" + # titleize('TheManWithoutAPast') # => "The Man Without A Past" + # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" + # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#192 + def titleize(word, keep_id_suffix: T.unsafe(nil)); end + + # Replaces non-ASCII characters with an ASCII approximation, or if none + # exists, a replacement character which defaults to "?". + # + # transliterate('Ærøskøbing') + # # => "AEroskobing" + # + # Default approximations are provided for Western/Latin characters, + # e.g, "ø", "ñ", "é", "ß", etc. + # + # This method is I18n aware, so you can set up custom approximations for a + # locale. This can be useful, for example, to transliterate German's "ü" + # and "ö" to "ue" and "oe", or to add support for transliterating Russian + # to ASCII. + # + # In order to make your custom transliterations available, you must set + # them as the i18n.transliterate.rule i18n key: + # + # # Store the transliterations in locales/de.yml + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # # Or set them using Ruby + # I18n.backend.store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # The value for i18n.transliterate.rule can be a simple Hash that + # maps characters to ASCII approximations as shown above, or, for more + # complex requirements, a Proc: + # + # I18n.backend.store_translations(:de, i18n: { + # transliterate: { + # rule: ->(string) { MyTransliterator.transliterate(string) } + # } + # }) + # + # Now you can have different transliterations for each locale: + # + # transliterate('Jürgen', locale: :en) + # # => "Jurgen" + # + # transliterate('Jürgen', locale: :de) + # # => "Juergen" + # + # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. + # Other encodings will raise an ArgumentError. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/inflector/transliterate.rb#64 + def transliterate(string, replacement = T.unsafe(nil), locale: T.unsafe(nil)); end + + # Makes an underscored, lowercase form from the expression in the string. + # + # Changes '::' to '/' to convert namespaces to paths. + # + # underscore('ActiveModel') # => "active_model" + # underscore('ActiveModel::Errors') # => "active_model/errors" + # + # As a rule of thumb you can think of +underscore+ as the inverse of + # #camelize, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#99 + def underscore(camel_cased_word); end + + # Converts the first character in the string to uppercase. + # + # upcase_first('what a Lovely Day') # => "What a Lovely Day" + # upcase_first('w') # => "W" + # upcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#166 + def upcase_first(string); end + + private + + # Applies inflection rules for +singularize+ and +pluralize+. + # + # If passed an optional +locale+ parameter, the uncountables will be + # found for that locale. + # + # apply_inflections('post', inflections.plurals, :en) # => "posts" + # apply_inflections('posts', inflections.singulars, :en) # => "post" + # + # source://activesupport//lib/active_support/inflector/methods.rb#376 + def apply_inflections(word, rules, locale = T.unsafe(nil)); end + + # Mounts a regular expression, returned as a string to ease interpolation, + # that will match part by part the given constant. + # + # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" + # const_regexp("::") # => "::" + # + # source://activesupport//lib/active_support/inflector/methods.rb#357 + def const_regexp(camel_cased_word); end +end + +# source://activesupport//lib/active_support/inflector/transliterate.rb#8 +ActiveSupport::Inflector::ALLOWED_ENCODINGS_FOR_TRANSLITERATE = T.let(T.unsafe(nil), Array) + +# = Active Support \Inflections +# +# A singleton instance of this class is yielded by Inflector.inflections, +# which can then be used to specify additional inflection rules. If passed +# an optional locale, rules for other languages can be specified. The +# default locale is :en. Only rules for English are provided. +# +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1\2en' +# inflect.singular /^(ox)en/i, '\1' +# +# inflect.irregular 'cactus', 'cacti' +# +# inflect.uncountable 'equipment' +# end +# +# New rules are added at the top. So in the example above, the irregular +# rule for cactus will now be the first of the pluralization and +# singularization rules that is runs. This guarantees that your rules run +# before any of the rules that may already have been loaded. +# +# source://activesupport//lib/active_support/inflector/inflections.rb#31 +class ActiveSupport::Inflector::Inflections + # @return [Inflections] a new instance of Inflections + # + # source://activesupport//lib/active_support/inflector/inflections.rb#97 + 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#159 + def acronym(word); end + + # Returns the value of attribute acronyms. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#93 + def acronyms; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#95 + def acronyms_camelize_regex; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#95 + 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#248 + 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#237 + def human(rule, replacement); end + + # Returns the value of attribute humans. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#93 + 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#191 + 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#168 + def plural(rule, replacement); end + + # Returns the value of attribute plurals. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#93 + 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#178 + def singular(rule, replacement); end + + # Returns the value of attribute singulars. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#93 + 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#225 + def uncountable(*words); end + + # Returns the value of attribute uncountables. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#93 + def uncountables; end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#267 + def define_acronym_regex_patterns; end + + # Private, for the test suite. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#103 + def initialize_dup(orig); end + + class << self + # source://activesupport//lib/active_support/inflector/inflections.rb#77 + def instance(locale = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#83 + def instance_or_fallback(locale); end + end +end + +# source://activesupport//lib/active_support/inflector/inflections.rb#35 +class ActiveSupport::Inflector::Inflections::Uncountables + include ::Enumerable + + # @return [Uncountables] a new instance of Uncountables + # + # source://activesupport//lib/active_support/inflector/inflections.rb#40 + def initialize; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#50 + def <<(word); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def ==(arg); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#61 + def add(words); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#45 + def delete(entry); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def each(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#57 + def flatten; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def pop(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def to_a(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def to_ary(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#38 + def to_s(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/inflector/inflections.rb#68 + def uncountable?(str); end +end + +# = Inheritable Options +# +# +InheritableOptions+ provides a constructor to build an OrderedOptions +# hash inherited from another hash. +# +# Use this if you already have some hash and you want to create a new one based on it. +# +# h = ActiveSupport::InheritableOptions.new({ girl: 'Mary', boy: 'John' }) +# h.girl # => 'Mary' +# h.boy # => 'John' +# +# If the existing hash has string keys, call Hash#symbolize_keys on it. +# +# h = ActiveSupport::InheritableOptions.new({ 'girl' => 'Mary', 'boy' => 'John' }.symbolize_keys) +# h.girl # => 'Mary' +# h.boy # => 'John' +# +# source://activesupport//lib/active_support/ordered_options.rb#89 +class ActiveSupport::InheritableOptions < ::ActiveSupport::OrderedOptions + # @return [InheritableOptions] a new instance of InheritableOptions + # + # source://activesupport//lib/active_support/ordered_options.rb#90 + def initialize(parent = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/ordered_options.rb#107 + def ==(other); end + + # source://activesupport//lib/active_support/ordered_options.rb#142 + def each(&block); end + + # source://activesupport//lib/active_support/ordered_options.rb#134 + def inheritable_copy; end + + # source://activesupport//lib/active_support/ordered_options.rb#111 + def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#126 + def key?(key); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#130 + def overridden?(key); end + + # source://activesupport//lib/active_support/ordered_options.rb#119 + def pretty_print(pp); end + + # source://activesupport//lib/active_support/ordered_options.rb#138 + def to_a; end + + # source://activesupport//lib/active_support/ordered_options.rb#103 + def to_h; end + + # source://activesupport//lib/active_support/ordered_options.rb#115 + def to_s; end + + private + + # source://activesupport//lib/active_support/ordered_options.rb#123 + def own_key?(_arg0); end +end + +# source://activesupport//lib/active_support/isolated_execution_state.rb#4 +module ActiveSupport::IsolatedExecutionState + class << self + # source://activesupport//lib/active_support/isolated_execution_state.rb#31 + def [](key); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#37 + def []=(key, value); end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#50 + def clear; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#54 + def context; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#46 + def delete(key); end + + # Returns the value of attribute isolation_level. + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#11 + def isolation_level; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#13 + def isolation_level=(level); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#42 + def key?(key); end + + # Returns the value of attribute scope. + # + # source://activesupport//lib/active_support/isolated_execution_state.rb#11 + def scope; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#58 + def share_with(other, except: T.unsafe(nil), &block); 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 Ruby object. + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # # => {"team" => "rails", "players" => "36"} + # ActiveSupport::JSON.decode("2.39") + # # => 2.39 + # + # source://activesupport//lib/active_support/json/decoding.rb#24 + def decode(json, options = T.unsafe(nil)); 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\"}" + # + # By default, it generates JSON that is safe to include in JavaScript, as + # it escapes U+2028 (Line Separator) and U+2029 (Paragraph Separator): + # + # ActiveSupport::JSON.encode({ key: "\u2028" }) + # # => "{\"key\":\"\\u2028\"}" + # + # By default, it also generates JSON that is safe to include in HTML, as + # it escapes <, >, and &: + # + # ActiveSupport::JSON.encode({ key: "<>&" }) + # # => "{\"key\":\"\\u003c\\u003e\\u0026\"}" + # + # This behavior can be changed with the +escape_html_entities+ option, or the + # global escape_html_entities_in_json configuration option. + # + # ActiveSupport::JSON.encode({ key: "<>&" }, escape_html_entities: false) + # # => "{\"key\":\"<>&\"}" + # + # For performance reasons, you can set the +escape+ option to false, + # which will skip all escaping: + # + # ActiveSupport::JSON.encode({ key: "\u2028<>&" }, escape: false) + # # => "{\"key\":\"\u2028<>&\"}" + # + # source://activesupport//lib/active_support/json/encoding.rb#56 + def dump(value, options = T.unsafe(nil)); 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\"}" + # + # By default, it generates JSON that is safe to include in JavaScript, as + # it escapes U+2028 (Line Separator) and U+2029 (Paragraph Separator): + # + # ActiveSupport::JSON.encode({ key: "\u2028" }) + # # => "{\"key\":\"\\u2028\"}" + # + # By default, it also generates JSON that is safe to include in HTML, as + # it escapes <, >, and &: + # + # ActiveSupport::JSON.encode({ key: "<>&" }) + # # => "{\"key\":\"\\u003c\\u003e\\u0026\"}" + # + # This behavior can be changed with the +escape_html_entities+ option, or the + # global escape_html_entities_in_json configuration option. + # + # ActiveSupport::JSON.encode({ key: "<>&" }, escape_html_entities: false) + # # => "{\"key\":\"<>&\"}" + # + # For performance reasons, you can set the +escape+ option to false, + # which will skip all escaping: + # + # ActiveSupport::JSON.encode({ key: "\u2028<>&" }, escape: false) + # # => "{\"key\":\"\u2028<>&\"}" + # + # source://activesupport//lib/active_support/json/encoding.rb#47 + def encode(value, options = T.unsafe(nil)); end + + # Parses a JSON string (JavaScript Object Notation) into a Ruby object. + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # # => {"team" => "rails", "players" => "36"} + # ActiveSupport::JSON.decode("2.39") + # # => 2.39 + # + # source://activesupport//lib/active_support/json/decoding.rb#33 + def load(json, 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#45 + def parse_error; end + + private + + # source://activesupport//lib/active_support/json/decoding.rb#50 + 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#59 +module ActiveSupport::JSON::Encoding + class << self + # source://activesupport//lib/active_support/json/encoding.rb#239 + def encode_without_escape(value); end + + # source://activesupport//lib/active_support/json/encoding.rb#235 + def encode_without_options(value); end + + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#212 + 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#212 + def escape_html_entities_in_json=(_arg0); end + + # If true, encode LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) + # as escaped unicode sequences ('\u2028' and '\u2029'). + # Historically these characters were not valid inside JavaScript strings + # but that changed in ECMAScript 2019. As such it's no longer a concern in + # modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset. + # + # source://activesupport//lib/active_support/json/encoding.rb#219 + def escape_js_separators_in_json; end + + # If true, encode LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) + # as escaped unicode sequences ('\u2028' and '\u2029'). + # Historically these characters were not valid inside JavaScript strings + # but that changed in ECMAScript 2019. As such it's no longer a concern in + # modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset. + # + # source://activesupport//lib/active_support/json/encoding.rb#219 + def escape_js_separators_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#227 + def json_encoder; end + + # source://activesupport//lib/active_support/json/encoding.rb#229 + def json_encoder=(encoder); end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#223 + 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#223 + 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#208 + 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#208 + def use_standard_json_time_format=(_arg0); end + end +end + +# source://activesupport//lib/active_support/json/encoding.rb#63 +ActiveSupport::JSON::Encoding::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/json/encoding.rb#72 +ActiveSupport::JSON::Encoding::FULL_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#71 +ActiveSupport::JSON::Encoding::HTML_ENTITIES_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#150 +class ActiveSupport::JSON::Encoding::JSONGemCoderEncoder + # @return [JSONGemCoderEncoder] a new instance of JSONGemCoderEncoder + # + # source://activesupport//lib/active_support/json/encoding.rb#171 + def initialize(options = T.unsafe(nil)); end + + # Encode the given object into a JSON string + # + # source://activesupport//lib/active_support/json/encoding.rb#183 + def encode(value); end +end + +# source://activesupport//lib/active_support/json/encoding.rb#152 +ActiveSupport::JSON::Encoding::JSONGemCoderEncoder::CODER = T.let(T.unsafe(nil), JSON::Coder) + +# source://activesupport//lib/active_support/json/encoding.rb#151 +ActiveSupport::JSON::Encoding::JSONGemCoderEncoder::JSON_NATIVE_TYPES = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/json/encoding.rb#75 +class ActiveSupport::JSON::Encoding::JSONGemEncoder + # @return [JSONGemEncoder] a new instance of JSONGemEncoder + # + # source://activesupport//lib/active_support/json/encoding.rb#78 + def initialize(options = T.unsafe(nil)); end + + # Encode the given object into a JSON string + # + # source://activesupport//lib/active_support/json/encoding.rb#83 + def encode(value); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/json/encoding.rb#76 + def options; end + + private + + # Convert an object into a "JSON-ready" representation composed of + # primitives like Hash, Array, String, Symbol, Numeric, + # and +true+/+false+/+nil+. + # Recursively calls #as_json to the object to recursively build a + # fully JSON-ready object. + # + # This allows developers to implement #as_json without having to + # worry about what base types of objects they are allowed to return + # or having to remember to call #as_json recursively. + # + # Note: the +options+ hash passed to +object.to_json+ is only passed + # to +object.as_json+, not any of this method's recursive +#as_json+ + # calls. + # + # source://activesupport//lib/active_support/json/encoding.rb#118 + def jsonify(value); end + + # Encode a "jsonified" Ruby data structure using the JSON gem + # + # source://activesupport//lib/active_support/json/encoding.rb#143 + def stringify(jsonified); end +end + +# source://activesupport//lib/active_support/json/encoding.rb#73 +ActiveSupport::JSON::Encoding::JS_SEPARATORS_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#60 +ActiveSupport::JSON::Encoding::U2028 = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/json/encoding.rb#61 +ActiveSupport::JSON::Encoding::U2029 = T.let(T.unsafe(nil), String) + +# = Key Generator +# +# KeyGenerator is a simple wrapper around OpenSSL's implementation of PBKDF2. +# It can be used to derive a number of keys for various purposes from a given secret. +# This lets \Rails applications have a single secure secret, but avoid reusing that +# key in multiple incompatible contexts. +# +# source://activesupport//lib/active_support/key_generator.rb#13 +class ActiveSupport::KeyGenerator + # @return [KeyGenerator] a new instance of KeyGenerator + # + # source://activesupport//lib/active_support/key_generator.rb#28 + def initialize(secret, options = T.unsafe(nil)); end + + # Returns a derived key suitable for use. The default +key_size+ is chosen + # to be compatible with the default settings of ActiveSupport::MessageVerifier. + # i.e. OpenSSL::Digest::SHA1#block_length + # + # source://activesupport//lib/active_support/key_generator.rb#41 + def generate_key(salt, key_size = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/key_generator.rb#45 + def inspect; end + + class << self + # source://activesupport//lib/active_support/key_generator.rb#23 + def hash_digest_class; end + + # source://activesupport//lib/active_support/key_generator.rb#15 + def hash_digest_class=(klass); end + end +end + +# = Lazy Load Hooks +# +# LazyLoadHooks allows \Rails to lazily load a lot of components and thus +# making the app boot faster. Because of this feature now there is no need to +# require +ActiveRecord::Base+ at boot time purely to apply +# configuration. Instead a hook is registered that applies configuration once +# +ActiveRecord::Base+ is loaded. Here +ActiveRecord::Base+ is +# used as example but this feature can be applied elsewhere too. +# +# Here is an example where on_load method is called to register a hook. +# +# initializer 'active_record.initialize_timezone' do +# ActiveSupport.on_load(:active_record) do +# self.time_zone_aware_attributes = true +# self.default_timezone = :utc +# end +# end +# +# When the entirety of +ActiveRecord::Base+ has been +# evaluated then run_load_hooks is invoked. The very last line of +# +ActiveRecord::Base+ is: +# +# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) +# +# run_load_hooks will then execute all the hooks that were registered +# with the on_load method. In the case of the above example, it will +# execute the block of code that is in the +initializer+. +# +# Registering a hook that has already run results in that hook executing +# immediately. This allows hooks to be nested for code that relies on +# multiple lazily loaded components: +# +# initializer "action_text.renderer" do +# ActiveSupport.on_load(:action_controller_base) do +# ActiveSupport.on_load(:action_text_content) do +# self.default_renderer = Class.new(ActionController::Base).renderer +# end +# end +# end +# +# source://activesupport//lib/active_support/lazy_load_hooks.rb#43 +module ActiveSupport::LazyLoadHooks + # Declares a block that will be executed when a \Rails component is fully + # loaded. If the component has already loaded, the block is executed + # immediately. + # + # ==== Options + # + # * :yield - Yields the object that run_load_hooks to +block+. + # * :run_once - Given +block+ will run only once. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#60 + def on_load(name, options = T.unsafe(nil), &block); end + + # Executes all blocks registered to +name+ via on_load, using +base+ as the + # evaluation context. + # + # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) + # + # In the case of the above example, it will execute all hooks registered + # for +:active_record+ within the class +ActiveRecord::Base+. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#75 + def run_load_hooks(name, base = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#91 + def execute_hook(name, base, options, block); end + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#83 + def with_execution_control(name, block, once); end + + class << self + # source://activesupport//lib/active_support/lazy_load_hooks.rb#44 + def extended(base); end + end +end + +# = Active Support Log \Subscriber +# +# +ActiveSupport::LogSubscriber+ is an object set to consume +# ActiveSupport::Notifications with the sole purpose of logging them. +# The log subscriber dispatches notifications to a registered object based +# on its given namespace. +# +# An example would be Active Record log subscriber responsible for logging +# queries: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# attach_to :active_record +# +# def sql(event) +# info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}" +# end +# end +# end +# +# ActiveRecord::LogSubscriber.logger must be set as well, but it is assigned +# automatically in a \Rails environment. +# +# After configured, whenever a "sql.active_record" notification is +# published, it will properly dispatch the event +# (ActiveSupport::Notifications::Event) to the +sql+ method. +# +# Being an ActiveSupport::Notifications consumer, +# +ActiveSupport::LogSubscriber+ exposes a simple interface to check if +# instrumented code raises an exception. It is common to log a different +# message in case of an error, and this can be achieved by extending +# the previous example: +# +# module ActiveRecord +# class LogSubscriber < ActiveSupport::LogSubscriber +# def sql(event) +# exception = event.payload[:exception] +# +# if exception +# exception_object = event.payload[:exception_object] +# +# error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \ +# "(#{exception_object.backtrace.first})" +# else +# # standard logger code +# end +# end +# end +# end +# +# +ActiveSupport::LogSubscriber+ also has some helpers to deal with +# logging. For example, ActiveSupport::LogSubscriber.flush_all! will ensure +# that all logs are flushed, and it is called in Rails::Rack::Logger after a +# request finishes. +# +# source://activesupport//lib/active_support/log_subscriber.rb#64 +class ActiveSupport::LogSubscriber < ::ActiveSupport::Subscriber + # @return [LogSubscriber] a new instance of LogSubscriber + # + # source://activesupport//lib/active_support/log_subscriber.rb#133 + def initialize; end + + # source://activesupport//lib/active_support/log_subscriber.rb#146 + def call(event); end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging=(val); end + + # source://activesupport//lib/active_support/log_subscriber.rb#156 + def debug(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#156 + def error(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#152 + def event_levels=(_arg0); end + + # source://activesupport//lib/active_support/log_subscriber.rb#156 + def fatal(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#156 + def info(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#138 + def logger; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/log_subscriber.rb#142 + def silenced?(event); end + + # source://activesupport//lib/active_support/log_subscriber.rb#156 + def unknown(progname = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/log_subscriber.rb#156 + def warn(progname = T.unsafe(nil), &block); end + + private + + # Set color by using a symbol or one of the defined constants. Set modes + # by specifying bold, italic, or underline options. Inspired by Highline, + # this method will automatically clear formatting at the end of the returned String. + # + # source://activesupport//lib/active_support/log_subscriber.rb#166 + def color(text, color, mode_options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/log_subscriber.rb#180 + def log_exception(name, e); end + + # source://activesupport//lib/active_support/log_subscriber.rb#174 + def mode_from(options); end + + class << self + # source://activesupport//lib/active_support/log_subscriber.rb#99 + def attach_to(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging; end + + # source://activesupport//lib/active_support/log_subscriber.rb#83 + def colorize_logging=(val); end + + # Flush all log_subscribers' logger. + # + # source://activesupport//lib/active_support/log_subscriber.rb#112 + def flush_all!; end + + # source://activesupport//lib/active_support/log_subscriber.rb#84 + def log_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#84 + def log_levels=(value); end + + # source://activesupport//lib/active_support/log_subscriber.rb#84 + def log_levels?; end + + # source://activesupport//lib/active_support/log_subscriber.rb#107 + def log_subscribers; end + + # source://activesupport//lib/active_support/log_subscriber.rb#93 + def logger; end + + # Sets the attribute logger + # + # @param value the value to set the attribute logger to. + # + # source://activesupport//lib/active_support/log_subscriber.rb#105 + def logger=(_arg0); end + + private + + # source://activesupport//lib/active_support/log_subscriber.rb#84 + def __class_attr_log_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#84 + def __class_attr_log_levels=(new_value); end + + # source://activesupport//lib/active_support/log_subscriber.rb#117 + def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/log_subscriber.rb#121 + def set_event_levels; end + + # source://activesupport//lib/active_support/log_subscriber.rb#127 + def subscribe_log_level(method, level); end + end +end + +# ANSI sequence colors +# +# source://activesupport//lib/active_support/log_subscriber.rb#74 +ActiveSupport::LogSubscriber::BLACK = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#78 +ActiveSupport::LogSubscriber::BLUE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#80 +ActiveSupport::LogSubscriber::CYAN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#76 +ActiveSupport::LogSubscriber::GREEN = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#86 +ActiveSupport::LogSubscriber::LEVEL_CHECKS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/log_subscriber.rb#79 +ActiveSupport::LogSubscriber::MAGENTA = T.let(T.unsafe(nil), String) + +# ANSI sequence modes +# +# source://activesupport//lib/active_support/log_subscriber.rb#66 +ActiveSupport::LogSubscriber::MODES = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/log_subscriber.rb#75 +ActiveSupport::LogSubscriber::RED = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#81 +ActiveSupport::LogSubscriber::WHITE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/log_subscriber.rb#77 +ActiveSupport::LogSubscriber::YELLOW = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/logger.rb#8 +class ActiveSupport::Logger < ::Logger + include ::ActiveSupport::LoggerSilence + include ::ActiveSupport::LoggerThreadSafeLevel + + # @return [Logger] a new instance of Logger + # + # source://activesupport//lib/active_support/logger.rb#33 + def initialize(*args, **kwargs); end + + # source://activesupport//lib/active_support/logger.rb#9 + def silencer; end + + # source://activesupport//lib/active_support/logger.rb#9 + def silencer=(val); end + + class << self + # Returns true if the logger destination matches one of the sources + # + # logger = Logger.new(STDOUT) + # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT) + # # => true + # + # logger = Logger.new('/var/log/rails.log') + # ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') + # # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/logger.rb#20 + def logger_outputs_to?(logger, *sources); end + + # source://activesupport//lib/active_support/logger.rb#47 + def normalize_sources(sources); end + + # source://activesupport//lib/active_support/logger.rb#9 + def silencer; end + + # source://activesupport//lib/active_support/logger.rb#9 + def silencer=(val); end + end +end + +# Simple formatter which only displays the message. +# +# source://activesupport//lib/active_support/logger.rb#39 +class ActiveSupport::Logger::SimpleFormatter < ::Logger::Formatter + # This method is invoked when a log event occurs + # + # source://activesupport//lib/active_support/logger.rb#41 + def call(severity, timestamp, progname, msg); end +end + +# source://activesupport//lib/active_support/logger_silence.rb#8 +module ActiveSupport::LoggerSilence + extend ::ActiveSupport::Concern + include ::ActiveSupport::LoggerThreadSafeLevel + + # Silences the logger for the duration of the block. + # + # source://activesupport//lib/active_support/logger_silence.rb#17 + def silence(severity = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/logger_thread_safe_level.rb#7 +module ActiveSupport::LoggerThreadSafeLevel + extend ::ActiveSupport::Concern + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#10 + def initialize(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#35 + def level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#15 + def local_level; end + + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#19 + 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#40 + def log_at(level); end + + private + + # Returns the value of attribute local_level_key. + # + # source://activesupport//lib/active_support/logger_thread_safe_level.rb#48 + def local_level_key; end +end + +# = Active Support Message Encryptor +# +# MessageEncryptor is a simple way to encrypt values which get stored +# somewhere you don't trust. +# +# The cipher text and initialization vector are base64 encoded and returned +# to you. +# +# This can be used in situations similar to the MessageVerifier, but +# where you don't want users to be able to determine the value of the payload. +# +# len = ActiveSupport::MessageEncryptor.key_len +# salt = SecureRandom.random_bytes(len) +# key = ActiveSupport::KeyGenerator.new('password').generate_key(salt, len) # => "\x89\xE0\x156\xAC..." +# crypt = ActiveSupport::MessageEncryptor.new(key) # => # +# encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." +# crypt.decrypt_and_verify(encrypted_data) # => "my secret data" +# +# The +decrypt_and_verify+ method will raise an +# +ActiveSupport::MessageEncryptor::InvalidMessage+ exception if the data +# provided cannot be decrypted or verified. +# +# crypt.decrypt_and_verify('not encrypted data') # => ActiveSupport::MessageEncryptor::InvalidMessage +# +# === Confining messages to a specific purpose +# +# By default any message can be used throughout your app. But they can also be +# confined to a specific +:purpose+. +# +# token = crypt.encrypt_and_sign("this is the chair", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# crypt.decrypt_and_verify(token, purpose: :login) # => "this is the chair" +# crypt.decrypt_and_verify(token, purpose: :shipping) # => nil +# crypt.decrypt_and_verify(token) # => nil +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = crypt.encrypt_and_sign("the conversation is lively") +# crypt.decrypt_and_verify(token, purpose: :scare_tactics) # => nil +# crypt.decrypt_and_verify(token) # => "the conversation is lively" +# +# === Making messages expire +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# crypt.encrypt_and_sign(parcel, expires_in: 1.month) +# crypt.encrypt_and_sign(doowad, expires_at: Time.now.end_of_year) +# +# Then the messages can be verified and returned up to the expire time. +# Thereafter, verifying returns +nil+. +# +# === Rotating keys +# +# MessageEncryptor also supports rotating out old configurations by falling +# back to a stack of encryptors. Call +rotate+ to build and add an encryptor +# so +decrypt_and_verify+ will also try the fallback. +# +# By default any rotated encryptors use the values of the primary +# encryptor unless specified otherwise. +# +# You'd give your encryptor the new defaults: +# +# crypt = ActiveSupport::MessageEncryptor.new(@secret, cipher: "aes-256-gcm") +# +# Then gradually rotate the old values out by adding them as fallbacks. Any message +# generated with the old values will then work until the rotation is removed. +# +# crypt.rotate old_secret # Fallback to an old secret instead of @secret. +# crypt.rotate cipher: "aes-256-cbc" # Fallback to an old cipher instead of aes-256-gcm. +# +# Though if both the secret and the cipher was changed at the same time, +# the above should be combined into: +# +# crypt.rotate old_secret, cipher: "aes-256-cbc" +# +# source://activesupport//lib/active_support/message_encryptor.rb#90 +class ActiveSupport::MessageEncryptor < ::ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Rotator + + # Initialize a new MessageEncryptor. +secret+ must be at least as long as + # the cipher key size. For the default 'aes-256-gcm' cipher, this is 256 + # bits. If you are using a user-entered secret, you can generate a suitable + # key by using ActiveSupport::KeyGenerator or a similar key + # derivation function. + # + # The first additional parameter is used as the signature key for + # MessageVerifier. This allows you to specify keys to encrypt and sign + # data. Ignored when using an AEAD cipher like 'aes-256-gcm'. + # + # ActiveSupport::MessageEncryptor.new('secret', 'signature_secret') + # + # ==== Options + # + # [+:cipher+] + # Cipher to use. Can be any cipher returned by +OpenSSL::Cipher.ciphers+. + # Default is 'aes-256-gcm'. + # + # [+:digest+] + # Digest used for signing. Ignored when using an AEAD cipher like + # 'aes-256-gcm'. + # + # [+:serializer+] + # The serializer used to serialize message data. You can specify any + # object that responds to +dump+ and +load+, or you can choose from + # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, + # +:json+, +:message_pack_allow_marshal+, +:message_pack+. + # + # The preconfigured serializers include a fallback mechanism to support + # multiple deserialization formats. For example, the +:marshal+ serializer + # will serialize using +Marshal+, but can deserialize using +Marshal+, + # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy + # to migrate between serializers. + # + # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ + # serializers support deserializing using +Marshal+, but the others do + # not. Beware that +Marshal+ is a potential vector for deserialization + # attacks in cases where a message signing secret has been leaked. If + # possible, choose a serializer that does not support +Marshal+. + # + # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use + # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are + # not supported by JSON, and may provide improved performance. However, + # these require the +msgpack+ gem. + # + # When using \Rails, the default depends on +config.active_support.message_serializer+. + # Otherwise, the default is +:marshal+. + # + # [+:url_safe+] + # By default, MessageEncryptor generates RFC 4648 compliant strings + # which are not URL-safe. In other words, they can contain "+" and "/". + # If you want to generate URL-safe strings (in compliance with "Base 64 + # Encoding with URL and Filename Safe Alphabet" in RFC 4648), you can + # pass +true+. + # + # [+:force_legacy_metadata_serializer+] + # Whether to use the legacy metadata serializer, which serializes the + # message first, then wraps it in an envelope which is also serialized. This + # was the default in \Rails 7.0 and below. + # + # If you don't pass a truthy value, the default is set using + # +config.active_support.use_message_serializer_for_metadata+. + # + # @return [MessageEncryptor] a new instance of MessageEncryptor + # + # source://activesupport//lib/active_support/message_encryptor.rb#183 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/message_encryptor.rb#256 + def create_message(value, **options); end + + # Decrypt and verify a message. We need to verify the message in order to + # avoid padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +decrypt_and_verify+ will return +nil+. + # + # message = encryptor.encrypt_and_sign("hello", purpose: "greeting") + # encryptor.decrypt_and_verify(message, purpose: "greeting") # => "hello" + # encryptor.decrypt_and_verify(message) # => nil + # + # message = encryptor.encrypt_and_sign("bye") + # encryptor.decrypt_and_verify(message) # => "bye" + # encryptor.decrypt_and_verify(message, purpose: "greeting") # => nil + # + # source://activesupport//lib/active_support/message_encryptor.rb#241 + def decrypt_and_verify(message, **options); end + + # Encrypt and sign a message. We need to sign the message in order to avoid + # padding attacks. Reference: https://www.limited-entropy.com/padding-oracle-attacks/. + # + # ==== Options + # + # [+:expires_at+] + # The datetime at which the message expires. After this datetime, + # verification of the message will fail. + # + # message = encryptor.encrypt_and_sign("hello", expires_at: Time.now.tomorrow) + # encryptor.decrypt_and_verify(message) # => "hello" + # # 24 hours later... + # encryptor.decrypt_and_verify(message) # => nil + # + # [+:expires_in+] + # The duration for which the message is valid. After this duration has + # elapsed, verification of the message will fail. + # + # message = encryptor.encrypt_and_sign("hello", expires_in: 24.hours) + # encryptor.decrypt_and_verify(message) # => "hello" + # # 24 hours later... + # encryptor.decrypt_and_verify(message) # => nil + # + # [+:purpose+] + # The purpose of the message. If specified, the same purpose must be + # specified when verifying the message; otherwise, verification will fail. + # (See #decrypt_and_verify.) + # + # source://activesupport//lib/active_support/message_encryptor.rb#220 + def encrypt_and_sign(value, **options); end + + # source://activesupport//lib/active_support/message_encryptor.rb#264 + def inspect; end + + # source://activesupport//lib/active_support/message_encryptor.rb#260 + def read_message(message, on_rotation: T.unsafe(nil), **options); end + + private + + # Returns the value of attribute aead_mode. + # + # source://activesupport//lib/active_support/message_encryptor.rb#371 + def aead_mode; end + + # Returns the value of attribute aead_mode. + # + # source://activesupport//lib/active_support/message_encryptor.rb#372 + def aead_mode?; end + + # source://activesupport//lib/active_support/message_encryptor.rb#295 + def decrypt(encrypted_message); end + + # source://activesupport//lib/active_support/message_encryptor.rb#277 + def encrypt(data); end + + # source://activesupport//lib/active_support/message_encryptor.rb#340 + def extract_part(encrypted_message, rindex, length); end + + # source://activesupport//lib/active_support/message_encryptor.rb#350 + def extract_parts(encrypted_message); end + + # source://activesupport//lib/active_support/message_encryptor.rb#336 + def join_parts(parts); end + + # source://activesupport//lib/active_support/message_encryptor.rb#320 + def length_after_encode(length_before_encode); end + + # source://activesupport//lib/active_support/message_encryptor.rb#332 + def length_of_encoded_auth_tag; end + + # source://activesupport//lib/active_support/message_encryptor.rb#328 + def length_of_encoded_iv; end + + # source://activesupport//lib/active_support/message_encryptor.rb#367 + def new_cipher; end + + # source://activesupport//lib/active_support/message_encryptor.rb#269 + def sign(data); end + + # source://activesupport//lib/active_support/message_encryptor.rb#273 + def verify(data); end + + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#96 + def default_cipher; end + + # Given a cipher, returns the key length of the cipher to help generate the key of desired size + # + # source://activesupport//lib/active_support/message_encryptor.rb#252 + def key_len(cipher = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/message_encryptor.rb#93 + def use_authenticated_message_encryption; end + + # source://activesupport//lib/active_support/message_encryptor.rb#93 + def use_authenticated_message_encryption=(val); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#118 +ActiveSupport::MessageEncryptor::AUTH_TAG_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/message_encryptor.rb#115 +class ActiveSupport::MessageEncryptor::InvalidMessage < ::StandardError; end + +# source://activesupport//lib/active_support/message_encryptor.rb#105 +module ActiveSupport::MessageEncryptor::NullSerializer + class << self + # source://activesupport//lib/active_support/message_encryptor.rb#110 + def dump(value); end + + # source://activesupport//lib/active_support/message_encryptor.rb#106 + def load(value); end + end +end + +# source://activesupport//lib/active_support/message_encryptor.rb#116 +ActiveSupport::MessageEncryptor::OpenSSLCipherError = OpenSSL::Cipher::CipherError + +# source://activesupport//lib/active_support/message_encryptor.rb#119 +ActiveSupport::MessageEncryptor::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/message_encryptors.rb#6 +class ActiveSupport::MessageEncryptors < ::ActiveSupport::Messages::RotationCoordinator + private + + # source://activesupport//lib/active_support/message_encryptors.rb#187 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end + +# = Active Support Message Verifier +# +# +MessageVerifier+ makes it easy to generate and verify messages which are +# signed to prevent tampering. +# +# In a \Rails application, you can use +Rails.application.message_verifier+ +# to manage unique instances of verifiers for each use case. +# {Learn more}[link:classes/Rails/Application.html#method-i-message_verifier]. +# +# This is useful for cases like remember-me tokens and auto-unsubscribe links +# where the session store isn't suitable or available. +# +# First, generate a signed message: +# cookies[:remember_me] = Rails.application.message_verifier(:remember_me).generate([@user.id, 2.weeks.from_now]) +# +# Later verify that message: +# +# id, time = Rails.application.message_verifier(:remember_me).verify(cookies[:remember_me]) +# if time.future? +# self.current_user = User.find(id) +# end +# +# === Signing is not encryption +# +# The signed messages are not encrypted. The payload is merely encoded (Base64 by default) and can be decoded by +# anyone. The signature is just assuring that the message wasn't tampered with. For example: +# +# message = Rails.application.message_verifier('my_purpose').generate('never put secrets here') +# # => "BAhJIhtuZXZlciBwdXQgc2VjcmV0cyBoZXJlBjoGRVQ=--a0c1c0827919da5e949e989c971249355735e140" +# Base64.decode64(message.split("--").first) # no key needed +# # => 'never put secrets here' +# +# If you also need to encrypt the contents, you must use ActiveSupport::MessageEncryptor instead. +# +# === Confine messages to a specific purpose +# +# It's not recommended to use the same verifier for different purposes in your application. +# Doing so could allow a malicious actor to re-use a signed message to perform an unauthorized +# action. +# You can reduce this risk by confining signed messages to a specific +:purpose+. +# +# token = @verifier.generate("signed message", purpose: :login) +# +# Then that same purpose must be passed when verifying to get the data back out: +# +# @verifier.verified(token, purpose: :login) # => "signed message" +# @verifier.verified(token, purpose: :shipping) # => nil +# @verifier.verified(token) # => nil +# +# @verifier.verify(token, purpose: :login) # => "signed message" +# @verifier.verify(token, purpose: :shipping) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# +# Likewise, if a message has no purpose it won't be returned when verifying with +# a specific purpose. +# +# token = @verifier.generate("signed message") +# @verifier.verified(token, purpose: :redirect) # => nil +# @verifier.verified(token) # => "signed message" +# +# @verifier.verify(token, purpose: :redirect) # => raises ActiveSupport::MessageVerifier::InvalidSignature +# @verifier.verify(token) # => "signed message" +# +# === Expiring messages +# +# By default messages last forever and verifying one year from now will still +# return the original value. But messages can be set to expire at a given +# time with +:expires_in+ or +:expires_at+. +# +# @verifier.generate("signed message", expires_in: 1.month) +# @verifier.generate("signed message", expires_at: Time.now.end_of_year) +# +# Messages can then be verified and returned until expiry. +# Thereafter, the +verified+ method returns +nil+ while +verify+ raises +# +ActiveSupport::MessageVerifier::InvalidSignature+. +# +# === Rotating keys +# +# MessageVerifier also supports rotating out old configurations by falling +# back to a stack of verifiers. Call +rotate+ to build and add a verifier so +# either +verified+ or +verify+ will also try verifying with the fallback. +# +# By default any rotated verifiers use the values of the primary +# verifier unless specified otherwise. +# +# You'd give your verifier the new defaults: +# +# verifier = ActiveSupport::MessageVerifier.new(@secret, digest: "SHA512", serializer: JSON) +# +# Then gradually rotate the old values out by adding them as fallbacks. Any message +# generated with the old values will then work until the rotation is removed. +# +# verifier.rotate(old_secret) # Fallback to an old secret instead of @secret. +# verifier.rotate(digest: "SHA256") # Fallback to an old digest instead of SHA512. +# verifier.rotate(serializer: Marshal) # Fallback to an old serializer instead of JSON. +# +# Though the above would most likely be combined into one rotation: +# +# verifier.rotate(old_secret, digest: "SHA256", serializer: Marshal) +# +# source://activesupport//lib/active_support/message_verifier.rb#110 +class ActiveSupport::MessageVerifier < ::ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Rotator + + # Initialize a new MessageVerifier with a secret for the signature. + # + # ==== Options + # + # [+:digest+] + # Digest used for signing. The default is "SHA1". See + # +OpenSSL::Digest+ for alternatives. + # + # [+:serializer+] + # The serializer used to serialize message data. You can specify any + # object that responds to +dump+ and +load+, or you can choose from + # several preconfigured serializers: +:marshal+, +:json_allow_marshal+, + # +:json+, +:message_pack_allow_marshal+, +:message_pack+. + # + # The preconfigured serializers include a fallback mechanism to support + # multiple deserialization formats. For example, the +:marshal+ serializer + # will serialize using +Marshal+, but can deserialize using +Marshal+, + # ActiveSupport::JSON, or ActiveSupport::MessagePack. This makes it easy + # to migrate between serializers. + # + # The +:marshal+, +:json_allow_marshal+, and +:message_pack_allow_marshal+ + # serializers support deserializing using +Marshal+, but the others do + # not. Beware that +Marshal+ is a potential vector for deserialization + # attacks in cases where a message signing secret has been leaked. If + # possible, choose a serializer that does not support +Marshal+. + # + # The +:message_pack+ and +:message_pack_allow_marshal+ serializers use + # ActiveSupport::MessagePack, which can roundtrip some Ruby types that are + # not supported by JSON, and may provide improved performance. However, + # these require the +msgpack+ gem. + # + # When using \Rails, the default depends on +config.active_support.message_serializer+. + # Otherwise, the default is +:marshal+. + # + # [+:url_safe+] + # By default, MessageVerifier generates RFC 4648 compliant strings which are + # not URL-safe. In other words, they can contain "+" and "/". If you want to + # generate URL-safe strings (in compliance with "Base 64 Encoding with URL + # and Filename Safe Alphabet" in RFC 4648), you can pass +true+. + # Note that MessageVerifier will always accept both URL-safe and URL-unsafe + # encoded messages, to allow a smooth transition between the two settings. + # + # [+:force_legacy_metadata_serializer+] + # Whether to use the legacy metadata serializer, which serializes the + # message first, then wraps it in an envelope which is also serialized. This + # was the default in \Rails 7.0 and below. + # + # If you don't pass a truthy value, the default is set using + # +config.active_support.use_message_serializer_for_metadata+. + # + # @raise [ArgumentError] + # @return [MessageVerifier] a new instance of MessageVerifier + # + # source://activesupport//lib/active_support/message_verifier.rb#167 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/message_verifier.rb#310 + def create_message(value, **options); end + + # Generates a signed message for the provided value. + # + # The message is signed with the +MessageVerifier+'s secret. + # Returns Base64-encoded message joined with the generated signature. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # verifier.generate("signed message") # => "BAhJIhNzaWduZWQgbWVzc2FnZQY6BkVU--f67d5f27c3ee0b8483cebf2103757455e947493b" + # + # ==== Options + # + # [+:expires_at+] + # The datetime at which the message expires. After this datetime, + # verification of the message will fail. + # + # message = verifier.generate("hello", expires_at: Time.now.tomorrow) + # verifier.verified(message) # => "hello" + # # 24 hours later... + # verifier.verified(message) # => nil + # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature + # + # [+:expires_in+] + # The duration for which the message is valid. After this duration has + # elapsed, verification of the message will fail. + # + # message = verifier.generate("hello", expires_in: 24.hours) + # verifier.verified(message) # => "hello" + # # 24 hours later... + # verifier.verified(message) # => nil + # verifier.verify(message) # => raises ActiveSupport::MessageVerifier::InvalidSignature + # + # [+:purpose+] + # The purpose of the message. If specified, the same purpose must be + # specified when verifying the message; otherwise, verification will fail. + # (See #verified and #verify.) + # + # source://activesupport//lib/active_support/message_verifier.rb#306 + def generate(value, **options); end + + # source://activesupport//lib/active_support/message_verifier.rb#318 + def inspect; end + + # source://activesupport//lib/active_support/message_verifier.rb#314 + def read_message(message, on_rotation: T.unsafe(nil), **options); end + + # Checks if a signed message could have been generated by signing an object + # with the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed message") + # verifier.valid_message?(signed_message) # => true + # + # tampered_message = signed_message.chop # editing the message invalidates the signature + # verifier.valid_message?(tampered_message) # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#183 + def valid_message?(message); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # + # signed_message = verifier.generate("signed message") + # verifier.verified(signed_message) # => "signed message" + # + # Returns +nil+ if the message was not signed with the same secret. + # + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") + # other_verifier.verified(signed_message) # => nil + # + # Returns +nil+ if the message is not Base64-encoded. + # + # invalid_message = "f--46a0120593880c733a53b6dad75b42ddc1c8996d" + # verifier.verified(invalid_message) # => nil + # + # Raises any error raised while decoding the signed message. + # + # incompatible_message = "test--dad7b06c94abba8d46a15fafaef56c327665d5ff" + # verifier.verified(incompatible_message) # => TypeError: incompatible marshal file format + # + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +verified+ will return +nil+. + # + # message = verifier.generate("hello", purpose: "greeting") + # verifier.verified(message, purpose: "greeting") # => "hello" + # verifier.verified(message, purpose: "chatting") # => nil + # verifier.verified(message) # => nil + # + # message = verifier.generate("bye") + # verifier.verified(message) # => "bye" + # verifier.verified(message, purpose: "greeting") # => nil + # + # source://activesupport//lib/active_support/message_verifier.rb#224 + def verified(message, **options); end + + # Decodes the signed message using the +MessageVerifier+'s secret. + # + # verifier = ActiveSupport::MessageVerifier.new("secret") + # signed_message = verifier.generate("signed message") + # + # verifier.verify(signed_message) # => "signed message" + # + # Raises +InvalidSignature+ if the message was not signed with the same + # secret or was not Base64-encoded. + # + # other_verifier = ActiveSupport::MessageVerifier.new("different_secret") + # other_verifier.verify(signed_message) # => ActiveSupport::MessageVerifier::InvalidSignature + # + # ==== Options + # + # [+:purpose+] + # The purpose that the message was generated with. If the purpose does not + # match, +verify+ will raise ActiveSupport::MessageVerifier::InvalidSignature. + # + # message = verifier.generate("hello", purpose: "greeting") + # verifier.verify(message, purpose: "greeting") # => "hello" + # verifier.verify(message, purpose: "chatting") # => raises InvalidSignature + # verifier.verify(message) # => raises InvalidSignature + # + # message = verifier.generate("bye") + # verifier.verify(message) # => "bye" + # verifier.verify(message, purpose: "greeting") # => raises InvalidSignature + # + # source://activesupport//lib/active_support/message_verifier.rb#262 + def verify(message, **options); end + + private + + # source://activesupport//lib/active_support/message_verifier.rb#323 + def decode(encoded, url_safe: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/message_verifier.rb#356 + def digest_length_in_hex; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#373 + def digest_matches_data?(digest, data); end + + # source://activesupport//lib/active_support/message_verifier.rb#335 + def extract_encoded(signed); end + + # source://activesupport//lib/active_support/message_verifier.rb#352 + def generate_digest(data); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/message_verifier.rb#364 + def separator_at?(signed_message, index); end + + # source://activesupport//lib/active_support/message_verifier.rb#368 + def separator_index_for(signed_message); end + + # source://activesupport//lib/active_support/message_verifier.rb#330 + def sign_encoded(encoded); end +end + +# source://activesupport//lib/active_support/message_verifier.rb#113 +class ActiveSupport::MessageVerifier::InvalidSignature < ::StandardError; end + +# source://activesupport//lib/active_support/message_verifier.rb#115 +ActiveSupport::MessageVerifier::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/message_verifier.rb#116 +ActiveSupport::MessageVerifier::SEPARATOR_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/message_verifiers.rb#6 +class ActiveSupport::MessageVerifiers < ::ActiveSupport::Messages::RotationCoordinator + private + + # source://activesupport//lib/active_support/message_verifiers.rb#185 + def build(salt, secret_generator:, secret_generator_options:, **options); end +end + +# source://activesupport//lib/active_support/messages/rotator.rb#4 +module ActiveSupport::Messages; end + +# source://activesupport//lib/active_support/messages/codec.rb#9 +class ActiveSupport::Messages::Codec + include ::ActiveSupport::Messages::Metadata + + # @return [Codec] a new instance of Codec + # + # source://activesupport//lib/active_support/messages/codec.rb#15 + def initialize(**options); end + + private + + # source://activesupport//lib/active_support/messages/codec.rb#45 + def catch_and_ignore(throwable, &block); end + + # source://activesupport//lib/active_support/messages/codec.rb#52 + def catch_and_raise(throwable, as: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/messages/codec.rb#29 + def decode(encoded, url_safe: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/codec.rb#39 + def deserialize(serialized); end + + # source://activesupport//lib/active_support/messages/codec.rb#25 + def encode(data, url_safe: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/codec.rb#35 + def serialize(data); end + + # Returns the value of attribute serializer. + # + # source://activesupport//lib/active_support/messages/codec.rb#23 + def serializer; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/codec.rb#60 + def use_message_serializer_for_metadata?; end + + class << self + # source://activesupport//lib/active_support/messages/codec.rb#12 + def default_serializer; end + + # source://activesupport//lib/active_support/messages/codec.rb#12 + def default_serializer=(value); end + + private + + # source://activesupport//lib/active_support/messages/codec.rb#12 + def __class_attr_default_serializer; end + + # source://activesupport//lib/active_support/messages/codec.rb#12 + def __class_attr_default_serializer=(new_value); end + end +end + +# source://activesupport//lib/active_support/messages/metadata.rb#9 +module ActiveSupport::Messages::Metadata + private + + # source://activesupport//lib/active_support/messages/metadata.rb#128 + def deserialize_from_json(serialized); end + + # source://activesupport//lib/active_support/messages/metadata.rb#141 + def deserialize_from_json_safe_string(string); end + + # source://activesupport//lib/active_support/messages/metadata.rb#43 + def deserialize_with_metadata(message, **expected_metadata); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#96 + def dual_serialized_metadata_envelope_json?(string); end + + # source://activesupport//lib/active_support/messages/metadata.rb#78 + def extract_from_metadata_envelope(envelope, purpose: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#92 + def metadata_envelope?(object); end + + # source://activesupport//lib/active_support/messages/metadata.rb#114 + def parse_expiry(expires_at); end + + # source://activesupport//lib/active_support/messages/metadata.rb#100 + def pick_expiry(expires_at, expires_in); end + + # source://activesupport//lib/active_support/messages/metadata.rb#124 + def serialize_to_json(data); end + + # source://activesupport//lib/active_support/messages/metadata.rb#137 + def serialize_to_json_safe_string(data); end + + # source://activesupport//lib/active_support/messages/metadata.rb#30 + def serialize_with_metadata(data, **metadata); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/metadata.rb#60 + def use_message_serializer_for_metadata?; end + + # source://activesupport//lib/active_support/messages/metadata.rb#64 + def wrap_in_metadata_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/messages/metadata.rb#71 + def wrap_in_metadata_legacy_envelope(hash, expires_at: T.unsafe(nil), expires_in: T.unsafe(nil), purpose: T.unsafe(nil)); end + + class << self + # source://activesupport//lib/active_support/messages/metadata.rb#10 + def use_message_serializer_for_metadata; end + + # source://activesupport//lib/active_support/messages/metadata.rb#10 + def use_message_serializer_for_metadata=(_arg0); end + end +end + +# source://activesupport//lib/active_support/messages/metadata.rb#12 +ActiveSupport::Messages::Metadata::ENVELOPE_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/messages/metadata.rb#19 +ActiveSupport::Messages::Metadata::TIMESTAMP_SERIALIZERS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/messages/rotation_coordinator.rb#7 +class ActiveSupport::Messages::RotationCoordinator + # @raise [ArgumentError] + # @return [RotationCoordinator] a new instance of RotationCoordinator + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#10 + def initialize(&secret_generator); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#18 + def [](salt); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#22 + def []=(salt, codec); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#48 + def clear_rotations; end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#54 + def on_rotation(&callback); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#35 + def prepend(**options, &block); end + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#26 + def rotate(**options, &block); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#44 + def rotate_defaults; end + + # Returns the value of attribute transitional. + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 + def transitional; end + + # Sets the attribute transitional + # + # @param value the value to set the attribute transitional to. + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#8 + def transitional=(_arg0); end + + private + + # @raise [NotImplementedError] + # + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#97 + def build(salt, secret_generator:, secret_generator_options:, **options); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#85 + def build_with_rotations(salt); end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#60 + def changing_configuration!; end + + # source://activesupport//lib/active_support/messages/rotation_coordinator.rb#71 + def normalize_options(options); end +end + +# source://activesupport//lib/active_support/messages/rotator.rb#5 +module ActiveSupport::Messages::Rotator + # source://activesupport//lib/active_support/messages/rotator.rb#6 + def initialize(*args, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#23 + def fall_back_to(fallback); end + + # source://activesupport//lib/active_support/messages/rotator.rb#18 + def on_rotation(&on_rotation); end + + # source://activesupport//lib/active_support/messages/rotator.rb#28 + def read_message(message, on_rotation: T.unsafe(nil), **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#14 + def rotate(*args, **options); end + + private + + # source://activesupport//lib/active_support/messages/rotator.rb#54 + def build_rotation(*args, **options); end + + # source://activesupport//lib/active_support/messages/rotator.rb#58 + def catch_rotation_error(&block); end + + # source://activesupport//lib/active_support/messages/rotator.rb#48 + def initialize_dup(*_arg0); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#8 +module ActiveSupport::Messages::SerializerWithFallback + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#17 + def load(dumped); end + + private + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#33 + def detect_format(dumped); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#44 + def fallback?(format); end + + class << self + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#9 + def [](format); end + end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#48 +module ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#50 + def fallback?(format); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#78 +module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#90 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#86 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#96 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#82 + def format; end + + private + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#101 + def detect_format(dumped); end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#94 +ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback::JSON_START_WITH = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#107 +module ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal + include ::ActiveSupport::Messages::SerializerWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback::JsonWithFallbackAllowMarshal +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#55 +module ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#67 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#63 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#73 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#59 + def format; end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#71 +ActiveSupport::Messages::SerializerWithFallback::MarshalWithFallback::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#113 +module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#125 + def _load(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#121 + def dump(object); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#129 + def dumped?(dumped); end + + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#117 + def format; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#134 + def available?; end +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#143 +module ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal + include ::ActiveSupport::Messages::SerializerWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + include ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallback + extend ::ActiveSupport::Messages::SerializerWithFallback::AllowMarshal + extend ::ActiveSupport::Messages::SerializerWithFallback::MessagePackWithFallbackAllowMarshal +end + +# source://activesupport//lib/active_support/messages/serializer_with_fallback.rb#149 +ActiveSupport::Messages::SerializerWithFallback::SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/multibyte.rb#4 +module ActiveSupport::Multibyte + class << self + # Returns the current proxy class. + # + # source://activesupport//lib/active_support/multibyte.rb#23 + def proxy_class; end + + # The proxy class returned when calling mb_chars. You can use this accessor + # to configure your own proxy class so you can support other encodings. See + # the ActiveSupport::Multibyte::Chars implementation for an example how to + # do this. + # + # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 + # + # source://activesupport//lib/active_support/multibyte.rb#14 + def proxy_class=(klass); end + end +end + +# = Active Support \Multibyte \Chars +# +# Chars enables you to work transparently with UTF-8 encoding in the Ruby +# String class without having extensive knowledge about the encoding. A +# Chars object accepts a string upon initialization and proxies String +# methods in an encoding safe manner. All the normal String methods are also +# implemented on the proxy. +# +# String methods are proxied through the Chars object, and can be accessed +# through the +mb_chars+ method. Methods which would normally return a +# String object now return a Chars object so methods can be chained. +# +# 'The Perfect String '.mb_chars.downcase.strip +# # => # +# +# Chars objects are perfectly interchangeable with String objects as long as +# no explicit class checks are made. If certain methods do explicitly check +# the class, call +to_s+ before you pass chars objects to them. +# +# bad.explicit_checking_method 'T'.mb_chars.downcase.to_s +# +# The default Chars implementation assumes that the encoding of the string +# is UTF-8, if you want to handle different encodings you can write your own +# multibyte string handler and configure it through +# ActiveSupport::Multibyte.proxy_class. +# +# class CharsForUTF32 +# def size +# @wrapped_string.size / 4 +# end +# +# def self.accepts?(string) +# string.length % 4 == 0 +# end +# end +# +# ActiveSupport::Multibyte.proxy_class = CharsForUTF32 +# +# source://activesupport//lib/active_support/multibyte/chars.rb#47 +class ActiveSupport::Multibyte::Chars + include ::Comparable + + # Creates a new Chars instance by wrapping _string_. + # + # @return [Chars] a new instance of Chars + # + # source://activesupport//lib/active_support/multibyte/chars.rb#56 + def initialize(string, deprecation: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def <=>(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def =~(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def acts_like_string?(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#171 + 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#150 + 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#142 + 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#158 + 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#125 + def limit(limit); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#53 + def match?(*_arg0, **_arg1, &_arg2); end + + # Forward all undefined methods to the wrapped string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#72 + def method_missing(method, *_arg1, **_arg2, &_arg3); end + + # Reverses all characters in the string. + # + # 'Café'.mb_chars.reverse.to_s # => 'éfaC' + # + # source://activesupport//lib/active_support/multibyte/chars.rb#116 + def reverse; end + + # source://activesupport//lib/active_support/multibyte/chars.rb#176 + 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#106 + 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#93 + 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#167 + def tidy_bytes(force = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/multibyte/chars.rb#176 + 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#136 + 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#133 + def titleize; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#50 + def to_s; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#51 + def to_str; end + + # Returns the value of attribute wrapped_string. + # + # source://activesupport//lib/active_support/multibyte/chars.rb#49 + def wrapped_string; end + + private + + # source://activesupport//lib/active_support/multibyte/chars.rb#183 + 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#84 + def respond_to_missing?(method, include_private); end +end + +# source://activesupport//lib/active_support/multibyte/unicode.rb#5 +module ActiveSupport::Multibyte::Unicode + extend ::ActiveSupport::Multibyte::Unicode + + # Compose decomposed characters to the composed form. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#21 + def compose(codepoints); end + + # Decompose composed characters to the decomposed form. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#12 + def decompose(type, codepoints); end + + # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent + # resulting in a valid UTF-8 string. + # + # Passing +true+ will forcibly tidy all bytes, assuming that the string's + # encoding is entirely CP1252 or ISO-8859-1. + # + # source://activesupport//lib/active_support/multibyte/unicode.rb#30 + def tidy_bytes(string, force = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/multibyte/unicode.rb#37 + def recode_windows1252_chars(string); end +end + +# The Unicode version that is supported by the implementation +# +# source://activesupport//lib/active_support/multibyte/unicode.rb#9 +ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# = \Notifications +# +# +ActiveSupport::Notifications+ provides an instrumentation API for +# Ruby. +# +# == Instrumenters +# +# To instrument an event you just need to do: +# +# ActiveSupport::Notifications.instrument('render', extra: :information) do +# render plain: 'Foo' +# end +# +# That first executes the block and then notifies all subscribers once done. +# +# In the example above +render+ is the name of the event, and the rest is called +# the _payload_. The payload is a mechanism that allows instrumenters to pass +# extra information to subscribers. Payloads consist of a hash whose contents +# are arbitrary and generally depend on the event. +# +# == Subscribers +# +# You can consume those events and the information they provide by registering +# a subscriber. +# +# ActiveSupport::Notifications.subscribe('render') do |event| +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# event.allocations # => 1826 (objects) +# end +# +# +Event+ objects record CPU time and allocations. If you don't need this +# it's also possible to pass a block that accepts five arguments: +# +# ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| +# name # => String, name of the event (such as 'render' from above) +# start # => Time, when the instrumented block started execution +# finish # => Time, when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# Here, the +start+ and +finish+ values represent wall-clock time. If you are +# concerned about accuracy, you can register a monotonic subscriber. +# +# ActiveSupport::Notifications.monotonic_subscribe('render') do |name, start, finish, id, payload| +# name # => String, name of the event (such as 'render' from above) +# start # => Float, monotonic time when the instrumented block started execution +# finish # => Float, monotonic time when the instrumented block ended execution +# id # => String, unique ID for the instrumenter that fired the event +# payload # => Hash, the payload +# end +# +# For instance, let's store all "render" events in an array: +# +# events = [] +# +# ActiveSupport::Notifications.subscribe('render') do |event| +# events << event +# end +# +# That code returns right away, you are just subscribing to "render" events. +# The block is saved and will be called whenever someone instruments "render": +# +# ActiveSupport::Notifications.instrument('render', extra: :information) do +# render plain: 'Foo' +# end +# +# event = events.first +# event.name # => "render" +# event.duration # => 10 (in milliseconds) +# event.payload # => { extra: :information } +# event.allocations # => 1826 (objects) +# +# If an exception happens during that particular instrumentation the payload will +# have a key :exception with an array of two elements as value: a string with +# the name of the exception class, and the exception message. +# The :exception_object key of the payload will have the exception +# itself as the value: +# +# event.payload[:exception] # => ["ArgumentError", "Invalid value"] +# event.payload[:exception_object] # => # +# +# As the earlier example depicts, the class ActiveSupport::Notifications::Event +# is able to take the arguments as they come and provide an object-oriented +# interface to that data. +# +# It is also possible to pass an object which responds to call method +# as the second parameter to the subscribe method instead of a block: +# +# module ActionController +# class PageRequest +# def call(name, started, finished, unique_id, payload) +# Rails.logger.debug ['notification:', name, started, finished, unique_id, payload].join(' ') +# end +# end +# end +# +# ActiveSupport::Notifications.subscribe('process_action.action_controller', ActionController::PageRequest.new) +# +# resulting in the following output within the logs including a hash with the payload: +# +# notification: process_action.action_controller 2012-04-13 01:08:35 +0300 2012-04-13 01:08:35 +0300 af358ed7fab884532ec7 { +# controller: "Devise::SessionsController", +# action: "new", +# params: {"action"=>"new", "controller"=>"devise/sessions"}, +# format: :html, +# method: "GET", +# path: "/login/sign_in", +# status: 200, +# view_runtime: 279.3080806732178, +# db_runtime: 40.053 +# } +# +# You can also subscribe to all events whose name matches a certain regexp: +# +# ActiveSupport::Notifications.subscribe(/render/) do |*args| +# ... +# end +# +# and even pass no argument to subscribe, in which case you are subscribing +# to all events. +# +# == Temporary Subscriptions +# +# Sometimes you do not want to subscribe to an event for the entire life of +# the application. There are two ways to unsubscribe. +# +# WARNING: The instrumentation framework is designed for long-running subscribers, +# use this feature sparingly because it wipes some internal caches and that has +# a negative impact on performance. +# +# === Subscribe While a Block Runs +# +# You can subscribe to some event temporarily while some block runs. For +# example, in +# +# callback = lambda {|event| ... } +# ActiveSupport::Notifications.subscribed(callback, "sql.active_record") do +# ... +# end +# +# the callback will be called for all "sql.active_record" events instrumented +# during the execution of the block. The callback is unsubscribed automatically +# after that. +# +# To record +started+ and +finished+ values with monotonic time, +# specify the optional :monotonic option to the +# subscribed method. The :monotonic option is set +# to +false+ by default. +# +# callback = lambda {|name, started, finished, unique_id, payload| ... } +# ActiveSupport::Notifications.subscribed(callback, "sql.active_record", monotonic: true) do +# ... +# end +# +# === Manual Unsubscription +# +# The +subscribe+ method returns a subscriber object: +# +# subscriber = ActiveSupport::Notifications.subscribe("render") do |event| +# ... +# end +# +# To prevent that block from being called anymore, just unsubscribe passing +# that reference: +# +# ActiveSupport::Notifications.unsubscribe(subscriber) +# +# You can also unsubscribe by passing the name of the subscriber object. Note +# that this will unsubscribe all subscriptions with the given name: +# +# ActiveSupport::Notifications.unsubscribe("render") +# +# Subscribers using a regexp or other pattern-matching object will remain subscribed +# to all events that match their original pattern, unless those events match a string +# passed to +unsubscribe+: +# +# subscriber = ActiveSupport::Notifications.subscribe(/render/) { } +# ActiveSupport::Notifications.unsubscribe('render_template.action_view') +# subscriber.matches?('render_template.action_view') # => false +# subscriber.matches?('render_partial.action_view') # => true +# +# == Default Queue +# +# Notifications ships with a queue implementation that consumes and publishes events +# to all log subscribers. You can use any queue implementation you want. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#7 +module ActiveSupport::Notifications + class << self + # source://activesupport//lib/active_support/notifications.rb#208 + def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications.rb#269 + def instrumenter; end + + # Performs the same functionality as #subscribe, but the +start+ and + # +finish+ block arguments are in monotonic time instead of wall-clock + # time. Monotonic time will not jump forward or backward (due to NTP or + # Daylights Savings). Use +monotonic_subscribe+ when accuracy of time + # duration is important. For example, computing elapsed time between + # two events. + # + # source://activesupport//lib/active_support/notifications.rb#254 + def monotonic_subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/notifications.rb#198 + def notifier; end + + # Sets the attribute notifier + # + # @param value the value to set the attribute notifier to. + # + # source://activesupport//lib/active_support/notifications.rb#198 + def notifier=(_arg0); end + + # source://activesupport//lib/active_support/notifications.rb#200 + def publish(name, *args); end + + # source://activesupport//lib/active_support/notifications.rb#204 + def publish_event(event); end + + # Subscribe to a given event name with the passed +block+. + # + # You can subscribe to events by passing a String to match exact event + # names, or by passing a Regexp to match all events that match a pattern. + # + # If the block passed to the method only takes one argument, + # it will yield an +Event+ object to the block: + # + # ActiveSupport::Notifications.subscribe(/render/) do |event| + # @event = event + # end + # + # Otherwise the +block+ will receive five arguments with information + # about the event: + # + # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload| + # name # => String, name of the event (such as 'render' from above) + # start # => Time, when the instrumented block started execution + # finish # => Time, when the instrumented block ended execution + # id # => String, unique ID for the instrumenter that fired the event + # payload # => Hash, the payload + # end + # + # Raises an error if invalid event name type is passed: + # + # ActiveSupport::Notifications.subscribe(:render) {|event| ...} + # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) + # + # source://activesupport//lib/active_support/notifications.rb#244 + def subscribe(pattern = T.unsafe(nil), callback = T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#258 + def subscribed(callback, pattern = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications.rb#265 + def unsubscribe(subscriber_or_name); end + + private + + # source://activesupport//lib/active_support/notifications.rb#274 + def registry; end + end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#106 +class ActiveSupport::Notifications::Event + # @return [Event] a new instance of Event + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#110 + def initialize(name, start, ending, transaction_id, payload); end + + # Returns the number of allocations made between the call to #start! and + # the call to #finish!. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#176 + def allocations; end + + # Returns the CPU time (in milliseconds) passed between the call to + # #start! and the call to #finish!. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#163 + def cpu_time; end + + # Returns the difference in milliseconds between when the execution of the + # event started and when it ended. + # + # ActiveSupport::Notifications.subscribe('wait') do |event| + # @event = event + # end + # + # ActiveSupport::Notifications.instrument('wait') do + # sleep 1 + # end + # + # @event.duration # => 1000.138 + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#198 + def duration; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#128 + def end; end + + # Record information at the time this event finishes + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#154 + def finish!; end + + # Returns the time spent in GC (in milliseconds) between the call to #start! + # and the call to #finish! + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#182 + def gc_time; end + + # Returns the idle time (in milliseconds) passed between the call to + # #start! and the call to #finish!. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#169 + def idle_time; end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 + def name; end + + # Returns the value of attribute payload. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 + def payload; end + + # Sets the attribute payload + # + # @param value the value to set the attribute payload to. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#108 + def payload=(_arg0); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#132 + def record; end + + # Record information at the time this event starts + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#146 + def start!; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#124 + def time; end + + # Returns the value of attribute transaction_id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#107 + def transaction_id; end + + private + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#203 + def now; end + + # Likely on JRuby, TruffleRuby + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#230 + def now_allocations; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#210 + def now_cpu; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#220 + def now_gc; end +end + +# This is a default queue implementation that ships with Notifications. +# It just pushes events to all registered log subscribers. +# +# This class is thread safe. All methods are reentrant. +# +# source://activesupport//lib/active_support/notifications/fanout.rb#55 +class ActiveSupport::Notifications::Fanout + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [Fanout] a new instance of Fanout + # + # source://activesupport//lib/active_support/notifications/fanout.rb#56 + def initialize; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#319 + def all_listeners_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#286 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#106 + def clear_cache(key = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#305 + def finish(name, id, payload, listeners = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#190 + def group_listeners(listeners); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#196 + def groups_for(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#64 + def inspect; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#328 + def listeners_for(name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#332 + def listening?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#311 + def publish(name, *_arg1, **_arg2, &_arg3); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#315 + def publish_event(event); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#298 + def start(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#69 + def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#86 + def unsubscribe(subscriber_or_name); end + + # This is a sync queue, so there is no waiting. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#337 + def wait; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#116 +class ActiveSupport::Notifications::Fanout::BaseGroup + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [BaseGroup] a new instance of BaseGroup + # + # source://activesupport//lib/active_support/notifications/fanout.rb#119 + def initialize(listeners, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#123 + def each(&block); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#128 +class ActiveSupport::Notifications::Fanout::BaseTimeGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#133 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#129 + def start(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#169 +class ActiveSupport::Notifications::Fanout::EventObjectGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#175 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#170 + def start(name, id, payload); end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#185 + def build_event(name, id, payload); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#155 +class ActiveSupport::Notifications::Fanout::EventedGroup < ::ActiveSupport::Notifications::Fanout::BaseGroup + # source://activesupport//lib/active_support/notifications/fanout.rb#162 + def finish(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#156 + def start(name, id, payload); end +end + +# A +Handle+ is used to record the start and finish time of event. +# +# Both #start and #finish must each be called exactly once. +# +# Where possible, it's best to use the block form: ActiveSupport::Notifications.instrument. +# +Handle+ is a low-level API intended for cases where the block form can't be used. +# +# handle = ActiveSupport::Notifications.instrumenter.build_handle("my.event", {}) +# begin +# handle.start +# # work to be instrumented +# ensure +# handle.finish +# end +# +# source://activesupport//lib/active_support/notifications/fanout.rb#230 +class ActiveSupport::Notifications::Fanout::Handle + include ::ActiveSupport::Notifications::FanoutIteration + + # @return [Handle] a new instance of Handle + # + # source://activesupport//lib/active_support/notifications/fanout.rb#233 + def initialize(notifier, name, id, groups, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#250 + def finish; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#254 + def finish_with_values(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#241 + def start; end + + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#264 + def ensure_state!(expected); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#141 +class ActiveSupport::Notifications::Fanout::MonotonicTimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#143 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#271 +module ActiveSupport::Notifications::Fanout::NullHandle + extend ::ActiveSupport::Notifications::Fanout::NullHandle + + # source://activesupport//lib/active_support/notifications/fanout.rb#277 + def finish; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#280 + def finish_with_values(_name, _id, _payload); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#274 + def start; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#340 +module ActiveSupport::Notifications::Fanout::Subscribers + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#341 + def new(pattern, listener, monotonic); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#455 +class ActiveSupport::Notifications::Fanout::Subscribers::EventObject < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#456 + def group_class; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#460 + def publish_event(event); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#397 +class ActiveSupport::Notifications::Fanout::Subscribers::Evented + # @return [Evented] a new instance of Evented + # + # source://activesupport//lib/active_support/notifications/fanout.rb#400 + def initialize(pattern, delegate); end + + # Returns the value of attribute delegate. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#398 + def delegate; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#408 + def group_class; end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#398 + def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#412 + def publish(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#418 + def publish_event(event); end + + # Returns the value of attribute silenceable. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#398 + def silenceable; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#426 + def silenced?(name); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/notifications/fanout.rb#430 + def subscribed_to?(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#434 + def unsubscribe!(name); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#360 +class ActiveSupport::Notifications::Fanout::Subscribers::Matcher + # @return [Matcher] a new instance of Matcher + # + # source://activesupport//lib/active_support/notifications/fanout.rb#373 + def initialize(pattern); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#382 + def ===(name); end + + # Returns the value of attribute exclusions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#361 + def exclusions; end + + # Returns the value of attribute pattern. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#361 + def pattern; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#378 + def unsubscribe!(name); end + + class << self + # source://activesupport//lib/active_support/notifications/fanout.rb#363 + def wrap(pattern); end + end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#386 +class ActiveSupport::Notifications::Fanout::Subscribers::Matcher::AllMessages + # source://activesupport//lib/active_support/notifications/fanout.rb#387 + def ===(name); end + + # source://activesupport//lib/active_support/notifications/fanout.rb#391 + def unsubscribe!(*_arg0); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#449 +class ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed < ::ActiveSupport::Notifications::Fanout::Subscribers::Timed + # source://activesupport//lib/active_support/notifications/fanout.rb#450 + def group_class; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#439 +class ActiveSupport::Notifications::Fanout::Subscribers::Timed < ::ActiveSupport::Notifications::Fanout::Subscribers::Evented + # source://activesupport//lib/active_support/notifications/fanout.rb#440 + def group_class; end + + # source://activesupport//lib/active_support/notifications/fanout.rb#444 + def publish(*_arg0, **_arg1, &_arg2); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#148 +class ActiveSupport::Notifications::Fanout::TimedGroup < ::ActiveSupport::Notifications::Fanout::BaseTimeGroup + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#150 + def now; end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#18 +module ActiveSupport::Notifications::FanoutIteration + private + + # source://activesupport//lib/active_support/notifications/fanout.rb#20 + def iterate_guarding_exceptions(collection, &block); end +end + +# source://activesupport//lib/active_support/notifications/fanout.rb#8 +class ActiveSupport::Notifications::InstrumentationSubscriberError < ::RuntimeError + # @return [InstrumentationSubscriberError] a new instance of InstrumentationSubscriberError + # + # source://activesupport//lib/active_support/notifications/fanout.rb#11 + def initialize(exceptions); end + + # Returns the value of attribute exceptions. + # + # source://activesupport//lib/active_support/notifications/fanout.rb#9 + def exceptions; end +end + +# Instrumenters are stored in a thread local. +# +# source://activesupport//lib/active_support/notifications/instrumenter.rb#9 +class ActiveSupport::Notifications::Instrumenter + # @return [Instrumenter] a new instance of Instrumenter + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#12 + def initialize(notifier); end + + # Returns a "handle" for an event with the given +name+ and +payload+. + # + # #start and #finish must each be called exactly once on the returned object. + # + # Where possible, it's best to use #instrument, which will record the + # start and finish of the event and correctly handle any exceptions. + # +build_handle+ is a low-level API intended for cases where using + # +instrument+ isn't possible. + # + # See ActiveSupport::Notifications::Fanout::Handle. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#78 + def build_handle(name, payload); end + + # Send a finish notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#92 + def finish(name, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#96 + def finish_with_state(listeners_state, name, payload); end + + # Returns the value of attribute id. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#10 + def id; end + + # Given a block, instrument it by measuring the time taken to execute + # and publish it. Without a block, simply send a message via the + # notifier. Notice that events get sent even if an error occurs in the + # passed-in block. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#54 + def instrument(name, payload = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#82 + def new_event(name, payload = T.unsafe(nil)); end + + # Send a start notification with +name+ and +payload+. + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#87 + def start(name, payload); end + + private + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#101 + def unique_id; end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#21 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle + # @return [LegacyHandle] a new instance of LegacyHandle + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#34 + def initialize(notifier, name, id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#45 + def finish; end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#41 + def start; end +end + +# source://activesupport//lib/active_support/notifications/instrumenter.rb#22 +class ActiveSupport::Notifications::Instrumenter::LegacyHandle::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://activesupport//lib/active_support/notifications/instrumenter.rb#23 + def initialize(notifier); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#27 + def build_handle(name, id, payload); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 + def finish(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/notifications/instrumenter.rb#31 + def start(*_arg0, **_arg1, &_arg2); end +end + +# = Number Helper +# +# Provides methods for formatting numbers into currencies, percentages, +# phone numbers, and more. +# +# Example usage in a class: +# class Topic +# include ActiveSupport::NumberHelper +# +# def price +# number_to_currency(@price) +# end +# end +# +# Example usage in a module: +# require "active_support/number_helper" +# +# module NumberFormatting +# def format_price(price) +# ActiveSupport::NumberHelper.number_to_currency(price) +# end +# end +# +# source://activesupport//lib/active_support/number_helper.rb#26 +module ActiveSupport::NumberHelper + extend ::ActiveSupport::Autoload + extend ::ActiveSupport::NumberHelper + + # Formats a +number+ into a currency string. + # + # number_to_currency(1234567890.50) # => "$1,234,567,890.50" + # number_to_currency(1234567890.506) # => "$1,234,567,890.51" + # number_to_currency("12x34") # => "$12x34" + # + # number_to_currency(1234567890.50, unit: "£", separator: ",", delimiter: "") + # # => "£1234567890,50" + # + # The currency unit and number formatting of the current locale will be used + # unless otherwise specified via options. No currency conversion is + # performed. If the user is given a way to change their locale, they will + # also be able to change the relative value of the currency displayed with + # this helper. If your application will ever support multiple locales, you + # may want to specify a constant +:locale+ option or consider using a + # library capable of currency conversion. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_currency(1234567890.506, locale: :fr) + # # => "1 234 567 890,51 €" + # + # [+:precision+] + # The level of precision. Defaults to 2. + # + # number_to_currency(1234567890.123, precision: 3) # => "$1,234,567,890.123" + # number_to_currency(0.456789, precision: 0) # => "$0" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_currency(1234567890.01, precision: 0, round_mode: :up) + # # => "$1,234,567,891" + # + # [+:unit+] + # The denomination of the currency. Defaults to "$". + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:format+] + # The format for non-negative numbers. %u represents the currency, + # and %n represents the number. Defaults to "%u%n". + # + # number_to_currency(1234567890.50, format: "%n %u") + # # => "1,234,567,890.50 $" + # + # [+:negative_format+] + # The format for negative numbers. %u and %n behave the + # same as in +:format+, but %n represents the absolute value of + # the number. Defaults to the value of +:format+ prepended with -. + # + # number_to_currency(-1234567890.50, negative_format: "(%u%n)") + # # => "($1,234,567,890.50)" + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # number_to_currency(1234567890.50, strip_insignificant_zeros: true) + # # => "$1,234,567,890.5" + # + # source://activesupport//lib/active_support/number_helper.rb#161 + def number_to_currency(number, options = T.unsafe(nil)); end + + # Formats +number+ by grouping thousands with a delimiter. + # + # number_to_delimited(12345678) # => "12,345,678" + # number_to_delimited("123456") # => "123,456" + # number_to_delimited(12345678.9876) # => "12,345,678.9876" + # number_to_delimited("12x34") # => "12x34" + # + # number_to_delimited(12345678.9876, delimiter: ".", separator: ",") + # # => "12.345.678,9876" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_delimited(12345678.05, locale: :fr) + # # => "12 345 678,05" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # number_to_delimited(12345678, delimiter: ".") + # # => "12.345.678" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_delimited(12345678.05, separator: " ") + # # => "12,345,678 05" + # + # [+:delimiter_pattern+] + # A regexp to determine the placement of delimiters. Helpful when using + # currency formats like INR. + # + # number_to_delimited("123456.78", delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/) + # # => "1,23,456.78" + # + # source://activesupport//lib/active_support/number_helper.rb#264 + def number_to_delimited(number, options = T.unsafe(nil)); end + + # Formats +number+ into a more human-friendly representation. Useful for + # numbers that can become very large and too hard to read. + # + # number_to_human(123) # => "123" + # number_to_human(1234) # => "1.23 Thousand" + # number_to_human(12345) # => "12.3 Thousand" + # number_to_human(1234567) # => "1.23 Million" + # number_to_human(1234567890) # => "1.23 Billion" + # number_to_human(1234567890123) # => "1.23 Trillion" + # number_to_human(1234567890123456) # => "1.23 Quadrillion" + # number_to_human(1234567890123456789) # => "1230 Quadrillion" + # + # See #number_to_human_size if you want to pretty-print a file size. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # [+:precision+] + # The level of precision. Defaults to 3. + # + # number_to_human(123456, precision: 2) # => "120 Thousand" + # number_to_human(123456, precision: 4) # => "123.5 Thousand" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_human(123456, precision: 2, round_mode: :up) + # # => "130 Thousand" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to true. + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_human(123456, precision: 4, separator: ",") + # # => "123,5 Thousand" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to true. + # + # number_to_human(1000000) # => "1 Million" + # number_to_human(1000000, strip_insignificant_zeros: false) # => "1.00 Million" + # number_to_human(10.01) # => "10" + # number_to_human(10.01, strip_insignificant_zeros: false) # => "10.0" + # + # [+:format+] + # The format of the output. %n represents the number, and + # %u represents the quantifier (e.g., "Thousand"). Defaults to + # "%n %u". + # + # [+:units+] + # A Hash of custom unit quantifier names. + # + # number_to_human(1, units: { unit: "m", thousand: "km" }) # => "1 m" + # number_to_human(100, units: { unit: "m", thousand: "km" }) # => "100 m" + # number_to_human(1000, units: { unit: "m", thousand: "km" }) # => "1 km" + # number_to_human(100000, units: { unit: "m", thousand: "km" }) # => "100 km" + # number_to_human(10000000, units: { unit: "m", thousand: "km" }) # => "10000 km" + # + # The following keys are supported for integer units: +:unit+, +:ten+, + # +:hundred+, +:thousand+, +:million+, +:billion+, +:trillion+, + # +:quadrillion+. Additionally, the following keys are supported for + # fractional units: +:deci+, +:centi+, +:mili+, +:micro+, +:nano+, + # +:pico+, +:femto+. + # + # The Hash can also be defined as a scope in an I18n locale. For example: + # + # en: + # distance: + # centi: + # one: "centimeter" + # other: "centimeters" + # unit: + # one: "meter" + # other: "meters" + # thousand: + # one: "kilometer" + # other: "kilometers" + # + # Then it can be specified by name: + # + # number_to_human(1, units: :distance) # => "1 meter" + # number_to_human(100, units: :distance) # => "100 meters" + # number_to_human(1000, units: :distance) # => "1 kilometer" + # number_to_human(100000, units: :distance) # => "100 kilometers" + # number_to_human(10000000, units: :distance) # => "10000 kilometers" + # number_to_human(0.1, units: :distance) # => "10 centimeters" + # number_to_human(0.01, units: :distance) # => "1 centimeter" + # + # source://activesupport//lib/active_support/number_helper.rb#475 + def number_to_human(number, options = T.unsafe(nil)); end + + # Formats +number+ as bytes into a more human-friendly representation. + # Useful for reporting file sizes to users. + # + # number_to_human_size(123) # => "123 Bytes" + # number_to_human_size(1234) # => "1.21 KB" + # number_to_human_size(12345) # => "12.1 KB" + # number_to_human_size(1234567) # => "1.18 MB" + # number_to_human_size(1234567890) # => "1.15 GB" + # number_to_human_size(1234567890123) # => "1.12 TB" + # number_to_human_size(1234567890123456) # => "1.1 PB" + # number_to_human_size(1234567890123456789) # => "1.07 EB" + # + # See #number_to_human if you want to pretty-print a generic number. + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # [+:precision+] + # The level of precision. Defaults to 3. + # + # number_to_human_size(123456, precision: 2) # => "120 KB" + # number_to_human_size(1234567, precision: 2) # => "1.2 MB" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_human_size(123456, precision: 2, round_mode: :up) + # # => "130 KB" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to true. + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # number_to_human_size(1234567, separator: ",") + # # => "1,18 MB" + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to true. + # + # source://activesupport//lib/active_support/number_helper.rb#373 + def number_to_human_size(number, options = T.unsafe(nil)); end + + # Formats +number+ as a percentage string. + # + # number_to_percentage(100) # => "100.000%" + # number_to_percentage("99") # => "99.000%" + # number_to_percentage("99x") # => "99x%" + # + # number_to_percentage(12345.6789, delimiter: ".", separator: ",", precision: 2) + # # => "12.345,68%" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_percentage(1000, locale: :fr) + # # => "1000,000%" + # + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 2. + # + # number_to_percentage(12.3456789, precision: 4) # => "12.3457%" + # number_to_percentage(99.999, precision: 0) # => "100%" + # number_to_percentage(99.999, precision: nil) # => "99.999%" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_percentage(12.3456789, precision: 4, round_mode: :down) + # # => "12.3456%" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to false. + # + # number_to_percentage(12345.6789) # => "12345.679%" + # number_to_percentage(12345.6789, significant: true) # => "12300%" + # number_to_percentage(12345.6789, precision: 2) # => "12345.68%" + # number_to_percentage(12345.6789, precision: 2, significant: true) # => "12000%" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # [+:format+] + # The format of the output. %n represents the number. Defaults to + # "%n%". + # + # number_to_percentage(100, format: "%n %") + # # => "100.000 %" + # + # source://activesupport//lib/active_support/number_helper.rb#223 + def number_to_percentage(number, options = T.unsafe(nil)); end + + # Formats +number+ into a phone number. + # + # number_to_phone(5551234) # => "555-1234" + # number_to_phone("5551234") # => "555-1234" + # number_to_phone(1235551234) # => "123-555-1234" + # number_to_phone("12x34") # => "12x34" + # + # number_to_phone(1235551234, delimiter: ".", country_code: 1, extension: 1343) + # # => "+1.123.555.1234 x 1343" + # + # ==== Options + # + # [+:area_code+] + # Whether to use parentheses for the area code. Defaults to false. + # + # number_to_phone(1235551234, area_code: true) + # # => "(123) 555-1234" + # + # [+:delimiter+] + # The digit group delimiter to use. Defaults to "-". + # + # number_to_phone(1235551234, delimiter: " ") + # # => "123 555 1234" + # + # [+:country_code+] + # A country code to prepend. + # + # number_to_phone(1235551234, country_code: 1) + # # => "+1-123-555-1234" + # + # [+:extension+] + # An extension to append. + # + # number_to_phone(1235551234, extension: 555) + # # => "123-555-1234 x 555" + # + # [+:pattern+] + # A regexp that specifies how the digits should be grouped. The first + # three captures from the regexp are treated as digit groups. + # + # number_to_phone(13312345678, pattern: /(\d{3})(\d{4})(\d{4})$/) + # # => "133-1234-5678" + # number_to_phone(75561234567, pattern: /(\d{1,4})(\d{4})(\d{4})$/, area_code: true) + # # => "(755) 6123-4567" + # + # source://activesupport//lib/active_support/number_helper.rb#88 + def number_to_phone(number, options = T.unsafe(nil)); end + + # Formats +number+ to a specific level of precision. + # + # number_to_rounded(12345.6789) # => "12345.679" + # number_to_rounded(12345.6789, precision: 2) # => "12345.68" + # number_to_rounded(12345.6789, precision: 0) # => "12345" + # number_to_rounded(12345, precision: 5) # => "12345.00000" + # + # ==== Options + # + # [+:locale+] + # The locale to use for formatting. Defaults to the current locale. + # + # number_to_rounded(111.234, locale: :fr) + # # => "111,234" + # + # [+:precision+] + # The level of precision, or +nil+ to preserve +number+'s precision. + # Defaults to 3. + # + # number_to_rounded(12345.6789, precision: nil) + # # => "12345.6789" + # + # [+:round_mode+] + # Specifies how rounding is performed. See +BigDecimal.mode+. Defaults to + # +:default+. + # + # number_to_rounded(12.34, precision: 0, round_mode: :up) + # # => "13" + # + # [+:significant+] + # Whether +:precision+ should be applied to significant digits instead of + # fractional digits. Defaults to false. + # + # number_to_rounded(12345.6789) # => "12345.679" + # number_to_rounded(12345.6789, significant: true) # => "12300" + # number_to_rounded(12345.6789, precision: 2) # => "12345.68" + # number_to_rounded(12345.6789, precision: 2, significant: true) # => "12000" + # + # [+:separator+] + # The decimal separator. Defaults to ".". + # + # [+:delimiter+] + # The thousands delimiter. Defaults to ",". + # + # [+:strip_insignificant_zeros+] + # Whether to remove insignificant zeros after the decimal separator. + # Defaults to false. + # + # number_to_rounded(12.34, strip_insignificant_zeros: false) # => "12.340" + # number_to_rounded(12.34, strip_insignificant_zeros: true) # => "12.34" + # number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346" + # + # source://activesupport//lib/active_support/number_helper.rb#320 + def number_to_rounded(number, options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/number_helper/number_converter.rb#12 +class ActiveSupport::NumberHelper::NumberConverter + # @return [NumberConverter] a new instance of NumberConverter + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#124 + def initialize(number, options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#130 + def execute; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace?; end + + # Returns the value of attribute number. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 + def number; end + + # Returns the value of attribute opts. + # + # source://activesupport//lib/active_support/number_helper/number_converter.rb#19 + def opts; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float=(_arg0); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float?; end + + private + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#149 + def default_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#174 + def default_value(key); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#145 + def format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#155 + def i18n_format_options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#141 + def options; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#170 + def translate_in_locale(key, **i18n_options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#166 + def translate_number_value_with_default(key, **i18n_options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#178 + def valid_bigdecimal; end + + class << self + # source://activesupport//lib/active_support/number_helper/number_converter.rb#120 + def convert(number, options); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace=(value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def namespace?; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float=(value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def validate_float?; end + + private + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def __class_attr_namespace; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#14 + def __class_attr_namespace=(new_value); end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def __class_attr_validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_converter.rb#17 + def __class_attr_validate_float=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_converter.rb#21 +ActiveSupport::NumberHelper::NumberConverter::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToCurrencyConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#10 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#38 + def i18n_opts; end + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#29 + def options; end + + class << self + private + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#8 + def __class_attr_namespace; end + + # source://activesupport//lib/active_support/number_helper/number_to_currency_converter.rb#8 + def __class_attr_namespace=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToDelimitedConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#12 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#25 + def delimiter_pattern; end + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#17 + def parts; end + + class << self + private + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#8 + def __class_attr_validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#8 + def __class_attr_validate_float=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_delimited_converter.rb#10 +ActiveSupport::NumberHelper::NumberToDelimitedConverter::DEFAULT_DELIMITER_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToHumanConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#15 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#50 + def calculate_exponent(units); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#38 + def determine_unit(units, exponent); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#34 + def format; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#55 + def unit_exponents(units); end + + class << self + private + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#12 + def __class_attr_namespace; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#12 + def __class_attr_namespace=(new_value); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#13 + def __class_attr_validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#13 + def __class_attr_validate_float=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#8 +ActiveSupport::NumberHelper::NumberToHumanConverter::DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_human_converter.rb#10 +ActiveSupport::NumberHelper::NumberToHumanConverter::INVERTED_DECIMAL_UNITS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToHumanSizeConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#13 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#55 + def base; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#31 + def conversion_format; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#44 + def exponent; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#51 + def smaller_than_base?; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#39 + def storage_unit_key; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#35 + def unit; end + + class << self + private + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#10 + def __class_attr_namespace; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#10 + def __class_attr_namespace=(new_value); end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#11 + def __class_attr_validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#11 + def __class_attr_validate_float=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_human_size_converter.rb#8 +ActiveSupport::NumberHelper::NumberToHumanSizeConverter::STORAGE_UNITS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToPercentageConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#10 + def convert; end + + class << self + private + + # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#8 + def __class_attr_namespace; end + + # source://activesupport//lib/active_support/number_helper/number_to_percentage_converter.rb#8 + def __class_attr_namespace=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#8 +class ActiveSupport::NumberHelper::NumberToPhoneConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#9 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#16 + def convert_to_phone_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#24 + def convert_with_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#31 + def convert_without_area_code(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#47 + def country_code(code); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#43 + def delimiter; end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#51 + def phone_ext(ext); end + + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#55 + def regexp_pattern(default_pattern); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/number_helper/number_to_phone_converter.rb#39 + def start_with_delimiter?(number); end +end + +# source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#7 +class ActiveSupport::NumberHelper::NumberToRoundedConverter < ::ActiveSupport::NumberHelper::NumberConverter + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#11 + def convert; end + + private + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#49 + def format_number(number); end + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#45 + def strip_insignificant_zeros; end + + class << self + private + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#8 + def __class_attr_namespace; end + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#8 + def __class_attr_namespace=(new_value); end + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#9 + def __class_attr_validate_float; end + + # source://activesupport//lib/active_support/number_helper/number_to_rounded_converter.rb#9 + def __class_attr_validate_float=(new_value); end + end +end + +# source://activesupport//lib/active_support/number_helper/rounding_helper.rb#5 +class ActiveSupport::NumberHelper::RoundingHelper + # @return [RoundingHelper] a new instance of RoundingHelper + # + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#8 + def initialize(options); end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#20 + def digit_count(number); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#6 + def options; end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#12 + def round(number); end + + private + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#37 + def absolute_precision(number); end + + # source://activesupport//lib/active_support/number_helper/rounding_helper.rb#26 + def convert_to_decimal(number); end +end + +# source://activesupport//lib/active_support/option_merger.rb#6 +class ActiveSupport::OptionMerger + # @return [OptionMerger] a new instance of OptionMerger + # + # source://activesupport//lib/active_support/option_merger.rb#11 + def initialize(context, options); end + + private + + # source://activesupport//lib/active_support/option_merger.rb#16 + def method_missing(method, *arguments, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/option_merger.rb#34 + def respond_to_missing?(*_arg0, **_arg1, &_arg2); end +end + +# DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves +# insertion order. +# +# oh = ActiveSupport::OrderedHash.new +# oh[:a] = 1 +# oh[:b] = 2 +# oh.keys # => [:a, :b], this order is guaranteed +# +# Also, maps the +omap+ feature for YAML files +# (See https://yaml.org/type/omap.html) to support ordered items +# when loading from YAML. +# +# +ActiveSupport::OrderedHash+ is namespaced to prevent conflicts +# with other implementations. +# +# source://activesupport//lib/active_support/ordered_hash.rb#24 +class ActiveSupport::OrderedHash < ::Hash + # source://activesupport//lib/active_support/ordered_hash.rb#29 + def encode_with(coder); end + + # Returns true to make sure that this hash is extractable via Array#extract_options! + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_hash.rb#46 + def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_hash.rb#41 + def nested_under_indifferent_access; end + + # source://activesupport//lib/active_support/ordered_hash.rb#37 + def reject(*args, &block); end + + # source://activesupport//lib/active_support/ordered_hash.rb#33 + def select(*args, &block); end + + # source://activesupport//lib/active_support/ordered_hash.rb#25 + def to_yaml_type; end +end + +# = Ordered Options +# +# +OrderedOptions+ inherits from +Hash+ and provides dynamic accessor methods. +# +# With a +Hash+, key-value pairs are typically managed like this: +# +# h = {} +# h[:boy] = 'John' +# h[:girl] = 'Mary' +# h[:boy] # => 'John' +# h[:girl] # => 'Mary' +# h[:dog] # => nil +# +# Using +OrderedOptions+, the above code can be written as: +# +# h = ActiveSupport::OrderedOptions.new +# h.boy = 'John' +# h.girl = 'Mary' +# h.boy # => 'John' +# h.girl # => 'Mary' +# h.dog # => nil +# +# To raise an exception when the value is blank, append a +# bang to the key name, like: +# +# h.dog! # => raises KeyError: :dog is blank +# +# source://activesupport//lib/active_support/ordered_options.rb#33 +class ActiveSupport::OrderedOptions < ::Hash + # source://activesupport//lib/active_support/ordered_options.rb#41 + def [](key); end + + # source://activesupport//lib/active_support/ordered_options.rb#37 + def []=(key, value); end + + # source://activesupport//lib/active_support/ordered_options.rb#45 + def dig(key, *identifiers); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#64 + def extractable_options?; end + + # source://activesupport//lib/active_support/ordered_options.rb#68 + def inspect; end + + # source://activesupport//lib/active_support/ordered_options.rb#49 + def method_missing(method, *args); end + + protected + + # preserve the original #[] method + # + # source://activesupport//lib/active_support/ordered_options.rb#34 + def _get(_arg0); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/ordered_options.rb#60 + def respond_to_missing?(name, include_private); end +end + +# = Active Support Parameter Filter +# +# +ParameterFilter+ replaces values in a Hash-like object if their +# keys match one of the specified filters. +# +# Matching based on nested keys is possible by using dot notation, e.g. +# "credit_card.number". +# +# If a proc is given as a filter, each key and value of the Hash-like +# and of any nested Hashes will be passed to it. The value or key can +# then be mutated as desired using methods such as String#replace. +# +# # Replaces values with "[FILTERED]" for keys that match /password/i. +# ActiveSupport::ParameterFilter.new([:password]) +# +# # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. +# ActiveSupport::ParameterFilter.new([:foo, "bar"]) +# +# # Replaces values for the exact key "pin" and for keys that begin with +# # "pin_". Does not match keys that otherwise include "pin" as a +# # substring, such as "shipping_id". +# ActiveSupport::ParameterFilter.new([/\Apin\z/, /\Apin_/]) +# +# # Replaces the value for :code in `{ credit_card: { code: "xxxx" } }`. +# # Does not change `{ file: { code: "xxxx" } }`. +# ActiveSupport::ParameterFilter.new(["credit_card.code"]) +# +# # Reverses values for keys that match /secret/i. +# ActiveSupport::ParameterFilter.new([-> (k, v) do +# v.reverse! if /secret/i.match?(k) +# end]) +# +# source://activesupport//lib/active_support/parameter_filter.rb#39 +class ActiveSupport::ParameterFilter + # Create instance with given filters. Supported type of filters are +String+, +Regexp+, and +Proc+. + # Other types of filters are treated as +String+ using +to_s+. + # For +Proc+ filters, key, value, and optional original hash is passed to block arguments. + # + # ==== Options + # + # * :mask - A replaced object when filtered. Defaults to "[FILTERED]". + # + # @return [ParameterFilter] a new instance of ParameterFilter + # + # source://activesupport//lib/active_support/parameter_filter.rb#77 + def initialize(filters = T.unsafe(nil), mask: T.unsafe(nil)); end + + # Mask value of +params+ if key matches one of filters. + # + # source://activesupport//lib/active_support/parameter_filter.rb#83 + def filter(params); end + + # Returns filtered value for given key. For +Proc+ filters, third block argument is not populated. + # + # source://activesupport//lib/active_support/parameter_filter.rb#88 + def filter_param(key, value); end + + private + + # source://activesupport//lib/active_support/parameter_filter.rb#125 + def call(params, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/parameter_filter.rb#93 + def compile_filters!(filters); end + + # source://activesupport//lib/active_support/parameter_filter.rb#135 + def value_for_key(key, value, full_parent_key = T.unsafe(nil), original_params = T.unsafe(nil)); end + + class << self + # Precompiles an array of filters that otherwise would be passed directly to + # #initialize. Depending on the quantity and types of filters, + # precompilation can improve filtering performance, especially in the case + # where the ParameterFilter instance itself cannot be retained (but the + # precompiled filters can be retained). + # + # filters = [/foo/, :bar, "nested.baz", /nested\.qux/] + # + # precompiled = ActiveSupport::ParameterFilter.precompile_filters(filters) + # # => [/(?-mix:foo)|(?i:bar)/, /(?i:nested\.baz)|(?-mix:nested\.qux)/] + # + # ActiveSupport::ParameterFilter.new(precompiled) + # + # source://activesupport//lib/active_support/parameter_filter.rb#55 + def precompile_filters(filters); end + end +end + +# source://activesupport//lib/active_support/parameter_filter.rb#40 +ActiveSupport::ParameterFilter::FILTERED = T.let(T.unsafe(nil), String) + +# = Active Support \Reloader +# +# This class defines several callbacks: +# +# to_prepare -- Run once at application startup, and also from +# +to_run+. +# +# to_run -- Run before a work run that is reloading. If +# +reload_classes_only_on_change+ is true (the default), the class +# unload will have already occurred. +# +# to_complete -- Run after a work run that has reloaded. If +# +reload_classes_only_on_change+ is false, the class unload will +# have occurred after the work run, but before this callback. +# +# before_class_unload -- Run immediately before the classes are +# unloaded. +# +# after_class_unload -- Run immediately after the classes are +# unloaded. +# +# source://activesupport//lib/active_support/reloader.rb#28 +class ActiveSupport::Reloader < ::ActiveSupport::ExecutionWrapper + # @return [Reloader] a new instance of Reloader + # + # source://activesupport//lib/active_support/reloader.rb#99 + def initialize; end + + # source://activesupport//lib/active_support/reloader.rb#31 + def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#29 + def _prepare_callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#31 + def _run_class_unload_callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#31 + def _run_class_unload_callbacks!(&block); end + + # source://activesupport//lib/active_support/reloader.rb#29 + def _run_prepare_callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#29 + def _run_prepare_callbacks!(&block); end + + # source://activesupport//lib/active_support/reloader.rb#48 + def _run_run_callbacks(&block); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check; end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check?; end + + # source://activesupport//lib/active_support/reloader.rb#126 + def class_unload!(&block); end + + # source://activesupport//lib/active_support/reloader.rb#131 + def complete!; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor=(_arg0); end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor?; end + + # Release the unload lock if it has been previously obtained + # + # source://activesupport//lib/active_support/reloader.rb#114 + def release_unload_lock!; end + + # Acquire the ActiveSupport::Dependencies::Interlock unload lock, + # ensuring it will be released automatically + # + # source://activesupport//lib/active_support/reloader.rb#106 + def require_unload_lock!; end + + # source://activesupport//lib/active_support/reloader.rb#121 + def run!; end + + class << self + # source://activesupport//lib/active_support/reloader.rb#31 + def _class_unload_callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#31 + def _class_unload_callbacks=(value); end + + # source://activesupport//lib/active_support/reloader.rb#29 + def _prepare_callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#29 + def _prepare_callbacks=(value); end + + # Registers a callback that will run immediately after the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#44 + def after_class_unload(*args, &block); end + + # Registers a callback that will run immediately before the classes are unloaded. + # + # source://activesupport//lib/active_support/reloader.rb#39 + def before_class_unload(*args, &block); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check; end + + # source://activesupport//lib/active_support/reloader.rb#87 + def check!; end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check=(value); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def check?; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor=(value); end + + # source://activesupport//lib/active_support/reloader.rb#84 + def executor?; end + + # source://activesupport//lib/active_support/reloader.rb#95 + def prepare!; end + + # Initiate a manual reload + # + # source://activesupport//lib/active_support/reloader.rb#51 + def reload!; end + + # source://activesupport//lib/active_support/reloader.rb#91 + def reloaded!; end + + # source://activesupport//lib/active_support/reloader.rb#62 + def run!(reset: T.unsafe(nil)); end + + # Registers a callback that will run once at application startup and every time the code is reloaded. + # + # source://activesupport//lib/active_support/reloader.rb#34 + def to_prepare(*args, &block); end + + # Run the supplied block as a work unit, reloading code as needed + # + # source://activesupport//lib/active_support/reloader.rb#71 + def wrap(**kwargs); end + + private + + # source://activesupport//lib/active_support/reloader.rb#29 + def __class_attr___callbacks; end + + # source://activesupport//lib/active_support/reloader.rb#29 + def __class_attr___callbacks=(new_value); end + + # source://activesupport//lib/active_support/reloader.rb#85 + def __class_attr_check; end + + # source://activesupport//lib/active_support/reloader.rb#85 + def __class_attr_check=(new_value); end + + # source://activesupport//lib/active_support/reloader.rb#84 + def __class_attr_executor; end + + # source://activesupport//lib/active_support/reloader.rb#84 + def __class_attr_executor=(new_value); end + end +end + +# = Active Support \Rescuable +# +# Rescuable module adds support for easier exception handling. +# +# source://activesupport//lib/active_support/rescuable.rb#11 +module ActiveSupport::Rescuable + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + mixes_in_class_methods ::ActiveSupport::Rescuable::ClassMethods + + # Internal handler lookup. Delegates to class method. Some libraries call + # this directly, so keeping it around for compatibility. + # + # source://activesupport//lib/active_support/rescuable.rb#172 + def handler_for_rescue(exception); end + + # Delegates to the class method, but uses the instance as the subject for + # rescue_from handlers (method calls, +instance_exec+ blocks). + # + # source://activesupport//lib/active_support/rescuable.rb#166 + def rescue_with_handler(exception); end + + module GeneratedClassMethods + def rescue_handlers; end + def rescue_handlers=(value); end + def rescue_handlers?; end + end + + module GeneratedInstanceMethods + def rescue_handlers; end + def rescue_handlers=(value); end + def rescue_handlers?; end + end +end + +# source://activesupport//lib/active_support/rescuable.rb#18 +module ActiveSupport::Rescuable::ClassMethods + # source://activesupport//lib/active_support/rescuable.rb#105 + def handler_for_rescue(exception, object: T.unsafe(nil)); end + + # Registers exception classes with a handler to be called by rescue_with_handler. + # + # rescue_from receives a series of exception classes or class + # names, and an exception handler specified by a trailing :with + # option containing the name of a method or a Proc object. Alternatively, a block + # can be given as the handler. + # + # Handlers that take one argument will be called with the exception, so + # that the exception can be inspected when dealing with it. + # + # Handlers are inherited. They are searched from right to left, from + # bottom to top, and up the hierarchy. The handler of the first class for + # which exception.is_a?(klass) holds true is the one invoked, if + # any. + # + # class ApplicationController < ActionController::Base + # rescue_from User::NotAuthorized, with: :deny_access + # rescue_from ActiveRecord::RecordInvalid, with: :show_record_errors + # + # rescue_from "MyApp::BaseError" do |exception| + # redirect_to root_url, alert: exception.message + # end + # + # private + # def deny_access + # head :forbidden + # end + # + # def show_record_errors(exception) + # redirect_back_or_to root_url, alert: exception.record.errors.full_messages.to_sentence + # end + # end + # + # Exceptions raised inside exception handlers are not propagated up. + # + # source://activesupport//lib/active_support/rescuable.rb#53 + def rescue_from(*klasses, with: T.unsafe(nil), &block); end + + # Matches an exception to a handler based on the exception class. + # + # If no handler matches the exception, check for a handler matching the + # (optional) +exception.cause+. If no handler matches the exception or its + # cause, this returns +nil+, so you can deal with unhandled exceptions. + # Be sure to re-raise unhandled exceptions if this is what you expect. + # + # begin + # # ... + # rescue => exception + # rescue_with_handler(exception) || raise + # end + # + # Returns the exception if it was handled and +nil+ if it was not. + # + # source://activesupport//lib/active_support/rescuable.rb#90 + def rescue_with_handler(exception, object: T.unsafe(nil), visited_exceptions: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/rescuable.rb#139 + def constantize_rescue_handler_class(class_or_name); end + + # source://activesupport//lib/active_support/rescuable.rb#124 + def find_rescue_handler(exception); end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#19 +class ActiveSupport::SafeBuffer < ::String + # @return [SafeBuffer] a new instance of SafeBuffer + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#70 + def initialize(_str = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#124 + def %(args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#115 + def *(_); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#111 + def +(other); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#85 + def <<(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#38 + def [](*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#103 + def []=(arg1, arg2, arg3 = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#143 + def as_json(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#87 + def bytesplice(*args, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def capitalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def capitalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def chomp(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def chomp!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def chop(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def chop!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#59 + def chr; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#79 + def concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete_prefix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete_prefix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete_suffix(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def delete_suffix!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def downcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def downcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#151 + def encode_with(coder); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#171 + def gsub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#171 + def gsub!(*args, &block); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#135 + def html_safe?; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#91 + def insert(index, value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def lstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def lstrip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def next(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def next!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#95 + def prepend(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#99 + def replace(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def reverse(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def reverse!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def rstrip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def rstrip!(*args); end + + # @raise [SafeConcatError] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#65 + def safe_concat(value); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def scrub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def scrub!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#49 + def slice(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#51 + def slice!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def squeeze(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def squeeze!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def strip(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def strip!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#171 + def sub(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#171 + def sub!(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def succ(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def succ!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def swapcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def swapcase!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#147 + def to_param; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#139 + def to_s; end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def tr(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def tr!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def tr_s(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def tr_s!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def unicode_normalize(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def unicode_normalize!(*args); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def upcase(*args, &block); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#157 + def upcase!(*args); end + + private + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#198 + def explicit_html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#202 + def implicit_html_escape_interpolated_argument(arg); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#74 + def initialize_copy(other); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#28 + def original_concat(*_arg0); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#210 + def set_block_back_references(block, match_data); end + + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#216 + def string_into_safe_buffer(new_string, is_html_safe); end +end + +# Raised when ActiveSupport::SafeBuffer#safe_concat is called on unsafe buffers. +# +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#32 +class ActiveSupport::SafeBuffer::SafeConcatError < ::StandardError + # @return [SafeConcatError] a new instance of SafeConcatError + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#33 + def initialize; end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#20 +ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#26 +ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS_WITH_BACKREF = T.let(T.unsafe(nil), Array) + +# = Secure Compare Rotator +# +# The ActiveSupport::SecureCompareRotator is a wrapper around ActiveSupport::SecurityUtils.secure_compare +# and allows you to rotate a previously defined value to a new one. +# +# It can be used as follow: +# +# rotator = ActiveSupport::SecureCompareRotator.new('new_production_value') +# rotator.rotate('previous_production_value') +# rotator.secure_compare!('previous_production_value') +# +# One real use case example would be to rotate a basic auth credentials: +# +# class MyController < ApplicationController +# def authenticate_request +# rotator = ActiveSupport::SecureCompareRotator.new('new_password') +# rotator.rotate('old_password') +# +# authenticate_or_request_with_http_basic do |username, password| +# rotator.secure_compare!(password) +# rescue ActiveSupport::SecureCompareRotator::InvalidMatch +# false +# end +# end +# end +# +# source://activesupport//lib/active_support/secure_compare_rotator.rb#32 +class ActiveSupport::SecureCompareRotator + include ::ActiveSupport::SecurityUtils + + # @return [SecureCompareRotator] a new instance of SecureCompareRotator + # + # source://activesupport//lib/active_support/secure_compare_rotator.rb#37 + def initialize(value, on_rotation: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#43 + def rotate(previous_value); end + + # source://activesupport//lib/active_support/secure_compare_rotator.rb#47 + def secure_compare!(other_value, on_rotation: T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/secure_compare_rotator.rb#35 +class ActiveSupport::SecureCompareRotator::InvalidMatch < ::StandardError; end + +# source://activesupport//lib/active_support/security_utils.rb#4 +module ActiveSupport::SecurityUtils + private + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/security_utils.rb#11 + def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://activesupport//lib/active_support/security_utils.rb#33 + def secure_compare(a, b); end + + class << self + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/security_utils.rb#25 + 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#36 + def secure_compare(a, b); end + end +end + +# = \String Inquirer +# +# Wrapping a string in this class gives you a prettier way to test +# for equality. The value returned by Rails.env is wrapped +# in a StringInquirer object, so instead of calling this: +# +# Rails.env == 'production' +# +# you can call this: +# +# Rails.env.production? +# +# == Instantiating a new \StringInquirer +# +# vehicle = ActiveSupport::StringInquirer.new('car') +# vehicle.car? # => true +# vehicle.bike? # => false +# +# source://activesupport//lib/active_support/string_inquirer.rb#21 +class ActiveSupport::StringInquirer < ::String + private + + # source://activesupport//lib/active_support/string_inquirer.rb#27 + def method_missing(method_name, *_arg1, **_arg2, &_arg3); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/string_inquirer.rb#23 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# = Active Support Structured Event \Subscriber +# +# +ActiveSupport::StructuredEventSubscriber+ consumes ActiveSupport::Notifications +# in order to emit structured events via +Rails.event+. +# +# An example would be the Action Controller structured event subscriber, responsible for +# emitting request processing events: +# +# module ActionController +# class StructuredEventSubscriber < ActiveSupport::StructuredEventSubscriber +# attach_to :action_controller +# +# def start_processing(event) +# emit_event("controller.request_started", +# controller: event.payload[:controller], +# action: event.payload[:action], +# format: event.payload[:format] +# ) +# end +# end +# end +# +# After configured, whenever a "start_processing.action_controller" notification is published, +# it will properly dispatch the event (+ActiveSupport::Notifications::Event+) to the +start_processing+ method. +# The subscriber can then emit a structured event via the +emit_event+ method. +# +# source://activesupport//lib/active_support/structured_event_subscriber.rb#31 +class ActiveSupport::StructuredEventSubscriber < ::ActiveSupport::Subscriber + # @return [StructuredEventSubscriber] a new instance of StructuredEventSubscriber + # + # source://activesupport//lib/active_support/structured_event_subscriber.rb#56 + def initialize; end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#88 + def call(event); end + + # Like +emit_event+, but only emits when the event reporter is in debug mode + # + # source://activesupport//lib/active_support/structured_event_subscriber.rb#82 + def emit_debug_event(name, payload = T.unsafe(nil), caller_depth: T.unsafe(nil), **kwargs); end + + # Emit a structured event via Rails.event.notify. + # + # ==== Arguments + # + # * +name+ - The event name as a string or symbol + # * +payload+ - The event payload as a hash or object + # * +caller_depth+ - Stack depth for source location (default: 1) + # * +kwargs+ - Additional payload data merged with the payload hash + # + # source://activesupport//lib/active_support/structured_event_subscriber.rb#75 + def emit_event(name, payload = T.unsafe(nil), caller_depth: T.unsafe(nil), **kwargs); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/structured_event_subscriber.rb#61 + def silenced?(event); end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#65 + def silenced_events=(_arg0); end + + private + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#95 + def handle_event_error(name, error); end + + class << self + # source://activesupport//lib/active_support/structured_event_subscriber.rb#37 + def attach_to(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#32 + def debug_methods; end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#32 + def debug_methods=(value); end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#32 + def debug_methods?; end + + private + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#32 + def __class_attr_debug_methods; end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#32 + def __class_attr_debug_methods=(new_value); end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#50 + def debug_only(method); end + + # source://activesupport//lib/active_support/structured_event_subscriber.rb#44 + def set_silenced_events; end + end +end + +# source://activesupport//lib/active_support/structured_event_subscriber.rb#34 +ActiveSupport::StructuredEventSubscriber::DEBUG_CHECK = T.let(T.unsafe(nil), Proc) + +# = Active Support \Subscriber +# +# +ActiveSupport::Subscriber+ is an object set to consume +# ActiveSupport::Notifications. The subscriber dispatches notifications to +# a registered object based on its given namespace. +# +# An example would be an Active Record subscriber responsible for collecting +# statistics about queries: +# +# module ActiveRecord +# class StatsSubscriber < ActiveSupport::Subscriber +# attach_to :active_record +# +# def sql(event) +# Statsd.timing("sql.#{event.payload[:name]}", event.duration) +# end +# end +# end +# +# After configured, whenever a "sql.active_record" notification is +# published, it will properly dispatch the event +# (ActiveSupport::Notifications::Event) to the +sql+ method. +# +# We can detach a subscriber as well: +# +# ActiveRecord::StatsSubscriber.detach_from(:active_record) +# +# source://activesupport//lib/active_support/subscriber.rb#32 +class ActiveSupport::Subscriber + # @return [Subscriber] a new instance of Subscriber + # + # source://activesupport//lib/active_support/subscriber.rb#70 + def initialize; end + + # source://activesupport//lib/active_support/subscriber.rb#70 + def call(event); end + + # source://activesupport//lib/active_support/subscriber.rb#70 + def patterns; end + + class << self + # Attach the subscriber to a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#35 + def attach_to(namespace, subscriber = T.unsafe(nil), notifier = T.unsafe(nil), inherit_all: T.unsafe(nil)); end + + # Detach the subscriber from a namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#50 + def detach_from(namespace, notifier = T.unsafe(nil)); end + + # Adds event subscribers for all new methods added to the class. + # + # source://activesupport//lib/active_support/subscriber.rb#69 + def method_added(event); end + + # source://activesupport//lib/active_support/subscriber.rb#79 + def subscribers; end + + private + + # source://activesupport//lib/active_support/subscriber.rb#86 + def add_event_subscriber(event); end + + # source://activesupport//lib/active_support/subscriber.rb#124 + def fetch_public_methods(subscriber, inherit_all); end + + # source://activesupport//lib/active_support/subscriber.rb#108 + def find_attached_subscriber; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#112 + def invalid_event?(event); end + + # Returns the value of attribute namespace. + # + # source://activesupport//lib/active_support/subscriber.rb#84 + def namespace; end + + # Returns the value of attribute notifier. + # + # source://activesupport//lib/active_support/subscriber.rb#84 + def notifier; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/subscriber.rb#120 + def pattern_subscribed?(pattern); end + + # source://activesupport//lib/active_support/subscriber.rb#116 + def prepare_pattern(event); end + + # source://activesupport//lib/active_support/subscriber.rb#97 + def remove_event_subscriber(event); end + + # Returns the value of attribute subscriber. + # + # source://activesupport//lib/active_support/subscriber.rb#84 + def subscriber; end + end +end + +# This is a class for wrapping syntax errors. The purpose of this class +# is to enhance the backtraces on SyntaxError exceptions to include the +# source location of the syntax error. That way we can display the error +# source on error pages in development. +# +# source://activesupport//lib/active_support/syntax_error_proxy.rb#10 +class ActiveSupport::SyntaxErrorProxy + # source://activesupport//lib/active_support/syntax_error_proxy.rb#11 + def backtrace; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#41 + def backtrace_locations; end + + private + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#54 + def parse_message_for_trace; end +end + +# source://activesupport//lib/active_support/syntax_error_proxy.rb#15 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocation < ::Struct + # source://activesupport//lib/active_support/syntax_error_proxy.rb#25 + def absolute_path; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#22 + def base_label; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#19 + def label; end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#16 + def spot(_); end +end + +# source://activesupport//lib/active_support/syntax_error_proxy.rb#30 +class ActiveSupport::SyntaxErrorProxy::BacktraceLocationProxy + # @return [BacktraceLocationProxy] a new instance of BacktraceLocationProxy + # + # source://activesupport//lib/active_support/syntax_error_proxy.rb#31 + def initialize(loc, ex); end + + # source://activesupport//lib/active_support/syntax_error_proxy.rb#36 + def spot(_); end +end + +# source://activesupport//lib/active_support/event_reporter.rb#6 +class ActiveSupport::TagStack + class << self + # source://activesupport//lib/active_support/event_reporter.rb#11 + def tags; end + + # source://activesupport//lib/active_support/event_reporter.rb#15 + def with_tags(*args, **kwargs); end + + private + + # source://activesupport//lib/active_support/event_reporter.rb#30 + def resolve_tags(args, kwargs); end + end +end + +# source://activesupport//lib/active_support/event_reporter.rb#7 +ActiveSupport::TagStack::EMPTY_TAGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/event_reporter.rb#8 +ActiveSupport::TagStack::FIBER_KEY = T.let(T.unsafe(nil), Symbol) + +# = Active Support Tagged Logging +# +# Wraps any standard Logger object to provide tagging capabilities. +# +# May be called with a block: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged('BCX') { logger.info 'Stuff' } # Logs "[BCX] Stuff" +# logger.tagged('BCX', "Jason") { |tagged_logger| tagged_logger.info 'Stuff' } # Logs "[BCX] [Jason] Stuff" +# logger.tagged('BCX') { logger.tagged('Jason') { logger.info 'Stuff' } } # Logs "[BCX] [Jason] Stuff" +# +# If called without a block, a new logger will be returned with applied tags: +# +# logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) +# logger.tagged("BCX").info "Stuff" # Logs "[BCX] Stuff" +# logger.tagged("BCX", "Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" +# logger.tagged("BCX").tagged("Jason").info "Stuff" # Logs "[BCX] [Jason] Stuff" +# +# This is used by the default Rails.logger as configured by Railties to make +# it easy to stamp log lines with subdomains, request ids, and anything else +# to aid debugging of multi-user production applications. +# +# source://activesupport//lib/active_support/tagged_logging.rb#29 +module ActiveSupport::TaggedLogging + # source://activesupport//lib/active_support/tagged_logging.rb#139 + def clear_tags!(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#152 + def flush; end + + # source://activesupport//lib/active_support/tagged_logging.rb#139 + def pop_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#139 + def push_tags(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/tagged_logging.rb#141 + def tagged(*tags); end + + class << self + # Returns an `ActiveSupport::Logger` that has already been wrapped with tagged logging concern. + # + # source://activesupport//lib/active_support/tagged_logging.rb#117 + def logger(*args, **kwargs); end + + # source://activesupport//lib/active_support/tagged_logging.rb#121 + def new(logger); end + end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#30 +module ActiveSupport::TaggedLogging::Formatter + # This method is invoked when a log event occurs. + # + # source://activesupport//lib/active_support/tagged_logging.rb#32 + def call(severity, timestamp, progname, msg); end + + # source://activesupport//lib/active_support/tagged_logging.rb#51 + def clear_tags!; end + + # source://activesupport//lib/active_support/tagged_logging.rb#61 + def current_tags; end + + # source://activesupport//lib/active_support/tagged_logging.rb#47 + def pop_tags(count = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/tagged_logging.rb#43 + def push_tags(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#55 + def tag_stack; end + + # source://activesupport//lib/active_support/tagged_logging.rb#36 + def tagged(*tags); end + + # source://activesupport//lib/active_support/tagged_logging.rb#65 + def tags_text; end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#108 +module ActiveSupport::TaggedLogging::LocalTagStorage + # Returns the value of attribute tag_stack. + # + # source://activesupport//lib/active_support/tagged_logging.rb#109 + def tag_stack; end + + # Sets the attribute tag_stack + # + # @param value the value to set the attribute tag_stack to. + # + # source://activesupport//lib/active_support/tagged_logging.rb#109 + def tag_stack=(_arg0); end + + class << self + # @private + # + # source://activesupport//lib/active_support/tagged_logging.rb#111 + def extended(base); end + end +end + +# source://activesupport//lib/active_support/tagged_logging.rb#70 +class ActiveSupport::TaggedLogging::TagStack + # @return [TagStack] a new instance of TagStack + # + # source://activesupport//lib/active_support/tagged_logging.rb#73 + def initialize; end + + # source://activesupport//lib/active_support/tagged_logging.rb#91 + def clear; end + + # source://activesupport//lib/active_support/tagged_logging.rb#96 + def format_message(message); end + + # source://activesupport//lib/active_support/tagged_logging.rb#86 + def pop_tags(count); end + + # source://activesupport//lib/active_support/tagged_logging.rb#78 + def push_tags(tags); end + + # Returns the value of attribute tags. + # + # source://activesupport//lib/active_support/tagged_logging.rb#71 + def tags; end +end + +# source://activesupport//lib/active_support/test_case.rb#23 +class ActiveSupport::TestCase < ::Minitest::Test + include ::ActiveSupport::Testing::SetupAndTeardown + include ::ActiveSupport::Testing::TestsWithoutAssertions + include ::ActiveSupport::Testing::TaggedLogging + include ::ActiveSupport::Callbacks + include ::ActiveSupport::Testing::Assertions + include ::ActiveSupport::Testing::ErrorReporterAssertions + include ::ActiveSupport::Testing::EventReporterAssertions + include ::ActiveSupport::Testing::NotificationAssertions + include ::ActiveSupport::Testing::Deprecation + include ::ActiveSupport::Testing::ConstantStubbing + include ::ActiveSupport::Testing::TimeHelpers + include ::ActiveSupport::Testing::FileFixtures + extend ::ActiveSupport::Callbacks::ClassMethods + extend ::ActiveSupport::DescendantsTracker + extend ::ActiveSupport::Testing::SetupAndTeardown::ClassMethods + extend ::ActiveSupport::Testing::Declarative + + # source://activesupport//lib/active_support/test_case.rb#204 + def __callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _run_setup_callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _run_setup_callbacks!(&block); end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _run_teardown_callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _run_teardown_callbacks!(&block); end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _setup_callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _teardown_callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#302 + def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#225 + def assert_not_empty(obj, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#236 + def assert_not_equal(exp, act, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#247 + def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#258 + def assert_not_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#269 + def assert_not_includes(obj, sub, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#280 + def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#291 + def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#313 + def assert_not_nil(obj, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#324 + def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#335 + def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#346 + def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#357 + def assert_not_same(exp, act, msg = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/test_case.rb#213 + def file_fixture_path; end + + # source://activesupport//lib/active_support/test_case.rb#213 + def file_fixture_path?; end + + # source://activesupport//lib/active_support/test_case.rb#361 + def inspect; end + + # source://activesupport//lib/active_support/test_case.rb#196 + def method_name; end + + # Returns the current parallel worker ID if tests are running in parallel + # + # source://activesupport//lib/active_support/test_case.rb#199 + def parallel_worker_id; end + + class << self + # source://activesupport//lib/active_support/test_case.rb#204 + def __callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def __callbacks=(value); end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _setup_callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _setup_callbacks=(value); end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _teardown_callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def _teardown_callbacks=(value); end + + # source://activesupport//lib/active_support/test_case.rb#213 + def file_fixture_path; end + + # source://activesupport//lib/active_support/test_case.rb#213 + def file_fixture_path=(value); end + + # source://activesupport//lib/active_support/test_case.rb#213 + def file_fixture_path?; end + + # Returns the current parallel worker ID if tests are running in parallel, + # nil otherwise. + # + # ActiveSupport::TestCase.parallel_worker_id # => 2 + # + # source://activesupport//lib/active_support/test_case.rb#34 + def parallel_worker_id; end + + # source://activesupport//lib/active_support/test_case.rb#38 + def parallel_worker_id=(value); end + + # Parallelizes the test suite. + # + # Takes a +workers+ argument that controls how many times the process + # is forked. For each process a new database will be created suffixed + # with the worker number. + # + # test-database_0 + # test-database_1 + # + # If ENV["PARALLEL_WORKERS"] is set the workers argument will be ignored + # and the environment variable will be used instead. This is useful for CI + # environments, or other environments where you may need more workers than + # you do for local testing. + # + # If the number of workers is set to +1+ or fewer, the tests will not be + # parallelized. + # + # If +workers+ is set to +:number_of_processors+, the number of workers will be + # set to the actual core count on the machine you are on. + # + # The default parallelization method is to fork processes. If you'd like to + # use threads instead you can pass with: :threads to the +parallelize+ + # method. Note the threaded parallelization does not create multiple + # databases and will not work with system tests. + # + # parallelize(workers: :number_of_processors, with: :threads) + # + # The threaded parallelization uses minitest's parallel executor directly. + # The processes parallelization uses a Ruby DRb server. + # + # Because parallelization presents an overhead, it is only enabled when the + # number of tests to run is above the +threshold+ param. The default value is + # 50, and it's configurable via +config.active_support.test_parallelization_threshold+. + # + # If you want to skip Rails default creation of one database per process in favor of + # writing your own implementation, you can set +parallelize_databases+, or configure it + # via +config.active_support.parallelize_test_databases+. + # + # parallelize(workers: :number_of_processors, parallelize_databases: false) + # + # Note that your test suite may deadlock if you attempt to use only one database + # with multiple processes. + # + # source://activesupport//lib/active_support/test_case.rb#113 + def parallelize(workers: T.unsafe(nil), with: T.unsafe(nil), threshold: T.unsafe(nil), parallelize_databases: T.unsafe(nil)); end + + # Before fork hook for parallel testing. This can be used to run anything + # before the processes are forked. + # + # In your +test_helper.rb+ add the following: + # + # class ActiveSupport::TestCase + # parallelize_before_fork do + # # run this before fork + # end + # end + # + # source://activesupport//lib/active_support/test_case.rb#138 + def parallelize_before_fork(&block); end + + # Setup 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#155 + 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#172 + 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#61 + 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#51 + def test_order=(new_order); end + + private + + # source://activesupport//lib/active_support/test_case.rb#204 + def __class_attr___callbacks; end + + # source://activesupport//lib/active_support/test_case.rb#204 + def __class_attr___callbacks=(new_value); end + + # source://activesupport//lib/active_support/test_case.rb#213 + def __class_attr_file_fixture_path; end + + # source://activesupport//lib/active_support/test_case.rb#213 + def __class_attr_file_fixture_path=(new_value); end + end +end + +# source://activesupport//lib/active_support/test_case.rb#24 +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. The comparison is done using case equality (===), which means + # you can specify patterns or classes: + # + # # Exact value match + # assert_changes :@object, from: nil, to: :foo do + # @object = :foo + # end + # + # # Case equality + # assert_changes -> { user.token }, to: /\w{32}/ do + # user.generate_token + # end + # + # # Type check + # assert_changes -> { current_error }, from: nil, to: RuntimeError do + # raise "Oops" + # 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#212 + 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 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 be passed in and evaluated. + # + # assert_difference({ 'Article.count' => 1, 'Notification.count' => 2 }) do + # post :create, params: { article: {...} } + # end + # + # A lambda, a list of lambdas or a hash of lambdas/numeric differences 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 + # + # assert_difference ->{ Article.count } => 1, ->{ Notification.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#105 + 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. The comparison is done using case equality (===), which means + # you can specify patterns or classes: + # + # # Exact value match + # assert_no_changes -> { Status.all_good? }, from: true do + # post :create, params: { status: { ok: true } } + # end + # + # # Case equality + # assert_no_changes -> { user.token }, from: /\w{32}/ do + # user.touch + # end + # + # # Type check + # assert_no_changes -> { current_error }, from: RuntimeError do + # retry_operation + # 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#281 + 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#162 + def assert_no_difference(expression, message = T.unsafe(nil), &block); end + + # Asserts that an expression is not truthy. Passes if +object+ is +nil+ or + # +false+. "Truthy" means "considered true in a conditional" like if + # foo. + # + # assert_not nil # => true + # assert_not false # => true + # assert_not 'foo' # => Expected "foo" to be nil or false + # + # An error message can be specified. + # + # assert_not foo, 'foo should be false' + # + # source://activesupport//lib/active_support/testing/assertions.rb#21 + def assert_not(object, message = T.unsafe(nil)); end + + # Assertion that the block should not raise an exception. + # + # Passes if evaluated code in the yielded block raises no exception. + # + # assert_nothing_raised do + # perform_service(param: 'no_exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#48 + def assert_nothing_raised; end + + # Asserts that a block raises one of +exp+. This is an enhancement of the + # standard Minitest assertion method with the ability to test error + # messages. + # + # assert_raises(ArgumentError, match: /incorrect param/i) do + # perform_service(param: 'exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#39 + def assert_raise(*exp, match: T.unsafe(nil), &block); end + + # Asserts that a block raises one of +exp+. This is an enhancement of the + # standard Minitest assertion method with the ability to test error + # messages. + # + # assert_raises(ArgumentError, match: /incorrect param/i) do + # perform_service(param: 'exception') + # end + # + # source://activesupport//lib/active_support/testing/assertions.rb#34 + def assert_raises(*exp, match: T.unsafe(nil), &block); end + + private + + # source://activesupport//lib/active_support/testing/assertions.rb#316 + def _assert_nothing_raised_or_warn(assertion, &block); end + + # source://activesupport//lib/active_support/testing/assertions.rb#331 + def _callable_to_source_string(callable); end +end + +# source://activesupport//lib/active_support/testing/assertions.rb#8 +ActiveSupport::Testing::Assertions::UNTRACKED = T.let(T.unsafe(nil), Object) + +# Resolves a constant from a minitest spec name. +# +# Given the following spec-style test: +# +# describe WidgetsController, :index do +# describe "authenticated user" do +# describe "returns widgets" do +# it "has a controller that exists" do +# assert_kind_of WidgetsController, @controller +# end +# end +# end +# end +# +# The test will have the following name: +# +# "WidgetsController::index::authenticated user::returns widgets" +# +# The constant WidgetsController can be resolved from the name. +# The following code will resolve the constant: +# +# controller = determine_constant_from_test_name(name) do |constant| +# Class === constant && constant < ::ActionController::Metal +# end +# +# source://activesupport//lib/active_support/testing/constant_lookup.rb#32 +module ActiveSupport::Testing::ConstantLookup + extend ::ActiveSupport::Concern + + mixes_in_class_methods ::ActiveSupport::Testing::ConstantLookup::ClassMethods +end + +# source://activesupport//lib/active_support/testing/constant_lookup.rb#35 +module ActiveSupport::Testing::ConstantLookup::ClassMethods + # source://activesupport//lib/active_support/testing/constant_lookup.rb#36 + def determine_constant_from_test_name(test_name); end +end + +# source://activesupport//lib/active_support/testing/constant_stubbing.rb#5 +module ActiveSupport::Testing::ConstantStubbing + # Changes the value of a constant for the duration of a block. Example: + # + # # World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 + # stub_const(World::List::Import, :LARGE_IMPORT_THRESHOLD, 1) do + # assert_equal 1, World::List::Import::LARGE_IMPORT_THRESHOLD + # end + # + # assert_equal 5000, World::List::Import::LARGE_IMPORT_THRESHOLD + # + # Using this method rather than forcing World::List::Import::LARGE_IMPORT_THRESHOLD = 5000 prevents + # warnings from being thrown, and ensures that the old value is returned after the test has completed. + # + # If the constant doesn't already exists, but you need it set for the duration of the block + # you can do so by passing `exists: false`. + # + # stub_const(object, :SOME_CONST, 1, exists: false) do + # assert_equal 1, SOME_CONST + # end + # + # Note: Stubbing a const will stub it across all threads. So if you have concurrent threads + # (like separate test suites running in parallel) that all depend on the same constant, it's possible + # divergent stubbing will trample on each other. + # + # source://activesupport//lib/active_support/testing/constant_stubbing.rb#28 + def stub_const(mod, constant, new_value, exists: T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/testing/declarative.rb#5 +module ActiveSupport::Testing::Declarative + # Helper to define a test method using a String. Under the hood, it replaces + # spaces with underscores and defines the test method. + # + # test "verify something" do + # ... + # end + # + # source://activesupport//lib/active_support/testing/declarative.rb#13 + def test(name, &block); end +end + +# source://activesupport//lib/active_support/testing/deprecation.rb#7 +module ActiveSupport::Testing::Deprecation + # :call-seq: + # assert_deprecated(deprecator, &block) + # assert_deprecated(match, deprecator, &block) + # + # Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block. + # + # assert_deprecated(/foo/, CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # The +match+ object may be a +Regexp+, or +String+ appearing in the message. + # + # assert_deprecated('foo', CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # If the +match+ is omitted (or explicitly +nil+), any deprecation warning will match. + # + # assert_deprecated(CustomDeprecator) do + # CustomDeprecator.warn "foo should no longer be used" + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#30 + def assert_deprecated(match = T.unsafe(nil), deprecator = T.unsafe(nil), &block); end + + # Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block. + # + # assert_not_deprecated(CustomDeprecator) do + # CustomDeprecator.warn "message" # fails assertion + # end + # + # assert_not_deprecated(ActiveSupport::Deprecation.new) do + # CustomDeprecator.warn "message" # passes assertion, different deprecator + # end + # + # source://activesupport//lib/active_support/testing/deprecation.rb#55 + def assert_not_deprecated(deprecator, &block); end + + # Returns the return value of the block and an array of all the deprecation warnings emitted by the given + # +deprecator+ during the execution of the yielded block. + # + # collect_deprecations(CustomDeprecator) do + # CustomDeprecator.warn "message" + # ActiveSupport::Deprecation.new.warn "other message" + # :result + # end # => [:result, ["message"]] + # + # source://activesupport//lib/active_support/testing/deprecation.rb#69 + def collect_deprecations(deprecator); end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#5 +module ActiveSupport::Testing::ErrorReporterAssertions + # Assertion that the block should cause at least one exception to be reported + # to +Rails.error+. + # + # Passes if the evaluated code in the yielded block reports a matching exception. + # + # assert_error_reported(IOError) do + # Rails.error.report(IOError.new("Oops")) + # end + # + # To test further details about the reported exception, you can use the return + # value. + # + # report = assert_error_reported(IOError) do + # # ... + # end + # assert_equal "Oops", report.error.message + # assert_equal "admin", report.context[:section] + # assert_equal :warning, report.severity + # assert_predicate report, :handled? + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#88 + def assert_error_reported(error_class = T.unsafe(nil), &block); end + + # Assertion that the block should not cause an exception to be reported + # to +Rails.error+. + # + # Passes if evaluated code in the yielded block reports no exception. + # + # assert_no_error_reported do + # perform_service(param: 'no_exception') + # end + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#62 + def assert_no_error_reported(&block); end + + # Captures reported errors from within the block that match the given + # error class. + # + # reports = capture_error_reports(IOError) do + # Rails.error.report(IOError.new("Oops")) + # Rails.error.report(IOError.new("Oh no")) + # Rails.error.report(StandardError.new) + # end + # + # assert_equal 2, reports.size + # assert_equal "Oops", reports.first.error.message + # assert_equal "Oh no", reports.last.error.message + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#118 + def capture_error_reports(error_class = T.unsafe(nil), &block); end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#6 +module ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector + class << self + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#16 + def record; end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#29 + def report(error, **kwargs); end + + private + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#38 + def subscribe; end + end +end + +# source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 +class ActiveSupport::Testing::ErrorReporterAssertions::ErrorCollector::Report < ::Struct + # Returns the value of attribute context + # + # @return [Object] the current value of context + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def context; end + + # Sets the attribute context + # + # @param value [Object] the value to set the attribute context to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def context=(_); end + + # Returns the value of attribute error + # + # @return [Object] the current value of error + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def error; end + + # Sets the attribute error + # + # @param value [Object] the value to set the attribute error to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def error=(_); end + + # Returns the value of attribute handled + # + # @return [Object] the current value of handled + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def handled; end + + # Sets the attribute handled + # + # @param value [Object] the value to set the attribute handled to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def handled=(_); end + + # Returns the value of attribute handled + # + # @return [Object] the current value of handled + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#12 + def handled?; end + + # Returns the value of attribute severity + # + # @return [Object] the current value of severity + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def severity; end + + # Sets the attribute severity + # + # @param value [Object] the value to set the attribute severity to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def severity=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def source=(_); end + + class << self + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def [](*_arg0); end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def inspect; end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def keyword_init?; end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def members; end + + # source://activesupport//lib/active_support/testing/error_reporter_assertions.rb#10 + def new(*_arg0); end + end +end + +# Provides test helpers for asserting on ActiveSupport::EventReporter events. +# +# source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#6 +module ActiveSupport::Testing::EventReporterAssertions + # Asserts that the block causes an event with the given name to be reported + # to +Rails.event+. + # + # Passes if the evaluated code in the yielded block reports a matching event. + # + # assert_event_reported("user.created") do + # Rails.event.notify("user.created", { id: 123 }) + # end + # + # To test further details about the reported event, you can specify payload and tag matchers. + # + # assert_event_reported("user.created", + # payload: { id: 123, name: "John Doe" }, + # tags: { request_id: /[0-9]+/ } + # ) do + # Rails.event.tagged(request_id: "123") do + # Rails.event.notify("user.created", { id: 123, name: "John Doe" }) + # end + # end + # + # The matchers support partial matching - only the specified keys need to match. + # + # assert_event_reported("user.created", payload: { id: 123 }) do + # Rails.event.notify("user.created", { id: 123, name: "John Doe" }) + # end + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#142 + def assert_event_reported(name, payload: T.unsafe(nil), tags: T.unsafe(nil), &block); end + + # Asserts that the provided events were reported, regardless of order. + # + # assert_events_reported([ + # { name: "user.created", payload: { id: 123 } }, + # { name: "email.sent", payload: { to: "user@example.com" } } + # ]) do + # create_user_and_send_welcome_email + # end + # + # Supports the same payload and tag matching as +assert_event_reported+. + # + # assert_events_reported([ + # { + # name: "process.started", + # payload: { id: 123 }, + # tags: { request_id: /[0-9]+/ } + # }, + # { name: "process.completed" } + # ]) do + # Rails.event.tagged(request_id: "456") do + # start_and_complete_process(123) + # end + # end + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#184 + def assert_events_reported(expected_events, &block); end + + # Asserts that the block does not cause an event to be reported to +Rails.event+. + # + # If no name is provided, passes if evaluated code in the yielded block reports no events. + # + # assert_no_event_reported do + # service_that_does_not_report_events.perform + # end + # + # If a name is provided, passes if evaluated code in the yielded block reports no events + # with that name. + # + # assert_no_event_reported("user.created") do + # service_that_does_not_report_events.perform + # end + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#101 + def assert_no_event_reported(name = T.unsafe(nil), payload: T.unsafe(nil), tags: T.unsafe(nil), &block); end + + # Allows debug events to be reported to +Rails.event+ for the duration of a given block. + # + # with_debug_event_reporting do + # service_that_reports_debug_events.perform + # end + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#222 + def with_debug_event_reporting(&block); end +end + +# source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#7 +module ActiveSupport::Testing::EventReporterAssertions::EventCollector + class << self + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#46 + def emit(event); end + + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#53 + def record; end + + private + + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#81 + def event_recorders; end + + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#66 + def subscribe; end + end +end + +# source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#11 +class ActiveSupport::Testing::EventReporterAssertions::EventCollector::Event + # @return [Event] a new instance of Event + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#14 + def initialize(event_data); end + + # Returns the value of attribute event_data. + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#12 + def event_data; end + + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#18 + def inspect; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#22 + def matches?(name, payload, tags); end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/event_reporter_assertions.rb#34 + def matches_hash?(expected_hash, event_key); end +end + +# Adds simple access to sample files called file fixtures. +# File fixtures are normal files stored in +# ActiveSupport::TestCase.file_fixture_path. +# +# File fixtures are represented as +Pathname+ objects. +# This makes it easy to extract specific information: +# +# file_fixture("example.txt").read # get the file's content +# file_fixture("example.mp3").size # get the file size +# +# source://activesupport//lib/active_support/testing/file_fixtures.rb#16 +module ActiveSupport::Testing::FileFixtures + extend ::ActiveSupport::Concern + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + # Returns a +Pathname+ to the fixture file named +fixture_name+. + # + # Raises +ArgumentError+ if +fixture_name+ can't be found. + # + # source://activesupport//lib/active_support/testing/file_fixtures.rb#26 + def file_fixture(fixture_name); end + + module GeneratedClassMethods + def file_fixture_path; end + def file_fixture_path=(value); end + def file_fixture_path?; end + end + + module GeneratedInstanceMethods + def file_fixture_path; end + def file_fixture_path?; end + end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#7 +module ActiveSupport::Testing::Isolation + include ::ActiveSupport::Testing::Isolation::Forking + + # source://activesupport//lib/active_support/testing/isolation.rb#20 + def run; end + + class << self + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/isolation.rb#16 + def forking_env?; end + + # source://activesupport//lib/active_support/testing/isolation.rb#10 + def included(klass); end + end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#35 +module ActiveSupport::Testing::Isolation::Forking + # source://activesupport//lib/active_support/testing/isolation.rb#36 + def run_in_isolation(&blk); end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#73 +module ActiveSupport::Testing::Isolation::Subprocess + # Complicated H4X to get this working in Windows / JRuby with + # no forking. + # + # source://activesupport//lib/active_support/testing/isolation.rb#78 + def run_in_isolation(&blk); end +end + +# source://activesupport//lib/active_support/testing/isolation.rb#74 +ActiveSupport::Testing::Isolation::Subprocess::ORIG_ARGV = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/testing/isolation.rb#8 +class ActiveSupport::Testing::Isolation::SubprocessCrashed < ::StandardError; end + +# source://activesupport//lib/active_support/testing/notification_assertions.rb#5 +module ActiveSupport::Testing::NotificationAssertions + # Assert no notifications were emitted for a given +pattern+. + # + # You can assert no notifications were emitted by passing a pattern, which accepts + # either a string or regexp, and a block. While the block is executed, if no + # matching notifications are emitted, the assertion will pass. + # + # assert_no_notifications("post.submitted") do + # post.destroy # => emits non-matching notification + # end + # + # source://activesupport//lib/active_support/testing/notification_assertions.rb#66 + def assert_no_notifications(pattern = T.unsafe(nil), &block); end + + # Assert a notification was emitted with a given +pattern+ and optional +payload+. + # + # You can assert that a notification was emitted by passing a pattern, which accepts + # either a string or regexp, an optional payload, and a block. While the block + # is executed, if a matching notification is emitted, the assertion will pass + # and the notification will be returned. + # + # Note that the payload is matched as a subset, meaning that the notification must + # contain at least the specified keys and values, but may contain additional ones. + # + # assert_notification("post.submitted", title: "Cool Post") do + # post.submit(title: "Cool Post", body: "Cool Body") # => emits matching notification + # end + # + # Using the returned notification, you can make more customized assertions. + # + # notification = assert_notification("post.submitted", title: "Cool Post") do + # ActiveSupport::Notifications.instrument("post.submitted", title: "Cool Post", body: Body.new("Cool Body")) + # end + # + # assert_instance_of(Body, notification.payload[:body]) + # + # source://activesupport//lib/active_support/testing/notification_assertions.rb#28 + def assert_notification(pattern, payload = T.unsafe(nil), &block); end + + # Assert the number of notifications emitted with a given +pattern+. + # + # You can assert the number of notifications emitted by passing a pattern, which accepts + # either a string or regexp, a count, and a block. While the block is executed, + # the number of matching notifications emitted will be counted. After the block's + # execution completes, the assertion will pass if the count matches. + # + # assert_notifications_count("post.submitted", 1) do + # post.submit(title: "Cool Post") # => emits matching notification + # end + # + # source://activesupport//lib/active_support/testing/notification_assertions.rb#51 + def assert_notifications_count(pattern, count, &block); end + + # Capture emitted notifications, optionally filtered by a +pattern+. + # + # You can capture emitted notifications, optionally filtered by a pattern, + # which accepts either a string or regexp, and a block. + # + # notifications = capture_notifications("post.submitted") do + # post.submit(title: "Cool Post") # => emits matching notification + # end + # + # source://activesupport//lib/active_support/testing/notification_assertions.rb#85 + def capture_notifications(pattern = T.unsafe(nil), &block); end +end + +# source://activesupport//lib/active_support/testing/parallelization/server.rb#8 +class ActiveSupport::Testing::Parallelization + # @return [Parallelization] a new instance of Parallelization + # + # source://activesupport//lib/active_support/testing/parallelization.rb#36 + def initialize(worker_count); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#54 + def <<(work); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#26 + def after_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#43 + def before_fork; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#18 + def before_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#34 + def run_cleanup_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#62 + def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#58 + def size; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#47 + def start; end + + class << self + # source://activesupport//lib/active_support/testing/parallelization.rb#22 + def after_fork_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#26 + def after_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#14 + def before_fork_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#18 + def before_fork_hooks; end + + # source://activesupport//lib/active_support/testing/parallelization.rb#30 + def run_cleanup_hook(&blk); end + + # source://activesupport//lib/active_support/testing/parallelization.rb#34 + def run_cleanup_hooks; end + end +end + +# source://activesupport//lib/active_support/testing/parallelization/server.rb#9 +class ActiveSupport::Testing::Parallelization::PrerecordResultClass < ::Struct + # Returns the value of attribute name + # + # @return [Object] the current value of name + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def name=(_); end + + class << self + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def [](*_arg0); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def inspect; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def keyword_init?; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def members; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#9 + def new(*_arg0); end + end +end + +# source://activesupport//lib/active_support/testing/parallelization/server.rb#11 +class ActiveSupport::Testing::Parallelization::Server + include ::DRb::DRbUndumped + + # @return [Server] a new instance of Server + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#14 + def initialize; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#32 + def <<(o); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#64 + def active_workers?; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#68 + def interrupt; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#37 + def pop; end + + # @raise [DRb::DRbConnError] + # + # source://activesupport//lib/active_support/testing/parallelization/server.rb#21 + def record(reporter, result); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#54 + def remove_dead_workers(dead_pids); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#72 + def shutdown; end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#44 + def start_worker(worker_id, worker_pid); end + + # source://activesupport//lib/active_support/testing/parallelization/server.rb#49 + def stop_worker(worker_id, worker_pid); 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#82 + 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#90 + def run_cleanup; end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#58 + 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#97 + def add_setup_exception(result); end + + # source://activesupport//lib/active_support/testing/parallelization/worker.rb#101 + def set_process_title(status); end +end + +# source://activesupport//lib/active_support/testing/parallelize_executor.rb#5 +class ActiveSupport::Testing::ParallelizeExecutor + # @return [ParallelizeExecutor] a new instance of ParallelizeExecutor + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#8 + def initialize(size:, with:, threshold: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#22 + def <<(work); end + + # Returns the value of attribute parallelize_with. + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 + def parallelize_with; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#26 + def shutdown; end + + # Returns the value of attribute size. + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 + def size; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#15 + def start; end + + # Returns the value of attribute threshold. + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#6 + def threshold; end + + private + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#35 + def build_parallel_executor; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#72 + def execution_info; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#60 + def many_workers?; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#31 + def parallel_executor; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#47 + def parallelize; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#52 + def parallelized?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#56 + def should_parallelize?; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#68 + def show_execution_info; end + + # source://activesupport//lib/active_support/testing/parallelize_executor.rb#64 + def tests_count; end +end + +# Adds support for +setup+ and +teardown+ callbacks. +# These callbacks serve as a replacement to overwriting the +# #setup and #teardown methods of your TestCase. +# +# class ExampleTest < ActiveSupport::TestCase +# setup do +# # ... +# end +# +# teardown do +# # ... +# end +# end +# +# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#20 +module ActiveSupport::Testing::SetupAndTeardown + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#44 + def after_teardown; end + + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#39 + def before_setup; end + + class << self + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#21 + def prepended(klass); end + end +end + +# source://activesupport//lib/active_support/testing/setup_and_teardown.rb#27 +module ActiveSupport::Testing::SetupAndTeardown::ClassMethods + # Add a callback, which runs before TestCase#setup. + # + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#29 + def setup(*args, &block); end + + # Add a callback, which runs after TestCase#teardown. + # + # source://activesupport//lib/active_support/testing/setup_and_teardown.rb#34 + def teardown(*args, &block); end +end + +# Manages stubs for TimeHelpers +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#9 +class ActiveSupport::Testing::SimpleStubs + # @return [SimpleStubs] a new instance of SimpleStubs + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#12 + def initialize; end + + # Stubs object.method_name with the given block + # If the method is already stubbed, remove that stub + # so that removing this stub will restore the original implementation. + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # target = Time.zone.local(2004, 11, 24, 1, 4, 44) + # simple_stubs.stub_object(Time, :now) { at(target.to_i) } + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#23 + def stub_object(object, method_name, &block); end + + # Returns true if any stubs are set, false if there are none + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#53 + def stubbed?; end + + # Returns the Stub for object#method_name + # (nil if it is not stubbed) + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#48 + def stubbing(object, method_name); end + + # Remove all object-method stubs held by this instance + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#37 + def unstub_all!; end + + private + + # Restores the original object.method described by the Stub + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#59 + def unstub_object(stub); end +end + +# source://activesupport//lib/active_support/testing/time_helpers.rb#10 +class ActiveSupport::Testing::SimpleStubs::Stub < ::Struct + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + 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 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def method_name=(_); end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def object=(_); end + + # Returns the value of attribute original_method + # + # @return [Object] the current value of original_method + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + 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 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def original_method=(_); end + + class << self + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def [](*_arg0); end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def inspect; end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def keyword_init?; end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + def members; end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#10 + 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 + +# Warns when a test case does not perform any assertions. +# +# This is helpful in detecting broken tests that do not perform intended assertions. +# +# source://activesupport//lib/active_support/testing/tests_without_assertions.rb#8 +module ActiveSupport::Testing::TestsWithoutAssertions + # source://activesupport//lib/active_support/testing/tests_without_assertions.rb#9 + def after_teardown; end +end + +# Contains helpers that help you test passage of time. +# +# source://activesupport//lib/active_support/testing/time_helpers.rb#68 +module ActiveSupport::Testing::TimeHelpers + # source://activesupport//lib/active_support/testing/time_helpers.rb#69 + def after_teardown; end + + # Calls +travel_to+ with +date_or_time+, which defaults to +Time.now+. + # Forwards optional with_usec argument. + # + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time + # sleep(1) + # Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00 + # freeze_time Time.current + 1.day + # sleep(1) + # Time.current # => Mon, 10 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#261 + def freeze_time(date_or_time = T.unsafe(nil), with_usec: T.unsafe(nil), &block); end + + # Changes current time to the time in the future or in the past by a given time difference by + # stubbing +Time.now+, +Date.today+, and +DateTime.now+. The stubs are automatically removed + # at the end of the test. + # + # Note that the usec for the resulting time will be set to 0 to prevent rounding + # errors with external services, like MySQL (which will round instead of floor, + # leading to off-by-one-second errors), unless the with_usec argument + # is set to true. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day + # Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # Date.current # => Sun, 10 Nov 2013 + # DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500 + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel 1.day do + # User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00 + # end + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#97 + def travel(duration, with_usec: T.unsafe(nil), &block); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # This method also accepts a block, which brings the stubs back at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back do + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # end + # + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#231 + def travel_back; end + + # Changes current time to the given time by stubbing +Time.now+, +Time.new+, + # +Date.today+, and +DateTime.now+ to return the time or date passed into this method. + # The stubs are automatically removed at the end of the test. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # Date.current # => Wed, 24 Nov 2004 + # DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500 + # + # Dates are taken as their timestamp at the beginning of the day in the + # application time zone. Time.current returns said timestamp, + # and Time.now its equivalent in the system time zone. Similarly, + # Date.current returns a date equal to the argument, and + # Date.today the date according to Time.now, which may + # be different. (Note that you rarely want to deal with Time.now, + # or Date.today, in order to honor the application time zone + # please always use Time.current and Date.current.) + # + # Note that the usec for the time passed will be set to 0 to prevent rounding + # errors with external services, like MySQL (which will round instead of floor, + # leading to off-by-one-second errors), unless the with_usec argument + # is set to true. + # + # This method also accepts a block, which will return the current time back to its original + # state at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) do + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # end + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#133 + def travel_to(date_or_time, with_usec: T.unsafe(nil)); end + + # Returns the current time back to its original state, by removing the stubs added by + # +travel+, +travel_to+, and +freeze_time+. + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # This method also accepts a block, which brings the stubs back at the end of the block: + # + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # + # travel_to Time.zone.local(2004, 11, 24, 1, 4, 44) + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # travel_back do + # Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 + # end + # + # Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00 + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#239 + def unfreeze_time; end + + private + + # Returns the value of attribute in_block. + # + # source://activesupport//lib/active_support/testing/time_helpers.rb#270 + 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#270 + def in_block=(_arg0); end + + # source://activesupport//lib/active_support/testing/time_helpers.rb#266 + def simple_stubs; end +end + +# = Active Support \Time With Zone +# +# A Time-like class that can represent a time in any time zone. Necessary +# because standard Ruby Time instances are limited to UTC and the +# system's ENV['TZ'] zone. +# +# You shouldn't ever need to create a TimeWithZone instance directly via +new+. +# Instead use methods +local+, +parse+, +at+, and +now+ on TimeZone instances, +# and +in_time_zone+ on Time and DateTime instances. +# +# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' +# Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.at(1171139445) # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# Time.zone.now # => Sun, 18 May 2008 13:07:55.754107581 EDT -04:00 +# Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45.000000000 EST -05:00 +# +# See Time and TimeZone for further documentation of these methods. +# +# TimeWithZone instances implement the same API as Ruby Time instances, so +# that Time and TimeWithZone instances are interchangeable. +# +# t = Time.zone.now # => Sun, 18 May 2008 13:27:25.031505668 EDT -04:00 +# t.hour # => 13 +# t.dst? # => true +# t.utc_offset # => -14400 +# t.zone # => "EDT" +# t.to_fs(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" +# t + 1.day # => Mon, 19 May 2008 13:27:25.031505668 EDT -04:00 +# t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00.000000000 EST -05:00 +# t > Time.utc(1999) # => true +# t.is_a?(Time) # => true +# t.is_a?(ActiveSupport::TimeWithZone) # => true +# +# source://activesupport//lib/active_support/time_with_zone.rb#44 +class ActiveSupport::TimeWithZone + include ::DateAndTime::Compatibility + include ::Comparable + + # @return [TimeWithZone] a new instance of TimeWithZone + # + # source://activesupport//lib/active_support/time_with_zone.rb#51 + def initialize(utc_time, time_zone, local_time = T.unsafe(nil), period = T.unsafe(nil)); end + + # Adds an interval of time to the current object's time and returns that + # value as a new TimeWithZone object. + # + # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' + # now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00 + # now + 1000 # => Sun, 02 Nov 2014 01:43:08.725182881 EDT -04:00 + # + # If we're adding a Duration of variable length (i.e., years, months, days), + # move forward from #time, otherwise move forward from #utc, for accuracy + # when moving across DST boundaries. + # + # For instance, a time + 24.hours will advance exactly 24 hours, while a + # time + 1.day will advance 23-25 hours, depending on the day. + # + # now + 24.hours # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00 + # now + 1.day # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#314 + 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#349 + def -(other); end + + # Use the time in UTC for comparisons. + # + # source://activesupport//lib/active_support/time_with_zone.rb#247 + def <=>(other); end + + # So that +self+ acts_like?(:time). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#506 + 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#438 + def advance(options); end + + # source://activesupport//lib/active_support/time_with_zone.rb#251 + 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#377 + def ago(other); end + + # Coerces time to a string for JSON encoding. The default format is ISO 8601. + # You can get %Y/%m/%d %H:%M:%S +offset style by setting + # ActiveSupport::JSON::Encoding.use_standard_json_time_format + # to +false+. + # + # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json + # # => "2005-02-01T05:15:10.000-10:00" + # + # # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false + # Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json + # # => "2005/02/01 05:15:10 -1000" + # + # source://activesupport//lib/active_support/time_with_zone.rb#182 + def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#250 + 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#255 + def between?(min, max); end + + # An instance of ActiveSupport::TimeWithZone is never blank + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#517 + def blank?; end + + # Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have + # been changed according to the +options+ parameter. The time options (:hour, + # :min, :sec, :usec, :nsec) reset cascadingly, + # so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the + # hour and minute is passed, then sec, usec, and nsec is set to 0. The +options+ + # parameter takes a hash with any of these keys: :year, :month, + # :day, :hour, :min, :sec, :usec, + # :nsec, :offset, :zone. Pass either :usec + # or :nsec, not both. Similarly, pass either :zone or + # :offset, not both. + # + # t = Time.zone.now # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00 + # t.change(year: 2020) # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00 + # t.change(hour: 12) # => Fri, 14 Apr 2017 12:00:00.000000000 EST -05:00 + # t.change(min: 30) # => Fri, 14 Apr 2017 11:30:00.000000000 EST -05:00 + # t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 + # t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 + # + # source://activesupport//lib/active_support/time_with_zone.rb#398 + 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#72 + def comparable_time; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#100 + def dst?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#194 + 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#290 + 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#131 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#525 + 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#285 + 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#92 + 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#74 + 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#114 + def gmt?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#120 + 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#75 + 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#294 + def hash; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#202 + 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#324 + def in(other); end + + # Returns the simultaneous time in Time.zone, or the specified zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#83 + def in_time_zone(new_zone = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#190 + def init_with(coder); end + + # Returns a string of the object's date, time, zone, and offset from UTC. + # + # Time.zone.now.inspect # => "2024-11-13 07:00:10.528054960 UTC +00:00" + # + # source://activesupport//lib/active_support/time_with_zone.rb#146 + def inspect; end + + # Say we're a Time to thwart type checking. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#511 + 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#103 + 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#167 + 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#514 + 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#89 + def localtime(utc_offset = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#531 + def marshal_dump; end + + # source://activesupport//lib/active_support/time_with_zone.rb#535 + def marshal_load(variables); end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#555 + def method_missing(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + def min; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + def mon; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#275 + def next_day?; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#260 + def past?; end + + # Returns the underlying +TZInfo::TimezonePeriod+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#78 + def period; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#521 + def present?; end + + # Returns true if the current object's time falls within + # the previous day (yesterday). + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#282 + 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#541 + 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#210 + 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#168 + 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#213 + def rfc822; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#323 + 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#241 + def strftime(format); end + + # Returns a Time instance that represents the time in +time_zone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#64 + def time; end + + # Returns the value of attribute time_zone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#49 + def time_zone; end + + # Returns Array of parts of Time in sequence of + # [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone]. + # + # now = Time.zone.now # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00 + # now.to_a # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"] + # + # source://activesupport//lib/active_support/time_with_zone.rb#461 + def to_a; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#494 + 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#469 + 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#237 + 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#228 + 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#477 + 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#486 + def to_r; end + + # Returns a string of the object's date and time. + # + # source://activesupport//lib/active_support/time_with_zone.rb#216 + def to_s; end + + # Returns an instance of +Time+, either with the same timezone as +self+, + # with the same UTC offset as +self+ or in the local system timezone + # depending on the setting of +ActiveSupport.to_time_preserves_timezone+. + # + # source://activesupport//lib/active_support/time_with_zone.rb#501 + 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#266 + 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#272 + 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#480 + def tv_sec; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # source://activesupport//lib/active_support/time_with_zone.rb#69 + 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#111 + def utc?; end + + # Returns the offset from current time to UTC time in seconds. + # + # source://activesupport//lib/active_support/time_with_zone.rb#117 + def utc_offset; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#154 + def xmlschema(fraction_digits = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + def yday; end + + # source://activesupport//lib/active_support/time_with_zone.rb#449 + 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#279 + 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#139 + def zone; end + + private + + # @return [Boolean] + # + # source://activesupport//lib/active_support/time_with_zone.rb#593 + def duration_of_variable_length?(obj); end + + # source://activesupport//lib/active_support/time_with_zone.rb#574 + def get_period_and_ensure_valid_local_time(period); end + + # source://activesupport//lib/active_support/time_with_zone.rb#564 + 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#549 + def respond_to_missing?(sym, include_priv); end + + # source://activesupport//lib/active_support/time_with_zone.rb#587 + def transfer_time_values_to_utc_constructor(time); end + + # source://activesupport//lib/active_support/time_with_zone.rb#597 + def wrap_with_time_zone(time); end +end + +# source://activesupport//lib/active_support/time_with_zone.rb#45 +ActiveSupport::TimeWithZone::PRECISIONS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/time_with_zone.rb#562 +ActiveSupport::TimeWithZone::SECONDS_PER_DAY = T.let(T.unsafe(nil), Integer) + +# = Active Support \Time Zone +# +# The TimeZone class serves as a wrapper around +TZInfo::Timezone+ instances. +# It allows us to do the following: +# +# * Limit the set of zones provided by TZInfo to a meaningful subset of 134 +# zones. +# * Retrieve and display zones with a friendlier name +# (e.g., "Eastern \Time (US & Canada)" instead of "America/New_York"). +# * Lazily load +TZInfo::Timezone+ instances only when they're needed. +# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, +# +parse+, +at+, and +now+ methods. +# +# If you set config.time_zone in the \Rails Application, you can +# access this TimeZone object via Time.zone: +# +# # application.rb: +# class Application < Rails::Application +# config.time_zone = 'Eastern Time (US & Canada)' +# end +# +# Time.zone # => # +# Time.zone.name # => "Eastern Time (US & Canada)" +# Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 +# +# source://activesupport//lib/active_support/values/time_zone.rb#31 +class ActiveSupport::TimeZone + include ::Comparable + + # :stopdoc: + # + # @return [TimeZone] a new instance of TimeZone + # + # source://activesupport//lib/active_support/values/time_zone.rb#310 + 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#340 + 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#349 + def =~(re); end + + # source://activesupport//lib/active_support/values/time_zone.rb#574 + def abbr(time); end + + # \Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from number of seconds since the Unix epoch. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.utc(2000).to_f # => 946684800.0 + # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # A second argument can be supplied to specify sub-second precision. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.at(946684800, 123456.789).nsec # => 123456789 + # + # source://activesupport//lib/active_support/values/time_zone.rb#386 + def at(*args); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/values/time_zone.rb#578 + def dst?(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#586 + 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#334 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#582 + 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#403 + 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#370 + 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#558 + 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#355 + def match?(re); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#297 + 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#523 + 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#460 + def parse(str, now = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#566 + def period_for_local(time, dst = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#562 + def period_for_utc(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#570 + 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#476 + def rfc3339(str); end + + # Returns a standard time zone name defined by IANA + # https://www.iana.org/time-zones + # + # source://activesupport//lib/active_support/values/time_zone.rb#319 + def standard_name; 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#514 + 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#361 + def to_s; end + + # Returns the current date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#528 + def today; end + + # Returns the next date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#533 + def tomorrow; end + + # Returns the value of attribute tzinfo. + # + # source://activesupport//lib/active_support/values/time_zone.rb#298 + def tzinfo; end + + # Returns the offset of this time zone from UTC in seconds. + # + # source://activesupport//lib/active_support/values/time_zone.rb#324 + 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#549 + def utc_to_local(time); end + + # Returns the previous date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#538 + def yesterday; end + + private + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#592 + def parts_to_time(parts, now); end + + # source://activesupport//lib/active_support/values/time_zone.rb#617 + 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#233 + 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#224 + def all; end + + # source://activesupport//lib/active_support/values/time_zone.rb#266 + 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#261 + def country_zones(country_code); end + + # source://activesupport//lib/active_support/values/time_zone.rb#212 + def create(*_arg0); end + + # source://activesupport//lib/active_support/values/time_zone.rb#208 + 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#217 + 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#200 + 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#255 + def us_zones; end + + private + + # source://activesupport//lib/active_support/values/time_zone.rb#274 + def load_country_zones(code); end + + # source://activesupport//lib/active_support/values/time_zone.rb#288 + def zones_map; end + end +end + +# Keys are \Rails TimeZone names, values are TZInfo identifiers. +# +# source://activesupport//lib/active_support/values/time_zone.rb#33 +ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/values/time_zone.rb#189 +ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/values/time_zone.rb#188 +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), T.untyped) + +# 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) + +# = \XmlMini +# +# To use the much faster libxml parser: +# gem "libxml-ruby" +# XmlMini.backend = 'LibXML' +# +# source://activesupport//lib/active_support/xml_mini.rb#17 +module ActiveSupport::XmlMini + extend ::ActiveSupport::XmlMini + + # source://activesupport//lib/active_support/xml_mini.rb#102 + def backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#106 + def backend=(name); end + + # Returns the value of attribute depth. + # + # source://activesupport//lib/active_support/xml_mini.rb#97 + 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#97 + def depth=(_arg0); end + + # source://activesupport//lib/active_support/xml_mini.rb#100 + def parse(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/xml_mini.rb#153 + def rename_key(key, options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/xml_mini.rb#120 + def to_tag(key, value, options); end + + # source://activesupport//lib/active_support/xml_mini.rb#112 + def with_backend(name); end + + private + + # source://activesupport//lib/active_support/xml_mini.rb#164 + def _dasherize(key); end + + # source://activesupport//lib/active_support/xml_mini.rb#170 + def _parse_binary(bin, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#181 + def _parse_file(file, entity); end + + # source://activesupport//lib/active_support/xml_mini.rb#189 + def _parse_hex_binary(bin); end + + # source://activesupport//lib/active_support/xml_mini.rb#201 + def cast_backend_name_to_module(name); end + + # source://activesupport//lib/active_support/xml_mini.rb#193 + def current_thread_backend; end + + # source://activesupport//lib/active_support/xml_mini.rb#197 + def current_thread_backend=(name); end +end + +# source://activesupport//lib/active_support/xml_mini.rb#34 +ActiveSupport::XmlMini::DEFAULT_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini.rb#56 +ActiveSupport::XmlMini::FORMATTING = T.let(T.unsafe(nil), Hash) + +# This module decorates files deserialized using Hash.from_xml with +# the original_filename and content_type methods. +# +# source://activesupport//lib/active_support/xml_mini.rb#22 +module ActiveSupport::XmlMini::FileLike + # source://activesupport//lib/active_support/xml_mini.rb#29 + def content_type; end + + # source://activesupport//lib/active_support/xml_mini.rb#23 + def content_type=(_arg0); end + + # source://activesupport//lib/active_support/xml_mini.rb#25 + def original_filename; end + + # source://activesupport//lib/active_support/xml_mini.rb#23 + def original_filename=(_arg0); end +end + +# source://activesupport//lib/active_support/xml_mini.rb#66 +ActiveSupport::XmlMini::PARSING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini.rb#39 +ActiveSupport::XmlMini::TYPE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/xml_mini/rexml.rb#8 +module ActiveSupport::XmlMini_REXML + extend ::ActiveSupport::XmlMini_REXML + + # Parse an XML Document string or IO into a simple hash. + # + # Same as XmlSimple::xml_in but doesn't shoot itself in the foot, + # and uses the defaults from Active Support. + # + # data:: + # XML Document string or IO to parse + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#20 + def parse(data); end + + private + + # Actually converts an XML document element into a data structure. + # + # element:: + # The document element to be collapsed. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#63 + def collapse(element, depth); end + + # Determines if a document element has text content + # + # element:: + # XML element to be checked. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#133 + def empty_content?(element); end + + # Converts the attributes array of an XML element into a hash. + # Returns an empty Hash if node has no attributes. + # + # element:: + # XML element to extract attributes from. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#123 + def get_attributes(element); end + + # Adds a new key/value pair to an existing Hash. If the key to be added + # already exists and the existing value associated with key is not + # an Array, it will be wrapped in an Array. Then the new value is + # appended to that Array. + # + # hash:: + # Hash to add key/value pair to. + # key:: + # Key to be added. + # value:: + # Value to be associated with key. + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#103 + def merge!(hash, key, value); end + + # Convert an XML element and merge into the hash + # + # hash:: + # Hash to merge the converted element into. + # element:: + # XML element to merge into hash + # + # @raise [REXML::ParseException] + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#54 + def merge_element!(hash, element, depth); end + + # Merge all the texts of an element into the hash + # + # hash:: + # Hash to add the converted element to. + # element:: + # XML element whose texts are to me merged into the hash + # + # source://activesupport//lib/active_support/xml_mini/rexml.rb#81 + def merge_texts!(hash, element); end + + # source://activesupport//lib/active_support/xml_mini/rexml.rb#41 + def require_rexml; end +end + +# source://activesupport//lib/active_support/xml_mini/rexml.rb#11 +ActiveSupport::XmlMini_REXML::CONTENT_KEY = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/array/extract.rb#3 +class Array + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#164 + def as_json(options = T.unsafe(nil)); end + + # An array is blank if it's empty: + # + # [].blank? # => true + # [1,2,3].blank? # => false + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#102 + def blank?; 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#275 + def compact_blank!; end + + # Returns a copy of the Array excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] + # + # Note: This is an optimization of Enumerable#excluding that uses Array#- + # instead of Array#reject for performance reasons. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#47 + def excluding(*elements); end + + # Removes and returns the elements for which the block returns a true value. + # If no block is given, an Enumerator is returned instead. + # + # numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + # odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9] + # numbers # => [0, 2, 4, 6, 8] + # + # source://activesupport//lib/active_support/core_ext/array/extract.rb#10 + def extract!; end + + # Extracts options from a set of arguments. Removes and returns the last + # element in the array if it's a hash, otherwise returns a blank hash. + # + # def options(*args) + # args.extract_options! + # end + # + # options(1, 2) # => {} + # options(1, 2, a: :b) # => {:a=>:b} + # + # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#24 + def extract_options!; end + + # Equal to self[4]. + # + # %w( a b c d e ).fifth # => "e" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#76 + def fifth; end + + # Equal to self[41]. Also known as accessing "the reddit". + # + # (1..42).to_a.forty_two # => 42 + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#83 + def forty_two; end + + # Equal to self[3]. + # + # %w( a b c d e ).fourth # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#69 + def fourth; end + + # Returns the tail of the array from +position+. + # + # %w( a b c d ).from(0) # => ["a", "b", "c", "d"] + # %w( a b c d ).from(2) # => ["c", "d"] + # %w( a b c d ).from(10) # => [] + # %w().from(0) # => [] + # %w( a b c d ).from(-2) # => ["c", "d"] + # %w( a b c ).from(-10) # => [] + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#12 + def from(position); end + + # 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 + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#104 + def present?; end + + # Equal to self[1]. + # + # %w( a b c d e ).second # => "b" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#55 + def second; end + + # Equal to self[-2]. + # + # %w( a b c d e ).second_to_last # => "d" + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#97 + def second_to_last; end + + # 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#106 + 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#48 + 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#56 + def to_query(key); end + + # Converts the array to a comma-separated sentence where the last element is + # joined by the connector word. + # + # You can pass the following options to change the default behavior. If you + # pass an option key that doesn't exist in the list below, it will raise an + # ArgumentError. + # + # ==== Options + # + # * :words_connector - The sign or word used to join all but the last + # element in arrays with three or more elements (default: ", "). + # * :last_word_connector - The sign or word used to join the last element + # in arrays with three or more elements (default: ", and "). + # * :two_words_connector - The sign or word used to join the elements + # in arrays with two elements (default: " and "). + # * :locale - If +i18n+ is available, you can set a locale and use + # the connector options defined on the 'support.array' namespace in the + # corresponding dictionary file. + # + # ==== Examples + # + # [].to_sentence # => "" + # ['one'].to_sentence # => "one" + # ['one', 'two'].to_sentence # => "one and two" + # ['one', 'two', 'three'].to_sentence # => "one, two, and three" + # + # ['one', 'two'].to_sentence(passing: 'invalid option') + # # => ArgumentError: Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale + # + # ['one', 'two'].to_sentence(two_words_connector: '-') + # # => "one-two" + # + # ['one', 'two', 'three'].to_sentence(words_connector: ' or ', last_word_connector: ' or at least ') + # # => "one or two or at least three" + # + # Using :locale option: + # + # # Given this locale dictionary: + # # + # # es: + # # support: + # # array: + # # words_connector: " o " + # # two_words_connector: " y " + # # last_word_connector: " o al menos " + # + # ['uno', 'dos'].to_sentence(locale: :es) + # # => "uno y dos" + # + # ['uno', 'dos', 'tres'].to_sentence(locale: :es) + # # => "uno o dos o al menos tres" + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#60 + def to_sentence(options = T.unsafe(nil)); end + + # Returns a string that represents the array in XML by invoking +to_xml+ + # on each element. Active Record collections delegate their representation + # in XML to this method. + # + # All elements are expected to respond to +to_xml+, if any of them does + # not then an exception is raised. + # + # The root node reflects the class name of the first element in plural + # if all elements belong to the same type and that's not Hash: + # + # customer.projects.to_xml + # + # + # + # + # 20000.0 + # 1567 + # 2008-04-09 + # ... + # + # + # 57230.0 + # 1567 + # 2008-04-15 + # ... + # + # + # + # Otherwise the root element is "objects": + # + # [{ foo: 1, bar: 2}, { baz: 3}].to_xml + # + # + # + # + # 2 + # 1 + # + # + # 3 + # + # + # + # If the collection is empty the root element is "nil-classes" by default: + # + # [].to_xml + # + # + # + # + # To ensure a meaningful root element use the :root option: + # + # customer_with_no_projects.projects.to_xml(root: 'projects') + # + # + # + # + # By default name of the node for the children of root is root.singularize. + # You can change it with the :children option. + # + # The +options+ hash is passed downwards: + # + # Message.all.to_xml(skip_types: true) + # + # + # + # + # 2008-03-07T09:58:18+01:00 + # 1 + # 1 + # 2008-03-07T09:58:18+01:00 + # 1 + # + # + # + # source://activesupport//lib/active_support/core_ext/array/conversions.rb#183 + def to_xml(options = T.unsafe(nil)); end + + # Returns a copy of the Array excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"] + # [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ] + # + # Note: This is an optimization of Enumerable#excluding that uses Array#- + # instead of Array#reject for performance reasons. + # + # source://activesupport//lib/active_support/core_ext/array/access.rb#50 + def without(*elements); end + + class << self + # Wraps its argument in an array unless it is already an array (or array-like). + # + # Specifically: + # + # * If the argument is +nil+ an empty array is returned. + # * Otherwise, if the argument responds to +to_ary+ it is invoked, and its result returned. + # * Otherwise, returns an array with the argument as its single element. + # + # Array.wrap(nil) # => [] + # Array.wrap([1, 2, 3]) # => [1, 2, 3] + # Array.wrap(0) # => [0] + # + # This method is similar in purpose to Kernel#Array, but there are some differences: + # + # * If the argument responds to +to_ary+ the method is invoked. Kernel#Array + # moves on to try +to_a+ if the returned value is +nil+, but Array.wrap returns + # an array with the argument as its single element right away. + # * If the returned value from +to_ary+ is neither +nil+ nor an +Array+ object, Kernel#Array + # raises an exception, while Array.wrap does not, it just returns the value. + # * It does not call +to_a+ on the argument, if the argument does not respond to +to_ary+ + # it returns an array with the argument as its single element. + # + # The last point is easily explained with some enumerables: + # + # Array(foo: :bar) # => [[:foo, :bar]] + # Array.wrap(foo: :bar) # => [{:foo=>:bar}] + # + # There's also a related idiom that uses the splat operator: + # + # [*object] + # + # which returns [] for +nil+, but calls to Array(object) otherwise. + # + # The differences with Kernel#Array explained above + # apply to the rest of objects. + # + # source://activesupport//lib/active_support/core_ext/array/wrap.rb#39 + def wrap(object); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#124 +class BigDecimal < ::Numeric + include ::ActiveSupport::BigDecimalWithDefaultFormat + + # A BigDecimal would be naturally represented as a JSON number. Most libraries, + # however, parse non-integer JSON numbers directly as floats. Clients using + # those libraries would get in general a wrong number and no way to recover + # other than manually inspecting the string with the JSON code itself. + # + # That's why a JSON string is returned. The JSON literal is not numeric, but + # if the other end knows by contract that the data is supposed to be a + # BigDecimal, it still has the chance to post-process the string and get the + # real value. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#134 + def as_json(options = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/class/attribute.rb#6 +class Class < ::Module + include ::ActiveSupport::DescendantsTracker::ReloadedClassesFiltering + + # Declare a class-level attribute whose value is inheritable by subclasses. + # Subclasses can change their own value and it will not impact parent class. + # + # ==== Options + # + # * :instance_reader - Sets the instance reader method (defaults to true). + # * :instance_writer - Sets the instance writer method (defaults to true). + # * :instance_accessor - Sets both instance methods (defaults to true). + # * :instance_predicate - Sets a predicate method (defaults to true). + # * :default - Sets a default value for the attribute (defaults to nil). + # + # ==== Examples + # + # class Base + # class_attribute :setting + # end + # + # class Subclass < Base + # end + # + # Base.setting = true + # Subclass.setting # => true + # Subclass.setting = false + # Subclass.setting # => false + # Base.setting # => true + # + # In the above case as long as Subclass does not assign a value to setting + # by performing Subclass.setting = _something_, Subclass.setting + # would read value assigned to parent class. Once Subclass assigns a value then + # the value assigned by Subclass would be returned. + # + # This matches normal Ruby method inheritance: think of writing an attribute + # on a subclass as overriding the reader method. However, you need to be aware + # when using +class_attribute+ with mutable structures as +Array+ or +Hash+. + # In such cases, you don't want to do changes in place. Instead use setters: + # + # Base.setting = [] + # Base.setting # => [] + # Subclass.setting # => [] + # + # # Appending in child changes both parent and child because it is the same object: + # Subclass.setting << :foo + # Base.setting # => [:foo] + # Subclass.setting # => [:foo] + # + # # Use setters to not propagate changes: + # Base.setting = [] + # Subclass.setting += [:foo] + # Base.setting # => [] + # Subclass.setting # => [:foo] + # + # For convenience, an instance predicate method is defined as well. + # To skip it, pass instance_predicate: false. + # + # Subclass.setting? # => false + # + # Instances may overwrite the class value in the same way: + # + # Base.setting = true + # object = Base.new + # object.setting # => true + # object.setting = false + # object.setting # => false + # Base.setting # => true + # + # To opt out of the instance reader method, pass instance_reader: false. + # + # object.setting # => NoMethodError + # object.setting? # => NoMethodError + # + # To opt out of the instance writer method, pass instance_writer: false. + # + # object.setting = false # => NoMethodError + # + # To opt out of both instance methods, pass instance_accessor: false. + # + # To set a default value for the attribute, pass default:, like so: + # + # class_attribute :settings, default: {} + # + # source://activesupport//lib/active_support/core_ext/class/attribute.rb#86 + def class_attribute(*attrs, instance_accessor: T.unsafe(nil), instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_predicate: T.unsafe(nil), default: T.unsafe(nil)); end + + # Returns an array with all classes that are < than its receiver. + # + # class C; end + # C.descendants # => [] + # + # class B < C; end + # C.descendants # => [B] + # + # class A < B; end + # C.descendants # => [B, A] + # + # class D < C; end + # C.descendants # => [B, A, D] + # + # source://activesupport//lib/active_support/core_ext/class/subclasses.rb#19 + def descendants; end + + # source://activesupport//lib/active_support/descendants_tracker.rb#59 + def subclasses; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#68 +class Data + # source://activesupport//lib/active_support/core_ext/object/json.rb#69 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/date/zones.rb#6 +class Date + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#98 + def +(other); end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#108 + 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#160 + def <=>(other); end + + # Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with + # any of these keys: :years, :months, :weeks, :days. + # + # The increments are applied in order of time units from largest to smallest. + # In other words, the date is incremented first by +:years+, then by + # +:months+, then by +:weeks+, then by +:days+. This order can affect the + # result around the end of a month. For example, incrementing first by months + # then by days: + # + # Date.new(2004, 9, 30).advance(months: 1, days: 1) + # # => Sun, 31 Oct 2004 + # + # Whereas incrementing first by days then by months yields a different result: + # + # Date.new(2004, 9, 30).advance(days: 1).advance(months: 1) + # # => Mon, 01 Nov 2004 + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#127 + def advance(options); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then subtracts the specified number of seconds. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#55 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#211 + def as_json(options = T.unsafe(nil)); end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#72 + 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#88 + 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#80 + 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#82 + 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#71 + 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#81 + 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#143 + def change(options); end + + # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#152 + def compare_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#159 + def compare_without_coercion(_arg0); end + + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#66 + def default_inspect; 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#64 + 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#67 + 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#78 + 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#70 + def midnight; end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#100 + def minus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#107 + def minus_without_duration(_arg0); 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#79 + def noon; end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#90 + def plus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#97 + def plus_without_duration(_arg0); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#63 + def readable_inspect; end + + # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) + # and then adds the specified number of seconds + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#61 + def since(seconds); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_fs(:db) # => "2007-11-10" + # date.to_formatted_s(:db) # => "2007-11-10" + # + # date.to_fs(:short) # => "10 Nov" + # date.to_fs(:number) # => "20071110" + # date.to_fs(:long) # => "November 10, 2007" + # date.to_fs(:long_ordinal) # => "November 10th, 2007" + # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:rfc2822) # => "10 Nov 2007" + # date.to_fs(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_fs + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#60 + def to_formatted_s(format = T.unsafe(nil)); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to to_formatted_s. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_fs(:db) # => "2007-11-10" + # date.to_formatted_s(:db) # => "2007-11-10" + # + # date.to_fs(:short) # => "10 Nov" + # date.to_fs(:number) # => "20071110" + # date.to_fs(:long) # => "November 10, 2007" + # date.to_fs(:long_ordinal) # => "November 10th, 2007" + # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:rfc2822) # => "10 Nov 2007" + # date.to_fs(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_fs + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#49 + def to_fs(format = T.unsafe(nil)); end + + # Converts a Date instance to a Time, where the time is set to the beginning of the day. + # The timezone can be either +:local+ or +:utc+ (default +:local+). + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_time # => 2007-11-10 00:00:00 0800 + # date.to_time(:local) # => 2007-11-10 00:00:00 0800 + # + # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC + # + # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. ENV['TZ']. + # If the application's timezone is needed, then use +in_time_zone+ instead. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#69 + 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#88 + def xmlschema; end + + class << self + # Returns the week start (e.g. +:monday+) for the current request, if this has been set (via Date.beginning_of_week=). + # If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. + # If no +config.beginning_of_week+ was specified, returns +:monday+. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#19 + def beginning_of_week; end + + # Sets Date.beginning_of_week to a week start (e.g. +:monday+) for current request/thread. + # + # This method accepts any of the following day symbols: + # +:monday+, +:tuesday+, +:wednesday+, +:thursday+, +:friday+, +:saturday+, +:sunday+ + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#27 + def beginning_of_week=(week_start); end + + # Returns the value of attribute beginning_of_week_default. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 + def beginning_of_week_default; end + + # Sets the attribute beginning_of_week_default + # + # @param value the value to set the attribute beginning_of_week_default to. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#14 + def beginning_of_week_default=(_arg0); end + + # Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today. + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#48 + def current; end + + # Returns week start day symbol (e.g. +:monday+), or raises an +ArgumentError+ for invalid day symbol. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#32 + def find_beginning_of_week!(week_start); end + + # Returns a new Date representing the date 1 day after today (i.e. tomorrow's date). + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#43 + def tomorrow; end + + # Returns a new Date representing the date 1 day ago (i.e. yesterday's date). + # + # source://activesupport//lib/active_support/core_ext/date/calculations.rb#38 + def yesterday; end + end +end + +# source://activesupport//lib/active_support/core_ext/date/conversions.rb#9 +Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#6 +module DateAndTime; end + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#7 +module DateAndTime::Calculations + # Returns true if the date/time falls after date_or_time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#72 + def after?(date_or_time); end + + # Returns a Range representing the whole day of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#310 + def all_day; end + + # Returns a Range representing the whole month of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#321 + def all_month; end + + # Returns a Range representing the whole quarter of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#326 + def all_quarter; end + + # Returns a Range representing the whole week of the current date/time. + # Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#316 + def all_week(start_day = T.unsafe(nil)); end + + # Returns a Range representing the whole year of the current date/time. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#331 + def all_year; end + + # Returns a new date/time at the start of the month. + # + # today = Date.today # => Thu, 18 Jun 2015 + # today.beginning_of_month # => Mon, 01 Jun 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 + # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#128 + 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#143 + 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#271 + 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#182 + 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#300 + 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#158 + 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#286 + 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#307 + def at_end_of_year; end + + # Returns true if the date/time falls before date_or_time. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#67 + def before?(date_or_time); end + + # Returns a new date/time at the start of the month. + # + # today = Date.today # => Thu, 18 Jun 2015 + # today.beginning_of_month # => Mon, 01 Jun 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000 + # now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#125 + def beginning_of_month; end + + # Returns a new date/time at the start of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_quarter # => Wed, 01 Jul 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#139 + def beginning_of_quarter; end + + # Returns a new date/time representing the start of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#267 + def beginning_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time at the beginning of the year. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.beginning_of_year # => Thu, 01 Jan 2015 + # + # +DateTime+ objects will have a time set to 0:00. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#179 + def beginning_of_year; end + + # Returns a new date/time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#77 + def days_ago(days); end + + # Returns a new date/time the specified number of days in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#82 + def days_since(days); end + + # Returns the number of days to the start of the week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#258 + def days_to_week_start(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the month. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#296 + def end_of_month; end + + # Returns a new date/time at the end of the quarter. + # + # today = Date.today # => Fri, 10 Jul 2015 + # today.end_of_quarter # => Wed, 30 Sep 2015 + # + # +DateTime+ objects will have a time set to 23:59:59. + # + # now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000 + # now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#154 + def end_of_quarter; end + + # Returns a new date/time representing the end of this week on the given day. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#283 + def end_of_week(start_day = T.unsafe(nil)); end + + # Returns a new date/time representing the end of the year. + # DateTime objects will have a time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#304 + def end_of_year; end + + # Returns true if the date/time is in the future. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#52 + def future?; end + + # Short-hand for months_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#240 + def last_month; end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#248 + 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#227 + 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#237 + def last_weekday; end + + # Short-hand for years_ago(1). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#251 + def last_year; end + + # Returns Monday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 0:00. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#275 + def monday; end + + # Returns a new date/time the specified number of months ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#97 + def months_ago(months); end + + # Returns a new date/time the specified number of months in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#102 + def months_since(months); end + + # Returns true if the date/time is tomorrow. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#38 + def next_day?; end + + # Returns a new date/time representing the next occurrence of the specified day of week. + # + # today = Date.today # => Thu, 14 Dec 2017 + # today.next_occurring(:monday) # => Mon, 18 Dec 2017 + # today.next_occurring(:thursday) # => Thu, 21 Dec 2017 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#340 + def next_occurring(day_of_week); end + + # Short-hand for months_since(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#215 + def next_quarter; end + + # Returns a new date/time representing the given day in the next week. + # + # today = Date.today # => Thu, 07 May 2015 + # today.next_week # => Mon, 11 May 2015 + # + # The +given_day_in_next_week+ defaults to the beginning of the week + # which is determined by +Date.beginning_of_week+ or +config.beginning_of_week+ + # when set. + # + # today = Date.today # => Thu, 07 May 2015 + # today.next_week(:friday) # => Fri, 15 May 2015 + # + # +DateTime+ objects have their time set to 0:00 unless +same_time+ is true. + # + # now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000 + # now.next_week # => Mon, 11 May 2015 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#200 + def next_week(given_day_in_next_week = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the next weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#206 + def next_weekday; end + + # Returns true if the date/time does not fall on a Saturday or Sunday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#62 + def on_weekday?; end + + # Returns true if the date/time falls on a Saturday or Sunday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#57 + def on_weekend?; end + + # Returns true if the date/time is in the past. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#47 + def past?; end + + # Returns true if the date/time is yesterday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#44 + def prev_day?; end + + # Returns a new date/time representing the previous occurrence of the specified day of week. + # + # today = Date.today # => Thu, 14 Dec 2017 + # today.prev_occurring(:monday) # => Mon, 11 Dec 2017 + # today.prev_occurring(:thursday) # => Thu, 07 Dec 2017 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#351 + def prev_occurring(day_of_week); end + + # Short-hand for months_ago(3). + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#245 + def prev_quarter; end + + # Returns a new date/time representing the given day in the previous week. + # Week is assumed to start on +start_day+, default is + # +Date.beginning_of_week+ or +config.beginning_of_week+ when set. + # DateTime objects have their time set to 0:00 unless +same_time+ is true. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#223 + def prev_week(start_day = T.unsafe(nil), same_time: T.unsafe(nil)); end + + # Returns a new date/time representing the previous weekday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#230 + def prev_weekday; end + + # Returns the quarter for a date/time. + # + # Date.new(2010, 1, 31).quarter # => 1 + # Date.new(2010, 4, 12).quarter # => 2 + # Date.new(2010, 9, 15).quarter # => 3 + # Date.new(2010, 12, 25).quarter # => 4 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#166 + def quarter; end + + # Returns Sunday of this week assuming that week starts on Monday. + # +DateTime+ objects have their time set to 23:59:59. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#290 + def sunday; end + + # Returns true if the date/time is today. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#30 + def today?; end + + # Returns a new date/time representing tomorrow. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#25 + def tomorrow; end + + # Returns true if the date/time is tomorrow. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#35 + def tomorrow?; end + + # Returns a new date/time the specified number of weeks ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#87 + def weeks_ago(weeks); end + + # Returns a new date/time the specified number of weeks in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#92 + def weeks_since(weeks); end + + # Returns a new date/time the specified number of years ago. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#107 + def years_ago(years); end + + # Returns a new date/time the specified number of years in the future. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#112 + def years_since(years); end + + # Returns a new date/time representing yesterday. + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#20 + def yesterday; end + + # Returns true if the date/time is yesterday. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#41 + def yesterday?; end + + private + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#370 + def copy_time_to(other); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#366 + def days_span(day); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#358 + def first_hour(date_or_time); end + + # source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#362 + def last_hour(date_or_time); end +end + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#8 +DateAndTime::Calculations::DAYS_INTO_WEEK = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/date_and_time/calculations.rb#17 +DateAndTime::Calculations::WEEKEND_DAYS = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#7 +module DateAndTime::Compatibility + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#21 + def utc_to_local_returns_utc_offset_times; end + + class << self + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#21 + def utc_to_local_returns_utc_offset_times; end + + # source://activesupport//lib/active_support/core_ext/date_and_time/compatibility.rb#21 + 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#208 + 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. + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#82 + def advance(options); end + + # Returns a new DateTime representing the time a number of seconds ago. + # Do not use this method in combination with x.months, use months_ago instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#109 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#221 + def as_json(options = T.unsafe(nil)); end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#127 + 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#149 + 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#161 + 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#143 + 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#155 + 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#167 + 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#135 + 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#137 + 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#126 + 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#136 + def at_noon; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 + def beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#146 + def beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#158 + def beginning_of_minute; end + + # 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 + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#61 + def default_inspect; end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#140 + def end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#152 + def end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#164 + def end_of_minute; end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) + # datetime.formatted_offset # => "-06:00" + # datetime.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#53 + 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#192 + 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#178 + 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#193 + 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#194 + 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#119 + 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#62 + def inspect; end + + # Returns a Time instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#170 + def localtime(utc_offset = T.unsafe(nil)); end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#133 + def midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#125 + 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#134 + def noon; end + + # Returns the fraction of a second as nanoseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#96 + 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#58 + def readable_inspect; end + + # Returns the number of seconds since 00:00:00. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#20 + def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#29 + def seconds_until_end_of_day; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#116 + def since(seconds); end + + # Returns the fraction of a second as a +Rational+ + # + # DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 + def subsec; end + + # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#81 + 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#44 + 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#37 + 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#86 + def to_i; end + + # Returns the fraction of a second as microseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#91 + def usec; end + + # Returns a Time instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 + def utc; end + + # Returns +true+ if offset == 0. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#197 + def utc?; end + + # Returns the offset value in seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#202 + def utc_offset; end + + private + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#101 + def offset_in_seconds; end + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#105 + 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#71 + 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 + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#39 +module ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + extend ::ActiveSupport::CoreExt::ERBUtil + + private + + # A utility method for escaping HTML without affecting existing escaped entities. + # + # html_escape_once('1 < 2 & 3') + # # => "1 < 2 & 3" + # + # html_escape_once('<< Accept & Checkout') + # # => "<< Accept & Checkout" + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#63 + def html_escape_once(s); end + + # A utility method for escaping HTML entities in JSON strings. Specifically, the + # &, > and < characters are replaced with their equivalent unicode escaped form - + # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also + # escaped as they are treated as newline characters in some JavaScript engines. + # These sequences have identical meaning as the original characters inside the + # context of a JSON string, so assuming the input is a valid and well-formed + # JSON value, the output will have equivalent meaning when parsed: + # + # json = JSON.generate({ name: ""}) + # # => "{\"name\":\"\"}" + # + # json_escape(json) + # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" + # + # JSON.parse(json) == JSON.parse(json_escape(json)) + # # => true + # + # The intended use case for this method is to escape JSON strings before including + # them inside a script tag to avoid XSS vulnerability: + # + # + # + # It is necessary to +raw+ the result of +json_escape+, so that quotation marks + # don't get converted to " entities. +json_escape+ doesn't + # automatically flag the result as HTML safe, since the raw value is unsafe to + # use inside HTML attributes. + # + # If your JSON is being used downstream for insertion into the DOM, be aware of + # whether or not it is being inserted via html(). Most jQuery plugins do this. + # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated + # content returned by your JSON. + # + # If you need to output JSON elsewhere in your HTML, you can just do something + # like this, as any unsafe characters (including quotation marks) will be + # automatically escaped for you: + # + #
    ...
    + # + # WARNING: this helper only works with valid JSON. Using this on non-JSON values + # will open up serious XSS vulnerabilities. For example, if you replace the + # +current_user.to_json+ in the example above with user input instead, the browser + # will happily eval() that string as JavaScript. + # + # The escaping performed in this method is identical to those performed in the + # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is + # set to true. Because this transformation is idempotent, this helper can be + # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. + # + # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ + # is enabled, or if you are unsure where your JSON string originated from, it + # is recommended that you always apply this helper (other libraries, such as the + # JSON gem, do not provide this kind of protection by default; also some gems + # might override +to_json+ to bypass Active Support's encoder). + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#124 + def json_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # xml_name_escape('1 < 2 & 3') + # # => "1___2___3" + # + # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#142 + def xml_name_escape(name); end + + class << self + # A utility method for escaping HTML without affecting existing escaped entities. + # + # html_escape_once('1 < 2 & 3') + # # => "1 < 2 & 3" + # + # html_escape_once('<< Accept & Checkout') + # # => "<< Accept & Checkout" + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#67 + def html_escape_once(s); end + + # A utility method for escaping HTML entities in JSON strings. Specifically, the + # &, > and < characters are replaced with their equivalent unicode escaped form - + # \u0026, \u003e, and \u003c. The Unicode sequences \u2028 and \u2029 are also + # escaped as they are treated as newline characters in some JavaScript engines. + # These sequences have identical meaning as the original characters inside the + # context of a JSON string, so assuming the input is a valid and well-formed + # JSON value, the output will have equivalent meaning when parsed: + # + # json = JSON.generate({ name: ""}) + # # => "{\"name\":\"\"}" + # + # json_escape(json) + # # => "{\"name\":\"\\u003C/script\\u003E\\u003Cscript\\u003Ealert('PWNED!!!')\\u003C/script\\u003E\"}" + # + # JSON.parse(json) == JSON.parse(json_escape(json)) + # # => true + # + # The intended use case for this method is to escape JSON strings before including + # them inside a script tag to avoid XSS vulnerability: + # + # + # + # It is necessary to +raw+ the result of +json_escape+, so that quotation marks + # don't get converted to " entities. +json_escape+ doesn't + # automatically flag the result as HTML safe, since the raw value is unsafe to + # use inside HTML attributes. + # + # If your JSON is being used downstream for insertion into the DOM, be aware of + # whether or not it is being inserted via html(). Most jQuery plugins do this. + # If that is the case, be sure to +html_escape+ or +sanitize+ any user-generated + # content returned by your JSON. + # + # If you need to output JSON elsewhere in your HTML, you can just do something + # like this, as any unsafe characters (including quotation marks) will be + # automatically escaped for you: + # + #
    ...
    + # + # WARNING: this helper only works with valid JSON. Using this on non-JSON values + # will open up serious XSS vulnerabilities. For example, if you replace the + # +current_user.to_json+ in the example above with user input instead, the browser + # will happily eval() that string as JavaScript. + # + # The escaping performed in this method is identical to those performed in the + # Active Support JSON encoder when +ActiveSupport.escape_html_entities_in_json+ is + # set to true. Because this transformation is idempotent, this helper can be + # applied even if +ActiveSupport.escape_html_entities_in_json+ is already true. + # + # Therefore, when you are unsure if +ActiveSupport.escape_html_entities_in_json+ + # is enabled, or if you are unsure where your JSON string originated from, it + # is recommended that you always apply this helper (other libraries, such as the + # JSON gem, do not provide this kind of protection by default; also some gems + # might override +to_json+ to bypass Active Support's encoder). + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#134 + def json_escape(s); end + + # Tokenizes a line of ERB. This is really just for error reporting and + # nobody should use it. + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#161 + def tokenize(source); end + + # source://activesupport//lib/active_support/core_ext/erb/util.rb#10 + def unwrapped_html_escape(s); end + + # A utility method for escaping XML names of tags and names of attributes. + # + # xml_name_escape('1 < 2 & 3') + # # => "1___2___3" + # + # It follows the requirements of the specification: https://www.w3.org/TR/REC-xml/#NT-Name + # + # source://activesupport//lib/active_support/core_ext/erb/util.rb#157 + def xml_name_escape(name); end + end +end + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#40 +ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#41 +ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#49 +ERB::Util::INVALID_TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#47 +ERB::Util::INVALID_TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#50 +ERB::Util::SAFE_XML_TAG_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#48 +ERB::Util::TAG_NAME_FOLLOWING_CODEPOINTS = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/erb/util.rb#51 +ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# Following XML requirements: https://www.w3.org/TR/REC-xml/#NT-Name +# +# source://activesupport//lib/active_support/core_ext/erb/util.rb#44 +ERB::Util::TAG_NAME_START_CODEPOINTS = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#145 +module Enumerable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + extend ::ActiveSupport::EnumerableCoreExt::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#146 + def as_json(options = T.unsafe(nil)); end + + # Returns a new +Array+ without the blank items. + # Uses Object#blank? for determining if an item is blank. + # + # [1, "", nil, 2, " ", [], {}, false, true].compact_blank + # # => [1, 2, true] + # + # Set.new([nil, "", 1, false]).compact_blank + # # => [1] + # + # When called on a +Hash+, returns a new +Hash+ without the blank values. + # + # { a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank + # # => { b: 1, f: true } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#184 + def compact_blank; end + + # The negative of the Enumerable#include?. Returns +true+ if the + # collection does not include the object. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#118 + def exclude?(object); end + + # Returns a copy of the enumerable excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" + # # => ["David", "Rafael"] + # + # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] + # # => ["David", "Rafael"] + # + # {foo: 1, bar: 2, baz: 3}.excluding :bar + # # => {foo: 1, baz: 3} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#132 + def excluding(*elements); end + + # Returns a new +Array+ where the order has been set to that provided in the +series+, based on the +key+ of the + # objects in the original enumerable. + # + # [ Person.find(5), Person.find(3), Person.find(1) ].in_order_of(:id, [ 1, 5, 3 ]) + # # => [ Person.find(1), Person.find(5), Person.find(3) ] + # + # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored. + # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result, unless + # the +filter+ option is set to +false+. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#197 + def in_order_of(key, series, filter: T.unsafe(nil)); end + + # Returns a new array that includes the passed elements. + # + # [ 1, 2, 3 ].including(4, 5) + # # => [ 1, 2, 3, 4, 5 ] + # + # ["David", "Rafael"].including %w[ Aaron Todd ] + # # => ["David", "Rafael", "Aaron", "Todd"] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#112 + def including(*elements); end + + # Convert an enumerable to a hash, using the block result as the key and the + # element as the value. + # + # people.index_by(&:login) + # # => { "nextangle" => , "chade-" => , ...} + # + # people.index_by { |person| "#{person.first_name} #{person.last_name}" } + # # => { "Chade- Fowlersburg-e" => , "David Heinemeier Hansson" => , ...} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#52 + def index_by; end + + # Convert an enumerable to a hash, using the element as the key and the block + # result as the value. + # + # post = Post.new(title: "hey there", body: "what's up?") + # + # %i( title body ).index_with { |attr_name| post.public_send(attr_name) } + # # => { title: "hey there", body: "what's up?" } + # + # If an argument is passed instead of a block, it will be used as the value + # for all elements: + # + # %i( created_at updated_at ).index_with(Time.now) + # # => { created_at: 2020-03-09 22:31:47, updated_at: 2020-03-09 22:31:47 } + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#75 + def index_with(default = T.unsafe(nil)); end + + # Returns +true+ if the enumerable has more than 1 element. Functionally + # equivalent to enum.to_a.size > 1. Can be called with a block too, + # much like any?, so people.many? { |p| p.age > 26 } returns +true+ + # if more than one person is over 26. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#93 + def many?; end + + # Calculates the maximum from the extracted elements. + # + # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] + # payments.maximum(:price) # => 15 + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#40 + def maximum(key); end + + # Calculates the minimum from the extracted elements. + # + # payments = [Payment.new(5), Payment.new(15), Payment.new(10)] + # payments.minimum(:price) # => 5 + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#32 + def minimum(key); end + + # Extract the given key from the first element in the enumerable. + # + # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pick(:name) + # # => "David" + # + # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) + # # => [1, "David"] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#161 + def pick(*keys); end + + # Extract the given key from each element in the enumerable. + # + # [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pluck(:name) + # # => ["David", "Rafael", "Aaron"] + # + # [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) + # # => [[1, "David"], [2, "Rafael"]] + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#145 + def pluck(*keys); end + + # Returns the sole item in the enumerable. If there are no items, or more + # than one item, raises Enumerable::SoleItemExpectedError. + # + # ["x"].sole # => "x" + # Set.new.sole # => Enumerable::SoleItemExpectedError: no item found + # { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple items found + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#211 + def sole; end + + # Returns a copy of the enumerable excluding the specified elements. + # + # ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd" + # # => ["David", "Rafael"] + # + # ["David", "Rafael", "Aaron", "Todd"].excluding %w[ Aaron Todd ] + # # => ["David", "Rafael"] + # + # {foo: 1, bar: 2, baz: 3}.excluding :bar + # # => {foo: 1, baz: 3} + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#136 + 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#263 +class Exception + # source://activesupport//lib/active_support/core_ext/object/json.rb#264 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/to_query.rb#38 +class FalseClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#87 + def as_json(options = T.unsafe(nil)); end + + # +false+ is blank: + # + # false.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#71 + def blank?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#75 + def present?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#40 + def to_param; end +end + +# source://activesupport//lib/active_support/core_ext/file/atomic.rb#5 +class File < ::IO + class << self + # Write to a file atomically. Useful for situations where you don't + # want other processes or threads to see half-written files. + # + # File.atomic_write('important.file') do |file| + # file.write('hello') + # end + # + # This method needs to create a temporary file. By default it will create it + # in the same directory as the destination file. If you don't like this + # behavior you can provide a different directory but it must be on the + # same physical filesystem as the file you're trying to write. + # + # File.atomic_write('/data/something.important', '/data/tmp') do |file| + # file.write('hello') + # end + # + # source://activesupport//lib/active_support/core_ext/file/atomic.rb#21 + def atomic_write(file_name, temp_dir = T.unsafe(nil)); end + + # Private utility method. + # + # source://activesupport//lib/active_support/core_ext/file/atomic.rb#56 + def probe_stat_in(dir); end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#116 +class Float < ::Numeric + # Encoding Infinity or NaN to JSON should return "null". The default returns + # "Infinity" or "NaN" which are not valid JSON. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#119 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#5 +class Hash + include ::Enumerable + include ::ActiveSupport::DeepMergeable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#175 + def as_json(options = T.unsafe(nil)); end + + # Validates all keys in a hash match *valid_keys, raising + # +ArgumentError+ on a mismatch. + # + # Note that keys are treated differently than HashWithIndifferentAccess, + # meaning that string and symbol keys will not match. + # + # { name: 'Rob', years: '28' }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key: :years. Valid keys are: :name, :age" + # { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" + # { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#48 + def assert_valid_keys(*valid_keys); end + + # A hash is blank if it's empty: + # + # {}.blank? # => true + # { key: 'value' }.blank? # => false + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#116 + def blank?; end + + # Hash#reject has its own definition, so this needs one too. + # + # source://activesupport//lib/active_support/core_ext/enumerable.rb#234 + 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#244 + def compact_blank!; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#40 + def deep_merge?(other); end + + # Returns a new hash with all keys converted to strings. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_stringify_keys + # # => {"person"=>{"name"=>"Rob", "age"=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#84 + def deep_stringify_keys; end + + # Destructively converts all keys to strings. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#91 + def deep_stringify_keys!; end + + # Returns a new hash with all keys converted to symbols, as long as + # they respond to +to_sym+. This includes the keys from the root hash + # and from all nested hashes and arrays. + # + # hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } } + # + # hash.deep_symbolize_keys + # # => {:person=>{:name=>"Rob", :age=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#103 + def deep_symbolize_keys; end + + # Destructively converts all keys to symbols, as long as they respond + # to +to_sym+. This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#110 + def deep_symbolize_keys!; end + + # Returns a new hash with all keys converted by the block operation. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # hash = { person: { name: 'Rob', age: '28' } } + # + # hash.deep_transform_keys{ |key| key.to_s.upcase } + # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#65 + def deep_transform_keys(&block); end + + # Destructively converts all keys by using the block operation. + # This includes the keys from the root hash and from all + # nested hashes and arrays. + # + # source://activesupport//lib/active_support/core_ext/hash/keys.rb#72 + def deep_transform_keys!(&block); end + + # Removes the given keys from hash and returns it. + # hash = { a: true, b: false, c: nil } + # hash.except!(:c) # => { a: true, b: false } + # hash # => { a: true, b: false } + # + # source://activesupport//lib/active_support/core_ext/hash/except.rb#8 + def except!(*keys); end + + # Removes and returns the key/value pairs matching the given keys. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.extract!(:a, :b) # => {:a=>1, :b=>2} + # hash # => {:c=>3, :d=>4} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 + def extract!(*keys); end + + # By default, only instances of Hash itself are extractable. + # Subclasses of Hash may implement this method and return + # true to declare themselves as extractable. If a Hash + # is extractable, Array#extract_options! pops it from + # the Array when it is the last element of the Array. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/array/extract_options.rb#9 + def extractable_options?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#118 + def present?; 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#30 + 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#37 + def to_options!; end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # {name: 'David', nationality: 'Danish'}.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # {name: 'David', nationality: 'Danish'}.to_query('user') + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#92 + def to_param(namespace = T.unsafe(nil)); end + + # Returns a string representation of the receiver suitable for use as a URL + # query string: + # + # {name: 'David', nationality: 'Danish'}.to_query + # # => "name=David&nationality=Danish" + # + # An optional namespace can be passed to enclose key names: + # + # {name: 'David', nationality: 'Danish'}.to_query('user') + # # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" + # + # The string pairs "key=value" that conform the query string + # are sorted lexicographically in ascending order. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#81 + def to_query(namespace = T.unsafe(nil)); 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 +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#151 +class IO + include ::Enumerable + include ::File::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#152 + def as_json(options = T.unsafe(nil)); end +end + +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def &(_arg0); end + def <=>(_arg0); end + def ^(_arg0); end + def and!(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def each(*_arg0); end + def each_byte(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def get_values(_arg0, _arg1); end + def hexdump; end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def not!; end + def null?; end + def or!(_arg0); end + def pread(*_arg0); end + def pwrite(*_arg0); end + def read(*_arg0); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def set_values(_arg0, _arg1, _arg2); end + def shared?; end + def size; end + def slice(*_arg0); end + def to_s; end + def transfer; end + def valid?; end + def values(*_arg0); end + def write(*_arg0); end + def xor!(_arg0); end + def |(_arg0); end + def ~; end + + private + + def initialize_copy(_arg0); end + + class << self + def for(_arg0); end + def map(*_arg0); end + def size_of(_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::MaskError < ::ArgumentError; end +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) +IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + +class IO::EAGAINWaitReadable < ::Errno::EAGAIN + include ::IO::WaitReadable +end + +class IO::EAGAINWaitWritable < ::Errno::EAGAIN + include ::IO::WaitWritable +end + +class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS + include ::IO::WaitReadable +end + +class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS + include ::IO::WaitWritable +end + +IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable +IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) +IO::WRITABLE = T.let(T.unsafe(nil), Integer) + +# Use `IPAddr#as_json` from the IPAddr gem if the version is 1.2.7 or higher. +# +# source://activesupport//lib/active_support/core_ext/object/json.rb#244 +class IPAddr + # source://activesupport//lib/active_support/core_ext/object/json.rb#245 + def as_json(options = T.unsafe(nil)); end +end + +class Integer < ::Numeric; end + +# source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 +module Kernel + private + + # Sets $VERBOSE to +true+ for the duration of the block and back to its + # original value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 + def enable_warnings(&block); end + + # Sets $VERBOSE to +nil+ for the duration of the block and back to its original + # value afterwards. + # + # silence_warnings do + # value = noisy_call # no warning voiced + # end + # + # noisy_call # warning voiced + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 + def silence_warnings(&block); end + + # Blocks and ignores any exception passed as argument if raised within the block. + # + # suppress(ZeroDivisionError) do + # 1/0 + # puts 'This code is NOT reached' + # end + # + # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 + def suppress(*exception_classes); end + + # Sets $VERBOSE for the duration of the block and back to its original + # value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 + def with_warnings(flag); end + + class << self + # Sets $VERBOSE to +true+ for the duration of the block and back to its + # original value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#20 + def enable_warnings(&block); end + + # Sets $VERBOSE to +nil+ for the duration of the block and back to its original + # value afterwards. + # + # silence_warnings do + # value = noisy_call # no warning voiced + # end + # + # noisy_call # warning voiced + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#14 + def silence_warnings(&block); end + + # Blocks and ignores any exception passed as argument if raised within the block. + # + # suppress(ZeroDivisionError) do + # 1/0 + # puts 'This code is NOT reached' + # end + # + # puts 'This code gets executed and nothing related to ZeroDivisionError was seen' + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#41 + def suppress(*exception_classes); end + + # Sets $VERBOSE for the duration of the block and back to its original + # value afterwards. + # + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#26 + def with_warnings(flag); end + end +end + +class LoadError < ::ScriptError + include ::DidYouMean::Correctable +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#39 +class Method + # Methods are not duplicable: + # + # method(:puts).duplicable? # => false + # method(:puts).dup # => TypeError: allocator undefined for Method + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#44 + def duplicable?; end +end + +# == Attribute Accessors per Thread +# +# Extends the module object with class/module and instance accessors for +# class/module attributes, just like the native attr* accessors for instance +# attributes, but does so on a per-thread basis. +# +# So the values are scoped within the Thread.current space under the class name +# of the module. +# +# Note that it can also be scoped per-fiber if +Rails.application.config.active_support.isolation_level+ +# is set to +:fiber+. +# +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#3 +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#20 + def attr_internal(*attrs); end + + # Declares an attribute reader and writer backed by an internally-named instance + # variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#16 + def attr_internal_accessor(*attrs); end + + # Declares an attribute reader backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#5 + def attr_internal_reader(*attrs); end + + # Declares an attribute writer backed by an internally-named instance variable. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#10 + def attr_internal_writer(*attrs); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue + # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # module HairColors + # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # module HairColors + # mattr_accessor :hair_colors, instance_accessor: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#213 + def cattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # module HairColors + # mattr_reader :hair_colors, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_styles # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#75 + def cattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#140 + 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 +ActiveSupport::DelegationError+ + # from being raised + # * :private - If set to true, changes method visibility to private + # + # The macro receives one or more method names (specified as symbols or + # strings) and the name of the target object via the :to option + # (also a symbol or string). + # + # Delegation is particularly useful with Active Record associations: + # + # class Greeter < ActiveRecord::Base + # def hello + # 'hello' + # end + # + # def goodbye + # 'goodbye' + # end + # end + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, to: :greeter + # end + # + # Foo.new.hello # => "hello" + # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # + # + # Multiple delegates to the same target are allowed: + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, :goodbye, to: :greeter + # end + # + # Foo.new.goodbye # => "goodbye" + # + # Methods can be delegated to instance variables, class variables, or constants + # by providing them as a symbols: + # + # class Foo + # CONSTANT_ARRAY = [0,1,2,3] + # @@class_array = [4,5,6,7] + # + # def initialize + # @instance_array = [8,9,10,11] + # end + # delegate :sum, to: :CONSTANT_ARRAY + # delegate :min, to: :@@class_array + # delegate :max, to: :@instance_array + # end + # + # Foo.new.sum # => 6 + # Foo.new.min # => 4 + # Foo.new.max # => 11 + # + # It's also possible to delegate a method to the class by using +:class+: + # + # class Foo + # def self.hello + # "world" + # end + # + # delegate :hello, to: :class + # end + # + # Foo.new.hello # => "world" + # + # Delegates can optionally be prefixed using the :prefix option. If the value + # is true, the delegate methods are prefixed with the name of the object being + # delegated to. + # + # Person = Struct.new(:name, :address) + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: true + # end + # + # john_doe = Person.new('John Doe', 'Vimmersvej 13') + # invoice = Invoice.new(john_doe) + # invoice.client_name # => "John Doe" + # invoice.client_address # => "Vimmersvej 13" + # + # It is also possible to supply a custom prefix. + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: :customer + # end + # + # invoice = Invoice.new(john_doe) + # invoice.customer_name # => 'John Doe' + # invoice.customer_address # => 'Vimmersvej 13' + # + # The delegated methods are public by default. + # Pass private: true to change that. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :first_name, to: :profile + # delegate :date_of_birth, to: :profile, private: true + # + # def age + # Date.today.year - date_of_birth.year + # end + # end + # + # User.new.first_name # => "Tomas" + # User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for # + # User.new.age # => 2 + # + # If the target is +nil+ and does not respond to the delegated method a + # +ActiveSupport::DelegationError+ is raised. If you wish to instead return +nil+, + # use the :allow_nil option. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile + # end + # + # User.new.age + # # => ActiveSupport::DelegationError: User#age delegated to profile.age, but profile is nil + # + # But if not having a profile yet is fine and should not be an error + # condition: + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile, allow_nil: true + # end + # + # User.new.age # nil + # + # Note that if the target is not +nil+ then the call is attempted regardless of the + # :allow_nil option, and thus an exception is still raised if said object + # does not respond to the method: + # + # class Foo + # def initialize(bar) + # @bar = bar + # end + # + # delegate :name, to: :@bar, allow_nil: true + # end + # + # Foo.new("Bar").name # raises NoMethodError: undefined method `name' + # + # The target method must be public, otherwise it will raise +NoMethodError+. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#160 + def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end + + # When building decorators, a common pattern may emerge: + # + # class Partition + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # + # private + # def respond_to_missing?(name, include_private = false) + # @event.respond_to?(name, include_private) + # end + # + # def method_missing(method, *args, &block) + # @event.send(method, *args, &block) + # end + # end + # + # With Module#delegate_missing_to, the above is condensed to: + # + # class Partition + # delegate_missing_to :@event + # + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # end + # + # The target can be anything callable within the object, e.g. instance + # variables, methods, constants, etc. + # + # The delegated method must be public on the target, otherwise it will + # raise +ActiveSupport::DelegationError+. If you wish to instead return +nil+, + # use the :allow_nil option. + # + # The marshal_dump and _dump methods are exempt from + # delegation due to possible interference when calling + # Marshal.dump(object), should the delegation target method + # of object add or remove instance variables. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#218 + def delegate_missing_to(target, allow_nil: T.unsafe(nil)); end + + # deprecate :foo, deprecator: MyLib.deprecator + # deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator + # + # A deprecator is typically an instance of ActiveSupport::Deprecation, but you can also pass any object that responds + # to deprecation_warning(deprecated_method_name, message, caller_backtrace) where you can implement your + # custom warning behavior. + # + # class MyLib::Deprecator + # def deprecation_warning(deprecated_method_name, message, caller_backtrace = nil) + # message = "#{deprecated_method_name} is deprecated and will be removed from MyLibrary | #{message}" + # Kernel.warn message + # end + # end + # + # source://activesupport//lib/active_support/core_ext/module/deprecation.rb#17 + def deprecate(*method_names, deprecator:, **options); end + + # Defines both class and instance accessors for class attributes. + # All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_accessor :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black, :blonde, :red] + # HairColors.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # + # If a subclass changes the value then that would also change the value for + # parent class. Similarly if parent class changes the value then that would + # change the value of subclasses too. + # + # class Citizen < Person + # end + # + # Citizen.new.hair_colors << :blue + # Person.new.hair_colors # => [:brown, :black, :blonde, :red, :blue] + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # module HairColors + # mattr_accessor :hair_colors, instance_writer: false, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # module HairColors + # mattr_accessor :hair_colors, instance_accessor: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:brown] # => NoMethodError + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_accessor :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_accessor(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#208 + def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # module HairColors + # mattr_reader :hair_colors, instance_reader: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_reader :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_reader(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors # => [:brown, :black, :blonde, :red] + # Person.new.hair_styles # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#55 + def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # mattr_writer(:hair_styles) { [:long, :short] } + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # Person.class_variable_get("@@hair_styles") # => [:long, :short] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#121 + def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 + def method_visibility(method); end + + # Returns the module which contains this one according to its name. + # + # module M + # module N + # end + # end + # X = M::N + # + # M::N.module_parent # => M + # X.module_parent # => M + # + # The parent of top-level and anonymous modules is Object. + # + # M.module_parent # => Object + # Module.new.module_parent # => Object + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#37 + def module_parent; end + + # Returns the name of the module containing this one. + # + # M::N.module_parent_name # => "M" + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#9 + def module_parent_name; end + + # Returns all the parents of this module according to its name, ordered from + # nested outwards. The receiver is not contained within the result. + # + # module M + # module N + # end + # end + # X = M::N + # + # M.module_parents # => [Object] + # M::N.module_parents # => [M, Object] + # X.module_parents # => [M, Object] + # + # source://activesupport//lib/active_support/core_ext/module/introspection.rb#53 + def module_parents; end + + # Replaces the existing method definition, if there is one, with the passed + # block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#17 + def redefine_method(method, &block); end + + # Replaces the existing singleton method definition, if there is one, with + # the passed block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#26 + def redefine_singleton_method(method, &block); end + + # Removes the named method, if it exists. + # + # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#7 + def remove_possible_method(method); end + + # Removes the named singleton method, if it exists. + # + # source://activesupport//lib/active_support/core_ext/module/remove_method.rb#14 + def remove_possible_singleton_method(method); end + + # Marks the named method as intended to be redefined, if it exists. + # Suppresses the Ruby method redefinition warning. Prefer + # #redefine_method where possible. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#7 + def silence_redefinition_of_method(method); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. + # If a subclass changes the value, the parent class' value is not changed. + # If the parent class changes the value, the value of subclasses is not changed. + # + # class Customer < Account + # end + # + # Account.user # => "DHH" + # Customer.user # => nil + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#174 + 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#81 + 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#123 + def thread_cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end + + # Defines both class and instance accessors for class attributes. + # + # class Account + # thread_mattr_accessor :user + # end + # + # Account.user = "DHH" + # Account.user # => "DHH" + # Account.new.user # => "DHH" + # + # Unlike +mattr_accessor+, values are *not* shared with subclasses or parent classes. + # If a subclass changes the value, the parent class' value is not changed. + # If the parent class changes the value, the value of subclasses is not changed. + # + # class Customer < Account + # end + # + # Account.user # => "DHH" + # Customer.user # => nil + # Customer.user = "Rafael" + # Customer.user # => "Rafael" + # Account.user # => "DHH" + # + # To omit the instance writer method, pass instance_writer: false. + # To omit the instance reader method, pass instance_reader: false. + # + # class Current + # thread_mattr_accessor :user, instance_writer: false, instance_reader: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # Or pass instance_accessor: false, to omit both instance methods. + # + # class Current + # thread_mattr_accessor :user, instance_accessor: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # Current.new.user # => NoMethodError + # + # A default value may be specified using the +:default+ option. Because + # multiple threads can access the default value, non-frozen default values + # will be duped and frozen. + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#170 + def thread_mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates class and instance reader methods. + # The underlying per-thread class variable is set to +nil+, if it is not previously defined. + # + # module Current + # thread_mattr_reader :user + # end + # + # Current.user = "DHH" + # Current.user # => "DHH" + # Thread.new { Current.user }.value # => nil + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # thread_mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # instance_reader: false or instance_accessor: false. + # + # class Current + # thread_mattr_reader :user, instance_reader: false + # end + # + # Current.new.user # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#41 + def thread_mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil)); end + + # Defines a per-thread class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. + # + # module Current + # thread_mattr_writer :user + # end + # + # Current.user = "DHH" + # Thread.current[:attr_Current_user] # => "DHH" + # + # To omit the instance writer method, pass + # instance_writer: false or instance_accessor: false. + # + # class Current + # thread_mattr_writer :user, instance_writer: false + # end + # + # Current.new.user = "DHH" # => NoMethodError + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#101 + def thread_mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#40 + def attr_internal_define(attr_name, type); end + + class << self + # Returns the value of attribute attr_internal_naming_format. + # + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#23 + def attr_internal_naming_format; end + + # source://activesupport//lib/active_support/core_ext/module/attr_internal.rb#25 + def attr_internal_naming_format=(format); end + end +end + +# == Bite-sized separation of concerns +# +# We often find ourselves with a medium-sized chunk of behavior that we'd +# like to extract, but only mix in to a single class. +# +# Extracting a plain old Ruby object to encapsulate it and collaborate or +# delegate to the original object is often a good choice, but when there's +# no additional state to encapsulate or we're making DSL-style declarations +# about the parent class, introducing new collaborators can obfuscate rather +# than simplify. +# +# The typical route is to just dump everything in a monolithic class, perhaps +# with a comment, as a least-bad alternative. Using modules in separate files +# means tedious sifting to get a big-picture view. +# +# == Dissatisfying ways to separate small concerns +# +# === Using comments: +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# ## Event tracking +# has_many :events +# +# before_create :track_creation +# +# private +# def track_creation +# # ... +# end +# end +# +# === With an inline module: +# +# Noisy syntax. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# module EventTracking +# extend ActiveSupport::Concern +# +# included do +# has_many :events +# before_create :track_creation +# end +# +# private +# def track_creation +# # ... +# end +# end +# include EventTracking +# end +# +# === Mix-in noise exiled to its own file: +# +# Once our chunk of behavior starts pushing the scroll-to-understand-it +# boundary, we give in and move it to a separate file. At this size, the +# increased overhead can be a reasonable tradeoff even if it reduces our +# at-a-glance perception of how things work. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# include TodoEventTracking +# end +# +# == Introducing Module#concerning +# +# By quieting the mix-in noise, we arrive at a natural, low-ceremony way to +# separate bite-sized concerns. +# +# class Todo < ApplicationRecord +# # Other todo implementation +# # ... +# +# concerning :EventTracking do +# included do +# has_many :events +# before_create :track_creation +# end +# +# private +# def track_creation +# # ... +# end +# end +# end +# +# Todo.ancestors +# # => [Todo, Todo::EventTracking, ApplicationRecord, Object] +# +# This small step has some wonderful ripple effects. We can +# * grok the behavior of our class in one glance, +# * clean up monolithic junk-drawer classes by separating their concerns, and +# * stop leaning on protected/private for crude "this is internal stuff" modularity. +# +# === Prepending concerning +# +# concerning supports a prepend: true argument which will prepend the +# concern instead of using include for it. +# +# source://activesupport//lib/active_support/core_ext/module/concerning.rb#112 +module Module::Concerning + # A low-cruft shortcut to define a concern. + # + # concern :EventTracking do + # ... + # end + # + # is equivalent to + # + # module EventTracking + # extend ActiveSupport::Concern + # + # ... + # end + # + # source://activesupport//lib/active_support/core_ext/module/concerning.rb#132 + def concern(topic, &module_definition); end + + # Define a new concern and mix it in. + # + # source://activesupport//lib/active_support/core_ext/module/concerning.rb#114 + def concerning(topic, prepend: T.unsafe(nil), &block); end +end + +# source://activesupport//lib/active_support/core_ext/module/delegation.rb#5 +Module::DelegationError = ActiveSupport::DelegationError + +class NameError < ::StandardError + include ::ErrorHighlight::CoreExt + include ::DidYouMean::Correctable +end + +# source://activesupport//lib/active_support/core_ext/object/to_query.rb#19 +class NilClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#93 + def as_json(options = T.unsafe(nil)); end + + # +nil+ is blank: + # + # nil.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 + def blank?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#60 + def present?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#26 + def to_param; end + + # Returns a CGI-escaped +key+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#21 + def to_query(key); 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, &_arg1); 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, &_arg1); end +end + +# source://activesupport//lib/active_support/core_ext/string/output_safety.rb#12 +class Numeric + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#111 + def as_json(options = T.unsafe(nil)); end + + # No number is blank: + # + # 1.blank? # => false + # 0.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#177 + def blank?; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#18 + def byte; end + + # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes + # + # 2.bytes # => 2 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#15 + def bytes; end + + # Returns 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#66 + def exabyte; end + + # Returns the number of bytes equivalent to the exabytes provided. + # + # 2.exabytes # => 2_305_843_009_213_693_952 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#63 + def exabytes; end + + # Returns 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#42 + def gigabyte; end + + # Returns the number of bytes equivalent to the gigabytes provided. + # + # 2.gigabytes # => 2_147_483_648 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#39 + def gigabytes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#13 + def html_safe?; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#26 + def kilobyte; end + + # Returns the number of bytes equivalent to the kilobytes provided. + # + # 2.kilobytes # => 2048 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#23 + def kilobytes; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#34 + def megabyte; end + + # Returns the number of bytes equivalent to the megabytes provided. + # + # 2.megabytes # => 2_097_152 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#31 + def megabytes; end + + # Returns 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#58 + def petabyte; end + + # Returns the number of bytes equivalent to the petabytes provided. + # + # 2.petabytes # => 2_251_799_813_685_248 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#55 + def petabytes; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#181 + def present?; end + + # Returns 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#50 + def terabyte; end + + # Returns the number of bytes equivalent to the terabytes provided. + # + # 2.terabytes # => 2_199_023_255_552 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#47 + def terabytes; end + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#74 + def zettabyte; end + + # Returns the number of bytes equivalent to the zettabytes provided. + # + # 2.zettabytes # => 2_361_183_241_434_822_606_848 + # + # source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#71 + def zettabytes; end +end + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#9 +Numeric::EXABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#6 +Numeric::GIGABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#4 +Numeric::KILOBYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#5 +Numeric::MEGABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#8 +Numeric::PETABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#7 +Numeric::TERABYTE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/numeric/bytes.rb#10 +Numeric::ZETTABYTE = T.let(T.unsafe(nil), Integer) + +# -- +# Most objects are cloneable, but not all. For example you can't dup methods: +# +# method(:puts).dup # => TypeError: allocator undefined for Method +# +# Classes may signal their instances are not duplicable removing +dup+/+clone+ +# or raising exceptions from them. So, to dup an arbitrary object you normally +# use an optimistic approach and are ready to catch an exception, say: +# +# arbitrary_object.dup rescue object +# +# Rails dups objects in a few critical spots where they are not that arbitrary. +# That rescue is very expensive (like 40 times slower than a predicate), and it +# is often triggered. +# +# That's why we hardcode the following cases and check duplicable? instead of +# using that rescue idiom. +# ++ +# +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#21 +class Object < ::BasicObject + include ::ActiveSupport::Dependencies::RequireDependency + include ::Kernel + include ::PP::ObjectMixin + include ::ActiveSupport::Tryable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + + # Provides a way to check whether some class acts like some other class based on the existence of + # an appropriately-named marker method. + # + # A class that provides the same interface as SomeClass may define a marker method named + # acts_like_some_class? to signal its compatibility to callers of + # acts_like?(:some_class). + # + # For example, Active Support extends Date to define an acts_like_date? method, + # and extends Time to define acts_like_time?. As a result, developers can call + # x.acts_like?(:time) and x.acts_like?(:date) to test duck-type compatibility, + # and classes that are able to act like Time can also define an acts_like_time? + # method to interoperate. + # + # Note that the marker method is only expected to exist. It isn't called, so its body or return + # value are irrelevant. + # + # ==== Example: A class that provides the same interface as String + # + # This class may define: + # + # class Stringish + # def acts_like_string? + # end + # end + # + # Then client code can query for duck-type-safeness this way: + # + # Stringish.new.acts_like?(:string) # => true + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/acts_like.rb#33 + def acts_like?(duck); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#59 + def as_json(options = T.unsafe(nil)); end + + # An object is blank if it's false, empty, or a whitespace string. + # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. + # + # This simplifies + # + # !address || address.empty? + # + # to + # + # address.blank? + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 + def blank?; end + + # Can you safely dup this object? + # + # False for method objects; + # true otherwise. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#26 + def duplicable?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#7 + def html_safe?; end + + # Returns true if this object is included in the argument. + # + # When argument is a +Range+, +#cover?+ is used to properly handle inclusion + # check within open ranges. Otherwise, argument must be any object which responds + # to +#include?+. Usage: + # + # characters = ["Konata", "Kagami", "Tsukasa"] + # "Konata".in?(characters) # => true + # + # For non +Range+ arguments, this will throw an +ArgumentError+ if the argument + # doesn't respond to +#include?+. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#15 + def in?(another_object); end + + # Returns a hash with string keys that maps instance variable names without "@" to their + # corresponding values. + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 + def instance_values; end + + # Returns an array of instance variable names as strings including "@". + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_variable_names # => ["@y", "@x"] + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#29 + def instance_variable_names; end + + # Returns the receiver if it's present otherwise returns +nil+. + # object.presence is equivalent to + # + # object.present? ? object : nil + # + # For example, something like + # + # state = params[:state] if params[:state].present? + # country = params[:country] if params[:country].present? + # region = state || country || 'US' + # + # becomes + # + # region = params[:state].presence || params[:country].presence || 'US' + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 + def presence; end + + # Returns the receiver if it's included in the argument otherwise returns +nil+. + # Argument must be any object which responds to +#include?+. Usage: + # + # params[:bucket_type].presence_in %w( project calendar ) + # + # This will throw an +ArgumentError+ if the argument doesn't respond to +#include?+. + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/inclusion.rb#34 + def presence_in(another_object); end + + # An object is present if it's not blank. + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#25 + def present?; end + + # Alias of to_s. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#8 + 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#14 + def to_query(key); end + + # Set and restore public attributes around a block. + # + # client.timeout # => 5 + # client.with(timeout: 1) do |c| + # c.timeout # => 1 + # end + # client.timeout # => 5 + # + # The receiver is yielded to the provided block. + # + # This method is a shorthand for the common begin/ensure pattern: + # + # old_value = object.attribute + # begin + # object.attribute = new_value + # # do things + # ensure + # object.attribute = old_value + # end + # + # It can be used on any object as long as both the reader and writer methods + # are public. + # + # source://activesupport//lib/active_support/core_ext/object/with.rb#26 + def with(**attributes); end + + # An elegant way to factor duplication out of options passed to a series of + # method calls. Each method called in the block, with the block variable as + # the receiver, will have its options merged with the default +options+ + # Hash or Hash-like object provided. Each method called on + # the block variable must take an options hash as its final argument. + # + # Without with_options, this code contains duplication: + # + # class Account < ActiveRecord::Base + # has_many :customers, dependent: :destroy + # has_many :products, dependent: :destroy + # has_many :invoices, dependent: :destroy + # has_many :expenses, dependent: :destroy + # end + # + # Using with_options, we can remove the duplication: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do |assoc| + # assoc.has_many :customers + # assoc.has_many :products + # assoc.has_many :invoices + # assoc.has_many :expenses + # end + # end + # + # It can also be used with an explicit receiver: + # + # I18n.with_options locale: user.locale, scope: 'newsletter' do |i18n| + # subject i18n.t :subject + # body i18n.t :body, user_name: user.name + # end + # + # When you don't pass an explicit receiver, it executes the whole block + # in merging options context: + # + # class Account < ActiveRecord::Base + # with_options dependent: :destroy do + # has_many :customers + # has_many :products + # has_many :invoices + # has_many :expenses + # end + # end + # + # with_options can also be nested since the call is forwarded to its receiver. + # + # NOTE: Each nesting level will merge inherited defaults in addition to their own. + # + # class Post < ActiveRecord::Base + # with_options if: :persisted?, length: { minimum: 50 } do + # validates :content, if: -> { content.present? } + # end + # end + # + # The code is equivalent to: + # + # validates :content, length: { minimum: 50 }, if: -> { content.present? } + # + # Hence the inherited default for +if+ key is ignored. + # + # NOTE: You cannot call class methods implicitly inside of +with_options+. + # You can access these methods using the class name instead: + # + # class Phone < ActiveRecord::Base + # enum :phone_number_type, { home: 0, office: 1, mobile: 2 } + # + # with_options presence: true do + # validates :phone_number_type, inclusion: { in: Phone.phone_number_types.keys } + # end + # end + # + # When the block argument is omitted, the decorated Object instance is returned: + # + # module MyStyledHelpers + # def styled + # with_options style: "color: red;" + # end + # end + # + # styled.link_to "I'm red", "/" + # # => I'm red + # + # styled.button_tag "I'm red too!" + # # => + # + # source://activesupport//lib/active_support/core_ext/object/with_options.rb#92 + def with_options(options, &block); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#236 +class Pathname + # source://activesupport//lib/active_support/core_ext/object/json.rb#237 + def as_json(options = T.unsafe(nil)); end +end + +module Process + extend ::ActiveSupport::ForkTracker::CoreExt + + class << self + # source://activesupport//lib/active_support/fork_tracker.rb#6 + def _fork; end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#257 +class Process::Status + # source://activesupport//lib/active_support/core_ext/object/json.rb#258 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#157 +class Range + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#158 + 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#253 + def sum(initial_value = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#139 +class Regexp + # source://activesupport//lib/active_support/core_ext/object/json.rb#140 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#62 +module Singleton + mixes_in_class_methods ::Singleton::SingletonClassMethods + + # Singleton instances are not duplicable: + # + # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#66 + def duplicable?; end +end + +# String inflections define new methods on the String class to transform names for different purposes. +# For instance, you can figure out the name of a table from the name of a class. +# +# 'ScaleScore'.tableize # => "scale_scores" +# +# source://activesupport//lib/active_support/core_ext/string/multibyte.rb#5 +class String + include ::Comparable + + # Enables more predictable duck-typing on String-like classes. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/behavior.rb#5 + def acts_like_string?; end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#99 + def as_json(options = T.unsafe(nil)); end + + # If you pass a single integer, returns a substring of one character at that + # position. The first character of the string is at position 0, the next at + # position 1, and so on. If a range is supplied, a substring containing + # characters at offsets given by the range is returned. In both cases, if an + # offset is negative, it is counted from the end of the string. Returns +nil+ + # if the initial offset falls outside the string. Returns an empty string if + # the beginning of the range is greater than the end of the string. + # + # str = "hello" + # str.at(0) # => "h" + # str.at(1..3) # => "ell" + # str.at(-2) # => "l" + # str.at(-2..-1) # => "lo" + # str.at(5) # => nil + # str.at(5..-1) # => "" + # + # If a Regexp is given, the matching portion of the string is returned. + # If a String is given, that given string is returned if it occurs in + # the string. In both cases, +nil+ is returned if there is no match. + # + # str = "hello" + # str.at(/lo/) # => "lo" + # str.at(/ol/) # => nil + # str.at("lo") # => "lo" + # str.at("ol") # => nil + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#29 + def at(position); end + + # A string is blank if it's empty or contains whitespaces only: + # + # ''.blank? # => true + # ' '.blank? # => true + # "\t\n\r".blank? # => true + # ' blah '.blank? # => false + # + # Unicode whitespace is supported: + # + # "\u00a0".blank? # => true + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#153 + def blank?; end + + # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize + # is set to :lower then camelize produces lowerCamelCase. + # + # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. + # + # 'active_record'.camelize # => "ActiveRecord" + # 'active_record'.camelize(:lower) # => "activeRecord" + # 'active_record/errors'.camelize # => "ActiveRecord::Errors" + # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#111 + def camelcase(first_letter = T.unsafe(nil)); end + + # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize + # is set to :lower then camelize produces lowerCamelCase. + # + # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. + # + # 'active_record'.camelize # => "ActiveRecord" + # 'active_record'.camelize(:lower) # => "activeRecord" + # 'active_record/errors'.camelize # => "ActiveRecord::Errors" + # 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors" + # + # See ActiveSupport::Inflector.camelize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#101 + def camelize(first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like \Rails does for table names to models. + # Note that this returns a string and not a class. (To convert to an actual class + # follow +classify+ with +constantize+.) + # + # 'ham_and_eggs'.classify # => "HamAndEgg" + # 'posts'.classify # => "Post" + # + # See ActiveSupport::Inflector.classify. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#239 + def classify; end + + # +constantize+ tries to find a declared constant with the name specified + # in the string. It raises a NameError when the name is not in CamelCase + # or is not initialized. + # + # 'Module'.constantize # => Module + # 'Class'.constantize # => Class + # 'blargle'.constantize # => NameError: wrong constant name blargle + # + # See ActiveSupport::Inflector.constantize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#73 + def constantize; end + + # Replaces underscores with dashes in the string. + # + # 'puni_puni'.dasherize # => "puni-puni" + # + # See ActiveSupport::Inflector.dasherize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#148 + def dasherize; end + + # Removes the rightmost segment from the constant expression in the string. + # + # 'Net::HTTP'.deconstantize # => "Net" + # '::Net::HTTP'.deconstantize # => "::Net" + # 'String'.deconstantize # => "" + # '::String'.deconstantize # => "" + # ''.deconstantize # => "" + # + # See ActiveSupport::Inflector.deconstantize. + # + # See also +demodulize+. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#177 + def deconstantize; end + + # Removes the module part from the constant expression in the string. + # + # 'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" + # 'Inflections'.demodulize # => "Inflections" + # '::Inflections'.demodulize # => "Inflections" + # ''.demodulize # => '' + # + # See ActiveSupport::Inflector.demodulize. + # + # See also +deconstantize+. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#162 + def demodulize; end + + # Converts the first character to lowercase. + # + # 'If they enjoyed The Matrix'.downcase_first # => "if they enjoyed The Matrix" + # 'I'.downcase_first # => "i" + # ''.downcase_first # => "" + # + # See ActiveSupport::Inflector.downcase_first. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#284 + def downcase_first; end + + # source://activesupport//lib/active_support/core_ext/string/starts_ends_with.rb#5 + def ends_with?(*_arg0); end + + # The inverse of String#include?. Returns true if the string + # does not include the other string. + # + # "hello".exclude? "lo" # => false + # "hello".exclude? "ol" # => true + # "hello".exclude? ?h # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/exclude.rb#10 + def exclude?(string); end + + # Returns the first character. If a limit is supplied, returns a substring + # from the beginning of the string until it reaches the limit value. If the + # given limit is greater than or equal to the string length, returns a copy of self. + # + # str = "hello" + # str.first # => "h" + # str.first(1) # => "h" + # str.first(2) # => "he" + # str.first(0) # => "" + # str.first(6) # => "hello" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#78 + def first(limit = T.unsafe(nil)); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # 'Message'.foreign_key # => "message_id" + # 'Message'.foreign_key(false) # => "messageid" + # 'Admin::Post'.foreign_key # => "post_id" + # + # See ActiveSupport::Inflector.foreign_key. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#297 + def foreign_key(separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Returns a substring from the given position to the end of the string. + # If the position is negative, it is counted from the end of the string. + # + # str = "hello" + # str.from(0) # => "hello" + # str.from(3) # => "lo" + # str.from(-2) # => "lo" + # + # You can mix it with +to+ method and do fun things like: + # + # str = "hello" + # str.from(0).to(-1) # => "hello" + # str.from(1).to(-2) # => "ell" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#46 + def from(position); end + + # Marks a string as trusted safe. It will be inserted into HTML with no + # additional escaping performed. It is your responsibility to ensure that the + # string contains no malicious content. This method is equivalent to the + # +raw+ helper in views. It is recommended that you use +sanitize+ instead of + # this method. It should never be called on user input. + # + # source://activesupport//lib/active_support/core_ext/string/output_safety.rb#232 + def html_safe; end + + # Capitalizes the first word, turns underscores into spaces, and (by default) strips a + # trailing '_id' if present. + # Like +titleize+, this is meant for creating pretty output. + # + # The capitalization of the first word can be turned off by setting the + # optional parameter +capitalize+ to false. + # By default, this parameter is true. + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'employee_salary'.humanize # => "Employee salary" + # 'author_id'.humanize # => "Author" + # 'author_id'.humanize(capitalize: false) # => "author" + # '_id'.humanize # => "Id" + # 'author_id'.humanize(keep_id_suffix: true) # => "Author id" + # + # See ActiveSupport::Inflector.humanize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#262 + def humanize(capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default + # is set, otherwise converts String to a Time via String#to_time + # + # source://activesupport//lib/active_support/core_ext/string/zones.rb#9 + def in_time_zone(zone = T.unsafe(nil)); end + + # Indents the lines in the receiver: + # + # < + # def some_method + # some_code + # end + # + # The second argument, +indent_string+, specifies which indent string to + # use. The default is +nil+, which tells the method to make a guess by + # peeking at the first indented line, and fall back to a space if there is + # none. + # + # " foo".indent(2) # => " foo" + # "foo\n\t\tbar".indent(2) # => "\t\tfoo\n\t\t\t\tbar" + # "foo".indent(2, "\t") # => "\t\tfoo" + # + # While +indent_string+ is typically one space or tab, it may be any string. + # + # The third argument, +indent_empty_lines+, is a flag that says whether + # empty lines should be indented. Default is false. + # + # "foo\n\nbar".indent(2) # => " foo\n\n bar" + # "foo\n\nbar".indent(2, nil, true) # => " foo\n \n bar" + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#42 + def indent(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Same as +indent+, except it indents the receiver in-place. + # + # Returns the indented string, or +nil+ if there was nothing to indent. + # + # source://activesupport//lib/active_support/core_ext/string/indent.rb#7 + def indent!(amount, indent_string = T.unsafe(nil), indent_empty_lines = T.unsafe(nil)); end + + # Wraps the current string in the ActiveSupport::StringInquirer class, + # which gives you a prettier way to test for equality. + # + # env = 'production'.inquiry + # env.production? # => true + # env.development? # => false + # + # source://activesupport//lib/active_support/core_ext/string/inquiry.rb#13 + def inquiry; end + + # Returns +true+ if string has utf_8 encoding. + # + # utf_8_str = "some string".encode "UTF-8" + # iso_str = "some string".encode "ISO-8859-1" + # + # utf_8_str.is_utf8? # => true + # iso_str.is_utf8? # => false + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#57 + def is_utf8?; end + + # Returns the last character of the string. If a limit is supplied, returns a substring + # from the end of the string until it reaches the limit value (counting backwards). If + # the given limit is greater than or equal to the string length, returns a copy of self. + # + # str = "hello" + # str.last # => "o" + # str.last(1) # => "o" + # str.last(2) # => "lo" + # str.last(0) # => "" + # str.last(6) # => "hello" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#92 + def last(limit = T.unsafe(nil)); end + + # == Multibyte proxy + # + # +mb_chars+ is a multibyte safe proxy for string methods. + # + # It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which + # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy + # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string. + # + # >> "lj".mb_chars.upcase.to_s + # # => "LJ" + # + # NOTE: Ruby 2.4 and later support native Unicode case mappings: + # + # >> "lj".upcase + # # => "LJ" + # + # == \Method chaining + # + # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows + # method chaining on the result of any of these methods. + # + # name.mb_chars.reverse.length # => 12 + # + # == Interoperability and configuration + # + # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between + # String and Char work like expected. The bang! methods change the internal string representation in the Chars + # object. Interoperability problems can be resolved easily with a +to_s+ call. + # + # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For + # information about how to change the default Multibyte behavior see ActiveSupport::Multibyte. + # + # source://activesupport//lib/active_support/core_ext/string/multibyte.rb#37 + def mb_chars; end + + # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. + # + # If the optional parameter +locale+ is specified, + # the word will be parameterized as a word of that language. + # By default, this parameter is set to nil and it will use + # the configured I18n.locale. + # + # class Person + # def to_param + # "#{id}-#{name.parameterize}" + # end + # end + # + # @person = Person.find(1) + # # => # + # + # <%= link_to(@person.name, person_path) %> + # # => Donald E. Knuth + # + # To preserve the case of the characters in a string, use the +preserve_case+ argument. + # + # class Person + # def to_param + # "#{id}-#{name.parameterize(preserve_case: true)}" + # end + # end + # + # @person = Person.find(1) + # # => # + # + # <%= link_to(@person.name, person_path) %> + # # => Donald E. Knuth + # + # See ActiveSupport::Inflector.parameterize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#215 + def parameterize(separator: T.unsafe(nil), preserve_case: T.unsafe(nil), locale: T.unsafe(nil)); end + + # Returns the plural form of the word in the string. + # + # If the optional parameter +count+ is specified, + # the singular form will be returned if count == 1. + # For any other value of +count+ the plural will be returned. + # + # If the optional parameter +locale+ is specified, + # the word will be pluralized as a word of that language. + # By default, this parameter is set to :en. + # You must define your own inflection rules for languages other than English. + # + # 'post'.pluralize # => "posts" + # 'octopus'.pluralize # => "octopi" + # 'sheep'.pluralize # => "sheep" + # 'words'.pluralize # => "words" + # 'the blue mailman'.pluralize # => "the blue mailmen" + # 'CamelOctopus'.pluralize # => "CamelOctopi" + # 'apple'.pluralize(1) # => "apple" + # 'apple'.pluralize(2) # => "apples" + # 'ley'.pluralize(:es) # => "leyes" + # 'ley'.pluralize(1, :es) # => "ley" + # + # See ActiveSupport::Inflector.pluralize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#35 + def pluralize(count = T.unsafe(nil), locale = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#165 + def present?; end + + # Returns a new string with all occurrences of the patterns removed. + # str = "foo bar test" + # str.remove(" test") # => "foo bar" + # str.remove(" test", /bar/) # => "foo " + # str # => "foo bar test" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#32 + def remove(*patterns); end + + # Alters the string by removing all occurrences of the patterns. + # str = "foo bar test" + # str.remove!(" test", /bar/) # => "foo " + # str # => "foo " + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#40 + def remove!(*patterns); end + + # +safe_constantize+ tries to find a declared constant with the name specified + # in the string. It returns +nil+ when the name is not in CamelCase + # or is not initialized. + # + # 'Module'.safe_constantize # => Module + # 'Class'.safe_constantize # => Class + # 'blargle'.safe_constantize # => nil + # + # See ActiveSupport::Inflector.safe_constantize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#86 + def safe_constantize; end + + # The reverse of +pluralize+, returns the singular form of a word in a string. + # + # If the optional parameter +locale+ is specified, + # the word will be singularized as a word of that language. + # By default, this parameter is set to :en. + # You must define your own inflection rules for languages other than English. + # + # 'posts'.singularize # => "post" + # 'octopi'.singularize # => "octopus" + # 'sheep'.singularize # => "sheep" + # 'word'.singularize # => "word" + # 'the blue mailmen'.singularize # => "the blue mailman" + # 'CamelOctopi'.singularize # => "CamelOctopus" + # 'leyes'.singularize(:es) # => "ley" + # + # See ActiveSupport::Inflector.singularize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#60 + def singularize(locale = T.unsafe(nil)); end + + # Returns the string, first removing all whitespace on both ends of + # the string, and then changing remaining consecutive whitespace + # groups into one space each. + # + # Note that it handles both ASCII and Unicode whitespace. + # + # %{ Multi-line + # string }.squish # => "Multi-line string" + # " foo bar \n \t boo".squish # => "foo bar boo" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#13 + def squish; end + + # Performs a destructive squish. See String#squish. + # str = " foo bar \n \t boo" + # str.squish! # => "foo bar boo" + # str # => "foo bar boo" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#21 + def squish!; end + + # source://activesupport//lib/active_support/core_ext/string/starts_ends_with.rb#4 + def starts_with?(*_arg0); end + + # Strips indentation in heredocs. + # + # For example in + # + # if options[:usage] + # puts <<-USAGE.strip_heredoc + # This command does such and such. + # + # Supported options are: + # -h This message + # ... + # USAGE + # end + # + # the user would see the usage message aligned against the left margin. + # + # Technically, it looks for the least indented non-empty line + # in the whole string, and removes that amount of leading whitespace. + # + # source://activesupport//lib/active_support/core_ext/string/strip.rb#22 + def strip_heredoc; end + + # Creates the name of a table like \Rails does for models to table names. This method + # uses the +pluralize+ method on the last word in the string. + # + # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" + # 'ham_and_egg'.tableize # => "ham_and_eggs" + # 'fancyCategory'.tableize # => "fancy_categories" + # + # See ActiveSupport::Inflector.tableize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#227 + def tableize; end + + # Capitalizes all the words and replaces some characters in the string to create + # a nicer looking title. +titleize+ is meant for creating pretty output. It is not + # used in the \Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'man from the boondocks'.titleize # => "Man From The Boondocks" + # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" + # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#129 + def titlecase(keep_id_suffix: T.unsafe(nil)); end + + # Capitalizes all the words and replaces some characters in the string to create + # a nicer looking title. +titleize+ is meant for creating pretty output. It is not + # used in the \Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # 'man from the boondocks'.titleize # => "Man From The Boondocks" + # 'x-men: the last stand'.titleize # => "X Men: The Last Stand" + # 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id" + # + # See ActiveSupport::Inflector.titleize. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#126 + def titleize(keep_id_suffix: T.unsafe(nil)); end + + # Returns a substring from the beginning of the string to the given position. + # If the position is negative, it is counted from the end of the string. + # + # str = "hello" + # str.to(0) # => "h" + # str.to(3) # => "hell" + # str.to(-2) # => "hell" + # + # You can mix it with +from+ method and do fun things like: + # + # str = "hello" + # str.from(0).to(-1) # => "hello" + # str.from(1).to(-2) # => "ell" + # + # source://activesupport//lib/active_support/core_ext/string/access.rb#63 + def to(position); end + + # Converts a string to a Date value. + # + # "1-1-2012".to_date # => Sun, 01 Jan 2012 + # "01/01/2012".to_date # => Sun, 01 Jan 2012 + # "2012-12-13".to_date # => Thu, 13 Dec 2012 + # "12/13/2012".to_date # => ArgumentError: invalid date + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#47 + def to_date; end + + # Converts a string to a DateTime value. + # + # "1-1-2012".to_datetime # => Sun, 01 Jan 2012 00:00:00 +0000 + # "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000 + # "2012-12-13 12:50".to_datetime # => Thu, 13 Dec 2012 12:50:00 +0000 + # "12/13/2012".to_datetime # => ArgumentError: invalid date + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#57 + def to_datetime; end + + # Converts a string to a Time value. + # The +form+ can be either +:utc+ or +:local+ (default +:local+). + # + # The time is parsed using Time.parse method. + # If +form+ is +:local+, then the time is in the system timezone. + # If the date part is missing then the current date is used and if + # the time part is missing then it is assumed to be 00:00:00. + # + # "13-12-2012".to_time # => 2012-12-13 00:00:00 +0100 + # "06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100 + # "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC + # "12/13/2012".to_time # => ArgumentError: argument out of range + # "1604326192".to_time # => ArgumentError: argument out of range + # + # source://activesupport//lib/active_support/core_ext/string/conversions.rb#22 + def to_time(form = T.unsafe(nil)); end + + # Truncates a given +text+ to length truncate_to if +text+ is longer than truncate_to: + # + # 'Once upon a time in a world far far away'.truncate(27) + # # => "Once upon a time in a wo..." + # + # Pass a string or regexp :separator to truncate +text+ at a natural break: + # + # 'Once upon a time in a world far far away'.truncate(27, separator: ' ') + # # => "Once upon a time in a..." + # + # 'Once upon a time in a world far far away'.truncate(27, separator: /\s/) + # # => "Once upon a time in a..." + # + # The last characters will be replaced with the :omission string (defaults to "..."). + # The total length will not exceed truncate_to unless both +text+ and :omission + # are longer than truncate_to: + # + # 'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)') + # # => "And they f... (continued)" + # + # 'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') + # # => "... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#70 + def truncate(truncate_to, options = T.unsafe(nil)); end + + # Truncates +text+ to at most truncate_to bytes in length without + # breaking string encoding by splitting multibyte characters or breaking + # grapheme clusters ("perceptual characters") by truncating at combining + # characters. + # + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size + # # => 20 + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".bytesize + # # => 80 + # >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".truncate_bytes(20) + # # => "🔪🔪🔪🔪…" + # + # The truncated text ends with the :omission string, defaulting + # to "…", for a total length not exceeding truncate_to. + # + # Raises +ArgumentError+ when the bytesize of :omission exceeds truncate_to. + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#101 + def truncate_bytes(truncate_to, omission: T.unsafe(nil)); end + + # Truncates a given +text+ after a given number of words (words_count): + # + # 'Once upon a time in a world far far away'.truncate_words(4) + # # => "Once upon a time..." + # + # Pass a string or regexp :separator to specify a different separator of words: + # + # 'Once
    upon
    a
    time
    in
    a
    world'.truncate_words(5, separator: '
    ') + # # => "Once
    upon
    a
    time
    in..." + # + # The last characters will be replaced with the :omission string (defaults to "..."): + # + # 'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)') + # # => "And they found that many... (continued)" + # + # source://activesupport//lib/active_support/core_ext/string/filters.rb#142 + def truncate_words(words_count, options = T.unsafe(nil)); end + + # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. + # + # +underscore+ will also change '::' to '/' to convert namespaces to paths. + # + # 'ActiveModel'.underscore # => "active_model" + # 'ActiveModel::Errors'.underscore # => "active_model/errors" + # + # See ActiveSupport::Inflector.underscore. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#139 + def underscore; end + + # Converts the first character to uppercase. + # + # 'what a Lovely Day'.upcase_first # => "What a Lovely Day" + # 'w'.upcase_first # => "W" + # ''.upcase_first # => "" + # + # See ActiveSupport::Inflector.upcase_first. + # + # source://activesupport//lib/active_support/core_ext/string/inflections.rb#273 + def upcase_first; end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#136 +String::BLANK_RE = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#137 +String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#74 +class Struct + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#75 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#104 +class Symbol + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#105 + def as_json(options = T.unsafe(nil)); end + + # A Symbol is blank if it's empty: + # + # :''.blank? # => true + # :symbol.blank? # => false + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#128 + def blank?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#130 + def present?; end +end + +class Thread + # source://activesupport//lib/active_support/isolated_execution_state.rb#7 + def active_support_execution_state; end + + # source://activesupport//lib/active_support/isolated_execution_state.rb#7 + def active_support_execution_state=(_arg0); end +end + +# source://activesupport//lib/active_support/core_ext/time/conversions.rb#7 +class Time + include ::Comparable + include ::DateAndTime::Zones + include ::DateAndTime::Calculations + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#298 + 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#308 + 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#338 + def <=>(other); end + + # Duck-types as a Time-like class. See Object#acts_like?. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/time/acts_like.rb#7 + def acts_like_time?; end + + # Uses Date to provide precise Time calculations for years, months, and days + # according to the proleptic Gregorian calendar. The +options+ parameter + # takes a hash with any of these keys: :years, :months, + # :weeks, :days, :hours, :minutes, + # :seconds. + # + # Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 + # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#194 + def advance(options); end + + # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#220 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#201 + def as_json(options = T.unsafe(nil)); end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#236 + 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#263 + 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#279 + 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#257 + def at_end_of_day; end + + # Returns a new Time representing the end of the hour, x:59:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#273 + def at_end_of_hour; end + + # Returns a new Time representing the end of the minute, x:xx:59.999999 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#288 + 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#244 + def at_midday; end + + # Returns a new Time representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#246 + def at_middle_of_day; end + + # Returns a new Time representing the start of the day (0:00) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#235 + 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#245 + 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#231 + 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#260 + 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#276 + def beginning_of_minute; end + + # No Time is blank: + # + # Time.now.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#192 + def blank?; end + + # Returns a new Time where one or more of the elements have been changed according + # to the +options+ parameter. The time options (:hour, :min, + # :sec, :usec, :nsec) reset cascadingly, so if only + # the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour + # and minute is passed, then sec, usec, and nsec is set to 0. The +options+ parameter + # takes a hash with any of these keys: :year, :month, :day, + # :hour, :min, :sec, :usec, :nsec, + # :offset. Pass either :usec or :nsec, not both. + # + # Time.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => Time.new(2012, 8, 1, 22, 35, 0) + # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => Time.new(1981, 8, 1, 22, 35, 0) + # Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0) + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#123 + def change(options); end + + # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances + # can be chronologically compared with a Time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#322 + def compare_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#337 + def compare_without_coercion(_arg0); 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#249 + 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#266 + 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#282 + 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#348 + 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#342 + def eql_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#347 + def eql_without_coercion(_arg0); 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#228 + 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#242 + 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#239 + 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#234 + 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#313 + def minus_with_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#300 + def minus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#317 + def minus_without_coercion(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#307 + def minus_without_duration(_arg0); end + + # Returns a new time the specified number of days in the future. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#356 + 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#366 + 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#376 + 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#243 + def noon; end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#290 + def plus_with_duration(other); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#297 + def plus_without_duration(_arg0); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#196 + def present?; end + + # Returns a new time the specified number of days ago. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#351 + 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#361 + 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#371 + def prev_year(years = T.unsafe(nil)); end + + # Aliased to +xmlschema+ for compatibility with +DateTime+ + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#74 + def rfc3339(fraction_digits = T.unsafe(nil)); end + + # Returns the fraction of a second as a +Rational+ + # + # Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#107 + def sec_fraction; end + + # Returns the number of seconds since 00:00:00. + # + # Time.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0.0 + # Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0 + # Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#91 + def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # Time.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#100 + def seconds_until_end_of_day; end + + # Returns a new Time representing the time a number of seconds since the instance time + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#225 + def since(seconds); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to to_formatted_s. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_fs(:time) # => "06:10" + # time.to_formatted_s(:time) # => "06:10" + # + # time.to_fs(:db) # => "2007-01-18 06:10:17" + # time.to_fs(:number) # => "20070118061017" + # time.to_fs(:short) # => "18 Jan 06:10" + # time.to_fs(:long) # => "January 18, 2007 06:10" + # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:rfc2822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_fs+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#62 + def to_formatted_s(format = T.unsafe(nil)); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to to_formatted_s. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_fs(:time) # => "06:10" + # time.to_formatted_s(:time) # => "06:10" + # + # time.to_fs(:db) # => "2007-01-18 06:10:17" + # time.to_fs(:number) # => "20070118061017" + # time.to_fs(:short) # => "18 Jan 06:10" + # time.to_fs(:long) # => "January 18, 2007 06:10" + # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:rfc2822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_fs+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#55 + def to_fs(format = T.unsafe(nil)); end + + 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#60 + def at(time_or_number, *args, **_arg2); end + + # Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime + # instances can be used when called with a single argument + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#45 + def at_with_coercion(time_or_number, *args, **_arg2); end + + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#59 + def at_without_coercion(time, subsec = T.unsafe(nil), unit = T.unsafe(nil), in: T.unsafe(nil)); end + + # Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#39 + def current; end + + # Returns the number of days in the given month. + # If no year is specified, it will use the current year. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#24 + def days_in_month(month, year = T.unsafe(nil)); end + + # Returns the number of days in the given year. + # If no year is specified, it will use the current year. + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#34 + def days_in_year(year = T.unsafe(nil)); end + + # Returns a TimeZone instance matching the time zone provided. + # Accepts the time zone in any format supported by Time.zone=. + # Returns +nil+ for invalid time zones. + # + # Time.find_zone "America/New_York" # => # + # Time.find_zone "NOT-A-TIMEZONE" # => nil + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#93 + def find_zone(time_zone); end + + # Returns a TimeZone instance matching the time zone provided. + # Accepts the time zone in any format supported by Time.zone=. + # Raises an +ArgumentError+ for invalid time zones. + # + # Time.find_zone! "America/New_York" # => # + # Time.find_zone! "EST" # => # + # Time.find_zone! -5.hours # => # + # Time.find_zone! nil # => nil + # Time.find_zone! false # => false + # Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#81 + def find_zone!(time_zone); end + + # Creates a +Time+ instance from an RFC 3339 string. + # + # Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000 + # + # If the time or offset components are missing then an +ArgumentError+ will be raised. + # + # Time.rfc3339('1999-12-31') # => ArgumentError: invalid date + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/time/calculations.rb#69 + def rfc3339(str); end + + # Allows override of Time.zone locally inside supplied block; + # resets Time.zone to existing value when done. + # + # class ApplicationController < ActionController::Base + # around_action :set_time_zone + # + # private + # def set_time_zone + # Time.use_zone(current_user.timezone) { yield } + # end + # end + # + # NOTE: This won't affect any ActiveSupport::TimeWithZone + # objects that have already been created, e.g. any model timestamp + # attributes that have been read before the block will remain in + # the application's default timezone. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#61 + def use_zone(time_zone); end + + # Returns the TimeZone for the current request, if this has been set (via Time.zone=). + # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#14 + def zone; end + + # Sets Time.zone to a TimeZone object for the current request/thread. + # + # This method accepts any of the following: + # + # * A \Rails TimeZone object. + # * An identifier for a \Rails TimeZone object (e.g., "Eastern \Time (US & Canada)", -5.hours). + # * A +TZInfo::Timezone+ object. + # * An identifier for a +TZInfo::Timezone+ object (e.g., "America/New_York"). + # + # Here's an example of how you might set Time.zone on a per request basis and reset it when the request is done. + # current_user.time_zone just needs to return a string identifying the user's preferred time zone: + # + # class ApplicationController < ActionController::Base + # around_action :set_time_zone + # + # def set_time_zone + # if logged_in? + # Time.use_zone(current_user.time_zone) { yield } + # else + # yield + # end + # end + # end + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#41 + def zone=(time_zone); end + + # Returns the value of attribute zone_default. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 + def zone_default; end + + # Sets the attribute zone_default + # + # @param value the value to set the attribute zone_default to. + # + # source://activesupport//lib/active_support/core_ext/time/zones.rb#10 + def zone_default=(_arg0); end + end +end + +# source://activesupport//lib/active_support/core_ext/time/calculations.rb#14 +Time::COMMON_YEAR_DAYS_IN_MONTH = T.let(T.unsafe(nil), Array) + +# source://activesupport//lib/active_support/core_ext/time/conversions.rb#8 +Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/object/to_query.rb#31 +class TrueClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#81 + def as_json(options = T.unsafe(nil)); end + + # +true+ is not blank: + # + # true.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#86 + def blank?; end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#90 + def present?; end + + # Returns +self+. + # + # source://activesupport//lib/active_support/core_ext/object/to_query.rb#33 + def to_param; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#230 +class URI::Generic + include ::URI + + # source://activesupport//lib/active_support/core_ext/object/json.rb#231 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/duplicable.rb#49 +class UnboundMethod + # Unbound methods are not duplicable: + # + # method(:puts).unbind.duplicable? # => false + # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/object/duplicable.rb#54 + def duplicable?; end +end diff --git a/sorbet/rbi/gems/addressable@2.8.9.rbi b/sorbet/rbi/gems/addressable@2.8.9.rbi new file mode 100644 index 0000000..6999fe2 --- /dev/null +++ b/sorbet/rbi/gems/addressable@2.8.9.rbi @@ -0,0 +1,9 @@ +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi deleted file mode 100644 index 687dae5..0000000 --- a/sorbet/rbi/gems/ast@2.4.2.rbi +++ /dev/null @@ -1,54 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ast` gem. -# Please instead update this file by running `bin/tapioca gem ast`. - -module AST; end - -class AST::Node - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - def +(array); end - def <<(element); end - def ==(other); end - def append(element); end - def children; end - def clone; end - def concat(array); end - def deconstruct; end - def dup; end - def eql?(other); end - def hash; end - def inspect(indent = T.unsafe(nil)); end - def to_a; end - def to_ast; end - def to_s(indent = T.unsafe(nil)); end - def to_sexp(indent = T.unsafe(nil)); end - def to_sexp_array; end - def type; end - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - - protected - - def assign_properties(properties); end - def fancy_type; end - - private - - def original_dup; end -end - -class AST::Processor - include ::AST::Processor::Mixin -end - -module AST::Processor::Mixin - def handler_missing(node); end - def process(node); end - def process_all(nodes); end -end - -module AST::Sexp - def s(type, *children); end -end diff --git a/sorbet/rbi/gems/ast@2.4.3.rbi b/sorbet/rbi/gems/ast@2.4.3.rbi new file mode 100644 index 0000000..c05e587 --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.3.rbi @@ -0,0 +1,586 @@ +# 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#172 + def +(array); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#181 + 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#118 + 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 [Integer] + # + # 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#57 + 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#204 + 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 children [Array, nil] + # @param properties [Hash, nil] + # @param type [Symbol, 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 + + # source://ast//lib/ast/node.rb#107 + 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 do +# include ::AST::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/better_html@2.2.0.rbi b/sorbet/rbi/gems/better_html@2.2.0.rbi new file mode 100644 index 0000000..cd3daba --- /dev/null +++ b/sorbet/rbi/gems/better_html@2.2.0.rbi @@ -0,0 +1,531 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `better_html` gem. +# Please instead update this file by running `bin/tapioca gem better_html`. + + +# source://better_html//lib/better_html.rb#8 +module BetterHtml + class << self + # source://better_html//lib/better_html.rb#12 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://better_html//lib/better_html.rb#10 + def config=(_arg0); end + + # @yield [config] + # + # source://better_html//lib/better_html.rb#16 + def configure; end + end +end + +# source://better_html//lib/better_html/ast/iterator.rb#7 +module BetterHtml::AST; end + +# source://better_html//lib/better_html/ast/iterator.rb#8 +class BetterHtml::AST::Iterator + # @return [Iterator] a new instance of Iterator + # + # source://better_html//lib/better_html/ast/iterator.rb#18 + def initialize(types, &block); end + + # source://better_html//lib/better_html/ast/iterator.rb#23 + def traverse(node); end + + # source://better_html//lib/better_html/ast/iterator.rb#30 + def traverse_all(nodes); end + + class << self + # source://better_html//lib/better_html/ast/iterator.rb#10 + def descendants(root_node, type); end + end +end + +# source://better_html//lib/better_html/ast/node.rb#8 +class BetterHtml::AST::Node < ::AST::Node + # source://better_html//lib/better_html/ast/node.rb#11 + def descendants(*types); end + + # Returns the value of attribute loc. + # + # source://better_html//lib/better_html/ast/node.rb#9 + def loc; end + + # source://better_html//lib/better_html/ast/node.rb#15 + def location; end +end + +# source://better_html//lib/better_html/config.rb#6 +class BetterHtml::Config + include ::SmartProperties + extend ::SmartProperties::ClassMethods + + # @return [Boolean] + # + # source://better_html//lib/better_html/config.rb#20 + def javascript_attribute_name?(name); end + + # @return [Boolean] + # + # source://better_html//lib/better_html/config.rb#28 + def javascript_safe_method?(name); end + + # @return [Boolean] + # + # source://better_html//lib/better_html/config.rb#24 + def lodash_safe_javascript_expression?(code); end +end + +# source://better_html//lib/better_html/errors.rb#8 +class BetterHtml::DontInterpolateHere < ::BetterHtml::InterpolatorError; end + +# source://better_html//lib/better_html/errors.rb#12 +class BetterHtml::Errors < ::Array + # source://better_html//lib/better_html/errors.rb#13 + def add(_arg0); end +end + +# source://better_html//lib/better_html/helpers.rb#4 +module BetterHtml::Helpers + # source://better_html//lib/better_html/helpers.rb#5 + def html_attributes(args); end +end + +# source://better_html//lib/better_html/html_attributes.rb#4 +class BetterHtml::HtmlAttributes + # @return [HtmlAttributes] a new instance of HtmlAttributes + # + # source://better_html//lib/better_html/html_attributes.rb#5 + def initialize(data); end + + # source://better_html//lib/better_html/html_attributes.rb#9 + def to_s; end +end + +# source://better_html//lib/better_html/errors.rb#10 +class BetterHtml::HtmlError < ::RuntimeError; end + +# source://better_html//lib/better_html/errors.rb#7 +class BetterHtml::InterpolatorError < ::RuntimeError; end + +# source://better_html//lib/better_html/parser.rb#13 +class BetterHtml::Parser + # @raise [ArgumentError] + # @return [Parser] a new instance of Parser + # + # source://better_html//lib/better_html/parser.rb#26 + def initialize(buffer, template_language: T.unsafe(nil)); end + + # source://better_html//lib/better_html/parser.rb#48 + def ast; end + + # source://better_html//lib/better_html/parser.rb#61 + def inspect; end + + # source://better_html//lib/better_html/parser.rb#43 + def nodes_with_type(*type); end + + # source://better_html//lib/better_html/parser.rb#52 + def parser_errors; end + + # Returns the value of attribute template_language. + # + # source://better_html//lib/better_html/parser.rb#14 + def template_language; end + + private + + # source://better_html//lib/better_html/parser.rb#180 + def build_attribute_name_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#170 + def build_attribute_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#185 + def build_attribute_value_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#115 + def build_cdata_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#120 + def build_comment_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#69 + def build_document_node; end + + # source://better_html//lib/better_html/parser.rb#91 + def build_erb_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#249 + def build_interpolation_node(tokens); end + + # @raise [ArgumentError] + # + # source://better_html//lib/better_html/parser.rb#210 + def build_location(enumerable); end + + # source://better_html//lib/better_html/parser.rb#104 + def build_lodash_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#165 + def build_nameless_attribute_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#202 + def build_node(type, tokens, pre: T.unsafe(nil), post: T.unsafe(nil)); end + + # source://better_html//lib/better_html/parser.rb#145 + def build_tag_attributes_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#140 + def build_tag_name_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#125 + def build_tag_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#197 + def build_text_node(tokens); end + + # source://better_html//lib/better_html/parser.rb#217 + def empty_location; end + + # source://better_html//lib/better_html/parser.rb#221 + def shift_all(tokens, *types); end + + # source://better_html//lib/better_html/parser.rb#259 + def shift_all_with_interpolation(tokens, *types); end + + # source://better_html//lib/better_html/parser.rb#284 + def shift_between(tokens, start_type, end_type); end + + # source://better_html//lib/better_html/parser.rb#292 + def shift_between_with_interpolation(tokens, start_type, end_type); end + + # source://better_html//lib/better_html/parser.rb#233 + def shift_single(tokens, *types); end + + # source://better_html//lib/better_html/parser.rb#237 + def shift_until(tokens, *types); end + + # source://better_html//lib/better_html/parser.rb#272 + def shift_until_with_interpolation(tokens, *types); end + + # source://better_html//lib/better_html/parser.rb#300 + def wrap_token(object); end + + # source://better_html//lib/better_html/parser.rb#322 + def wrap_tokens(enumerable); end +end + +# source://better_html//lib/better_html/parser.rb#16 +class BetterHtml::Parser::Error < ::BetterHtml::HtmlError + # @return [Error] a new instance of Error + # + # source://better_html//lib/better_html/parser.rb#20 + def initialize(message, location:); end + + # Returns the value of attribute location. + # + # source://better_html//lib/better_html/parser.rb#18 + def loc; end + + # Returns the value of attribute location. + # + # source://better_html//lib/better_html/parser.rb#17 + def location; end +end + +# source://better_html//lib/better_html/parser.rb#67 +BetterHtml::Parser::INTERPOLATION_TYPES = T.let(T.unsafe(nil), Array) + +# source://better_html//lib/better_html/errors.rb#16 +class BetterHtml::ParserError < ::RuntimeError + # @return [ParserError] a new instance of ParserError + # + # source://better_html//lib/better_html/errors.rb#19 + def initialize(message, position, line, column); end + + # Returns the value of attribute column. + # + # source://better_html//lib/better_html/errors.rb#17 + def column; end + + # Returns the value of attribute line. + # + # source://better_html//lib/better_html/errors.rb#17 + def line; end + + # Returns the value of attribute position. + # + # source://better_html//lib/better_html/errors.rb#17 + def position; end +end + +# source://better_html//lib/better_html/tokenizer/token.rb#4 +module BetterHtml::Tokenizer; end + +# source://better_html//lib/better_html/tokenizer/base_erb.rb#10 +class BetterHtml::Tokenizer::BaseErb < ::Erubi::Engine + # @raise [ArgumentError] + # @return [BaseErb] a new instance of BaseErb + # + # source://better_html//lib/better_html/tokenizer/base_erb.rb#18 + def initialize(buffer); end + + # Returns the value of attribute current_position. + # + # source://better_html//lib/better_html/tokenizer/base_erb.rb#16 + def current_position; end + + # Returns the value of attribute tokens. + # + # source://better_html//lib/better_html/tokenizer/base_erb.rb#15 + def tokens; end + + private + + # source://better_html//lib/better_html/tokenizer/base_erb.rb#34 + def add_code(code); end + + # source://better_html//lib/better_html/tokenizer/base_erb.rb#53 + def add_erb_tokens(ltrim, indicator, code, rtrim); end + + # source://better_html//lib/better_html/tokenizer/base_erb.rb#47 + def add_expression(indicator, code); end + + # source://better_html//lib/better_html/tokenizer/base_erb.rb#80 + def add_token(type, begin_pos, end_pos); end + + # source://better_html//lib/better_html/tokenizer/base_erb.rb#30 + def append(text); end +end + +# source://better_html//lib/better_html/tokenizer/base_erb.rb#13 +BetterHtml::Tokenizer::BaseErb::EXPR_TRIM_MATCHER = T.let(T.unsafe(nil), Regexp) + +# source://better_html//lib/better_html/tokenizer/base_erb.rb#11 +BetterHtml::Tokenizer::BaseErb::REGEXP_WITHOUT_TRIM = T.let(T.unsafe(nil), Regexp) + +# source://better_html//lib/better_html/tokenizer/base_erb.rb#12 +BetterHtml::Tokenizer::BaseErb::STMT_TRIM_MATCHER = T.let(T.unsafe(nil), Regexp) + +# source://better_html//lib/better_html/tokenizer/html_erb.rb#7 +class BetterHtml::Tokenizer::HtmlErb < ::BetterHtml::Tokenizer::BaseErb + # @return [HtmlErb] a new instance of HtmlErb + # + # source://better_html//lib/better_html/tokenizer/html_erb.rb#10 + def initialize(buffer); end + + # source://better_html//lib/better_html/tokenizer/html_erb.rb#15 + def current_position; end + + # Returns the value of attribute parser. + # + # source://better_html//lib/better_html/tokenizer/html_erb.rb#8 + def parser; end + + private + + # source://better_html//lib/better_html/tokenizer/html_erb.rb#25 + def add_text(text); end + + # source://better_html//lib/better_html/tokenizer/html_erb.rb#21 + def append(text); end +end + +# source://better_html//lib/better_html/tokenizer/html_lodash.rb#9 +class BetterHtml::Tokenizer::HtmlLodash + # @return [HtmlLodash] a new instance of HtmlLodash + # + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#18 + def initialize(buffer); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_escape; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_escape=(val); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_evaluate; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_evaluate=(val); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_interpolate; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_interpolate=(val); end + + # Returns the value of attribute parser. + # + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#11 + def parser; end + + # Returns the value of attribute tokens. + # + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#10 + def tokens; end + + private + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#79 + def add_lodash_tokens(indicator, code); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#73 + def add_text(text); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#96 + def add_token(type, begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#28 + def scan!; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#62 + def scan_pattern; end + + class << self + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_escape; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_escape=(val); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_evaluate; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_evaluate=(val); end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_interpolate; end + + # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 + def lodash_interpolate=(val); end + end +end + +# source://better_html//lib/better_html/tokenizer/javascript_erb.rb#7 +class BetterHtml::Tokenizer::JavascriptErb < ::BetterHtml::Tokenizer::BaseErb + private + + # source://better_html//lib/better_html/tokenizer/javascript_erb.rb#10 + def add_text(text); end +end + +# source://better_html//lib/better_html/tokenizer/location.rb#8 +class BetterHtml::Tokenizer::Location < ::Parser::Source::Range + # @raise [ArgumentError] + # @return [Location] a new instance of Location + # + # source://better_html//lib/better_html/tokenizer/location.rb#9 + def initialize(buffer, begin_pos, end_pos); end + + # source://better_html//lib/better_html/tokenizer/location.rb#50 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # source://better_html//lib/better_html/tokenizer/location.rb#62 + def begin; end + + # source://better_html//lib/better_html/tokenizer/location.rb#66 + def end; end + + # source://better_html//lib/better_html/tokenizer/location.rb#30 + def line_range; end + + # source://better_html//lib/better_html/tokenizer/location.rb#39 + def line_source_with_underline; end + + # source://better_html//lib/better_html/tokenizer/location.rb#58 + def offset(offset); end + + # source://better_html//lib/better_html/tokenizer/location.rb#26 + def range; end + + # source://better_html//lib/better_html/tokenizer/location.rb#54 + def resize(new_size); end + + # source://better_html//lib/better_html/tokenizer/location.rb#36 + def start_column; end + + # source://better_html//lib/better_html/tokenizer/location.rb#34 + def start_line; end + + # source://better_html//lib/better_html/tokenizer/location.rb#37 + def stop_column; end + + # source://better_html//lib/better_html/tokenizer/location.rb#35 + def stop_line; end + + # source://better_html//lib/better_html/tokenizer/location.rb#46 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# source://better_html//lib/better_html/tokenizer/token.rb#5 +class BetterHtml::Tokenizer::Token + # @return [Token] a new instance of Token + # + # source://better_html//lib/better_html/tokenizer/token.rb#8 + def initialize(type:, loc:); end + + # source://better_html//lib/better_html/tokenizer/token.rb#13 + def inspect; end + + # Returns the value of attribute loc. + # + # source://better_html//lib/better_html/tokenizer/token.rb#6 + def loc; end + + # Returns the value of attribute type. + # + # source://better_html//lib/better_html/tokenizer/token.rb#6 + def type; end +end + +# source://better_html//lib/better_html/tokenizer/token_array.rb#5 +class BetterHtml::Tokenizer::TokenArray + # @return [TokenArray] a new instance of TokenArray + # + # source://better_html//lib/better_html/tokenizer/token_array.rb#6 + def initialize(list); end + + # @return [Boolean] + # + # source://better_html//lib/better_html/tokenizer/token_array.rb#37 + def any?; end + + # source://better_html//lib/better_html/tokenizer/token_array.rb#41 + def current; end + + # @return [Boolean] + # + # source://better_html//lib/better_html/tokenizer/token_array.rb#33 + def empty?; end + + # source://better_html//lib/better_html/tokenizer/token_array.rb#45 + def last; end + + # source://better_html//lib/better_html/tokenizer/token_array.rb#20 + def pop; end + + # source://better_html//lib/better_html/tokenizer/token_array.rb#12 + def shift; end + + # source://better_html//lib/better_html/tokenizer/token_array.rb#49 + def size; end + + # source://better_html//lib/better_html/tokenizer/token_array.rb#28 + def trim(type); end +end + +# source://better_html//lib/better_html/errors.rb#9 +class BetterHtml::UnsafeHtmlError < ::BetterHtml::InterpolatorError; end + +# source://better_html//lib/better_html/version.rb#4 +BetterHtml::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/builder@3.3.0.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi new file mode 100644 index 0000000..177ba9a --- /dev/null +++ b/sorbet/rbi/gems/builder@3.3.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `builder` gem. +# Please instead update this file by running `bin/tapioca gem builder`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/byebug@13.0.0.rbi b/sorbet/rbi/gems/byebug@13.0.0.rbi new file mode 100644 index 0000000..d8c2594 --- /dev/null +++ b/sorbet/rbi/gems/byebug@13.0.0.rbi @@ -0,0 +1,3597 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `byebug` gem. +# Please instead update this file by running `bin/tapioca gem byebug`. + + +# Reopen main module to define the library version +# +# source://byebug//lib/byebug/helpers/reflection.rb#3 +module Byebug + include ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug + + # Debugger's display expressions + # + # source://byebug//lib/byebug/core.rb#31 + def displays; end + + # Debugger's display expressions + # + # source://byebug//lib/byebug/core.rb#31 + def displays=(_arg0); end + + # Configuration file used for startup commands. Default value is .byebugrc + # + # source://byebug//lib/byebug/core.rb#25 + def init_file; end + + # Configuration file used for startup commands. Default value is .byebugrc + # + # source://byebug//lib/byebug/core.rb#25 + def init_file=(_arg0); end + + # Running mode of the debugger. Can be either: + # + # * :attached => Attached to a running program through the `byebug` method. + # * :standalone => Started through `byebug` script. + # * :off => Ignoring any `byebug` method calls. + # + # source://byebug//lib/byebug/core.rb#41 + def mode; end + + # Running mode of the debugger. Can be either: + # + # * :attached => Attached to a running program through the `byebug` method. + # * :standalone => Started through `byebug` script. + # * :off => Ignoring any `byebug` method calls. + # + # source://byebug//lib/byebug/core.rb#41 + def mode=(_arg0); end + + # Runs normal byebug initialization scripts. + # + # Reads and executes the commands from init file (if any) in the current + # working directory. This is only done if the current directory is different + # from your home directory. Thus, you can have more than one init file, one + # generic in your home directory, and another, specific to the program you + # are debugging, in the directory where you invoke byebug. + # + # source://byebug//lib/byebug/core.rb#52 + def run_init_script; end + + private + + def add_catchpoint(_arg0); end + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + def lock; end + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + + # List of folders to load rc files from + # + # @note Files will be loaded in the order specified here. + # + # source://byebug//lib/byebug/core.rb#102 + def rc_dirs; end + + # Runs a initialization script file + # + # source://byebug//lib/byebug/core.rb#91 + def run_rc_file(rc_file); end + + def start; end + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + class << self + # The actual port that the control server is started at + # + # source://byebug//lib/byebug/remote.rb#25 + def actual_control_port; end + + # The actual port that the server is started at + # + # source://byebug//lib/byebug/remote.rb#20 + def actual_port; end + + def add_catchpoint(_arg0); end + + # Starts byebug, and stops at the first line of user's code. + # + # source://byebug//lib/byebug/attacher.rb#10 + def attach; end + + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + + # Saves information about the unhandled exception and gives a byebug + # prompt back to the user before program termination. + # + # source://byebug//lib/byebug/core.rb#76 + def handle_post_mortem; end + + # Interrupts the current thread + # + # source://byebug//lib/byebug/remote.rb#32 + def interrupt; end + + # source://byebug//lib/byebug/core.rb#61 + def load_settings; end + + def lock; end + + # source://byebug//lib/byebug/remote.rb#59 + def parse_host_and_port(host_port_spec); end + + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + + # source://byebug//lib/byebug/attacher.rb#21 + def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end + + def start; end + + # Connects to the remote byebug + # + # source://byebug//lib/byebug/remote.rb#55 + def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # Starts the remote server control thread + # + # source://byebug//lib/byebug/remote.rb#48 + def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # Starts the remote server main thread + # + # source://byebug//lib/byebug/remote.rb#39 + def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end + + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + # If in remote mode, wait for the remote connection + # + # source://byebug//lib/byebug/remote.rb#17 + def wait_connection; end + + # If in remote mode, wait for the remote connection + # + # source://byebug//lib/byebug/remote.rb#17 + def wait_connection=(_arg0); end + + private + + # source://byebug//lib/byebug/remote.rb#66 + def client; end + + # source://byebug//lib/byebug/remote.rb#76 + def control; end + + # source://byebug//lib/byebug/remote.rb#70 + def server; end + end +end + +# Setting for automatically invoking IRB on every stop. +# +# source://byebug//lib/byebug/settings/autoirb.rb#10 +class Byebug::AutoirbSetting < ::Byebug::Setting + # @return [AutoirbSetting] a new instance of AutoirbSetting + # + # source://byebug//lib/byebug/settings/autoirb.rb#13 + def initialize; end + + # source://byebug//lib/byebug/settings/autoirb.rb#17 + def banner; end + + # source://byebug//lib/byebug/settings/autoirb.rb#25 + def value; end + + # source://byebug//lib/byebug/settings/autoirb.rb#21 + def value=(val); end +end + +# source://byebug//lib/byebug/settings/autoirb.rb#11 +Byebug::AutoirbSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Setting for automatically listing source code on every stop. +# +# source://byebug//lib/byebug/settings/autolist.rb#10 +class Byebug::AutolistSetting < ::Byebug::Setting + # @return [AutolistSetting] a new instance of AutolistSetting + # + # source://byebug//lib/byebug/settings/autolist.rb#13 + def initialize; end + + # source://byebug//lib/byebug/settings/autolist.rb#17 + def banner; end + + # source://byebug//lib/byebug/settings/autolist.rb#25 + def value; end + + # source://byebug//lib/byebug/settings/autolist.rb#21 + def value=(val); end +end + +# source://byebug//lib/byebug/settings/autolist.rb#11 +Byebug::AutolistSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Setting for automatically invoking Pry on every stop. +# +# source://byebug//lib/byebug/settings/autopry.rb#10 +class Byebug::AutoprySetting < ::Byebug::Setting + # @return [AutoprySetting] a new instance of AutoprySetting + # + # source://byebug//lib/byebug/settings/autopry.rb#13 + def initialize; end + + # source://byebug//lib/byebug/settings/autopry.rb#17 + def banner; end + + # source://byebug//lib/byebug/settings/autopry.rb#25 + def value; end + + # source://byebug//lib/byebug/settings/autopry.rb#21 + def value=(val); end +end + +# source://byebug//lib/byebug/settings/autopry.rb#11 +Byebug::AutoprySetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Setting for automatically saving previously entered commands to history +# when exiting the debugger. +# +# source://byebug//lib/byebug/settings/autosave.rb#10 +class Byebug::AutosaveSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/autosave.rb#13 + def banner; end +end + +# source://byebug//lib/byebug/settings/autosave.rb#11 +Byebug::AutosaveSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) + +# Command to display short paths in file names. +# +# For example, when displaying source code information. +# +# source://byebug//lib/byebug/settings/basename.rb#11 +class Byebug::BasenameSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/basename.rb#12 + def banner; end +end + +# Implements breakpoint functionality +# +# source://byebug//lib/byebug/commands/break.rb#13 +class Byebug::BreakCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::FileHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/break.rb#42 + def execute; end + + private + + # source://byebug//lib/byebug/commands/break.rb#85 + def add_line_breakpoint(file, line); end + + # source://byebug//lib/byebug/commands/break.rb#56 + def line_breakpoint(location); end + + # source://byebug//lib/byebug/commands/break.rb#67 + def method_breakpoint(location); end + + # source://byebug//lib/byebug/commands/break.rb#76 + def target_object(str); end + + # source://byebug//lib/byebug/commands/break.rb#106 + def valid_breakpoints_for(path, line); end + + class << self + # source://byebug//lib/byebug/commands/break.rb#24 + def description; end + + # source://byebug//lib/byebug/commands/break.rb#20 + def regexp; end + + # source://byebug//lib/byebug/commands/break.rb#38 + def short_description; end + end +end + +# Implements breakpoints +# +# source://byebug//lib/byebug/breakpoint.rb#7 +class Byebug::Breakpoint + def initialize(_arg0, _arg1, _arg2); end + + def enabled=(_arg0); end + def enabled?; end + def expr; end + def expr=(_arg0); end + def hit_condition; end + def hit_condition=(_arg0); end + def hit_count; end + def hit_value; end + def hit_value=(_arg0); end + def id; end + + # Prints all information associated to the breakpoint + # + # source://byebug//lib/byebug/breakpoint.rb#88 + def inspect; end + + def pos; end + def source; end + + class << self + # Adds a new breakpoint + # + # @param expr [String] + # @param file [String] + # @param line [Fixnum] + # + # source://byebug//lib/byebug/breakpoint.rb#29 + def add(file, line, expr = T.unsafe(nil)); end + + # First breakpoint, in order of creation + # + # source://byebug//lib/byebug/breakpoint.rb#11 + def first; end + + # Last breakpoint, in order of creation + # + # source://byebug//lib/byebug/breakpoint.rb#18 + def last; end + + # True if there's no breakpoints + # + # @return [Boolean] + # + # source://byebug//lib/byebug/breakpoint.rb#81 + def none?; end + + # Returns true if a breakpoint could be set in line number +lineno+ in file + # name +filename. + # + # @return [Boolean] + # + # source://byebug//lib/byebug/breakpoint.rb#74 + def potential_line?(filename, lineno); end + + # Returns an array of line numbers in file named +filename+ where + # breakpoints could be set. The list will contain an entry for each + # distinct line event call so it is possible (and possibly useful) for a + # line number appear more than once. + # + # @param filename [String] File name to inspect for possible breakpoints + # + # source://byebug//lib/byebug/breakpoint.rb#52 + def potential_lines(filename); end + + # Removes a breakpoint + # + # @param id [integer] breakpoint number + # + # source://byebug//lib/byebug/breakpoint.rb#40 + def remove(id); end + + private + + # source://byebug//lib/byebug/breakpoint.rb#59 + def potential_lines_with_trace_points(iseq, lines); end + end +end + +# Setting to customize the verbosity level for stack frames. +# +# source://byebug//lib/byebug/settings/callstyle.rb#9 +class Byebug::CallstyleSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/callstyle.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/callstyle.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/callstyle.rb#10 +Byebug::CallstyleSetting::DEFAULT = T.let(T.unsafe(nil), String) + +# Implements exception catching. +# +# Enables the user to catch unhandled assertion when they happen. +# +# source://byebug//lib/byebug/commands/catch.rb#12 +class Byebug::CatchCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/catch.rb#38 + def execute; end + + private + + # source://byebug//lib/byebug/commands/catch.rb#57 + def add(exception); end + + # source://byebug//lib/byebug/commands/catch.rb#64 + def clear; end + + # source://byebug//lib/byebug/commands/catch.rb#68 + def info; end + + # source://byebug//lib/byebug/commands/catch.rb#50 + def remove(exception); end + + class << self + # source://byebug//lib/byebug/commands/catch.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/catch.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/catch.rb#34 + def short_description; end + end +end + +# Parent class of all byebug commands. +# +# Subclass it and name the subclass ending with the word Command to implement +# your own custom command. +# +# class MyCustomCommand < Command +# def self.regexp +# /custom_regexp/ +# end +# +# def self.description +# "Custom long desc" +# end +# +# def.short_description +# "Custom short desc" +# end +# +# def execute +# # My command's implementation +# end +# end +# +# @example Define a custom command +# +# source://byebug//lib/byebug/command.rb#33 +class Byebug::Command + extend ::Forwardable + extend ::Byebug::Helpers::StringHelper + + # @return [Command] a new instance of Command + # + # source://byebug//lib/byebug/command.rb#38 + def initialize(processor, input = T.unsafe(nil)); end + + # source://byebug//lib/byebug/command.rb#51 + def arguments; end + + # source://byebug//lib/byebug/command.rb#61 + def confirm(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#43 + def context; end + + # source://byebug//lib/byebug/command.rb#61 + def errmsg(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#47 + def frame; end + + # source://byebug//lib/byebug/command.rb#55 + def help(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#55 + def match(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#57 + def pr(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#58 + def prc(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#61 + def print(*args, **_arg1, &block); end + + # Returns the value of attribute processor. + # + # source://byebug//lib/byebug/command.rb#36 + def processor; end + + # source://byebug//lib/byebug/command.rb#59 + def prv(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/command.rb#61 + def puts(*args, **_arg1, &block); end + + class << self + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_control; end + + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_control=(_arg0); end + + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_post_mortem; end + + # Special methods to allow command filtering in processors + # + # source://byebug//lib/byebug/command.rb#69 + def allow_in_post_mortem=(_arg0); end + + # source://byebug//lib/byebug/command.rb#73 + def always_run; end + + # Sets the attribute always_run + # + # @param value the value to set the attribute always_run to. + # + # source://byebug//lib/byebug/command.rb#71 + def always_run=(_arg0); end + + # source://byebug//lib/byebug/command.rb#88 + def columnize(width); end + + # Default help text for a command. + # + # source://byebug//lib/byebug/command.rb#99 + def help; end + + # Command's regexp match against an input + # + # source://byebug//lib/byebug/command.rb#106 + def match(input); end + + # Name of the command, as executed by the user. + # + # source://byebug//lib/byebug/command.rb#80 + def to_s; end + end +end + +# Holds an array of subcommands for a command +# +# source://byebug//lib/byebug/command_list.rb#9 +class Byebug::CommandList + include ::Enumerable + + # @return [CommandList] a new instance of CommandList + # + # source://byebug//lib/byebug/command_list.rb#12 + def initialize(commands); end + + # source://byebug//lib/byebug/command_list.rb#20 + def each; end + + # source://byebug//lib/byebug/command_list.rb#16 + def match(input); end + + # source://byebug//lib/byebug/command_list.rb#24 + def to_s; end + + private + + # source://byebug//lib/byebug/command_list.rb#30 + def width; end +end + +# Custom exception exception to signal "command not found" errors +# +# source://byebug//lib/byebug/errors.rb#7 +class Byebug::CommandNotFound < ::NoMethodError + # @return [CommandNotFound] a new instance of CommandNotFound + # + # source://byebug//lib/byebug/errors.rb#8 + def initialize(input, parent = T.unsafe(nil)); end + + private + + # source://byebug//lib/byebug/errors.rb#25 + def build_cmd(*args); end + + # source://byebug//lib/byebug/errors.rb#21 + def help; end + + # source://byebug//lib/byebug/errors.rb#17 + def name; end +end + +# Processes commands in regular mode. +# +# You can override this class to create your own command processor that, for +# example, whitelists only certain commands to be executed. +# +# @see PostMortemProcessor for a example +# +# source://byebug//lib/byebug/processors/command_processor.rb#17 +class Byebug::CommandProcessor + include ::Byebug::Helpers::EvalHelper + extend ::Forwardable + + # @return [CommandProcessor] a new instance of CommandProcessor + # + # source://byebug//lib/byebug/processors/command_processor.rb#23 + def initialize(context, interface = T.unsafe(nil)); end + + # source://byebug//lib/byebug/processors/command_processor.rb#64 + def at_breakpoint(brkpt); end + + # source://byebug//lib/byebug/processors/command_processor.rb#70 + def at_catchpoint(exception); end + + # source://byebug//lib/byebug/processors/command_processor.rb#80 + def at_end; end + + # source://byebug//lib/byebug/processors/command_processor.rb#54 + def at_line; end + + # source://byebug//lib/byebug/processors/command_processor.rb#74 + def at_return(return_value); end + + # source://byebug//lib/byebug/processors/command_processor.rb#58 + def at_tracing; end + + # Available commands + # + # source://byebug//lib/byebug/processors/command_processor.rb#50 + def command_list; end + + # source://byebug//lib/byebug/processors/command_processor.rb#45 + def commands(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/processors/command_processor.rb#43 + def confirm(*args, **_arg1, &block); end + + # Returns the value of attribute context. + # + # source://byebug//lib/byebug/processors/command_processor.rb#21 + def context; end + + # source://byebug//lib/byebug/processors/command_processor.rb#43 + def errmsg(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/processors/command_processor.rb#37 + def frame(*args, **_arg1, &block); end + + # Returns the value of attribute interface. + # + # source://byebug//lib/byebug/processors/command_processor.rb#21 + def interface; end + + # source://byebug//lib/byebug/processors/command_processor.rb#39 + def pr(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/processors/command_processor.rb#40 + def prc(*args, **_arg1, &block); end + + # Returns the value of attribute prev_line. + # + # source://byebug//lib/byebug/processors/command_processor.rb#20 + def prev_line; end + + # Sets the attribute prev_line + # + # @param value the value to set the attribute prev_line to. + # + # source://byebug//lib/byebug/processors/command_processor.rb#20 + def prev_line=(_arg0); end + + # source://byebug//lib/byebug/processors/command_processor.rb#31 + def printer; end + + # Let the execution continue + # + # source://byebug//lib/byebug/processors/command_processor.rb#87 + def proceed!; end + + # Handle byebug commands. + # + # source://byebug//lib/byebug/processors/command_processor.rb#94 + def process_commands; end + + # source://byebug//lib/byebug/processors/command_processor.rb#41 + def prv(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/processors/command_processor.rb#43 + def puts(*args, **_arg1, &block); end + + protected + + # source://byebug//lib/byebug/processors/command_processor.rb#119 + def after_repl; end + + # source://byebug//lib/byebug/processors/command_processor.rb#111 + def before_repl; end + + # Prompt shown before reading a command. + # + # source://byebug//lib/byebug/processors/command_processor.rb#107 + def prompt; end + + # Main byebug's REPL + # + # source://byebug//lib/byebug/processors/command_processor.rb#126 + def repl; end + + private + + # source://byebug//lib/byebug/processors/command_processor.rb#139 + def auto_cmds_for(run_level); end + + # Run permanent commands. + # + # source://byebug//lib/byebug/processors/command_processor.rb#146 + def run_auto_cmds(run_level); end + + # Executes the received input + # + # Instantiates a command matching the input and runs it. If a matching + # command is not found, it evaluates the unknown input. + # + # source://byebug//lib/byebug/processors/command_processor.rb#158 + def run_cmd(input); end + + # source://byebug//lib/byebug/processors/command_processor.rb#167 + def safely; end +end + +# Implements conditions on breakpoints. +# +# Adds the ability to stop on breakpoints only under certain conditions. +# +# source://byebug//lib/byebug/commands/condition.rb#12 +class Byebug::ConditionCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/condition.rb#38 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/condition.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/condition.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/condition.rb#34 + def short_description; end + end +end + +# Maintains context information for the debugger and it's the main +# communication point between the library and the C-extension through the +# at_breakpoint, at_catchpoint, at_tracing, at_line and at_return callbacks +# +# source://byebug//lib/byebug/context.rb#14 +class Byebug::Context + include ::Byebug::Helpers::FileHelper + extend ::Byebug::Helpers::PathHelper + extend ::Forwardable + + # Breakpoint handler + # + # source://byebug//lib/byebug/context.rb#113 + def at_breakpoint(breakpoint); end + + # Catchpoint handler + # + # source://byebug//lib/byebug/context.rb#120 + def at_catchpoint(exception); end + + # End of class definition handler + # + # source://byebug//lib/byebug/context.rb#136 + def at_end; end + + # Line handler + # + # source://byebug//lib/byebug/context.rb#94 + def at_line; end + + # Return handler + # + # source://byebug//lib/byebug/context.rb#127 + def at_return(return_value); end + + # Tracing handler + # + # source://byebug//lib/byebug/context.rb#104 + def at_tracing; end + + def backtrace; end + def dead?; end + + # source://byebug//lib/byebug/context.rb#58 + def file(*args, **_arg1, &block); end + + # Reader for the current frame + # + # source://byebug//lib/byebug/context.rb#46 + def frame; end + + # Writer for the current frame + # + # source://byebug//lib/byebug/context.rb#53 + def frame=(pos); end + + def frame_binding(*_arg0); end + def frame_class(*_arg0); end + def frame_file(*_arg0); end + def frame_line(*_arg0); end + def frame_method(*_arg0); end + def frame_self(*_arg0); end + + # Current file, line and source code information + # + # source://byebug//lib/byebug/context.rb#70 + def full_location; end + + def ignored?; end + + # source://byebug//lib/byebug/context.rb#87 + def interrupt; end + + # source://byebug//lib/byebug/context.rb#58 + def line(*args, **_arg1, &block); end + + # Current file & line information + # + # source://byebug//lib/byebug/context.rb#63 + def location; end + + def resume; end + + # Context's stack size + # + # source://byebug//lib/byebug/context.rb#79 + def stack_size; end + + def step_into(*_arg0); end + def step_out(*_arg0); end + def step_over(*_arg0); end + def stop_reason; end + def suspend; end + def suspended?; end + def switch; end + def thnum; end + def thread; end + def tracing; end + def tracing=(_arg0); end + + private + + # Tells whether a file is ignored by the debugger. + # + # @param path [String] filename to be checked. + # @return [Boolean] + # + # source://byebug//lib/byebug/context.rb#153 + def ignored_file?(path); end + + # source://byebug//lib/byebug/context.rb#144 + def processor; end + + class << self + # List of files byebug will ignore while debugging + # + # source://byebug//lib/byebug/context.rb#25 + def ignored_files; end + + # Sets the attribute ignored_files + # + # @param value the value to set the attribute ignored_files to. + # + # source://byebug//lib/byebug/context.rb#20 + def ignored_files=(_arg0); end + + # source://byebug//lib/byebug/context.rb#32 + def interface; end + + # Sets the attribute interface + # + # @param value the value to set the attribute interface to. + # + # source://byebug//lib/byebug/context.rb#30 + def interface=(_arg0); end + + # source://byebug//lib/byebug/context.rb#38 + def processor; end + + # Sets the attribute processor + # + # @param value the value to set the attribute processor to. + # + # source://byebug//lib/byebug/context.rb#36 + def processor=(_arg0); end + end +end + +# Implements the continue command. +# +# Allows the user to continue execution until the next stopping point, a +# specific line number or until program termination. +# +# source://byebug//lib/byebug/commands/continue.rb#13 +class Byebug::ContinueCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/continue.rb#37 + def execute; end + + private + + # source://byebug//lib/byebug/commands/continue.rb#64 + def modifier; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/commands/continue.rb#60 + def unconditionally?; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/commands/continue.rb#56 + def until_line?; end + + class << self + # source://byebug//lib/byebug/commands/continue.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/continue.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/continue.rb#33 + def short_description; end + end +end + +# Processes commands when there's not program running +# +# source://byebug//lib/byebug/processors/control_processor.rb#9 +class Byebug::ControlProcessor < ::Byebug::CommandProcessor + # Available commands + # + # source://byebug//lib/byebug/processors/control_processor.rb#13 + def commands; end + + # Prompt shown before reading a command. + # + # source://byebug//lib/byebug/processors/control_processor.rb#20 + def prompt; end +end + +# Spawns a subdebugger and evaluates the given expression +# +# source://byebug//lib/byebug/commands/debug.rb#10 +class Byebug::DebugCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/debug.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/debug.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/debug.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/debug.rb#28 + def short_description; end + end +end + +class Byebug::DebugThread < ::Thread + class << self + def inherited; end + end +end + +# Implements breakpoint deletion. +# +# source://byebug//lib/byebug/commands/delete.rb#10 +class Byebug::DeleteCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/delete.rb#35 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/delete.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/delete.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/delete.rb#31 + def short_description; end + end +end + +# Disabling custom display expressions or breakpoints. +# +# source://byebug//lib/byebug/commands/disable/breakpoints.rb#9 +class Byebug::DisableCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/disable.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/disable.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/disable.rb#29 + def short_description; end + end +end + +# Disables all or specific breakpoints +# +# source://byebug//lib/byebug/commands/disable/breakpoints.rb#13 +class Byebug::DisableCommand::BreakpointsCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#37 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/disable/breakpoints.rb#33 + def short_description; end + end +end + +# Enables all or specific displays +# +# source://byebug//lib/byebug/commands/disable/display.rb#13 +class Byebug::DisableCommand::DisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/disable/display.rb#38 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/disable/display.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/disable/display.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/disable/display.rb#34 + def short_description; end + end +end + +# Custom expressions to be displayed every time the debugger stops. +# +# source://byebug//lib/byebug/commands/display.rb#10 +class Byebug::DisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/display.rb#35 + def execute; end + + private + + # source://byebug//lib/byebug/commands/display.rb#44 + def display_expression(exp); end + + # source://byebug//lib/byebug/commands/display.rb#60 + def eval_expr(expression); end + + # source://byebug//lib/byebug/commands/display.rb#50 + def print_display_expressions; end + + class << self + # source://byebug//lib/byebug/commands/display.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/display.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/display.rb#31 + def short_description; end + end +end + +# Move the current frame down in the backtrace. +# +# source://byebug//lib/byebug/commands/down.rb#12 +class Byebug::DownCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/down.rb#36 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/down.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/down.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/down.rb#32 + def short_description; end + end +end + +# Edit a file from byebug's prompt. +# +# source://byebug//lib/byebug/commands/edit.rb#9 +class Byebug::EditCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/edit.rb#33 + def execute; end + + private + + # source://byebug//lib/byebug/commands/edit.rb#65 + def edit_error(type, file); end + + # source://byebug//lib/byebug/commands/edit.rb#61 + def editor; end + + # source://byebug//lib/byebug/commands/edit.rb#45 + def location(matched); end + + class << self + # source://byebug//lib/byebug/commands/edit.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/edit.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/edit.rb#29 + def short_description; end + end +end + +# Enabling custom display expressions or breakpoints. +# +# source://byebug//lib/byebug/commands/enable/breakpoints.rb#9 +class Byebug::EnableCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/enable.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/enable.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/enable.rb#29 + def short_description; end + end +end + +# Enables all or specific breakpoints +# +# source://byebug//lib/byebug/commands/enable/breakpoints.rb#13 +class Byebug::EnableCommand::BreakpointsCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#37 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/enable/breakpoints.rb#33 + def short_description; end + end +end + +# Enables all or specific displays +# +# source://byebug//lib/byebug/commands/enable/display.rb#13 +class Byebug::EnableCommand::DisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + include ::Byebug::Helpers::ToggleHelper + + # source://byebug//lib/byebug/commands/enable/display.rb#38 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/enable/display.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/enable/display.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/enable/display.rb#34 + def short_description; end + end +end + +# Implements the finish functionality. +# +# Allows the user to continue execution until certain frames are finished. +# +# source://byebug//lib/byebug/commands/finish.rb#12 +class Byebug::FinishCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/finish.rb#37 + def execute; end + + private + + # source://byebug//lib/byebug/commands/finish.rb#53 + def max_frames; end + + class << self + # source://byebug//lib/byebug/commands/finish.rb#21 + def description; end + + # source://byebug//lib/byebug/commands/finish.rb#17 + def regexp; end + + # source://byebug//lib/byebug/commands/finish.rb#33 + def short_description; end + end +end + +# Represents a frame in the stack trace +# +# source://byebug//lib/byebug/frame.rb#9 +class Byebug::Frame + include ::Byebug::Helpers::FileHelper + + # @return [Frame] a new instance of Frame + # + # source://byebug//lib/byebug/frame.rb#14 + def initialize(context, pos); end + + # source://byebug//lib/byebug/frame.rb#31 + def _binding; end + + # source://byebug//lib/byebug/frame.rb#35 + def _class; end + + # source://byebug//lib/byebug/frame.rb#39 + def _method; end + + # source://byebug//lib/byebug/frame.rb#27 + def _self; end + + # Gets current method arguments for the frame. + # + # source://byebug//lib/byebug/frame.rb#62 + def args; end + + # Checks whether the frame is a c-frame + # + # @return [Boolean] + # + # source://byebug//lib/byebug/frame.rb#141 + def c_frame?; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/frame.rb#43 + def current?; end + + # Builds a string containing all available args in the frame number, in a + # verbose or non verbose way according to the value of the +callstyle+ + # setting + # + # source://byebug//lib/byebug/frame.rb#89 + def deco_args; end + + # source://byebug//lib/byebug/frame.rb#76 + def deco_block; end + + # Builds a formatted string containing information about current method call + # + # source://byebug//lib/byebug/frame.rb#106 + def deco_call; end + + # Returns the current class in the frame or an empty string if the current + # +callstyle+ setting is 'short' + # + # source://byebug//lib/byebug/frame.rb#72 + def deco_class; end + + # Formatted filename in frame + # + # source://byebug//lib/byebug/frame.rb#113 + def deco_file; end + + # source://byebug//lib/byebug/frame.rb#80 + def deco_method; end + + # Properly formatted frame number of frame + # + # source://byebug//lib/byebug/frame.rb#120 + def deco_pos; end + + # source://byebug//lib/byebug/frame.rb#19 + def file; end + + # source://byebug//lib/byebug/frame.rb#23 + def line; end + + # Gets local variables for the frame. + # + # source://byebug//lib/byebug/frame.rb#50 + def locals; end + + # Formatted mark for the frame. + # + # --> marks the current frame + # ͱ-- marks c-frames + # marks regular frames + # + # source://byebug//lib/byebug/frame.rb#131 + def mark; end + + # Returns the value of attribute pos. + # + # source://byebug//lib/byebug/frame.rb#12 + def pos; end + + # source://byebug//lib/byebug/frame.rb#145 + def to_hash; end + + private + + # source://byebug//lib/byebug/frame.rb#158 + def c_args; end + + # source://byebug//lib/byebug/frame.rb#178 + def prefix_and_default(arg_type); end + + # source://byebug//lib/byebug/frame.rb#164 + def ruby_args; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/frame.rb#174 + def use_short_style?(arg); end +end + +# Move to specific frames in the backtrace. +# +# source://byebug//lib/byebug/commands/frame.rb#12 +class Byebug::FrameCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/frame.rb#46 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/frame.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/frame.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/frame.rb#42 + def short_description; end + end +end + +# Setting to display full paths in backtraces. +# +# source://byebug//lib/byebug/settings/fullpath.rb#9 +class Byebug::FullpathSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/fullpath.rb#12 + def banner; end +end + +# source://byebug//lib/byebug/settings/fullpath.rb#10 +Byebug::FullpathSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) + +# Ask for help from byebug's prompt. +# +# source://byebug//lib/byebug/commands/help.rb#10 +class Byebug::HelpCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/help.rb#34 + def execute; end + + private + + # source://byebug//lib/byebug/commands/help.rb#54 + def command; end + + # @raise [CommandNotFound] + # + # source://byebug//lib/byebug/commands/help.rb#48 + def help_for(input, cmd); end + + # source://byebug//lib/byebug/commands/help.rb#44 + def help_for_all; end + + # source://byebug//lib/byebug/commands/help.rb#58 + def subcommand; end + + class << self + # source://byebug//lib/byebug/commands/help.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/help.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/help.rb#30 + def short_description; end + end +end + +# source://byebug//lib/byebug/helpers/reflection.rb#4 +module Byebug::Helpers; end + +# Utilities for interaction with executables +# +# source://byebug//lib/byebug/helpers/bin.rb#8 +module Byebug::Helpers::BinHelper + # source://byebug//lib/byebug/helpers/bin.rb#38 + def executable_file_extensions; end + + # source://byebug//lib/byebug/helpers/bin.rb#24 + def find_executable(path, cmd); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/bin.rb#42 + def real_executable?(file); end + + # source://byebug//lib/byebug/helpers/bin.rb#34 + def search_paths; end + + # Cross-platform way of finding an executable in the $PATH. + # Adapted from: https://gist.github.com/steakknife/88b6c3837a5e90a08296 + # + # source://byebug//lib/byebug/helpers/bin.rb#13 + def which(cmd); end +end + +# Utilities to assist evaluation of code strings +# +# source://byebug//lib/byebug/helpers/eval.rb#8 +module Byebug::Helpers::EvalHelper + # Evaluates a string containing Ruby code in a specific binding, + # handling the errors at an error level. + # + # source://byebug//lib/byebug/helpers/eval.rb#46 + def error_eval(str, binding = T.unsafe(nil)); end + + # Evaluates an +expression+ that might use or defer execution to threads + # other than the current one. + # + # "frozen" so that nothing gets run. So we need to unlock threads prior + # to evaluation or we will run into a deadlock. + # + # @note This is necessary because when in byebug's prompt, every thread is + # @param expression [String] Expression to evaluate + # + # source://byebug//lib/byebug/helpers/eval.rb#30 + def multiple_thread_eval(expression); end + + # Evaluates an +expression+ in a separate thread. + # + # @param expression [String] Expression to evaluate + # + # source://byebug//lib/byebug/helpers/eval.rb#14 + def separate_thread_eval(expression); end + + # Evaluates a string containing Ruby code in a specific binding, + # returning nil if an error happens. + # + # source://byebug//lib/byebug/helpers/eval.rb#38 + def silent_eval(str, binding = T.unsafe(nil)); end + + # Evaluates a string containing Ruby code in a specific binding, + # handling the errors at a warning level. + # + # source://byebug//lib/byebug/helpers/eval.rb#54 + def warning_eval(str, binding = T.unsafe(nil)); end + + private + + # Run block temporarily ignoring all TracePoint events. + # + # Used to evaluate stuff within Byebug's prompt. Otherwise, any code + # creating new threads won't be properly evaluated because new threads + # will get blocked by byebug's main thread. + # + # source://byebug//lib/byebug/helpers/eval.rb#91 + def allowing_other_threads(&block); end + + # source://byebug//lib/byebug/helpers/eval.rb#72 + def error_msg(exception); end + + # Runs the given block in a new thread, waits for it to finish and + # returns the new thread's result. + # + # source://byebug//lib/byebug/helpers/eval.rb#103 + def in_new_thread; end + + # source://byebug//lib/byebug/helpers/eval.rb#66 + def msg(exception); end + + # source://byebug//lib/byebug/helpers/eval.rb#60 + def safe_eval(str, binding); end + + # source://byebug//lib/byebug/helpers/eval.rb#111 + def safe_inspect(var); end + + # source://byebug//lib/byebug/helpers/eval.rb#117 + def safe_to_s(var); end + + # source://byebug//lib/byebug/helpers/eval.rb#80 + def warning_msg(exception); end +end + +# Utilities for interaction with files +# +# source://byebug//lib/byebug/helpers/file.rb#8 +module Byebug::Helpers::FileHelper + # Reads line number +lineno+ from file named +filename+ + # + # source://byebug//lib/byebug/helpers/file.rb#19 + def get_line(filename, lineno); end + + # Reads lines of source file +filename+ into an array + # + # source://byebug//lib/byebug/helpers/file.rb#12 + def get_lines(filename); end + + # Returns the number of lines in file +filename+ in a portable, + # one-line-at-a-time way. + # + # source://byebug//lib/byebug/helpers/file.rb#30 + def n_lines(filename); end + + # Regularize file name. + # + # source://byebug//lib/byebug/helpers/file.rb#37 + def normalize(filename); end + + # A short version of a long path + # + # source://byebug//lib/byebug/helpers/file.rb#48 + def shortpath(fullpath); end + + # True for special files like -e, false otherwise + # + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/file.rb#58 + def virtual_file?(name); end +end + +# Utilities to assist frame navigation +# +# source://byebug//lib/byebug/helpers/frame.rb#8 +module Byebug::Helpers::FrameHelper + # source://byebug//lib/byebug/helpers/frame.rb#16 + def jump_frames(steps); end + + # source://byebug//lib/byebug/helpers/frame.rb#9 + def switch_to_frame(frame); end + + private + + # source://byebug//lib/byebug/helpers/frame.rb#22 + def adjust_frame(new_frame); end + + # @param step [Integer] A positive or negative integer + # @return [Integer] +1 if step is positive / -1 if negative + # + # source://byebug//lib/byebug/helpers/frame.rb#60 + def direction(step); end + + # source://byebug//lib/byebug/helpers/frame.rb#51 + def frame_err(msg); end + + # Convert a possibly negative index to a positive index from the start + # of the callstack. -1 is the last position in the stack and so on. + # + # @param i [Integer] Integer to be converted in a proper positive index. + # + # source://byebug//lib/byebug/helpers/frame.rb#70 + def index_from_start(index); end + + # source://byebug//lib/byebug/helpers/frame.rb#30 + def navigate_to_frame(jump_no); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/frame.rb#47 + def out_of_bounds?(pos); end +end + +# Utilities to assist command parsing +# +# source://byebug//lib/byebug/helpers/parse.rb#10 +module Byebug::Helpers::ParseHelper + # Parses +str+ of command +cmd+ as an integer between +min+ and +max+. + # + # If either +min+ or +max+ is nil, that value has no bound. + # + # purpose. + # + # @todo Remove the `cmd` parameter. It has nothing to do with the method's + # + # source://byebug//lib/byebug/helpers/parse.rb#19 + def get_int(str, cmd, min = T.unsafe(nil), max = T.unsafe(nil)); end + + # @return +str+ as an integer or 1 if +str+ is empty. + # + # source://byebug//lib/byebug/helpers/parse.rb#58 + def parse_steps(str, cmd); end + + # @return [Boolean] true if code is syntactically correct for Ruby, false otherwise + # + # source://byebug//lib/byebug/helpers/parse.rb#37 + def syntax_valid?(code); end + + private + + # Temporarily disable output to $stderr + # + # source://byebug//lib/byebug/helpers/parse.rb#72 + def without_stderr; end +end + +# Utilities for managing gem paths +# +# source://byebug//lib/byebug/helpers/path.rb#8 +module Byebug::Helpers::PathHelper + # source://byebug//lib/byebug/helpers/path.rb#29 + def all_files; end + + # source://byebug//lib/byebug/helpers/path.rb#9 + def bin_file; end + + # source://byebug//lib/byebug/helpers/path.rb#25 + def gem_files; end + + # source://byebug//lib/byebug/helpers/path.rb#17 + def lib_files; end + + # source://byebug//lib/byebug/helpers/path.rb#13 + def root_path; end + + # source://byebug//lib/byebug/helpers/path.rb#21 + def test_files; end + + private + + # source://byebug//lib/byebug/helpers/path.rb#35 + def glob_for(dir); end +end + +# Reflection utility +# +# source://byebug//lib/byebug/helpers/reflection.rb#8 +module Byebug::Helpers::ReflectionHelper + # List of "command" classes in the including module + # + # source://byebug//lib/byebug/helpers/reflection.rb#12 + def commands; end +end + +# Utilities for interaction with strings +# +# source://byebug//lib/byebug/helpers/string.rb#8 +module Byebug::Helpers::StringHelper + # Converts +str+ from an_underscored-or-dasherized_string to + # ACamelizedString. + # + # source://byebug//lib/byebug/helpers/string.rb#13 + def camelize(str); end + + # Removes a number of leading whitespace for each input line. + # + # source://byebug//lib/byebug/helpers/string.rb#28 + def deindent(str, leading_spaces: T.unsafe(nil)); end + + # Improves indentation and spacing in +str+ for readability in Byebug's + # command prompt. + # + # source://byebug//lib/byebug/helpers/string.rb#21 + def prettify(str); end +end + +# Utilities for thread subcommands +# +# source://byebug//lib/byebug/helpers/thread.rb#8 +module Byebug::Helpers::ThreadHelper + # source://byebug//lib/byebug/helpers/thread.rb#30 + def context_from_thread(thnum); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/helpers/thread.rb#26 + def current_thread?(ctx); end + + # source://byebug//lib/byebug/helpers/thread.rb#9 + def display_context(ctx); end + + # source://byebug//lib/byebug/helpers/thread.rb#13 + def thread_arguments(ctx); end + + private + + # source://byebug//lib/byebug/helpers/thread.rb#62 + def debug_flag(ctx); end + + # @todo Check whether it is Byebug.current_context or context + # + # source://byebug//lib/byebug/helpers/thread.rb#47 + def location(ctx); end + + # source://byebug//lib/byebug/helpers/thread.rb#56 + def status_flag(ctx); end +end + +# Utilities to assist breakpoint/display enabling/disabling. +# +# source://byebug//lib/byebug/helpers/toggle.rb#10 +module Byebug::Helpers::ToggleHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/helpers/toggle.rb#13 + def enable_disable_breakpoints(is_enable, args); end + + # source://byebug//lib/byebug/helpers/toggle.rb#26 + def enable_disable_display(is_enable, args); end + + private + + # source://byebug//lib/byebug/helpers/toggle.rb#57 + def n_displays; end + + # source://byebug//lib/byebug/helpers/toggle.rb#41 + def select_breakpoints(is_enable, args); end +end + +# Utilities for variable subcommands +# +# source://byebug//lib/byebug/helpers/var.rb#10 +module Byebug::Helpers::VarHelper + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/helpers/var.rb#58 + def var_args; end + + # source://byebug//lib/byebug/helpers/var.rb#37 + def var_global; end + + # source://byebug//lib/byebug/helpers/var.rb#45 + def var_instance(str); end + + # source://byebug//lib/byebug/helpers/var.rb#13 + def var_list(ary, binding = T.unsafe(nil)); end + + # source://byebug//lib/byebug/helpers/var.rb#51 + def var_local; end +end + +# Setting to customize the file where byebug's history is saved. +# +# source://byebug//lib/byebug/settings/histfile.rb#9 +class Byebug::HistfileSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/histfile.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/histfile.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/histfile.rb#10 +Byebug::HistfileSetting::DEFAULT = T.let(T.unsafe(nil), String) + +# Handles byebug's history of commands. +# +# source://byebug//lib/byebug/history.rb#9 +class Byebug::History + # @return [History] a new instance of History + # + # source://byebug//lib/byebug/history.rb#12 + def initialize; end + + # Array holding the list of commands in history + # + # source://byebug//lib/byebug/history.rb#19 + def buffer; end + + # Discards history. + # + # source://byebug//lib/byebug/history.rb#48 + def clear; end + + # Max number of commands to be displayed when no size has been specified. + # + # Never more than Setting[:histsize]. + # + # source://byebug//lib/byebug/history.rb#95 + def default_max_size; end + + # Whether a specific command should not be stored in history. + # + # For now, empty lines and consecutive duplicates. + # + # @return [Boolean] + # + # source://byebug//lib/byebug/history.rb#113 + def ignore?(buf); end + + # Array of ids of the last +number+ commands. + # + # source://byebug//lib/byebug/history.rb#86 + def last_ids(number); end + + # Removes a command from Reline's history. + # + # source://byebug//lib/byebug/history.rb#65 + def pop; end + + # Adds a new command to Reline's history. + # + # source://byebug//lib/byebug/history.rb#55 + def push(cmd); end + + # Restores history from disk. + # + # source://byebug//lib/byebug/history.rb#26 + def restore; end + + # Saves history to disk. + # + # source://byebug//lib/byebug/history.rb#35 + def save; end + + # Returns the value of attribute size. + # + # source://byebug//lib/byebug/history.rb#10 + def size; end + + # Max number of commands to be displayed when a size has been specified. + # + # The only bound here is not showing more items than available. + # + # source://byebug//lib/byebug/history.rb#104 + def specific_max_size(number); end + + # Prints the requested numbers of history entries. + # + # source://byebug//lib/byebug/history.rb#73 + def to_s(n_cmds); end +end + +# Show history of byebug commands. +# +# source://byebug//lib/byebug/commands/history.rb#10 +class Byebug::HistoryCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/history.rb#31 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/history.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/history.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/history.rb#27 + def short_description; end + end +end + +# Setting to customize the number of byebug commands to be saved in history. +# +# source://byebug//lib/byebug/settings/histsize.rb#9 +class Byebug::HistsizeSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/histsize.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/histsize.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/histsize.rb#10 +Byebug::HistsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Shows info about different aspects of the debugger. +# +# source://byebug//lib/byebug/commands/info/breakpoints.rb#7 +class Byebug::InfoCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/info.rb#25 + def description; end + + # source://byebug//lib/byebug/commands/info.rb#21 + def regexp; end + + # source://byebug//lib/byebug/commands/info.rb#33 + def short_description; end + end +end + +# Information about current breakpoints +# +# source://byebug//lib/byebug/commands/info/breakpoints.rb#11 +class Byebug::InfoCommand::BreakpointsCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/breakpoints.rb#30 + def execute; end + + private + + # source://byebug//lib/byebug/commands/info/breakpoints.rb#47 + def info_breakpoint(brkpt); end + + class << self + # source://byebug//lib/byebug/commands/info/breakpoints.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/breakpoints.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/breakpoints.rb#26 + def short_description; end + end +end + +# Information about display expressions +# +# source://byebug//lib/byebug/commands/info/display.rb#11 +class Byebug::InfoCommand::DisplayCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/display.rb#30 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/info/display.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/display.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/display.rb#26 + def short_description; end + end +end + +# Information about a particular source file +# +# source://byebug//lib/byebug/commands/info/file.rb#13 +class Byebug::InfoCommand::FileCommand < ::Byebug::Command + include ::Byebug::Helpers::FileHelper + include ::Byebug::Helpers::StringHelper + + # source://byebug//lib/byebug/commands/info/file.rb#38 + def execute; end + + private + + # source://byebug//lib/byebug/commands/info/file.rb#55 + def info_file_basic(file); end + + # source://byebug//lib/byebug/commands/info/file.rb#63 + def info_file_breakpoints(file); end + + # source://byebug//lib/byebug/commands/info/file.rb#70 + def info_file_mtime(file); end + + # source://byebug//lib/byebug/commands/info/file.rb#74 + def info_file_sha1(file); end + + class << self + # source://byebug//lib/byebug/commands/info/file.rb#23 + def description; end + + # source://byebug//lib/byebug/commands/info/file.rb#19 + def regexp; end + + # source://byebug//lib/byebug/commands/info/file.rb#34 + def short_description; end + end +end + +# Information about current location +# +# source://byebug//lib/byebug/commands/info/line.rb#11 +class Byebug::InfoCommand::LineCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/line.rb#30 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/info/line.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/line.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/line.rb#26 + def short_description; end + end +end + +# Information about arguments of the current method/block +# +# source://byebug//lib/byebug/commands/info/program.rb#11 +class Byebug::InfoCommand::ProgramCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/info/program.rb#30 + def execute; end + + private + + # source://byebug//lib/byebug/commands/info/program.rb#37 + def format_stop_reason(stop_reason); end + + class << self + # source://byebug//lib/byebug/commands/info/program.rb#18 + def description; end + + # source://byebug//lib/byebug/commands/info/program.rb#14 + def regexp; end + + # source://byebug//lib/byebug/commands/info/program.rb#26 + def short_description; end + end +end + +# Main Interface class +# +# Contains common functionality to all implemented interfaces. +# +# source://byebug//lib/byebug/interface.rb#16 +class Byebug::Interface + include ::Byebug::Helpers::FileHelper + + # @return [Interface] a new instance of Interface + # + # source://byebug//lib/byebug/interface.rb#22 + def initialize; end + + # Restores history according to +autosave+ setting. + # + # source://byebug//lib/byebug/interface.rb#118 + def autorestore; end + + # Saves or clears history according to +autosave+ setting. + # + # source://byebug//lib/byebug/interface.rb#111 + def autosave; end + + # source://byebug//lib/byebug/interface.rb#105 + def close; end + + # Returns the value of attribute command_queue. + # + # source://byebug//lib/byebug/interface.rb#19 + def command_queue; end + + # Sets the attribute command_queue + # + # @param value the value to set the attribute command_queue to. + # + # source://byebug//lib/byebug/interface.rb#19 + def command_queue=(_arg0); end + + # Confirms user introduced an affirmative response to the input stream. + # + # source://byebug//lib/byebug/interface.rb#101 + def confirm(prompt); end + + # Prints an error message to the error stream. + # + # source://byebug//lib/byebug/interface.rb#80 + def errmsg(message); end + + # Returns the value of attribute error. + # + # source://byebug//lib/byebug/interface.rb#20 + def error; end + + # Returns the value of attribute history. + # + # source://byebug//lib/byebug/interface.rb#19 + def history; end + + # Sets the attribute history + # + # @param value the value to set the attribute history to. + # + # source://byebug//lib/byebug/interface.rb#19 + def history=(_arg0); end + + # Returns the value of attribute input. + # + # source://byebug//lib/byebug/interface.rb#20 + def input; end + + # source://byebug//lib/byebug/interface.rb#28 + def last_if_empty(input); end + + # Returns the value of attribute output. + # + # source://byebug//lib/byebug/interface.rb#20 + def output; end + + # Reads a new line from the interface's input stream. + # + # read now was empty. + # + # @return [String] New string read or the previous string if the string + # + # source://byebug//lib/byebug/interface.rb#70 + def prepare_input(prompt); end + + # Prints an output message to the output stream without a final "\n". + # + # source://byebug//lib/byebug/interface.rb#94 + def print(message); end + + # Prints an output message to the output stream. + # + # source://byebug//lib/byebug/interface.rb#87 + def puts(message); end + + # Pops a command from the input stream. + # + # source://byebug//lib/byebug/interface.rb#35 + def read_command(prompt); end + + # Pushes lines in +filename+ to the command queue. + # + # source://byebug//lib/byebug/interface.rb#44 + def read_file(filename); end + + # Reads a new line from the interface's input stream, parses it into + # commands and saves it to history. + # + # @return [String] Representing something to be run by the debugger. + # + # source://byebug//lib/byebug/interface.rb#54 + def read_input(prompt, save_hist = T.unsafe(nil)); end + + private + + # Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an + # array of commands: [cmd1, cmd2, ..., cmdN] + # + # source://byebug//lib/byebug/interface.rb#128 + def split_commands(cmd_line); end +end + +# Interrupting execution of current thread. +# +# source://byebug//lib/byebug/commands/interrupt.rb#9 +class Byebug::InterruptCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/interrupt.rb#28 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/interrupt.rb#16 + def description; end + + # source://byebug//lib/byebug/commands/interrupt.rb#12 + def regexp; end + + # source://byebug//lib/byebug/commands/interrupt.rb#24 + def short_description; end + end +end + +# Enter IRB from byebug's prompt +# +# source://byebug//lib/byebug/commands/irb.rb#10 +class Byebug::IrbCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/irb.rb#29 + def execute; end + + private + + # source://byebug//lib/byebug/commands/irb.rb#41 + def with_clean_argv; end + + class << self + # source://byebug//lib/byebug/commands/irb.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/irb.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/irb.rb#25 + def short_description; end + end +end + +# Send custom signals to the debugged program. +# +# source://byebug//lib/byebug/commands/kill.rb#9 +class Byebug::KillCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/kill.rb#30 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/kill.rb#16 + def description; end + + # source://byebug//lib/byebug/commands/kill.rb#12 + def regexp; end + + # source://byebug//lib/byebug/commands/kill.rb#26 + def short_description; end + end +end + +# Setting to enable/disable linetracing. +# +# source://byebug//lib/byebug/settings/linetrace.rb#9 +class Byebug::LinetraceSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/linetrace.rb#10 + def banner; end + + # source://byebug//lib/byebug/settings/linetrace.rb#18 + def value; end + + # source://byebug//lib/byebug/settings/linetrace.rb#14 + def value=(val); end +end + +# List parts of the source code. +# +# source://byebug//lib/byebug/commands/list.rb#12 +class Byebug::ListCommand < ::Byebug::Command + include ::Byebug::Helpers::FileHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/list.rb#150 + def amend_final(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/commands/list.rb#40 + def execute; end + + # source://byebug//lib/byebug/commands/list.rb#150 + def max_line(*args, **_arg1, &block); end + + # source://byebug//lib/byebug/commands/list.rb#150 + def size(*args, **_arg1, &block); end + + private + + # Set line range to be printed by list + # + # @return first line number to list + # @return last line number to list + # + # source://byebug//lib/byebug/commands/list.rb#79 + def auto_range(direction); end + + # Show a range of lines in the current file. + # + # @param max [Integer] Upper bound + # @param min [Integer] Lower bound + # + # source://byebug//lib/byebug/commands/list.rb#115 + def display_lines(min, max); end + + # @param range [String] A string with an integer range format + # @return [String] The lower bound of the given range + # + # source://byebug//lib/byebug/commands/list.rb#126 + def lower_bound(range); end + + # source://byebug//lib/byebug/commands/list.rb#105 + def move(line, size, direction = T.unsafe(nil)); end + + # source://byebug//lib/byebug/commands/list.rb#89 + def parse_range(input); end + + # Line range to be printed by `list`. + # + # If is set, range is parsed from it. + # + # Otherwise it's automatically chosen. + # + # source://byebug//lib/byebug/commands/list.rb#60 + def range(input); end + + # source://byebug//lib/byebug/commands/list.rb#152 + def source_file_formatter; end + + # @param str [String] A string with an integer range format + # @return [Array] The upper & lower bounds of the given range + # + # source://byebug//lib/byebug/commands/list.rb#144 + def split_range(str); end + + # @param range [String] A string with an integer range format + # @return [String] The upper bound of the given range + # + # source://byebug//lib/byebug/commands/list.rb#135 + def upper_bound(range); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/commands/list.rb#69 + def valid_range?(first, last); end + + class << self + # source://byebug//lib/byebug/commands/list.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/list.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/list.rb#36 + def short_description; end + end +end + +# Setting to customize the number of source code lines to be displayed every +# time the "list" command is invoked. +# +# source://byebug//lib/byebug/settings/listsize.rb#10 +class Byebug::ListsizeSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/listsize.rb#13 + def banner; end + + # source://byebug//lib/byebug/settings/listsize.rb#17 + def to_s; end +end + +# source://byebug//lib/byebug/settings/listsize.rb#11 +Byebug::ListsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Interface class for standard byebug use. +# +# source://byebug//lib/byebug/interfaces/local_interface.rb#7 +class Byebug::LocalInterface < ::Byebug::Interface + # @return [LocalInterface] a new instance of LocalInterface + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#10 + def initialize; end + + # Reads a single line of input using Reline. If Ctrl-D is pressed, it + # returns "continue", meaning that program's execution will go on. + # + # @param prompt Prompt to be displayed. + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#23 + def readline(prompt); end + + # Yields the block handling Ctrl-C the following way: if pressed while + # waiting for input, the line is reset to only the prompt and we ask for + # input again. + # + # @note Any external 'INT' traps are overriden during this method. + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#34 + def with_repl_like_sigint; end + + # Disable any Reline completion procs. + # + # Other gems, for example, IRB could've installed completion procs that are + # dependent on them being loaded. Disable those while byebug is the REPL + # making use of Reline. + # + # source://byebug//lib/byebug/interfaces/local_interface.rb#51 + def without_reline_completion; end +end + +# source://byebug//lib/byebug/interfaces/local_interface.rb#8 +Byebug::LocalInterface::EOF_ALIAS = T.let(T.unsafe(nil), String) + +# Show methods of specific classes/modules/objects. +# +# source://byebug//lib/byebug/commands/method.rb#10 +class Byebug::MethodCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/method.rb#37 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/method.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/method.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/method.rb#33 + def short_description; end + end +end + +# Implements the next functionality. +# +# Allows the user the continue execution until the next instruction in the +# current frame. +# +# source://byebug//lib/byebug/commands/next.rb#13 +class Byebug::NextCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/next.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/next.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/next.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/next.rb#28 + def short_description; end + end +end + +# Port number used for remote debugging +# +# source://byebug//lib/byebug/remote.rb#13 +Byebug::PORT = T.let(T.unsafe(nil), Integer) + +# Processes commands in post_mortem mode +# +# source://byebug//lib/byebug/processors/post_mortem_processor.rb#9 +class Byebug::PostMortemProcessor < ::Byebug::CommandProcessor + # source://byebug//lib/byebug/processors/post_mortem_processor.rb#10 + def commands; end + + # source://byebug//lib/byebug/processors/post_mortem_processor.rb#14 + def prompt; end +end + +# Setting to enable/disable post_mortem mode, i.e., a debugger prompt after +# program termination by unhandled exception. +# +# source://byebug//lib/byebug/settings/post_mortem.rb#10 +class Byebug::PostMortemSetting < ::Byebug::Setting + # @return [PostMortemSetting] a new instance of PostMortemSetting + # + # source://byebug//lib/byebug/settings/post_mortem.rb#11 + def initialize; end + + # source://byebug//lib/byebug/settings/post_mortem.rb#15 + def banner; end + + # source://byebug//lib/byebug/settings/post_mortem.rb#23 + def value; end + + # source://byebug//lib/byebug/settings/post_mortem.rb#19 + def value=(val); end +end + +# source://byebug//lib/byebug/printers/base.rb#6 +module Byebug::Printers; end + +# Base printer +# +# source://byebug//lib/byebug/printers/base.rb#10 +class Byebug::Printers::Base + # source://byebug//lib/byebug/printers/base.rb#16 + def type; end + + private + + # source://byebug//lib/byebug/printers/base.rb#55 + def array_of_args(collection, &_block); end + + # source://byebug//lib/byebug/printers/base.rb#49 + def contents; end + + # source://byebug//lib/byebug/printers/base.rb#63 + def contents_files; end + + # @raise [MissedPath] + # + # source://byebug//lib/byebug/printers/base.rb#22 + def locate(path); end + + # source://byebug//lib/byebug/printers/base.rb#45 + def parts(path); end + + # source://byebug//lib/byebug/printers/base.rb#35 + def translate(string, args = T.unsafe(nil)); end +end + +# source://byebug//lib/byebug/printers/base.rb#12 +class Byebug::Printers::Base::MissedArgument < ::StandardError; end + +# source://byebug//lib/byebug/printers/base.rb#11 +class Byebug::Printers::Base::MissedPath < ::StandardError; end + +# source://byebug//lib/byebug/printers/base.rb#14 +Byebug::Printers::Base::SEPARATOR = T.let(T.unsafe(nil), String) + +# Plain text printer +# +# source://byebug//lib/byebug/printers/plain.rb#10 +class Byebug::Printers::Plain < ::Byebug::Printers::Base + # source://byebug//lib/byebug/printers/plain.rb#11 + def print(path, args = T.unsafe(nil)); end + + # source://byebug//lib/byebug/printers/plain.rb#17 + def print_collection(path, collection, &block); end + + # source://byebug//lib/byebug/printers/plain.rb#25 + def print_variables(variables, *_unused); end + + private + + # source://byebug//lib/byebug/printers/plain.rb#39 + def contents_files; end +end + +# Enter Pry from byebug's prompt +# +# source://byebug//lib/byebug/commands/pry.rb#10 +class Byebug::PryCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/pry.rb#29 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/pry.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/pry.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/pry.rb#25 + def short_description; end + end +end + +# Exit from byebug. +# +# source://byebug//lib/byebug/commands/quit.rb#9 +class Byebug::QuitCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/quit.rb#33 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/quit.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/quit.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/quit.rb#29 + def short_description; end + end +end + +# source://byebug//lib/byebug/remote/server.rb#6 +module Byebug::Remote; end + +# Client for remote debugging +# +# source://byebug//lib/byebug/remote/client.rb#10 +class Byebug::Remote::Client + # @return [Client] a new instance of Client + # + # source://byebug//lib/byebug/remote/client.rb#13 + def initialize(interface); end + + # Returns the value of attribute interface. + # + # source://byebug//lib/byebug/remote/client.rb#11 + def interface; end + + # Returns the value of attribute socket. + # + # source://byebug//lib/byebug/remote/client.rb#11 + def socket; end + + # Connects to the remote byebug + # + # source://byebug//lib/byebug/remote/client.rb#21 + def start(host = T.unsafe(nil), port = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://byebug//lib/byebug/remote/client.rb#44 + def started?; end + + private + + # source://byebug//lib/byebug/remote/client.rb#50 + def connect_at(host, port); end +end + +# Server for remote debugging +# +# source://byebug//lib/byebug/remote/server.rb#10 +class Byebug::Remote::Server + # @return [Server] a new instance of Server + # + # source://byebug//lib/byebug/remote/server.rb#13 + def initialize(wait_connection:, &block); end + + # Returns the value of attribute actual_port. + # + # source://byebug//lib/byebug/remote/server.rb#11 + def actual_port; end + + # Start the remote debugging server + # + # source://byebug//lib/byebug/remote/server.rb#22 + def start(host, port); end + + # Returns the value of attribute wait_connection. + # + # source://byebug//lib/byebug/remote/server.rb#11 + def wait_connection; end +end + +# Interface class for remote use of byebug. +# +# source://byebug//lib/byebug/interfaces/remote_interface.rb#9 +class Byebug::RemoteInterface < ::Byebug::Interface + # @return [RemoteInterface] a new instance of RemoteInterface + # + # source://byebug//lib/byebug/interfaces/remote_interface.rb#10 + def initialize(socket); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#41 + def close; end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#23 + def confirm(prompt); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#29 + def print(message); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#35 + def puts(message); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#17 + def read_command(prompt); end + + # source://byebug//lib/byebug/interfaces/remote_interface.rb#45 + def readline(prompt); end +end + +# Restart debugged program from within byebug. +# +# source://byebug//lib/byebug/commands/restart.rb#14 +class Byebug::RestartCommand < ::Byebug::Command + include ::Byebug::Helpers::BinHelper + include ::Byebug::Helpers::PathHelper + + # source://byebug//lib/byebug/commands/restart.rb#40 + def execute; end + + private + + # source://byebug//lib/byebug/commands/restart.rb#54 + def prepend_byebug_bin(cmd); end + + # source://byebug//lib/byebug/commands/restart.rb#59 + def prepend_ruby_bin(cmd); end + + class << self + # source://byebug//lib/byebug/commands/restart.rb#25 + def description; end + + # source://byebug//lib/byebug/commands/restart.rb#21 + def regexp; end + + # source://byebug//lib/byebug/commands/restart.rb#36 + def short_description; end + end +end + +# Save current settings to use them in another debug session. +# +# source://byebug//lib/byebug/commands/save.rb#9 +class Byebug::SaveCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/save.rb#36 + def execute; end + + private + + # source://byebug//lib/byebug/commands/save.rb#50 + def save_breakpoints(file); end + + # source://byebug//lib/byebug/commands/save.rb#56 + def save_catchpoints(file); end + + # source://byebug//lib/byebug/commands/save.rb#62 + def save_displays(file); end + + # source://byebug//lib/byebug/commands/save.rb#66 + def save_settings(file); end + + class << self + # source://byebug//lib/byebug/commands/save.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/save.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/save.rb#32 + def short_description; end + end +end + +# Setting to customize the file where byebug's settings are saved. +# +# source://byebug//lib/byebug/settings/savefile.rb#9 +class Byebug::SavefileSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/savefile.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/savefile.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/savefile.rb#10 +Byebug::SavefileSetting::DEFAULT = T.let(T.unsafe(nil), String) + +# Interface class for command execution from script files. +# +# source://byebug//lib/byebug/interfaces/script_interface.rb#7 +class Byebug::ScriptInterface < ::Byebug::Interface + # @return [ScriptInterface] a new instance of ScriptInterface + # + # source://byebug//lib/byebug/interfaces/script_interface.rb#8 + def initialize(file, verbose = T.unsafe(nil)); end + + # source://byebug//lib/byebug/interfaces/script_interface.rb#20 + def close; end + + # source://byebug//lib/byebug/interfaces/script_interface.rb#16 + def read_command(prompt); end + + # source://byebug//lib/byebug/interfaces/script_interface.rb#24 + def readline(*_arg0); end +end + +# Processes commands from a file +# +# source://byebug//lib/byebug/processors/script_processor.rb#9 +class Byebug::ScriptProcessor < ::Byebug::CommandProcessor + # source://byebug//lib/byebug/processors/script_processor.rb#28 + def after_repl; end + + # Available commands + # + # source://byebug//lib/byebug/processors/script_processor.rb#13 + def commands; end + + # Prompt shown before reading a command. + # + # source://byebug//lib/byebug/processors/script_processor.rb#37 + def prompt; end + + # source://byebug//lib/byebug/processors/script_processor.rb#17 + def repl; end + + private + + # source://byebug//lib/byebug/processors/script_processor.rb#43 + def without_exceptions; end +end + +# Change byebug settings. +# +# source://byebug//lib/byebug/commands/set.rb#10 +class Byebug::SetCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/set.rb#42 + def execute; end + + private + + # source://byebug//lib/byebug/commands/set.rb#66 + def get_onoff(arg, default); end + + class << self + # source://byebug//lib/byebug/commands/set.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/set.rb#38 + def help; end + + # source://byebug//lib/byebug/commands/set.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/set.rb#34 + def short_description; end + end +end + +# Parent class for all byebug settings. +# +# source://byebug//lib/byebug/setting.rb#9 +class Byebug::Setting + # @return [Setting] a new instance of Setting + # + # source://byebug//lib/byebug/setting.rb#14 + def initialize; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/setting.rb#18 + def boolean?; end + + # source://byebug//lib/byebug/setting.rb#28 + def help; end + + # @return [Boolean] + # + # source://byebug//lib/byebug/setting.rb#22 + def integer?; end + + # source://byebug//lib/byebug/setting.rb#37 + def to_s; end + + # source://byebug//lib/byebug/setting.rb#32 + def to_sym; end + + # Returns the value of attribute value. + # + # source://byebug//lib/byebug/setting.rb#10 + def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://byebug//lib/byebug/setting.rb#10 + def value=(_arg0); end + + class << self + # source://byebug//lib/byebug/setting.rb#46 + def [](name); end + + # source://byebug//lib/byebug/setting.rb#50 + def []=(name, value); end + + # source://byebug//lib/byebug/setting.rb#54 + def find(shortcut); end + + # @todo DRY this up. Very similar code exists in the CommandList class + # + # source://byebug//lib/byebug/setting.rb#65 + def help_all; end + + # source://byebug//lib/byebug/setting.rb#42 + def settings; end + end +end + +# source://byebug//lib/byebug/setting.rb#12 +Byebug::Setting::DEFAULT = T.let(T.unsafe(nil), FalseClass) + +# Show byebug settings. +# +# source://byebug//lib/byebug/commands/show.rb#9 +class Byebug::ShowCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/show.rb#35 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/show.rb#17 + def description; end + + # source://byebug//lib/byebug/commands/show.rb#31 + def help; end + + # source://byebug//lib/byebug/commands/show.rb#13 + def regexp; end + + # source://byebug//lib/byebug/commands/show.rb#27 + def short_description; end + end +end + +# Allows the user to continue execution until the next breakpoint, as +# long as it is different from the current one +# +# source://byebug//lib/byebug/commands/skip.rb#11 +class Byebug::SkipCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/skip.rb#70 + def auto_run; end + + # source://byebug//lib/byebug/commands/skip.rb#77 + def execute; end + + # source://byebug//lib/byebug/commands/skip.rb#53 + def initialize_attributes; end + + # source://byebug//lib/byebug/commands/skip.rb#60 + def keep_execution; end + + # source://byebug//lib/byebug/commands/skip.rb#64 + def reset_attributes; end + + class << self + # source://byebug//lib/byebug/commands/skip.rb#41 + def description; end + + # source://byebug//lib/byebug/commands/skip.rb#18 + def file_line; end + + # Sets the attribute file_line + # + # @param value the value to set the attribute file_line to. + # + # source://byebug//lib/byebug/commands/skip.rb#15 + def file_line=(_arg0); end + + # source://byebug//lib/byebug/commands/skip.rb#22 + def file_path; end + + # Sets the attribute file_path + # + # @param value the value to set the attribute file_path to. + # + # source://byebug//lib/byebug/commands/skip.rb#15 + def file_path=(_arg0); end + + # Returns the value of attribute previous_autolist. + # + # source://byebug//lib/byebug/commands/skip.rb#16 + def previous_autolist; end + + # source://byebug//lib/byebug/commands/skip.rb#37 + def regexp; end + + # source://byebug//lib/byebug/commands/skip.rb#31 + def restore_autolist; end + + # source://byebug//lib/byebug/commands/skip.rb#26 + def setup_autolist(value); end + + # source://byebug//lib/byebug/commands/skip.rb#49 + def short_description; end + end +end + +# Execute a file containing byebug commands. +# +# It can be used to restore a previously saved debugging session. +# +# source://byebug//lib/byebug/commands/source.rb#11 +class Byebug::SourceCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/source.rb#31 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/source.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/source.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/source.rb#27 + def short_description; end + end +end + +# Formats specific line ranges in a source file +# +# source://byebug//lib/byebug/source_file_formatter.rb#10 +class Byebug::SourceFileFormatter + include ::Byebug::Helpers::FileHelper + + # @return [SourceFileFormatter] a new instance of SourceFileFormatter + # + # source://byebug//lib/byebug/source_file_formatter.rb#15 + def initialize(file, annotator); end + + # source://byebug//lib/byebug/source_file_formatter.rb#67 + def amend(line, ceiling); end + + # source://byebug//lib/byebug/source_file_formatter.rb#51 + def amend_final(line); end + + # source://byebug//lib/byebug/source_file_formatter.rb#47 + def amend_initial(line); end + + # Returns the value of attribute annotator. + # + # source://byebug//lib/byebug/source_file_formatter.rb#13 + def annotator; end + + # Returns the value of attribute file. + # + # source://byebug//lib/byebug/source_file_formatter.rb#13 + def file; end + + # source://byebug//lib/byebug/source_file_formatter.rb#20 + def lines(min, max); end + + # source://byebug//lib/byebug/source_file_formatter.rb#33 + def lines_around(center); end + + # source://byebug//lib/byebug/source_file_formatter.rb#55 + def max_initial_line; end + + # source://byebug//lib/byebug/source_file_formatter.rb#59 + def max_line; end + + # source://byebug//lib/byebug/source_file_formatter.rb#37 + def range_around(center); end + + # source://byebug//lib/byebug/source_file_formatter.rb#41 + def range_from(min); end + + # source://byebug//lib/byebug/source_file_formatter.rb#63 + def size; end +end + +# Setting to enable/disable the display of backtraces when evaluations raise +# errors. +# +# source://byebug//lib/byebug/settings/stack_on_error.rb#10 +class Byebug::StackOnErrorSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/stack_on_error.rb#11 + def banner; end +end + +# Implements the step functionality. +# +# Allows the user the continue execution until the next instruction, possibly +# in a different frame. Use step to step into method calls or blocks. +# +# source://byebug//lib/byebug/commands/step.rb#13 +class Byebug::StepCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/step.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/step.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/step.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/step.rb#28 + def short_description; end + end +end + +# Subcommand additions. +# +# source://byebug//lib/byebug/subcommands.rb#12 +module Byebug::Subcommands + extend ::Forwardable + + mixes_in_class_methods ::Byebug::Subcommands::ClassMethods + + # Delegates to subcommands or prints help if no subcommand specified. + # + # @raise [CommandNotFound] + # + # source://byebug//lib/byebug/subcommands.rb#23 + def execute; end + + # source://byebug//lib/byebug/subcommands.rb#18 + def subcommand_list(*args, **_arg1, &block); end + + class << self + # @private + # + # source://byebug//lib/byebug/subcommands.rb#13 + def included(command); end + end +end + +# Class methods added to subcommands +# +# source://byebug//lib/byebug/subcommands.rb#36 +module Byebug::Subcommands::ClassMethods + include ::Byebug::Helpers::ReflectionHelper + + # Default help text for a command with subcommands + # + # source://byebug//lib/byebug/subcommands.rb#42 + def help; end + + # Command's subcommands. + # + # source://byebug//lib/byebug/subcommands.rb#49 + def subcommand_list; end +end + +# Manipulation of Ruby threads +# +# source://byebug//lib/byebug/commands/thread/current.rb#9 +class Byebug::ThreadCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/thread.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/thread.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/thread.rb#30 + def short_description; end + end +end + +# Information about the current thread +# +# source://byebug//lib/byebug/commands/thread/current.rb#13 +class Byebug::ThreadCommand::CurrentCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/current.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/current.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/current.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/current.rb#28 + def short_description; end + end +end + +# Information about threads +# +# source://byebug//lib/byebug/commands/thread/list.rb#13 +class Byebug::ThreadCommand::ListCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/list.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/list.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/list.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/list.rb#28 + def short_description; end + end +end + +# Resumes the specified thread +# +# source://byebug//lib/byebug/commands/thread/resume.rb#13 +class Byebug::ThreadCommand::ResumeCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/resume.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/resume.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/resume.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/resume.rb#28 + def short_description; end + end +end + +# Stops the specified thread +# +# source://byebug//lib/byebug/commands/thread/stop.rb#13 +class Byebug::ThreadCommand::StopCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/stop.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/stop.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/stop.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/stop.rb#28 + def short_description; end + end +end + +# Switches to the specified thread +# +# source://byebug//lib/byebug/commands/thread/switch.rb#13 +class Byebug::ThreadCommand::SwitchCommand < ::Byebug::Command + include ::Byebug::Helpers::ThreadHelper + + # source://byebug//lib/byebug/commands/thread/switch.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/thread/switch.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/thread/switch.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/thread/switch.rb#28 + def short_description; end + end +end + +class Byebug::ThreadsTable; end + +# Show (and possibly stop) at every line that changes a global variable. +# +# source://byebug//lib/byebug/commands/tracevar.rb#9 +class Byebug::TracevarCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/tracevar.rb#32 + def execute; end + + private + + # source://byebug//lib/byebug/commands/tracevar.rb#48 + def on_change(name, value, stop); end + + class << self + # source://byebug//lib/byebug/commands/tracevar.rb#16 + def description; end + + # source://byebug//lib/byebug/commands/tracevar.rb#10 + def regexp; end + + # source://byebug//lib/byebug/commands/tracevar.rb#28 + def short_description; end + end +end + +# Remove expressions from display list. +# +# source://byebug//lib/byebug/commands/undisplay.rb#10 +class Byebug::UndisplayCommand < ::Byebug::Command + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/undisplay.rb#35 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/undisplay.rb#19 + def description; end + + # source://byebug//lib/byebug/commands/undisplay.rb#15 + def regexp; end + + # source://byebug//lib/byebug/commands/undisplay.rb#31 + def short_description; end + end +end + +# Stop tracing a global variable. +# +# source://byebug//lib/byebug/commands/untracevar.rb#9 +class Byebug::UntracevarCommand < ::Byebug::Command + # source://byebug//lib/byebug/commands/untracevar.rb#26 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/untracevar.rb#14 + def description; end + + # source://byebug//lib/byebug/commands/untracevar.rb#10 + def regexp; end + + # source://byebug//lib/byebug/commands/untracevar.rb#22 + def short_description; end + end +end + +# Move the current frame up in the backtrace. +# +# source://byebug//lib/byebug/commands/up.rb#12 +class Byebug::UpCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + include ::Byebug::Helpers::ParseHelper + + # source://byebug//lib/byebug/commands/up.rb#36 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/up.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/up.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/up.rb#32 + def short_description; end + end +end + +# Shows variables and its values +# +# source://byebug//lib/byebug/commands/var/all.rb#9 +class Byebug::VarCommand < ::Byebug::Command + include ::Byebug::Subcommands + extend ::Byebug::Helpers::ReflectionHelper + extend ::Byebug::Subcommands::ClassMethods + + class << self + # source://byebug//lib/byebug/commands/var.rb#25 + def description; end + + # source://byebug//lib/byebug/commands/var.rb#21 + def regexp; end + + # source://byebug//lib/byebug/commands/var.rb#33 + def short_description; end + end +end + +# Shows global, instance and local variables +# +# source://byebug//lib/byebug/commands/var/all.rb#13 +class Byebug::VarCommand::AllCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/all.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/all.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/all.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/all.rb#30 + def short_description; end + end +end + +# Information about arguments of the current method/block +# +# source://byebug//lib/byebug/commands/var/args.rb#13 +class Byebug::VarCommand::ArgsCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/args.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/args.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/args.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/args.rb#30 + def short_description; end + end +end + +# Shows constants +# +# source://byebug//lib/byebug/commands/var/const.rb#13 +class Byebug::VarCommand::ConstCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + + # source://byebug//lib/byebug/commands/var/const.rb#34 + def execute; end + + private + + # source://byebug//lib/byebug/commands/var/const.rb#44 + def str_obj; end + + class << self + # source://byebug//lib/byebug/commands/var/const.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/const.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/const.rb#30 + def short_description; end + end +end + +# Shows global variables +# +# source://byebug//lib/byebug/commands/var/global.rb#11 +class Byebug::VarCommand::GlobalCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/global.rb#32 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/global.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/var/global.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/var/global.rb#28 + def short_description; end + end +end + +# Shows instance variables +# +# source://byebug//lib/byebug/commands/var/instance.rb#13 +class Byebug::VarCommand::InstanceCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/instance.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/instance.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/instance.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/instance.rb#30 + def short_description; end + end +end + +# Shows local variables in current scope +# +# source://byebug//lib/byebug/commands/var/local.rb#13 +class Byebug::VarCommand::LocalCommand < ::Byebug::Command + include ::Byebug::Helpers::EvalHelper + include ::Byebug::Helpers::VarHelper + + # source://byebug//lib/byebug/commands/var/local.rb#34 + def execute; end + + class << self + # source://byebug//lib/byebug/commands/var/local.rb#22 + def description; end + + # source://byebug//lib/byebug/commands/var/local.rb#18 + def regexp; end + + # source://byebug//lib/byebug/commands/var/local.rb#30 + def short_description; end + end +end + +# Show current backtrace. +# +# source://byebug//lib/byebug/commands/where.rb#11 +class Byebug::WhereCommand < ::Byebug::Command + include ::Byebug::Helpers::FrameHelper + + # source://byebug//lib/byebug/commands/where.rb#43 + def execute; end + + private + + # source://byebug//lib/byebug/commands/where.rb#49 + def print_backtrace; end + + class << self + # source://byebug//lib/byebug/commands/where.rb#20 + def description; end + + # source://byebug//lib/byebug/commands/where.rb#16 + def regexp; end + + # source://byebug//lib/byebug/commands/where.rb#39 + def short_description; end + end +end + +# Setting to customize the maximum width of byebug's output. +# +# source://byebug//lib/byebug/settings/width.rb#9 +class Byebug::WidthSetting < ::Byebug::Setting + # source://byebug//lib/byebug/settings/width.rb#12 + def banner; end + + # source://byebug//lib/byebug/settings/width.rb#16 + def to_s; end +end + +# source://byebug//lib/byebug/settings/width.rb#10 +Byebug::WidthSetting::DEFAULT = T.let(T.unsafe(nil), Integer) + +# Extends the extension class to be able to pass information about the +# debugging environment from the c-extension to the user. +# +# source://byebug//lib/byebug/core.rb#113 +class Exception + # Returns the value of attribute __bb_context. + # + # source://byebug//lib/byebug/core.rb#114 + def __bb_context; end +end + +# Adds a `byebug` method to the Kernel module. +# +# Dropping a `byebug` call anywhere in your code, you get a debug prompt. +# +# source://byebug//lib/byebug/attacher.rb#34 +module Kernel + # source://byebug//lib/byebug/attacher.rb#35 + def byebug; end + + # source://byebug//lib/byebug/attacher.rb#47 + def debugger; end + + # source://byebug//lib/byebug/attacher.rb#41 + def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/code_ownership@1.34.2.rbi b/sorbet/rbi/gems/code_ownership@1.34.2.rbi deleted file mode 100644 index daf2ea7..0000000 --- a/sorbet/rbi/gems/code_ownership@1.34.2.rbi +++ /dev/null @@ -1,836 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `code_ownership` gem. -# Please instead update this file by running `bin/tapioca gem code_ownership`. - -# source://code_ownership//lib/code_ownership/mapper.rb#5 -module CodeOwnership - extend ::CodeOwnership - - requires_ancestor { Kernel } - - # source://code_ownership//lib/code_ownership.rb#127 - sig do - params( - backtrace: T.nilable(T::Array[::String]) - ).returns(T::Enumerable[[T.nilable(::CodeTeams::Team), ::String]]) - end - def backtrace_with_ownership(backtrace); end - - # Given a backtrace from either `Exception#backtrace` or `caller`, find the - # first owned file in it, useful for figuring out which file is being blamed. - # - # source://code_ownership//lib/code_ownership.rb#116 - sig do - params( - backtrace: T.nilable(T::Array[::String]), - excluded_teams: T::Array[::CodeTeams::Team] - ).returns(T.nilable([::CodeTeams::Team, ::String])) - end - def first_owned_file_for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end - - # Given a backtrace from either `Exception#backtrace` or `caller`, find the - # first line that corresponds to a file with assigned ownership - # - # source://code_ownership//lib/code_ownership.rb#109 - sig do - params( - backtrace: T.nilable(T::Array[::String]), - excluded_teams: T::Array[::CodeTeams::Team] - ).returns(T.nilable(::CodeTeams::Team)) - end - def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end - - # source://code_ownership//lib/code_ownership.rb#160 - sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::CodeTeams::Team)) } - def for_class(klass); end - - # source://code_ownership//lib/code_ownership.rb#29 - sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def for_file(file); end - - # source://code_ownership//lib/code_ownership.rb#177 - sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) } - def for_package(package); end - - # source://code_ownership//lib/code_ownership.rb#49 - sig { params(team: T.any(::CodeTeams::Team, ::String)).returns(::String) } - def for_team(team); end - - # source://code_ownership//lib/code_ownership.rb#90 - sig { params(autocorrect: T::Boolean, stage_changes: T::Boolean, files: T.nilable(T::Array[::String])).void } - def validate!(autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil), files: T.unsafe(nil)); end - - class << self - # Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change. - # Namely, the set of files, packages, and directories which are tracked for ownership should not change. - # The primary reason this is helpful is for clients of CodeOwnership who want to test their code, and each test context - # has different ownership and tracked files. - # - # source://code_ownership//lib/code_ownership.rb#186 - sig { void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership.rb#194 - sig { returns(::CodeOwnership::Configuration) } - def configuration; end - - # source://code_ownership//lib/code_ownership.rb#79 - sig { params(filename: ::String).void } - def remove_file_annotation!(filename); end - end -end - -# source://code_ownership//lib/code_ownership/cli.rb#8 -class CodeOwnership::Cli - class << self - # For now, this just returns team ownership - # Later, this could also return code ownership errors about that file. - # - # source://code_ownership//lib/code_ownership/cli.rb#76 - def for_file(argv); end - - # source://code_ownership//lib/code_ownership/cli.rb#123 - def for_team(argv); end - - # source://code_ownership//lib/code_ownership/cli.rb#9 - def run!(argv); end - - private - - # source://code_ownership//lib/code_ownership/cli.rb#33 - def validate!(argv); end - end -end - -# source://code_ownership//lib/code_ownership/configuration.rb#4 -class CodeOwnership::Configuration < ::T::Struct - const :owned_globs, T::Array[::String] - const :unowned_globs, T::Array[::String] - const :js_package_paths, T::Array[::String] - const :unbuilt_gems_path, T.nilable(::String) - const :skip_codeowners_validation, T::Boolean - const :raw_hash, T::Hash[T.untyped, T.untyped] - - class << self - # source://code_ownership//lib/code_ownership/configuration.rb#16 - sig { returns(::CodeOwnership::Configuration) } - def fetch; end - - # source://sorbet-runtime/0.5.10826/lib/types/struct.rb#13 - def inherited(s); end - - # source://code_ownership//lib/code_ownership/configuration.rb#35 - sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) } - def js_package_paths(config_hash); end - end -end - -# source://code_ownership//lib/code_ownership/configuration.rb#6 -CodeOwnership::Configuration::DEFAULT_JS_PACKAGE_PATHS = T.let(T.unsafe(nil), Array) - -# source://code_ownership//lib/code_ownership.rb#26 -CodeOwnership::GlobsToOwningTeamMap = T.type_alias { T::Hash[::String, ::CodeTeams::Team] } - -# source://code_ownership//lib/code_ownership.rb#75 -class CodeOwnership::InvalidCodeOwnershipConfigurationError < ::StandardError; end - -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://code_ownership//lib/code_ownership/mapper.rb#6 -module CodeOwnership::Mapper - interface! - - # @abstract - # - # source://code_ownership//lib/code_ownership/mapper.rb#62 - sig { abstract.void } - def bust_caches!; end - - # @abstract - # - # source://code_ownership//lib/code_ownership/mapper.rb#58 - sig { abstract.returns(::String) } - def description; end - - # This should be fast when run with MANY files - # - # @abstract - # - # source://code_ownership//lib/code_ownership/mapper.rb#45 - sig { abstract.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # This should be fast when run with ONE file - # - # @abstract - # - # source://code_ownership//lib/code_ownership/mapper.rb#35 - sig { abstract.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # This should be fast when run with MANY files - # - # @abstract - # - # source://code_ownership//lib/code_ownership/mapper.rb#54 - sig do - abstract - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end - - class << self - # source://code_ownership//lib/code_ownership/mapper.rb#23 - sig { returns(T::Array[::CodeOwnership::Mapper]) } - def all; end - - # source://code_ownership//lib/code_ownership/mapper.rb#16 - sig { params(base: T::Class[::CodeOwnership::Mapper]).void } - def included(base); end - - # source://code_ownership//lib/code_ownership/mapper.rb#66 - sig { returns(::CodeOwnership::Private::GlobCache) } - def to_glob_cache; end - end -end - -# source://code_ownership//lib/code_ownership/private/extension_loader.rb#5 -module CodeOwnership::Private - class << self - # source://code_ownership//lib/code_ownership/private.rb#40 - sig { void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private.rb#26 - sig { returns(::CodeOwnership::Configuration) } - def configuration; end - - # source://code_ownership//lib/code_ownership/private.rb#88 - sig { params(file: ::String).returns(T::Boolean) } - def file_tracked?(file); end - - # source://code_ownership//lib/code_ownership/private.rb#106 - sig { params(team_name: ::String, location_of_reference: ::String).returns(::CodeTeams::Team) } - def find_team!(team_name, location_of_reference); end - - # source://code_ownership//lib/code_ownership/private.rb#116 - sig { returns(::CodeOwnership::Private::GlobCache) } - def glob_cache; end - - # This is just an alias for `configuration` that makes it more explicit what we're doing instead of just calling `configuration`. - # This is necessary because configuration may contain extensions of code ownership, so those extensions should be loaded prior to - # calling APIs that provide ownership information. - # - # source://code_ownership//lib/code_ownership/private.rb#35 - sig { returns(::CodeOwnership::Configuration) } - def load_configuration!; end - - # Returns a string version of the relative path to a Rails constant, - # or nil if it can't find something - # - # source://code_ownership//lib/code_ownership/private.rb#67 - sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::String)) } - def path_from_klass(klass); end - - # The output of this function is string pathnames relative to the root. - # - # source://code_ownership//lib/code_ownership/private.rb#82 - sig { returns(T::Array[::String]) } - def tracked_files; end - - # source://code_ownership//lib/code_ownership/private.rb#47 - sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void } - def validate!(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end - end -end - -# This class is responsible for turning CodeOwnership directives (e.g. annotations, package owners) -# into a GitHub CODEOWNERS file, as specified here: -# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners -# -# source://code_ownership//lib/code_ownership/private/codeowners_file.rb#11 -class CodeOwnership::Private::CodeownersFile - class << self - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#15 - sig { returns(T::Array[::String]) } - def actual_contents_lines; end - - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#29 - sig { returns(T::Array[T.nilable(::String)]) } - def expected_contents_lines; end - - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#93 - sig { returns(::Pathname) } - def path; end - - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#115 - sig { returns(::CodeOwnership::Private::GlobCache) } - def to_glob_cache; end - - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#98 - sig { params(files: T::Array[::String]).void } - def update_cache!(files); end - - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#110 - sig { returns(T::Boolean) } - def use_codeowners_cache?; end - - # source://code_ownership//lib/code_ownership/private/codeowners_file.rb#87 - sig { void } - def write!; end - end -end - -# This class handles loading extensions to code_ownership using the `require` directive -# in the `code_ownership.yml` configuration. -# -# source://code_ownership//lib/code_ownership/private/extension_loader.rb#8 -module CodeOwnership::Private::ExtensionLoader - class << self - # source://code_ownership//lib/code_ownership/private/extension_loader.rb#12 - sig { params(require_directive: ::String).void } - def load(require_directive); end - end -end - -# source://code_ownership//lib/code_ownership/private/glob_cache.rb#6 -class CodeOwnership::Private::GlobCache - # source://code_ownership//lib/code_ownership/private/glob_cache.rb#26 - sig { params(raw_cache_contents: T::Hash[::String, T::Hash[::String, ::CodeTeams::Team]]).void } - def initialize(raw_cache_contents); end - - # source://code_ownership//lib/code_ownership/private/glob_cache.rb#36 - sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Set[::String]]) } - def mapper_descriptions_that_map_files(files); end - - # source://code_ownership//lib/code_ownership/private/glob_cache.rb#31 - sig { returns(T::Hash[::String, T::Hash[::String, ::CodeTeams::Team]]) } - def raw_cache_contents; end - - private - - # source://code_ownership//lib/code_ownership/private/glob_cache.rb#50 - sig { returns(T::Hash[::String, T::Hash[::String, ::CodeTeams::Team]]) } - def expanded_cache; end - - # source://code_ownership//lib/code_ownership/private/glob_cache.rb#69 - sig { returns(T::Hash[::String, T::Set[::String]]) } - def files_by_mappers_via_expanded_cache; end - - # source://code_ownership//lib/code_ownership/private/glob_cache.rb#85 - sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Set[::String]]) } - def files_by_mappers_via_file_fnmatch(files); end -end - -# source://code_ownership//lib/code_ownership/private/glob_cache.rb#11 -CodeOwnership::Private::GlobCache::CacheShape = T.type_alias { T::Hash[::String, T::Hash[::String, ::CodeTeams::Team]] } - -# source://code_ownership//lib/code_ownership/private/glob_cache.rb#18 -CodeOwnership::Private::GlobCache::FilesByMapper = T.type_alias { T::Hash[::String, T::Set[::String]] } - -# source://code_ownership//lib/code_ownership/private/glob_cache.rb#9 -CodeOwnership::Private::GlobCache::MapperDescription = T.type_alias { ::String } - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#7 -module CodeOwnership::Private::OwnershipMappers; end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#8 -class CodeOwnership::Private::OwnershipMappers::DirectoryOwnership - include ::CodeOwnership::Mapper - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#61 - sig { override.void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#56 - sig { override.returns(::String) } - def description; end - - # Directory ownership ignores the passed in files when generating code owners lines. - # This is because Directory ownership knows that the fastest way to find code owners for directory based ownership - # is to simply iterate over the directories and grab the owner, rather than iterating over each file just to get what directory it is in - # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument, - # but in practice this is not of consequence because in reality we never really want to generate code owners for only a - # subset of files, but rather we want code ownership for all files. - # - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#43 - sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#20 - sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#27 - sig do - override - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end - - private - - # takes a file and finds the relevant `.codeowner` file by walking up the directory - # structure. Example, given `a/b/c.rb`, this looks for `a/b/.codeowner`, `a/.codeowner`, - # and `.codeowner` in that order, stopping at the first file to actually exist. - # We do additional caching so that we don't have to check for file existence every time - # - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#82 - sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_relevant_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#68 - sig { params(codeowners_file: ::Pathname).returns(::CodeTeams::Team) } - def owner_for_codeowners_file(codeowners_file); end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/directory_ownership.rb#12 -CodeOwnership::Private::OwnershipMappers::DirectoryOwnership::CODEOWNERS_DIRECTORY_FILE_NAME = T.let(T.unsafe(nil), String) - -# Calculate, cache, and return a mapping of file names (relative to the root -# of the repository) to team name. -# -# Example: -# -# { -# 'app/models/company.rb' => Team.find('Setup & Onboarding'), -# ... -# } -# -# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#17 -class CodeOwnership::Private::OwnershipMappers::FileAnnotations - include ::CodeOwnership::Mapper - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#128 - sig { override.void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#123 - sig { override.returns(::String) } - def description; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#73 - sig { params(filename: ::String).returns(T.nilable(::CodeTeams::Team)) } - def file_annotation_based_owner(filename); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#37 - sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#28 - sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#109 - sig { params(filename: ::String).void } - def remove_file_annotation!(filename); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#49 - sig do - override - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#22 -CodeOwnership::Private::OwnershipMappers::FileAnnotations::DESCRIPTION = T.let(T.unsafe(nil), String) - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/file_annotations.rb#21 -CodeOwnership::Private::OwnershipMappers::FileAnnotations::TEAM_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#8 -class CodeOwnership::Private::OwnershipMappers::JsPackageOwnership - include ::CodeOwnership::Mapper - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#71 - sig { override.void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#55 - sig { override.returns(::String) } - def description; end - - # Package ownership ignores the passed in files when generating code owners lines. - # This is because Package ownership knows that the fastest way to find code owners for package based ownership - # is to simply iterate over the packages and grab the owner, rather than iterating over each file just to get what package it is in - # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument, - # but in practice this is not of consequence because in reality we never really want to generate code owners for only a - # subset of files, but rather we want code ownership for all files. - # - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#45 - sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#18 - sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#60 - sig { params(package: ::CodeOwnership::Private::ParseJsPackages::Package).returns(T.nilable(::CodeTeams::Team)) } - def owner_for_package(package); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#29 - sig do - override - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end - - private - - # takes a file and finds the relevant `package.json` file by walking up the directory - # structure. Example, given `packages/a/b/c.rb`, this looks for `packages/a/b/package.json`, `packages/a/package.json`, - # `packages/package.json`, and `package.json` in that order, stopping at the first file to actually exist. - # We do additional caching so that we don't have to check for file existence every time - # - # source://code_ownership//lib/code_ownership/private/ownership_mappers/js_package_ownership.rb#82 - sig { params(file: ::String).returns(T.nilable(::CodeOwnership::Private::ParseJsPackages::Package)) } - def map_file_to_relevant_package(file); end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#8 -class CodeOwnership::Private::OwnershipMappers::PackageOwnership - include ::CodeOwnership::Mapper - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#69 - sig { override.void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#46 - sig { override.returns(::String) } - def description; end - - # Package ownership ignores the passed in files when generating code owners lines. - # This is because Package ownership knows that the fastest way to find code owners for package based ownership - # is to simply iterate over the packages and grab the owner, rather than iterating over each file just to get what package it is in - # In theory this means that we may generate code owners lines that cover files that are not in the passed in argument, - # but in practice this is not of consequence because in reality we never really want to generate code owners for only a - # subset of files, but rather we want code ownership for all files. - # - # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#36 - sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#16 - sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#58 - sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) } - def owner_for_package(package); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/package_ownership.rb#53 - sig do - override - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#8 -class CodeOwnership::Private::OwnershipMappers::TeamGlobs - include ::CodeOwnership::Mapper - include ::CodeOwnership::Validator - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#112 - sig { override.void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#117 - sig { override.returns(::String) } - def description; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#57 - sig { returns(T::Array[::CodeOwnership::Private::OwnershipMappers::TeamGlobs::GlobOverlap]) } - def find_overlapping_globs; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#103 - sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#88 - sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#20 - sig { params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def map_files_to_owners(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#95 - sig do - override - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#122 - sig do - override - .params( - files: T::Array[::String], - autocorrect: T::Boolean, - stage_changes: T::Boolean - ).returns(T::Array[::String]) - end - def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#37 -class CodeOwnership::Private::OwnershipMappers::TeamGlobs::GlobOverlap < ::T::Struct - const :mapping_contexts, T::Array[::CodeOwnership::Private::OwnershipMappers::TeamGlobs::MappingContext] - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#43 - sig { returns(::String) } - def description; end - - class << self - # source://sorbet-runtime/0.5.10826/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_globs.rb#32 -class CodeOwnership::Private::OwnershipMappers::TeamGlobs::MappingContext < ::T::Struct - const :glob, ::String - const :team, ::CodeTeams::Team - - class << self - # source://sorbet-runtime/0.5.10826/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#8 -class CodeOwnership::Private::OwnershipMappers::TeamYmlOwnership - include ::CodeOwnership::Mapper - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#46 - sig { override.void } - def bust_caches!; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#58 - sig { override.returns(::String) } - def description; end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#39 - sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def globs_to_owner(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#31 - sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) } - def map_file_to_owner(file); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#19 - sig { params(files: T::Array[::String]).returns(T::Hash[::String, ::CodeTeams::Team]) } - def map_files_to_owners(files); end - - # source://code_ownership//lib/code_ownership/private/ownership_mappers/team_yml_ownership.rb#53 - sig do - override - .params( - cache: T::Hash[::String, ::CodeTeams::Team], - files: T::Array[::String] - ).returns(T::Hash[::String, ::CodeTeams::Team]) - end - def update_cache(cache, files); end -end - -# Modeled off of ParsePackwerk -# -# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#8 -module CodeOwnership::Private::ParseJsPackages - class << self - # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#57 - sig { returns(T::Array[::CodeOwnership::Private::ParseJsPackages::Package]) } - def all; end - end -end - -# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#13 -CodeOwnership::Private::ParseJsPackages::METADATA = T.let(T.unsafe(nil), String) - -# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#12 -CodeOwnership::Private::ParseJsPackages::PACKAGE_JSON_NAME = T.let(T.unsafe(nil), String) - -# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#15 -class CodeOwnership::Private::ParseJsPackages::Package < ::T::Struct - const :name, ::String - const :metadata, T::Hash[::String, T.untyped] - - # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#48 - sig { returns(::Pathname) } - def directory; end - - class << self - # source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#22 - sig { params(pathname: ::Pathname).returns(::CodeOwnership::Private::ParseJsPackages::Package) } - def from(pathname); end - - # source://sorbet-runtime/0.5.10826/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://code_ownership//lib/code_ownership/private/parse_js_packages.rb#11 -CodeOwnership::Private::ParseJsPackages::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String) - -# source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#5 -module CodeOwnership::Private::TeamPlugins; end - -# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#6 -class CodeOwnership::Private::TeamPlugins::Github < ::CodeTeams::Plugin - # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#13 - sig { returns(::CodeOwnership::Private::TeamPlugins::Github::GithubStruct) } - def github; end - - class << self - # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#23 - sig { override.params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } - def validation_errors(teams); end - end -end - -# source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10 -class CodeOwnership::Private::TeamPlugins::Github::GithubStruct < ::Struct - # Returns the value of attribute do_not_add_to_codeowners_file - # - # @return [Object] the current value of do_not_add_to_codeowners_file - def do_not_add_to_codeowners_file; end - - # Sets the attribute do_not_add_to_codeowners_file - # - # @param value [Object] the value to set the attribute do_not_add_to_codeowners_file to. - # @return [Object] the newly set value - # - # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10 - def do_not_add_to_codeowners_file=(_); end - - # Returns the value of attribute team - # - # @return [Object] the current value of team - def team; end - - # Sets the attribute team - # - # @param value [Object] the value to set the attribute team to. - # @return [Object] the newly set value - # - # source://code_ownership//lib/code_ownership/private/team_plugins/github.rb#10 - def team=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -# source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#6 -class CodeOwnership::Private::TeamPlugins::Ownership < ::CodeTeams::Plugin - # source://code_ownership//lib/code_ownership/private/team_plugins/ownership.rb#11 - sig { returns(T::Array[::String]) } - def owned_globs; end -end - -# source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#5 -module CodeOwnership::Private::Validations; end - -# source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#6 -class CodeOwnership::Private::Validations::FilesHaveOwners - include ::CodeOwnership::Validator - - # source://code_ownership//lib/code_ownership/private/validations/files_have_owners.rb#12 - sig do - override - .params( - files: T::Array[::String], - autocorrect: T::Boolean, - stage_changes: T::Boolean - ).returns(T::Array[::String]) - end - def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end -end - -# source://code_ownership//lib/code_ownership/private/validations/files_have_unique_owners.rb#6 -class CodeOwnership::Private::Validations::FilesHaveUniqueOwners - include ::CodeOwnership::Validator - - # source://code_ownership//lib/code_ownership/private/validations/files_have_unique_owners.rb#12 - sig do - override - .params( - files: T::Array[::String], - autocorrect: T::Boolean, - stage_changes: T::Boolean - ).returns(T::Array[::String]) - end - def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end -end - -# source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#6 -class CodeOwnership::Private::Validations::GithubCodeownersUpToDate - include ::CodeOwnership::Validator - - # source://code_ownership//lib/code_ownership/private/validations/github_codeowners_up_to_date.rb#12 - sig do - override - .params( - files: T::Array[::String], - autocorrect: T::Boolean, - stage_changes: T::Boolean - ).returns(T::Array[::String]) - end - def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end -end - -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://code_ownership//lib/code_ownership/validator.rb#4 -module CodeOwnership::Validator - interface! - - # @abstract - # - # source://code_ownership//lib/code_ownership/validator.rb#11 - sig do - abstract - .params( - files: T::Array[::String], - autocorrect: T::Boolean, - stage_changes: T::Boolean - ).returns(T::Array[::String]) - end - def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end - - class << self - # source://code_ownership//lib/code_ownership/validator.rb#25 - sig { returns(T::Array[::CodeOwnership::Validator]) } - def all; end - - # source://code_ownership//lib/code_ownership/validator.rb#18 - sig { params(base: T::Class[::CodeOwnership::Validator]).void } - def included(base); end - end -end diff --git a/sorbet/rbi/gems/code_ownership@2.1.1.rbi b/sorbet/rbi/gems/code_ownership@2.1.1.rbi new file mode 100644 index 0000000..d55f136 --- /dev/null +++ b/sorbet/rbi/gems/code_ownership@2.1.1.rbi @@ -0,0 +1,395 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `code_ownership` gem. +# Please instead update this file by running `bin/tapioca gem code_ownership`. + + +# source://code_ownership//lib/code_ownership/version.rb#4 +module CodeOwnership + class << self + # Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change. + # Namely, the set of files, packages, and directories which are tracked for ownership should not change. + # The primary reason this is helpful is for clients of CodeOwnership who want to test their code, and each test context + # has different ownership and tracked files. + # + # source://code_ownership//lib/code_ownership.rb#316 + sig { void } + def bust_caches!; end + + # Given a backtrace from either `Exception#backtrace` or `caller`, find the + # first owned file in it, useful for figuring out which file is being blamed. + # + # source://code_ownership//lib/code_ownership.rb#297 + sig do + params( + backtrace: T.nilable(T::Array[::String]), + excluded_teams: T::Array[::CodeTeams::Team] + ).returns(T.nilable([::CodeTeams::Team, ::String])) + end + def first_owned_file_for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end + + # Given a backtrace from either `Exception#backtrace` or `caller`, find the + # first line that corresponds to a file with assigned ownership + # + # source://code_ownership//lib/code_ownership.rb#290 + sig do + params( + backtrace: T.nilable(T::Array[::String]), + excluded_teams: T::Array[::CodeTeams::Team] + ).returns(T.nilable(::CodeTeams::Team)) + end + def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end + + # source://code_ownership//lib/code_ownership.rb#302 + sig do + params( + klass: T.nilable(T.any(T::Class[T.anything], T::Module[T.anything])) + ).returns(T.nilable(::CodeTeams::Team)) + end + def for_class(klass); end + + # Returns the owning team for a given file path. + # + # @example Find owner for a file using CODEOWNERS + # team = CodeOwnership.for_file('app/models/user.rb') + # # => # + # @example Find owner without using CODEOWNERS + # team = CodeOwnership.for_file('app/models/user.rb', from_codeowners: false) + # # => # + # @example Raise if no owner is found + # team = CodeOwnership.for_file('unknown_file.rb', allow_raise: true) + # # => raises exception if no owner found + # + # source://code_ownership//lib/code_ownership.rb#63 + sig do + params( + file: ::String, + from_codeowners: T::Boolean, + allow_raise: T::Boolean + ).returns(T.nilable(::CodeTeams::Team)) + end + def for_file(file, from_codeowners: T.unsafe(nil), allow_raise: T.unsafe(nil)); end + + # Returns detailed ownership information for a given file path. + # + # This method provides verbose ownership details including the team name, + # team configuration file path, and the reasons/sources for ownership assignment. + # It's particularly useful for debugging ownership assignments and understanding + # why a file is owned by a specific team. + # + # The returned hash contains the following keys when an owner is found: + # - :team_name [String] - The name of the owning team + # - :team_config_yml [String] - Path to the team's configuration YAML file + # - :reasons [Array] - List of reasons/sources explaining why this team owns the file + # (e.g., "CODEOWNERS pattern: /app/models/**", "Package ownership") + # + # @example Get verbose ownership details + # details = CodeOwnership.for_file_verbose('app/models/user.rb') + # # => { + # # team_name: "platform", + # # team_config_yml: "config/teams/platform.yml", + # # reasons: ["Matched pattern '/app/models/**' in CODEOWNERS"] + # # } + # @example Handle unowned files + # details = CodeOwnership.for_file_verbose('unowned_file.txt') + # # => nil + # @note This method is primarily used by the CLI tool when the --verbose flag is provided, + # allowing users to understand the ownership assignment logic. + # @note Unlike `for_file`, this method always uses the CODEOWNERS file and other ownership + # sources to determine ownership, providing complete context about the ownership decision. + # @see #for_file for a simpler ownership lookup that returns just the team + # @see CLI#for_file for the command-line interface that uses this method + # + # source://code_ownership//lib/code_ownership.rb#158 + sig { params(file: ::String).returns(T.nilable(T::Hash[::Symbol, ::String])) } + def for_file_verbose(file); end + + # source://code_ownership//lib/code_ownership.rb#307 + sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) } + def for_package(package); end + + # source://code_ownership//lib/code_ownership.rb#163 + sig { params(team: T.any(::CodeTeams::Team, ::String)).returns(T::Array[::String]) } + def for_team(team); end + + # Removes the file annotation (e.g., "# @team TeamName") from a file. + # + # This method removes the ownership annotation from the first line of a file, + # which is typically used to declare team ownership at the file level. + # The annotation can be in the form of: + # - Ruby comments: # @team TeamName + # - JavaScript/TypeScript comments: // @team TeamName + # - YAML comments: -# @team TeamName + # + # If the file does not have an annotation or the annotation doesn't match a valid team, + # this method does nothing. + # + # @example Remove annotation from a JavaScript file + # # Before: File contains "// @team Frontend\nexport default function() {}" + # CodeOwnership.remove_file_annotation!('app/javascript/component.js') + # # After: File contains "export default function() {}" + # @example Remove annotation from a Ruby file + # # Before: File contains "# @team Platform\nclass User; end" + # CodeOwnership.remove_file_annotation!('app/models/user.rb') + # # After: File contains "class User; end" + # @note This method modifies the file in place. + # @note Leading newlines after the annotation are also removed to maintain clean formatting. + # + # source://code_ownership//lib/code_ownership.rb#267 + sig { params(filename: ::String).void } + def remove_file_annotation!(filename); end + + # Returns the owning teams for multiple file paths using the CODEOWNERS file. + # + # This method efficiently determines ownership for multiple files in a single operation + # by leveraging the generated CODEOWNERS file. It's more performant than calling + # `for_file` multiple times when you need to check ownership for many files. + # + # @example Get owners for multiple files + # files = ['app/models/user.rb', 'app/controllers/users_controller.rb', 'config/routes.rb'] + # owners = CodeOwnership.teams_for_files_from_codeowners(files) + # # => { + # # 'app/models/user.rb' => #, + # # 'app/controllers/users_controller.rb' => #, + # # 'config/routes.rb' => # + # # } + # @example Handle files without owners + # files = ['owned_file.rb', 'unowned_file.txt'] + # owners = CodeOwnership.teams_for_files_from_codeowners(files) + # # => { + # # 'owned_file.rb' => #, + # # 'unowned_file.txt' => nil + # # } + # @note This method uses caching internally for performance. The cache is populated + # as files are processed and reused for subsequent lookups. + # @note This method relies on the CODEOWNERS file being up-to-date. Run + # `CodeOwnership.validate!` to ensure the CODEOWNERS file is current. + # @see #for_file for single file ownership lookup + # @see #validate! for ensuring CODEOWNERS file is up-to-date + # + # source://code_ownership//lib/code_ownership.rb#114 + sig do + params( + files: T::Array[::String], + allow_raise: T::Boolean + ).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) + end + def teams_for_files_from_codeowners(files, allow_raise: T.unsafe(nil)); end + + # Validates code ownership configuration and optionally corrects issues. + # + # This method performs comprehensive validation of the code ownership setup, ensuring: + # 1. Only one ownership mechanism is defined per file (no conflicts between annotations, packages, or globs) + # 2. All referenced teams are valid (exist in CodeTeams configuration) + # 3. All files have ownership (unless explicitly listed in unowned_globs) + # 4. The .github/CODEOWNERS file is up-to-date and properly formatted + # + # When autocorrect is enabled, the method will automatically: + # - Generate or update the CODEOWNERS file based on current ownership rules + # - Fix any formatting issues in the CODEOWNERS file + # - Stage the corrected CODEOWNERS file (unless stage_changes is false) + # + # @example Basic validation with autocorrection + # CodeOwnership.validate! + # # Validates all files and auto-corrects/stages CODEOWNERS if needed + # @example Validate and fix but don't stage changes + # CodeOwnership.validate!(autocorrect: true, stage_changes: false) + # # Fixes CODEOWNERS but doesn't stage it with git + # @example Validation without making changes + # CodeOwnership.validate!(autocorrect: false) + # # Only checks for issues without updating CODEOWNERS + # @note The validation can be disabled for CODEOWNERS by setting skip_codeowners_validation: true in config/code_ownership.yml + # @note This method is called by the CLI command: bin/codeownership validate + # @raise [RuntimeError] Raises an error if validation fails with details about: + # - Files with conflicting ownership definitions + # - References to non-existent teams + # - Files without ownership (not in unowned_globs) + # - CODEOWNERS file inconsistencies + # @see CLI.validate! for the command-line interface + # @see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners for CODEOWNERS format + # + # source://code_ownership//lib/code_ownership.rb#224 + sig { params(autocorrect: T::Boolean, stage_changes: T::Boolean, files: T.nilable(T::Array[::String])).void } + def validate!(autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil), files: T.unsafe(nil)); end + + # Returns the version of the code_ownership gem and the codeowners-rs gem. + # + # source://code_ownership//lib/code_ownership.rb#33 + sig { returns(T::Array[::String]) } + def version; end + end +end + +# source://code_ownership//lib/code_ownership/cli.rb#9 +class CodeOwnership::Cli + class << self + # For now, this just returns team ownership + # Later, this could also return code ownership errors about that file. + # + # source://code_ownership//lib/code_ownership/cli.rb#95 + def for_file(argv); end + + # source://code_ownership//lib/code_ownership/cli.rb#129 + def for_team(argv); end + + # source://code_ownership//lib/code_ownership/cli.rb#12 + def run!(argv); end + + # source://code_ownership//lib/code_ownership/cli.rb#37 + def validate!(argv); end + + # source://code_ownership//lib/code_ownership/cli.rb#89 + def version; end + end +end + +# source://code_ownership//lib/code_ownership/cli.rb#10 +CodeOwnership::Cli::EXECUTABLE = T.let(T.unsafe(nil), String) + +# source://code_ownership//lib/code_ownership.rb#29 +CodeOwnership::GlobsToOwningTeamMap = T.type_alias { T::Hash[::String, ::CodeTeams::Team] } + +# source://code_ownership//lib/code_ownership/private/file_path_finder.rb#5 +module CodeOwnership::Private; end + +# source://code_ownership//lib/code_ownership/private/file_path_finder.rb#6 +module CodeOwnership::Private::FilePathFinder + class << self + # source://code_ownership//lib/code_ownership/private/file_path_finder.rb#22 + sig { params(backtrace: T.nilable(T::Array[::String])).returns(T::Enumerable[::String]) } + def from_backtrace(backtrace); end + + # Returns a string version of the relative path to a Rails constant, + # or nil if it can't find anything + # + # source://code_ownership//lib/code_ownership/private/file_path_finder.rb#12 + sig { params(klass: T.nilable(T.any(T::Class[T.anything], T::Module[T.anything]))).returns(T.nilable(::String)) } + def path_from_klass(klass); end + end +end + +# source://code_ownership//lib/code_ownership/private/file_path_team_cache.rb#6 +module CodeOwnership::Private::FilePathTeamCache + class << self + # source://code_ownership//lib/code_ownership/private/file_path_team_cache.rb#25 + sig { void } + def bust_cache!; end + + # source://code_ownership//lib/code_ownership/private/file_path_team_cache.rb#30 + sig { returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) } + def cache; end + + # source://code_ownership//lib/code_ownership/private/file_path_team_cache.rb#20 + sig { params(file_path: ::String).returns(T::Boolean) } + def cached?(file_path); end + + # source://code_ownership//lib/code_ownership/private/file_path_team_cache.rb#10 + sig { params(file_path: ::String).returns(T.nilable(::CodeTeams::Team)) } + def get(file_path); end + + # source://code_ownership//lib/code_ownership/private/file_path_team_cache.rb#15 + sig { params(file_path: ::String, team: T.nilable(::CodeTeams::Team)).void } + def set(file_path, team); end + end +end + +# source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#6 +class CodeOwnership::Private::ForFileOutputBuilder + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#12 + sig { params(file_path: ::String, json: T::Boolean, verbose: T::Boolean).void } + def initialize(file_path:, json:, verbose:); end + + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#32 + sig { returns(::String) } + def build; end + + private + + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#78 + sig { params(reasons: T::Array[::String]).returns(::String) } + def build_description_message(reasons); end + + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#69 + sig { params(result_hash: T::Hash[::Symbol, T.untyped]).returns(::String) } + def build_message_for(result_hash); end + + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#55 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def build_terse; end + + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#43 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def build_verbose; end + + class << self + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#19 + sig { params(file_path: ::String, json: T::Boolean, verbose: T::Boolean).returns(::String) } + def build(file_path:, json:, verbose:); end + + private + + # source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#9 + def new(*_arg0); end + end +end + +# source://code_ownership//lib/code_ownership/private/for_file_output_builder.rb#23 +CodeOwnership::Private::ForFileOutputBuilder::UNOWNED_OUTPUT = T.let(T.unsafe(nil), Hash) + +# source://code_ownership//lib/code_ownership/private/team_finder.rb#6 +module CodeOwnership::Private::TeamFinder + class << self + # source://code_ownership//lib/code_ownership/private/team_finder.rb#76 + sig do + params( + backtrace: T.nilable(T::Array[::String]), + excluded_teams: T::Array[::CodeTeams::Team] + ).returns(T.nilable([::CodeTeams::Team, ::String])) + end + def first_owned_file_for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end + + # source://code_ownership//lib/code_ownership/private/team_finder.rb#71 + sig do + params( + backtrace: T.nilable(T::Array[::String]), + excluded_teams: T::Array[::CodeTeams::Team] + ).returns(T.nilable(::CodeTeams::Team)) + end + def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end + + # source://code_ownership//lib/code_ownership/private/team_finder.rb#55 + sig do + params( + klass: T.nilable(T.any(T::Class[T.anything], T::Module[T.anything])) + ).returns(T.nilable(::CodeTeams::Team)) + end + def for_class(klass); end + + # source://code_ownership//lib/code_ownership/private/team_finder.rb#10 + sig { params(file_path: ::String, allow_raise: T::Boolean).returns(T.nilable(::CodeTeams::Team)) } + def for_file(file_path, allow_raise: T.unsafe(nil)); end + + # source://code_ownership//lib/code_ownership/private/team_finder.rb#63 + sig { params(package: ::Packs::Pack).returns(T.nilable(::CodeTeams::Team)) } + def for_package(package); end + + # source://code_ownership//lib/code_ownership/private/team_finder.rb#28 + sig do + params( + files: T::Array[::String], + allow_raise: T::Boolean + ).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) + end + def teams_for_files(files, allow_raise: T.unsafe(nil)); end + + private + + # source://code_ownership//lib/code_ownership/private/team_finder.rb#88 + sig { params(team_name: ::String, allow_raise: T::Boolean).returns(T.nilable(::CodeTeams::Team)) } + def find_team!(team_name, allow_raise: T.unsafe(nil)); end + end +end + +# source://code_ownership//lib/code_ownership/version.rb#5 +CodeOwnership::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/code_teams@1.0.0.rbi b/sorbet/rbi/gems/code_teams@1.0.0.rbi deleted file mode 100644 index c252b40..0000000 --- a/sorbet/rbi/gems/code_teams@1.0.0.rbi +++ /dev/null @@ -1,120 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `code_teams` gem. -# Please instead update this file by running `bin/tapioca gem code_teams`. - -module CodeTeams - class << self - sig { returns(T::Array[::CodeTeams::Team]) } - def all; end - - sig { void } - def bust_caches!; end - - sig { params(name: ::String).returns(T.nilable(::CodeTeams::Team)) } - def find(name); end - - sig { params(dir: ::String).returns(T::Array[::CodeTeams::Team]) } - def for_directory(dir); end - - sig { params(string: ::String).returns(::String) } - def tag_value_for(string); end - - sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } - def validation_errors(teams); end - end -end - -class CodeTeams::IncorrectPublicApiUsageError < ::StandardError; end - -class CodeTeams::Plugin - abstract! - - sig { params(team: ::CodeTeams::Team).void } - def initialize(team); end - - class << self - sig { returns(T::Array[T.class_of(CodeTeams::Plugin)]) } - def all_plugins; end - - sig { params(team: ::CodeTeams::Team).returns(T.attached_class) } - def for(team); end - - sig { params(base: T.untyped).void } - def inherited(base); end - - sig { params(team: ::CodeTeams::Team, key: ::String).returns(::String) } - def missing_key_error_message(team, key); end - - sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } - def validation_errors(teams); end - - private - - sig { params(team: ::CodeTeams::Team).returns(T.attached_class) } - def register_team(team); end - - sig { returns(T::Hash[T.nilable(::String), T::Hash[::Class, ::CodeTeams::Plugin]]) } - def registry; end - end -end - -module CodeTeams::Plugins; end - -class CodeTeams::Plugins::Identity < ::CodeTeams::Plugin - sig { returns(::CodeTeams::Plugins::Identity::IdentityStruct) } - def identity; end - - class << self - sig { override.params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } - def validation_errors(teams); end - end -end - -class CodeTeams::Plugins::Identity::IdentityStruct < ::Struct - def name; end - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class CodeTeams::Team - sig { params(config_yml: T.nilable(::String), raw_hash: T::Hash[T.untyped, T.untyped]).void } - def initialize(config_yml:, raw_hash:); end - - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - sig { returns(T.nilable(::String)) } - def config_yml; end - - def eql?(*args, &blk); end - - sig { returns(::Integer) } - def hash; end - - sig { returns(::String) } - def name; end - - sig { returns(T::Hash[T.untyped, T.untyped]) } - def raw_hash; end - - sig { returns(::String) } - def to_tag; end - - class << self - sig { params(raw_hash: T::Hash[T.untyped, T.untyped]).returns(::CodeTeams::Team) } - def from_hash(raw_hash); end - - sig { params(config_yml: ::String).returns(::CodeTeams::Team) } - def from_yml(config_yml); end - end -end - -CodeTeams::UNKNOWN_TEAM_STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/code_teams@1.3.0.rbi b/sorbet/rbi/gems/code_teams@1.3.0.rbi new file mode 100644 index 0000000..7f62d32 --- /dev/null +++ b/sorbet/rbi/gems/code_teams@1.3.0.rbi @@ -0,0 +1,258 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `code_teams` gem. +# Please instead update this file by running `bin/tapioca gem code_teams`. + + +# source://code_teams//lib/code_teams/plugin.rb#3 +module CodeTeams + class << self + # source://code_teams//lib/code_teams.rb#22 + sig { returns(T::Array[::CodeTeams::Team]) } + def all; end + + # Generally, you should not ever need to do this, because once your ruby process loads, cached content should not change. + # Namely, the YML files that are the source of truth for teams should not change, so we should not need to look at the YMLs again to verify. + # The primary reason this is helpful is for clients of CodeTeams who want to test their code, and each test context has different set of teams + # + # source://code_teams//lib/code_teams.rb#67 + sig { void } + def bust_caches!; end + + # source://code_teams//lib/code_teams.rb#27 + sig { params(name: ::String).returns(T.nilable(::CodeTeams::Team)) } + def find(name); end + + # source://code_teams//lib/code_teams.rb#33 + sig { params(name: ::String).returns(::CodeTeams::Team) } + def find!(name); end + + # source://code_teams//lib/code_teams.rb#38 + sig { params(dir: ::String).returns(T::Array[::CodeTeams::Team]) } + def for_directory(dir); end + + # source://code_teams//lib/code_teams.rb#59 + sig { params(string: ::String).returns(::String) } + def tag_value_for(string); end + + # source://code_teams//lib/code_teams.rb#52 + sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } + def validation_errors(teams); end + end +end + +# source://code_teams//lib/code_teams.rb#15 +class CodeTeams::IncorrectPublicApiUsageError < ::StandardError; end + +# Plugins allow a client to add validation on custom keys in the team YML. +# For now, only a single plugin is allowed to manage validation on a top-level key. +# In the future we can think of allowing plugins to be gracefully merged with each other. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://code_teams//lib/code_teams/plugin.rb#7 +class CodeTeams::Plugin + abstract! + + # source://code_teams//lib/code_teams/plugin.rb#16 + sig { params(team: ::CodeTeams::Team).void } + def initialize(team); end + + class << self + # source://code_teams//lib/code_teams/plugin.rb#37 + sig { returns(T::Array[T.class_of(CodeTeams::Plugin)]) } + def all_plugins; end + + # source://code_teams//lib/code_teams/plugin.rb#78 + sig { void } + def bust_caches!; end + + # source://code_teams//lib/code_teams/plugin.rb#83 + sig { void } + def clear_team_registry!; end + + # source://code_teams//lib/code_teams/plugin.rb#21 + sig { params(key: ::String).returns(::String) } + def data_accessor_name(key = T.unsafe(nil)); end + + # source://code_teams//lib/code_teams/plugin.rb#26 + sig { returns(::String) } + def default_data_accessor_name; end + + # source://code_teams//lib/code_teams/plugin.rb#49 + sig { params(team: ::CodeTeams::Team).returns(T.attached_class) } + def for(team); end + + # source://code_teams//lib/code_teams/plugin.rb#32 + sig { params(base: T.class_of(CodeTeams::Plugin)).void } + def inherited(base); end + + # source://code_teams//lib/code_teams/plugin.rb#54 + sig { params(team: ::CodeTeams::Team, key: ::String).returns(::String) } + def missing_key_error_message(team, key); end + + # source://code_teams//lib/code_teams/plugin.rb#44 + sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } + def validation_errors(teams); end + + private + + # source://code_teams//lib/code_teams/plugin.rb#66 + sig { params(team: ::CodeTeams::Team).returns(T.attached_class) } + def register_team(team); end + + # source://code_teams//lib/code_teams/plugin.rb#59 + sig { returns(T::Hash[T.nilable(::String), T::Hash[T.class_of(CodeTeams::Plugin), ::CodeTeams::Plugin]]) } + def registry; end + end +end + +# source://code_teams//lib/code_teams/plugins/identity.rb#4 +module CodeTeams::Plugins; end + +# source://code_teams//lib/code_teams/plugins/identity.rb#5 +class CodeTeams::Plugins::Identity < ::CodeTeams::Plugin + # source://code_teams//lib/code_teams/plugins/identity.rb#12 + sig { returns(::CodeTeams::Plugins::Identity::IdentityStruct) } + def identity; end + + class << self + # source://code_teams//lib/code_teams/plugins/identity.rb#19 + sig { override.params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) } + def validation_errors(teams); end + end +end + +# source://code_teams//lib/code_teams/plugins/identity.rb#9 +class CodeTeams::Plugins::Identity::IdentityStruct < ::Struct + # Returns the value of attribute name + # + # @return [Object] the current value of name + # + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + # + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def name=(_); end + + class << self + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def [](*_arg0); end + + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def inspect; end + + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def keyword_init?; end + + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def members; end + + # source://code_teams//lib/code_teams/plugins/identity.rb#9 + def new(*_arg0); end + end +end + +# source://code_teams//lib/code_teams.rb#74 +class CodeTeams::Team + # source://code_teams//lib/code_teams.rb#118 + sig { params(config_yml: T.nilable(::String), raw_hash: T::Hash[::String, T.untyped]).void } + def initialize(config_yml:, raw_hash:); end + + # source://code_teams//lib/code_teams.rb#134 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://code_teams//lib/code_teams.rb#110 + sig { returns(T.nilable(::String)) } + def config_yml; end + + # @param other [Object] + # @return [Boolean] + # + # source://code_teams//lib/code_teams.rb#142 + def eql?(*args, **_arg1, &blk); end + + # source://code_teams//lib/code_teams.rb#145 + sig { returns(::Integer) } + def hash; end + + # source://code_teams//lib/code_teams.rb#124 + sig { returns(::String) } + def name; end + + # source://code_teams//lib/code_teams.rb#107 + sig { returns(T::Hash[::String, T.untyped]) } + def raw_hash; end + + # source://code_teams//lib/code_teams.rb#129 + sig { returns(::String) } + def to_tag; end + + class << self + # source://code_teams//lib/code_teams.rb#88 + sig { params(raw_hash: T::Hash[::String, T.untyped]).returns(::CodeTeams::Team) } + def from_hash(raw_hash); end + + # source://code_teams//lib/code_teams.rb#78 + sig { params(config_yml: ::String).returns(::CodeTeams::Team) } + def from_yml(config_yml); end + + # source://code_teams//lib/code_teams.rb#96 + sig { void } + def register_plugins; end + end +end + +# source://code_teams//lib/code_teams.rb#16 +class CodeTeams::TeamNotFoundError < ::StandardError; end + +# source://code_teams//lib/code_teams.rb#18 +CodeTeams::UNKNOWN_TEAM_STRING = T.let(T.unsafe(nil), String) + +# source://code_teams//lib/code_teams/utils.rb#6 +module CodeTeams::Utils + private + + # Recursively converts symbol keys to strings. Top-level input should be a Hash. + # + # source://code_teams//lib/code_teams/utils.rb#27 + sig { params(value: T.untyped).returns(T.untyped) } + def deep_stringify_keys(value); end + + # source://code_teams//lib/code_teams/utils.rb#21 + sig { params(string: ::String).returns(::String) } + def demodulize(string); end + + # source://code_teams//lib/code_teams/utils.rb#12 + sig { params(string: ::String).returns(::String) } + def underscore(string); end + + class << self + # Recursively converts symbol keys to strings. Top-level input should be a Hash. + # + # @param value [T.untyped] + # @return [T.untyped] + # + # source://code_teams//lib/code_teams/utils.rb#27 + def deep_stringify_keys(value); end + + # @param string [String] + # @return [String] + # + # source://code_teams//lib/code_teams/utils.rb#21 + def demodulize(string); end + + # @param string [String] + # @return [String] + # + # source://code_teams//lib/code_teams/utils.rb#12 + def underscore(string); end + end +end diff --git a/sorbet/rbi/gems/coderay@1.1.3.rbi b/sorbet/rbi/gems/coderay@1.1.3.rbi new file mode 100644 index 0000000..12c7652 --- /dev/null +++ b/sorbet/rbi/gems/coderay@1.1.3.rbi @@ -0,0 +1,3448 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `coderay` gem. +# Please instead update this file by running `bin/tapioca gem coderay`. + + +# = CodeRay Library +# +# CodeRay is a Ruby library for syntax highlighting. +# +# I try to make CodeRay easy to use and intuitive, but at the same time fully +# featured, complete, fast and efficient. +# +# See README. +# +# It consists mainly of +# * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder) +# * the plugin system: PluginHost, Plugin +# * the scanners in CodeRay::Scanners +# * the encoders in CodeRay::Encoders +# * the styles in CodeRay::Styles +# +# Here's a fancy graphic to light up this gray docu: +# +# http://cycnus.de/raindark/coderay/scheme.png +# +# == Documentation +# +# See CodeRay, Encoders, Scanners, Tokens. +# +# == Usage +# +# Remember you need RubyGems to use CodeRay, unless you have it in your load +# path. Run Ruby with -rubygems option if required. +# +# === Highlight Ruby code in a string as html +# +# require 'coderay' +# print CodeRay.scan('puts "Hello, world!"', :ruby).html +# +# # prints something like this: +# puts "Hello, world!" +# +# +# === Highlight C code from a file in a html div +# +# require 'coderay' +# print CodeRay.scan(File.read('ruby.h'), :c).div +# print CodeRay.scan_file('ruby.h').html.div +# +# You can include this div in your page. The used CSS styles can be printed with +# +# % coderay_stylesheet +# +# === Highlight without typing too much +# +# If you are one of the hasty (or lazy, or extremely curious) people, just run this file: +# +# % ruby -rubygems /path/to/coderay/coderay.rb > example.html +# +# and look at the file it created in your browser. +# +# = CodeRay Module +# +# The CodeRay module provides convenience methods for the engine. +# +# * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are +# simply lower-case symbols, like :python or :html. +# * All methods take an optional hash as last parameter, +options+, that is send to +# the Encoder / Scanner. +# * Input and language are always sorted in this order: +code+, +lang+. +# (This is in alphabetical order, if you need a mnemonic ;) +# +# You should be able to highlight everything you want just using these methods; +# so there is no need to dive into CodeRay's deep class hierarchy. +# +# The examples in the demo directory demonstrate common cases using this interface. +# +# = Basic Access Ways +# +# Read this to get a general view what CodeRay provides. +# +# == Scanning +# +# Scanning means analysing an input string, splitting it up into Tokens. +# Each Token knows about what type it is: string, comment, class name, etc. +# +# Each +lang+ (language) has its own Scanner; for example, :ruby code is +# handled by CodeRay::Scanners::Ruby. +# +# CodeRay.scan:: Scan a string in a given language into Tokens. +# This is the most common method to use. +# CodeRay.scan_file:: Scan a file and guess the language using FileType. +# +# The Tokens object you get from these methods can encode itself; see Tokens. +# +# == Encoding +# +# Encoding means compiling Tokens into an output. This can be colored HTML or +# LaTeX, a textual statistic or just the number of non-whitespace tokens. +# +# Each Encoder provides output in a specific +format+, so you select Encoders via +# formats like :html or :statistic. +# +# CodeRay.encode:: Scan and encode a string in a given language. +# CodeRay.encode_tokens:: Encode the given tokens. +# CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. +# +# == All-in-One Encoding +# +# CodeRay.encode:: Highlight a string with a given input and output format. +# +# == Instanciating +# +# You can use an Encoder instance to highlight multiple inputs. This way, the setup +# for this Encoder must only be done once. +# +# CodeRay.encoder:: Create an Encoder instance with format and options. +# CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code. +# +# To make use of CodeRay.scanner, use CodeRay::Scanner::code=. +# +# The scanning methods provide more flexibility; we recommend to use these. +# +# == Reusing Scanners and Encoders +# +# If you want to re-use scanners and encoders (because that is faster), see +# CodeRay::Duo for the most convenient (and recommended) interface. +# +# source://coderay//lib/coderay.rb#126 +module CodeRay + class << self + # Assuming the path is a subpath of lib/coderay/ + # + # source://coderay//lib/coderay.rb#133 + def coderay_path(*path); end + + # Encode a string. + # + # This scans +code+ with the the Scanner for +lang+ and then + # encodes it with the Encoder for +format+. + # +options+ will be passed to the Encoder. + # + # See CodeRay::Encoder.encode. + # + # source://coderay//lib/coderay.rb#196 + def encode(code, lang, format, options = T.unsafe(nil)); end + + # Encodes +filename+ (a path to a code file) with the Scanner for +lang+. + # + # See CodeRay.scan_file. + # Notice that the second argument is the output +format+, not the input language. + # + # Example: + # require 'coderay' + # page = CodeRay.encode_file 'some_c_code.c', :html + # + # source://coderay//lib/coderay.rb#221 + def encode_file(filename, format, options = T.unsafe(nil)); end + + # Encode pre-scanned Tokens. + # Use this together with CodeRay.scan: + # + # require 'coderay' + # + # # Highlight a short Ruby code example in a HTML span + # tokens = CodeRay.scan '1 + 2', :ruby + # puts CodeRay.encode_tokens(tokens, :span) + # + # source://coderay//lib/coderay.rb#209 + def encode_tokens(tokens, format, options = T.unsafe(nil)); end + + # Finds the Encoder class for +format+ and creates an instance, passing + # +options+ to it. + # + # Example: + # require 'coderay' + # + # stats = CodeRay.encoder(:statistic) + # stats.encode("puts 17 + 4\n", :ruby) + # + # puts '%d out of %d tokens have the kind :integer.' % [ + # stats.type_stats[:integer].count, + # stats.real_token_count + # ] + # #-> 2 out of 4 tokens have the kind :integer. + # + # source://coderay//lib/coderay.rb#260 + def encoder(format, options = T.unsafe(nil)); end + + # Extract the options for the scanner from the +options+ hash. + # + # Returns an empty Hash if :scanner_options is not set. + # + # This is used if a method like CodeRay.encode has to provide options + # for Encoder _and_ scanner. + # + # source://coderay//lib/coderay.rb#278 + def get_scanner_options(options); end + + # Highlight a string into a HTML
    . + # + # CSS styles use classes, so you have to include a stylesheet + # in your output. + # + # See encode. + # + # source://coderay//lib/coderay.rb#232 + def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end + + # Highlight a file into a HTML
    . + # + # CSS styles use classes, so you have to include a stylesheet + # in your output. + # + # See encode. + # + # source://coderay//lib/coderay.rb#242 + def highlight_file(filename, options = T.unsafe(nil), format = T.unsafe(nil)); end + + # Scans the given +code+ (a String) with the Scanner for +lang+. + # + # This is a simple way to use CodeRay. Example: + # require 'coderay' + # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html + # + # See also demo/demo_simple. + # + # source://coderay//lib/coderay.rb#168 + def scan(code, lang, options = T.unsafe(nil), &block); end + + # Scans +filename+ (a path to a code file) with the Scanner for +lang+. + # + # If +lang+ is :auto or omitted, the CodeRay::FileType module is used to + # determine it. If it cannot find out what type it is, it uses + # CodeRay::Scanners::Text. + # + # Calls CodeRay.scan. + # + # Example: + # require 'coderay' + # page = CodeRay.scan_file('some_c_code.c').html + # + # source://coderay//lib/coderay.rb#183 + def scan_file(filename, lang = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Finds the Scanner class for +lang+ and creates an instance, passing + # +options+ to it. + # + # See Scanner.new. + # + # source://coderay//lib/coderay.rb#268 + def scanner(lang, options = T.unsafe(nil), &block); end + end +end + +# source://coderay//lib/coderay.rb#130 +CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) + +# = Duo +# +# A Duo is a convenient way to use CodeRay. You just create a Duo, +# giving it a lang (language of the input code) and a format (desired +# output format), and call Duo#highlight with the code. +# +# Duo makes it easy to re-use both scanner and encoder for a repetitive +# task. It also provides a very easy interface syntax: +# +# require 'coderay' +# CodeRay::Duo[:python, :div].highlight 'import this' +# +# Until you want to do uncommon things with CodeRay, I recommend to use +# this method, since it takes care of everything. +# +# source://coderay//lib/coderay/duo.rb#17 +class CodeRay::Duo + # Create a new Duo, holding a lang and a format to highlight code. + # + # simple: + # CodeRay::Duo[:ruby, :html].highlight 'bla 42' + # + # with options: + # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' + # + # alternative syntax without options: + # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end' + # + # alternative syntax with options: + # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc' + # + # The options are forwarded to scanner and encoder + # (see CodeRay.get_scanner_options). + # + # @return [Duo] a new instance of Duo + # + # source://coderay//lib/coderay/duo.rb#37 + def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # Allows to use Duo like a proc object: + # + # CodeRay::Duo[:python => :yaml].call(code) + # + # or, in Ruby 1.9 and later: + # + # CodeRay::Duo[:python => :yaml].(code) + # + # source://coderay//lib/coderay/duo.rb#77 + def call(code, options = T.unsafe(nil)); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # + # source://coderay//lib/coderay/duo.rb#64 + def encode(code, options = T.unsafe(nil)); end + + # The encoder of the duo. Only created once. + # + # source://coderay//lib/coderay/duo.rb#59 + def encoder; end + + # Returns the value of attribute format. + # + # source://coderay//lib/coderay/duo.rb#19 + def format; end + + # Sets the attribute format + # + # @param value the value to set the attribute format to. + # + # source://coderay//lib/coderay/duo.rb#19 + def format=(_arg0); end + + # Tokenize and highlight the code using +scanner+ and +encoder+. + # + # source://coderay//lib/coderay/duo.rb#68 + def highlight(code, options = T.unsafe(nil)); end + + # Returns the value of attribute lang. + # + # source://coderay//lib/coderay/duo.rb#19 + def lang; end + + # Sets the attribute lang + # + # @param value the value to set the attribute lang to. + # + # source://coderay//lib/coderay/duo.rb#19 + def lang=(_arg0); end + + # Returns the value of attribute options. + # + # source://coderay//lib/coderay/duo.rb#19 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://coderay//lib/coderay/duo.rb#19 + def options=(_arg0); end + + # The scanner of the duo. Only created once. + # + # source://coderay//lib/coderay/duo.rb#54 + def scanner; end + + class << self + # To allow calls like Duo[:ruby, :html].highlight. + # + # source://coderay//lib/coderay/duo.rb#50 + def [](*_arg0); end + end +end + +# This module holds the Encoder class and its subclasses. +# For example, the HTML encoder is named CodeRay::Encoders::HTML +# can be found in coderay/encoders/html. +# +# Encoders also provides methods and constants for the register +# mechanism and the [] method that returns the Encoder class +# belonging to the given format. +# +# source://coderay//lib/coderay/encoders.rb#10 +module CodeRay::Encoders + extend ::CodeRay::PluginHost +end + +# A simple Filter that removes all tokens of the :comment kind. +# +# Alias: +remove_comments+ +# +# Usage: +# CodeRay.scan('print # foo', :ruby).comment_filter.text +# #-> "print " +# +# See also: TokenKindFilter, LinesOfCode +# +# source://coderay//lib/coderay/encoders/comment_filter.rb#15 +class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end + +# source://coderay//lib/coderay/encoders/comment_filter.rb#19 +CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Returns the number of tokens. +# +# Text and block tokens are counted. +# +# source://coderay//lib/coderay/encoders/count.rb#7 +class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/count.rb#29 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#33 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#32 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#34 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/count.rb#25 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/count.rb#19 + def finish(options); end + + # source://coderay//lib/coderay/encoders/count.rb#13 + def setup(options); end +end + +# = Debug Encoder +# +# Fast encoder producing simple debug output. +# +# It is readable and diff-able and is used for testing. +# +# You cannot fully restore the tokens information from the +# output, because consecutive :space tokens are merged. +# +# See also: Scanners::Debug +# +# source://coderay//lib/coderay/encoders/debug.rb#14 +class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/debug.rb#30 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#38 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#34 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#42 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/debug.rb#20 + def text_token(text, kind); end +end + +# source://coderay//lib/coderay/encoders/debug.rb#18 +CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = Debug Lint Encoder +# +# Debug encoder with additional checks for: +# +# - empty tokens +# - incorrect nesting +# +# It will raise an InvalidTokenStream exception when any of the above occurs. +# +# See also: Encoders::Debug +# +# source://coderay//lib/coderay/encoders/debug_lint.rb#16 +class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug + # source://coderay//lib/coderay/encoders/debug_lint.rb#26 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/debug_lint.rb#37 + def begin_line(kind); end + + # @raise [Lint::IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#31 + def end_group(kind); end + + # @raise [Lint::IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#42 + def end_line(kind); end + + # @raise [Lint::EmptyToken] + # + # source://coderay//lib/coderay/encoders/debug_lint.rb#20 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/debug_lint.rb#55 + def finish(options); end + + # source://coderay//lib/coderay/encoders/debug_lint.rb#50 + def setup(options); end +end + +# Wraps HTML output into a DIV element, using inline styles by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/div.rb#9 +class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/div.rb#15 +CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/div.rb#11 +CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = Encoder +# +# The Encoder base class. Together with Scanner and +# Tokens, it forms the highlighting triad. +# +# Encoder instances take a Tokens object and do something with it. +# +# The most common Encoder is surely the HTML encoder +# (CodeRay::Encoders::HTML). It highlights the code in a colorful +# html page. +# If you want the highlighted code in a div or a span instead, +# use its subclasses Div and Span. +# +# source://coderay//lib/coderay/encoders/encoder.rb#16 +class CodeRay::Encoders::Encoder + extend ::CodeRay::Plugin + + # Creates a new Encoder. + # +options+ is saved and used for all encode operations, as long + # as you don't overwrite it there by passing additional options. + # + # Encoder objects provide three encode methods: + # - encode simply takes a +code+ string and a +lang+ + # - encode_tokens expects a +tokens+ object instead + # + # Each method has an optional +options+ parameter. These are + # added to the options you passed at creation. + # + # @return [Encoder] a new instance of Encoder + # + # source://coderay//lib/coderay/encoders/encoder.rb#55 + def initialize(options = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/encoder.rb#87 + def <<(token); end + + # Starts a token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#123 + def begin_group(kind); end + + # Starts a new line token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#131 + def begin_line(kind); end + + # Encode the given +code+ using the Scanner for +lang+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#70 + def encode(code, lang, options = T.unsafe(nil)); end + + # Encode a Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#61 + def encode_tokens(tokens, options = T.unsafe(nil)); end + + # Ends a token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#127 + def end_group(kind); end + + # Ends a new line token group with the given +kind+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#135 + def end_line(kind); end + + # The default file extension for this encoder. + # + # source://coderay//lib/coderay/encoders/encoder.rb#83 + def file_extension; end + + # Encode the given +code+ using the Scanner for +lang+. + # You can use highlight instead of encode, if that seems + # more clear to you. + # + # source://coderay//lib/coderay/encoders/encoder.rb#80 + def highlight(code, lang, options = T.unsafe(nil)); end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def options; end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def options=(_arg0); end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def scanner; end + + # The options you gave the Encoder at creating. + # + # source://coderay//lib/coderay/encoders/encoder.rb#43 + def scanner=(_arg0); end + + # Called for each text token ([text, kind]), where text is a String. + # + # source://coderay//lib/coderay/encoders/encoder.rb#118 + def text_token(text, kind); end + + # Called with +content+ and +kind+ of the currently scanned token. + # For simple scanners, it's enougth to implement this method. + # + # By default, it calls text_token, begin_group, end_group, begin_line, + # or end_line, depending on the +content+. + # + # source://coderay//lib/coderay/encoders/encoder.rb#100 + def token(content, kind); end + + # Do the encoding. + # + # The already created +tokens+ object must be used; it must be a + # Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#184 + def tokens(tokens, options = T.unsafe(nil)); end + + protected + + # Do the encoding. + # + # The already created +tokens+ object must be used; it must be a + # Tokens object. + # + # source://coderay//lib/coderay/encoders/encoder.rb#168 + def compile(tokens, options = T.unsafe(nil)); end + + # Called with merged options after encoding starts. + # The return value is the result of encoding, typically @out. + # + # source://coderay//lib/coderay/encoders/encoder.rb#160 + def finish(options); end + + # source://coderay//lib/coderay/encoders/encoder.rb#148 + def get_output(options); end + + # Append data.to_s to the output. Returns the argument. + # + # source://coderay//lib/coderay/encoders/encoder.rb#153 + def output(data); end + + # Called with merged options before encoding starts. + # Sets @out to an empty string. + # + # See the HTML Encoder for an example of option caching. + # + # source://coderay//lib/coderay/encoders/encoder.rb#144 + def setup(options); end + + class << self + # If FILE_EXTENSION isn't defined, this method returns the + # downcase class name instead. + # + # source://coderay//lib/coderay/encoders/encoder.rb#24 + def const_missing(sym); end + + # The default file extension for output file of this encoder class. + # + # source://coderay//lib/coderay/encoders/encoder.rb#33 + def file_extension; end + end +end + +# Subclasses are to store their default options in this constant. +# +# source://coderay//lib/coderay/encoders/encoder.rb#40 +CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 +CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders + +# A Filter encoder has another Tokens instance as output. +# It can be subclass to select, remove, or modify tokens in the stream. +# +# Subclasses of Filter are called "Filters" and can be chained. +# +# == Options +# +# === :tokens +# +# The Tokens object which will receive the output. +# +# Default: Tokens.new +# +# See also: TokenKindFilter +# +# source://coderay//lib/coderay/encoders/filter.rb#18 +class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/filter.rb#39 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#43 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#47 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#51 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/filter.rb#35 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/filter.rb#29 + def finish(options); end + + # source://coderay//lib/coderay/encoders/filter.rb#23 + def setup(options); end +end + +# = HTML Encoder +# +# This is CodeRay's most important highlighter: +# It provides save, fast XHTML generation and CSS support. +# +# == Usage +# +# require 'coderay' +# puts CodeRay.scan('Some /code/', :ruby).html #-> a HTML page +# puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span) +# #-> Some /code/ +# puts CodeRay.scan('Some /code/', :ruby).span #-> the same +# +# puts CodeRay.scan('Some code', :ruby).html( +# :wrap => nil, +# :line_numbers => :inline, +# :css => :style +# ) +# +# == Options +# +# === :tab_width +# Convert \t characters to +n+ spaces (a number or false.) +# false will keep tab characters untouched. +# +# Default: 8 +# +# === :css +# How to include the styles; can be :class or :style. +# +# Default: :class +# +# === :wrap +# Wrap in :page, :div, :span or nil. +# +# You can also use Encoders::Div and Encoders::Span. +# +# Default: nil +# +# === :title +# +# The title of the HTML page (works only when :wrap is set to :page.) +# +# Default: 'CodeRay output' +# +# === :break_lines +# +# Split multiline blocks at line breaks. +# Forced to true if :line_numbers option is set to :inline. +# +# Default: false +# +# === :line_numbers +# Include line numbers in :table, :inline, or nil (no line numbers) +# +# Default: nil +# +# === :line_number_anchors +# Adds anchors and links to the line numbers. Can be false (off), true (on), +# or a prefix string that will be prepended to the anchor name. +# +# The prefix must consist only of letters, digits, and underscores. +# +# Default: true, default prefix name: "line" +# +# === :line_number_start +# Where to start with line number counting. +# +# Default: 1 +# +# === :bold_every +# Make every +n+-th number appear bold. +# +# Default: 10 +# +# === :highlight_lines +# +# Highlights certain line numbers. +# Can be any Enumerable, typically just an Array or Range, of numbers. +# +# Bolding is deactivated when :highlight_lines is set. It only makes sense +# in combination with :line_numbers. +# +# Default: nil +# +# === :hint +# Include some information into the output using the title attribute. +# Can be :info (show token kind on mouse-over), :info_long (with full path) +# or :debug (via inspect). +# +# Default: false +# +# source://coderay//lib/coderay/encoders/html.rb#97 +class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder + # token groups, eg. strings + # + # source://coderay//lib/coderay/encoders/html.rb#235 + def begin_group(kind); end + + # whole lines to be highlighted, eg. a deleted line in a diff + # + # source://coderay//lib/coderay/encoders/html.rb#247 + def begin_line(kind); end + + # Returns the value of attribute css. + # + # source://coderay//lib/coderay/encoders/html.rb#126 + def css; end + + # source://coderay//lib/coderay/encoders/html.rb#241 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/html.rb#261 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/html.rb#221 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/html.rb#316 + def break_lines(text, style); end + + # source://coderay//lib/coderay/encoders/html.rb#310 + def check_group_nesting(name, kind); end + + # source://coderay//lib/coderay/encoders/html.rb#268 + def check_options!(options); end + + # source://coderay//lib/coderay/encoders/html.rb#324 + def close_span; end + + # source://coderay//lib/coderay/encoders/html.rb#280 + def css_class_for_kinds(kinds); end + + # source://coderay//lib/coderay/encoders/html.rb#195 + def finish(options); end + + # source://coderay//lib/coderay/encoders/html.rb#289 + def make_span_for_kinds(method, hint); end + + # source://coderay//lib/coderay/encoders/html.rb#172 + def setup(options); end + + # source://coderay//lib/coderay/encoders/html.rb#284 + def style_for_kinds(kinds); end + + class << self + # source://coderay//lib/coderay/encoders/html.rb#130 + def make_html_escape_hash; end + + # Generate a hint about the given +kinds+ in a +hint+ style. + # + # +hint+ may be :info, :info_long or :debug. + # + # source://coderay//lib/coderay/encoders/html.rb#157 + def token_path_to_hint(hint, kinds); end + end +end + +# source://coderay//lib/coderay/encoders/html/css.rb#5 +class CodeRay::Encoders::HTML::CSS + # @return [CSS] a new instance of CSS + # + # source://coderay//lib/coderay/encoders/html/css.rb#13 + def initialize(style = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/css.rb#23 + def get_style_for_css_classes(css_classes); end + + # Returns the value of attribute stylesheet. + # + # source://coderay//lib/coderay/encoders/html/css.rb#7 + def stylesheet; end + + private + + # source://coderay//lib/coderay/encoders/html/css.rb#49 + def parse(stylesheet); end + + class << self + # source://coderay//lib/coderay/encoders/html/css.rb#9 + def load_stylesheet(style = T.unsafe(nil)); end + end +end + +# source://coderay//lib/coderay/encoders/html/css.rb#36 +CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/encoders/html.rb#103 +CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#101 +CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/html.rb#143 +CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#144 +CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/encoders/html/numbering.rb#6 +module CodeRay::Encoders::HTML::Numbering + class << self + # source://coderay//lib/coderay/encoders/html/numbering.rb#8 + def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# This module is included in the output String of the HTML Encoder. +# +# It provides methods like wrap, div, page etc. +# +# Remember to use #clone instead of #dup to keep the modules the object was +# extended with. +# +# TODO: Rewrite this without monkey patching. +# +# source://coderay//lib/coderay/encoders/html/output.rb#14 +module CodeRay::Encoders::HTML::Output + # source://coderay//lib/coderay/encoders/html/output.rb#57 + def apply_title!(title); end + + # Returns the value of attribute css. + # + # source://coderay//lib/coderay/encoders/html/output.rb#16 + def css; end + + # Sets the attribute css + # + # @param value the value to set the attribute css to. + # + # source://coderay//lib/coderay/encoders/html/output.rb#16 + def css=(_arg0); end + + # source://coderay//lib/coderay/encoders/html/output.rb#86 + def stylesheet(in_tag = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/output.rb#62 + def wrap!(element, *args); end + + # source://coderay//lib/coderay/encoders/html/output.rb#52 + def wrap_in!(template); end + + # source://coderay//lib/coderay/encoders/html/output.rb#47 + def wrapped_in; end + + # Sets the attribute wrapped_in + # + # @param value the value to set the attribute wrapped_in to. + # + # source://coderay//lib/coderay/encoders/html/output.rb#50 + def wrapped_in=(_arg0); end + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/html/output.rb#43 + def wrapped_in?(element); end + + class << self + # Raises an exception if an object that doesn't respond to to_str is extended by Output, + # to prevent users from misuse. Use Module#remove_method to disable. + # + # source://coderay//lib/coderay/encoders/html/output.rb#22 + def extended(o); end + + # source://coderay//lib/coderay/encoders/html/output.rb#26 + def make_stylesheet(css, in_tag = T.unsafe(nil)); end + + # source://coderay//lib/coderay/encoders/html/output.rb#36 + def page_template_for_css(css); end + end +end + +# source://coderay//lib/coderay/encoders/html/output.rb#117 +CodeRay::Encoders::HTML::Output::DIV = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#130 +CodeRay::Encoders::HTML::Output::PAGE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#115 +CodeRay::Encoders::HTML::Output::SPAN = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# source://coderay//lib/coderay/encoders/html/output.rb#123 +CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) + +# -- don't include the templates in docu +# +# source://coderay//lib/coderay/encoders/html/output.rb#92 +class CodeRay::Encoders::HTML::Output::Template < ::String + # source://coderay//lib/coderay/encoders/html/output.rb#104 + def apply(target, replacement); end + + class << self + # source://coderay//lib/coderay/encoders/html/output.rb#94 + def wrap!(str, template, target); end + end +end + +# source://coderay//lib/coderay/encoders/html.rb#146 +CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/html.rb#150 +CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) + +# A simple JSON Encoder. +# +# Example: +# CodeRay.scan('puts "Hello world!"', :ruby).json +# yields +# [ +# {"type"=>"text", "text"=>"puts", "kind"=>"ident"}, +# {"type"=>"text", "text"=>" ", "kind"=>"space"}, +# {"type"=>"block", "action"=>"open", "kind"=>"string"}, +# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, +# {"type"=>"text", "text"=>"Hello world!", "kind"=>"content"}, +# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, +# {"type"=>"block", "action"=>"close", "kind"=>"string"}, +# ] +# +# source://coderay//lib/coderay/encoders/json.rb#18 +class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/json.rb#64 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#72 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#68 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#76 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/json.rb#60 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/json.rb#49 + def append(data); end + + # source://coderay//lib/coderay/encoders/json.rb#45 + def finish(options); end + + # source://coderay//lib/coderay/encoders/json.rb#38 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/json.rb#35 +CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Counts the LoC (Lines of Code). Returns an Integer >= 0. +# +# Alias: +loc+ +# +# Everything that is not comment, markup, doctype/shebang, or an empty line, +# is considered to be code. +# +# For example, +# * HTML files not containing JavaScript have 0 LoC +# * in a Java class without comments, LoC is the number of non-empty lines +# +# A Scanner class should define the token kinds that are not code in the +# KINDS_NOT_LOC constant, which defaults to [:comment, :doctype]. +# +# source://coderay//lib/coderay/encoders/lines_of_code.rb#17 +class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter + protected + + # source://coderay//lib/coderay/encoders/lines_of_code.rb#38 + def finish(options); end + + # source://coderay//lib/coderay/encoders/lines_of_code.rb#25 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/lines_of_code.rb#21 +CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) + +# = Lint Encoder +# +# Checks for: +# +# - empty tokens +# - incorrect nesting +# +# It will raise an InvalidTokenStream exception when any of the above occurs. +# +# See also: Encoders::DebugLint +# +# source://coderay//lib/coderay/encoders/lint.rb#14 +class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug + # source://coderay//lib/coderay/encoders/lint.rb#28 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/lint.rb#37 + def begin_line(kind); end + + # @raise [IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/lint.rb#32 + def end_group(kind); end + + # @raise [IncorrectTokenGroupNesting] + # + # source://coderay//lib/coderay/encoders/lint.rb#41 + def end_line(kind); end + + # @raise [EmptyToken] + # + # source://coderay//lib/coderay/encoders/lint.rb#23 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/lint.rb#52 + def finish(options); end + + # source://coderay//lib/coderay/encoders/lint.rb#48 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/lint.rb#19 +class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# source://coderay//lib/coderay/encoders/lint.rb#21 +class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# source://coderay//lib/coderay/encoders/lint.rb#18 +class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end + +# source://coderay//lib/coderay/encoders/lint.rb#20 +class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end + +# = Null Encoder +# +# Does nothing and returns an empty string. +# +# source://coderay//lib/coderay/encoders/null.rb#7 +class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/null.rb#11 + def text_token(text, kind); end +end + +# Wraps the output into a HTML page, using CSS classes and +# line numbers in the table format by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/page.rb#10 +class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/page.rb#16 +CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/page.rb#12 +CodeRay::Encoders::Page::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Wraps HTML output into a SPAN element, using inline styles by default. +# +# See Encoders::HTML for available options. +# +# source://coderay//lib/coderay/encoders/span.rb#9 +class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end + +# source://coderay//lib/coderay/encoders/span.rb#15 +CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/span.rb#11 +CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# Makes a statistic for the given tokens. +# +# Alias: +stats+ +# +# source://coderay//lib/coderay/encoders/statistic.rb#7 +class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/statistic.rb#70 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#78 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#86 + def block_token(action, kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#74 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#82 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#11 + def real_token_count; end + + # source://coderay//lib/coderay/encoders/statistic.rb#62 + def text_token(text, kind); end + + # source://coderay//lib/coderay/encoders/statistic.rb#11 + def type_stats; end + + protected + + # source://coderay//lib/coderay/encoders/statistic.rb#42 + def finish(options); end + + # source://coderay//lib/coderay/encoders/statistic.rb#17 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/statistic.rb#24 +CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/statistic.rb#38 +CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/encoders/statistic.rb#13 +class CodeRay::Encoders::Statistic::TypeStats < ::Struct + # Returns the value of attribute count + # + # @return [Object] the current value of count + # + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def count; end + + # Sets the attribute count + # + # @param value [Object] the value to set the attribute count to. + # @return [Object] the newly set value + # + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def count=(_); end + + # Returns the value of attribute size + # + # @return [Object] the current value of size + # + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def size; end + + # Sets the attribute size + # + # @param value [Object] the value to set the attribute size to. + # @return [Object] the newly set value + # + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def size=(_); end + + class << self + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def [](*_arg0); end + + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def inspect; end + + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def keyword_init?; end + + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def members; end + + # source://coderay//lib/coderay/encoders/statistic.rb#13 + def new(*_arg0); end + end +end + +# source://coderay//lib/coderay/encoders/terminal.rb#17 +class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/terminal.rb#156 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#160 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#162 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#172 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/terminal.rb#141 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/terminal.rb#133 + def setup(options); end + + private + + # source://coderay//lib/coderay/encoders/terminal.rb#179 + def open_token(kind); end +end + +# source://coderay//lib/coderay/encoders/terminal.rb#21 +CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash) + +# Concats the tokens into a single string, resulting in the original +# code string if no tokens were removed. +# +# Alias: +plain+, +plaintext+ +# +# == Options +# +# === :separator +# A separator string to join the tokens. +# +# Default: empty String +# +# source://coderay//lib/coderay/encoders/text.rb#15 +class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/text.rb#25 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/text.rb#36 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/text.rb#21 +CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/text.rb#19 +CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# A Filter that selects tokens based on their token kind. +# +# == Options +# +# === :exclude +# +# One or many symbols (in an Array) which shall be excluded. +# +# Default: [] +# +# === :include +# +# One or many symbols (in an array) which shall be included. +# +# Default: :all, which means all tokens are included. +# +# Exclusion wins over inclusion. +# +# See also: CommentFilter +# +# source://coderay//lib/coderay/encoders/token_kind_filter.rb#25 +class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter + # Add the token group to the output stream if +kind+ matches the + # conditions. + # + # If it does not, all tokens inside the group are excluded from the + # stream, even if their kinds match. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#66 + def begin_group(kind); end + + # See +begin_group+. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#77 + def begin_line(kind); end + + # Take care of re-enabling the delegation of tokens to the output stream + # if an exluded group has ended. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#89 + def end_group(kind); end + + # See +end_group+. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#99 + def end_line(kind); end + + # Add the token to the output stream if +kind+ matches the conditions. + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#57 + def text_token(text, kind); end + + protected + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#49 + def include_group?(kind); end + + # @return [Boolean] + # + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#45 + def include_text_token?(text, kind); end + + # source://coderay//lib/coderay/encoders/token_kind_filter.rb#35 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29 +CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# = XML Encoder +# +# Uses REXML. Very slow. +# +# source://coderay//lib/coderay/encoders/xml.rb#7 +class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/xml.rb#58 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/xml.rb#62 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/xml.rb#38 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/xml.rb#31 + def finish(options); end + + # source://coderay//lib/coderay/encoders/xml.rb#22 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/xml.rb#15 +CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/encoders/xml.rb#11 +CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = YAML Encoder +# +# Slow. +# +# source://coderay//lib/coderay/encoders/yaml.rb#9 +class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder + # source://coderay//lib/coderay/encoders/yaml.rb#31 + def begin_group(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#39 + def begin_line(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#35 + def end_group(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#43 + def end_line(kind); end + + # source://coderay//lib/coderay/encoders/yaml.rb#27 + def text_token(text, kind); end + + protected + + # source://coderay//lib/coderay/encoders/yaml.rb#22 + def finish(options); end + + # source://coderay//lib/coderay/encoders/yaml.rb#16 + def setup(options); end +end + +# source://coderay//lib/coderay/encoders/yaml.rb#13 +CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) + +# = FileType +# +# A simple filetype recognizer. +# +# == Usage +# +# # determine the type of the given +# lang = FileType[file_name] +# +# # return :text if the file type is unknown +# lang = FileType.fetch file_name, :text +# +# # try the shebang line, too +# lang = FileType.fetch file_name, :text, true +# +# source://coderay//lib/coderay/helpers/file_type.rb#17 +module CodeRay::FileType + class << self + # Try to determine the file type of the file. + # + # +filename+ is a relative or absolute path to a file. + # + # The file itself is only accessed when +read_shebang+ is set to true. + # That means you can get filetypes from files that don't exist. + # + # source://coderay//lib/coderay/helpers/file_type.rb#29 + def [](filename, read_shebang = T.unsafe(nil)); end + + # This works like Hash#fetch. + # + # If the filetype cannot be found, the +default+ value + # is returned. + # + # source://coderay//lib/coderay/helpers/file_type.rb#50 + def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end + + protected + + # source://coderay//lib/coderay/helpers/file_type.rb#66 + def type_from_shebang(filename); end + end +end + +# source://coderay//lib/coderay/helpers/file_type.rb#79 +CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/file_type.rb#139 +CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/file_type.rb#137 +CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/helpers/file_type.rb#19 +class CodeRay::FileType::UnknownFileType < ::Exception; end + +# = Plugin +# +# Plugins have to include this module. +# +# IMPORTANT: Use extend for this module. +# +# See CodeRay::PluginHost for examples. +# +# source://coderay//lib/coderay/helpers/plugin.rb#10 +module CodeRay::Plugin + # source://coderay//lib/coderay/helpers/plugin.rb#46 + def aliases; end + + # The PluginHost for this Plugin class. + # + # source://coderay//lib/coderay/helpers/plugin.rb#39 + def plugin_host(host = T.unsafe(nil)); end + + # Returns the value of attribute plugin_id. + # + # source://coderay//lib/coderay/helpers/plugin.rb#12 + def plugin_id; end + + # Register this class for the given +id+. + # + # Example: + # class MyPlugin < PluginHost::BaseClass + # register_for :my_id + # ... + # end + # + # See PluginHost.register. + # + # source://coderay//lib/coderay/helpers/plugin.rb#23 + def register_for(id); end + + # Returns the title of the plugin, or sets it to the + # optional argument +title+. + # + # source://coderay//lib/coderay/helpers/plugin.rb#30 + def title(title = T.unsafe(nil)); end +end + +# = PluginHost +# +# A simple subclass/subfolder plugin system. +# +# Example: +# class Generators +# extend PluginHost +# plugin_path 'app/generators' +# end +# +# class Generator +# extend Plugin +# PLUGIN_HOST = Generators +# end +# +# class FancyGenerator < Generator +# register_for :fancy +# end +# +# Generators[:fancy] #-> FancyGenerator +# # or +# CodeRay.require_plugin 'Generators/fancy' +# # or +# Generators::Fancy +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#27 +module CodeRay::PluginHost + # Returns the Plugin for +id+. + # + # Example: + # yaml_plugin = MyPluginHost[:yaml] + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#49 + def [](id, *args, &blk); end + + # Returns an array of all Plugins. + # + # Note: This loads all plugins using load_all. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#151 + def all_plugins; end + + # Tries to +load+ the missing plugin by translating +const+ to the + # underscore form (eg. LinesOfCode becomes lines_of_code). + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#61 + def const_missing(const); end + + # Define the default plugin to use when no plugin is found + # for a given id, or return the default plugin. + # + # See also map. + # + # class MyColorHost < PluginHost + # map :navy => :dark_blue + # default :gray + # end + # + # MyColorHost.default # loads and returns the Gray plugin + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#114 + def default(id = T.unsafe(nil)); end + + # Returns an array of all .rb files in the plugin path. + # + # The extension .rb is not included. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#140 + def list; end + + # Returns the Plugin for +id+. + # + # Example: + # yaml_plugin = MyPluginHost[:yaml] + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#57 + def load(id, *args, &blk); end + + # Loads all plugins using list and load. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#39 + def load_all; end + + # Loads the map file (see map). + # + # This is done automatically when plugin_path is called. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#159 + def load_plugin_map; end + + # Map a plugin_id to another. + # + # Usage: Put this in a file plugin_path/_map.rb. + # + # class MyColorHost < PluginHost + # map :navy => :dark_blue, + # :maroon => :brown, + # :luna => :moon + # end + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#95 + def map(hash); end + + # A Hash of plugion_id => Plugin pairs. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#133 + def plugin_hash; end + + # The path where the plugins can be found. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#79 + def plugin_path(*args); end + + # Every plugin must register itself for +id+ by calling register_for, + # which calls this method. + # + # See Plugin#register_for. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#128 + def register(plugin, id); end + + protected + + # Return a plugin hash that automatically loads plugins. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#172 + def make_plugin_hash; end + + # Returns the expected path to the plugin file for the given id. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#196 + def path_to(plugin_id); end + + # Converts +id+ to a valid plugin ID String, or returns +nil+. + # + # Raises +ArgumentError+ for all other objects, or if the + # given String includes non-alphanumeric characters (\W). + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#204 + def validate_id(id); end + + class << self + # Adds the module/class to the PLUGIN_HOSTS list. + # + # source://coderay//lib/coderay/helpers/plugin_host.rb#72 + def extended(mod); end + end +end + +# source://coderay//lib/coderay/helpers/plugin_host.rb#33 +class CodeRay::PluginHost::HostNotFound < ::LoadError; end + +# source://coderay//lib/coderay/helpers/plugin_host.rb#35 +CodeRay::PluginHost::PLUGIN_HOSTS = T.let(T.unsafe(nil), Array) + +# dummy hash +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#36 +CodeRay::PluginHost::PLUGIN_HOSTS_BY_ID = T.let(T.unsafe(nil), Hash) + +# Raised if Encoders::[] fails because: +# * a file could not be found +# * the requested Plugin is not registered +# +# source://coderay//lib/coderay/helpers/plugin_host.rb#32 +class CodeRay::PluginHost::PluginNotFound < ::LoadError; end + +# = Scanners +# +# This module holds the Scanner class and its subclasses. +# For example, the Ruby scanner is named CodeRay::Scanners::Ruby +# can be found in coderay/scanners/ruby. +# +# Scanner also provides methods and constants for the register +# mechanism and the [] method that returns the Scanner class +# belonging to the given lang. +# +# See PluginHost. +# +# source://coderay//lib/coderay/scanners.rb#18 +module CodeRay::Scanners + extend ::CodeRay::PluginHost +end + +# Scanner for C. +# +# source://coderay//lib/coderay/scanners/c.rb#5 +class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/c.rb#44 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/c.rb#27 +CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#39 +CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/c.rb#33 +CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/c.rb#10 +CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#23 +CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#17 +CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/c.rb#40 +CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for C++. +# +# Aliases: +cplusplus+, c++ +CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text + +# source://coderay//lib/coderay/scanners/css.rb#4 +class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/css.rb#55 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/css.rb#50 + def setup; end +end + +# source://coderay//lib/coderay/scanners/css.rb#8 +CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/css.rb#16 +module CodeRay::Scanners::CSS::RE; end + +# source://coderay//lib/coderay/scanners/css.rb#31 +CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#45 +CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#43 +CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#38 +CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#19 +CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#40 +CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#17 +CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#26 +CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#42 +CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#30 +CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#20 +CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#21 +CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#29 +CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#28 +CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#32 +CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#44 +CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#24 +CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp) + +# TODO: buggy regexp +# +# source://coderay//lib/coderay/scanners/css.rb#22 +CodeRay::Scanners::CSS::RE::String1 = T.let(T.unsafe(nil), Regexp) + +# TODO: buggy regexp +# +# source://coderay//lib/coderay/scanners/css.rb#23 +CodeRay::Scanners::CSS::RE::String2 = T.let(T.unsafe(nil), Regexp) + +# differs from standard because it allows uppercase hex too +# +# source://coderay//lib/coderay/scanners/css.rb#18 +CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/css.rb#36 +CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#6 +class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/clojure.rb#145 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/clojure.rb#95 +CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#133 +CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#134 +CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#136 +CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#135 +CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#16 +CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#120 +CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#98 +CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#99 +CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#100 +CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#102 +CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#101 +CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#107 +CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#110 +CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#109 +CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#96 +CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#85 +CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/clojure.rb#129 +CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#130 +CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#132 +CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#131 +CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#90 +CodeRay::Scanners::Clojure::KEYWORD_NEXT_TOKEN_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/clojure.rb#141 +CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#137 +CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#138 +CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#140 +CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#139 +CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#78 +CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#112 +CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#113 +CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#115 +CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#114 +CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#106 +CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#103 +CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#105 +CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#104 +CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#125 +CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#126 +CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#128 +CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#127 +CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#108 +CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#11 +CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/clojure.rb#111 +CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#97 +CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#116 +CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#117 +CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#119 +CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#118 +CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#121 +CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#122 +CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#124 +CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/clojure.rb#123 +CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp) + +# = Debug Scanner +# +# Interprets the output of the Encoders::Debug encoder (basically the inverse function). +# +# source://coderay//lib/coderay/scanners/debug.rb#9 +class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/debug.rb#21 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/debug.rb#16 + def setup; end +end + +# Scanner for the Delphi language (Object Pascal). +# +# Alias: +pascal+ +# +# source://coderay//lib/coderay/scanners/delphi.rb#7 +class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/delphi.rb#45 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/delphi.rb#25 +CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/delphi.rb#36 +CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/delphi.rb#12 +CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/delphi.rb#40 +CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# Scanner for output of the diff command. +# +# Alias: +patch+ +# +# source://coderay//lib/coderay/scanners/diff.rb#7 +class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/diff.rb#19 + def scan_tokens(encoder, options); end + + private + + # source://coderay//lib/coderay/scanners/diff.rb#204 + def diff(a, b); end +end + +# source://coderay//lib/coderay/scanners/diff.rb#12 +CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Scanner for HTML ERB templates. +# +# source://coderay//lib/coderay/scanners/erb.rb#8 +class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/erb.rb#38 + def reset_instance; end + + # source://coderay//lib/coderay/scanners/erb.rb#43 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/erb.rb#33 + def setup; end +end + +# source://coderay//lib/coderay/scanners/erb.rb#15 +CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/erb.rb#13 +CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/erb.rb#27 +CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/go.rb#4 +class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/go.rb#50 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/go.rb#45 +CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/go.rb#39 +CodeRay::Scanners::Go::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# http://golang.org/ref/spec#Keywords +# +# source://coderay//lib/coderay/scanners/go.rb#10 +CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#29 +CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#34 +CodeRay::Scanners::Go::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# http://golang.org/ref/spec#Types +# +# source://coderay//lib/coderay/scanners/go.rb#19 +CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/go.rb#46 +CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for Groovy. +# +# source://coderay//lib/coderay/scanners/groovy.rb#7 +class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java + protected + + # source://coderay//lib/coderay/scanners/groovy.rb#43 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/groovy.rb#39 + def setup; end +end + +# source://coderay//lib/coderay/scanners/groovy.rb#24 +CodeRay::Scanners::Groovy::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# TODO: check list of keywords +# +# source://coderay//lib/coderay/scanners/groovy.rb#12 +CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/groovy.rb#18 +CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/groovy.rb#20 +CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/groovy.rb#15 +CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/groovy.rb#26 +CodeRay::Scanners::Groovy::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# TODO: interpretation inside ', ", / +# +# source://coderay//lib/coderay/scanners/groovy.rb#29 +CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/groovy.rb#25 +CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/haml.rb#8 +class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/haml.rb#24 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/haml.rb#17 + def setup; end +end + +# source://coderay//lib/coderay/scanners/haml.rb#13 +CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# HTML Scanner +# +# Alias: +xhtml+ +# +# See also: Scanners::XML +# +# source://coderay//lib/coderay/scanners/html.rb#9 +class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/html.rb#62 + def reset; end + + protected + + # source://coderay//lib/coderay/scanners/html.rb#83 + def scan_css(encoder, code, state = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/html.rb#76 + def scan_java_script(encoder, code); end + + # source://coderay//lib/coderay/scanners/html.rb#90 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/html.rb#70 + def setup; end +end + +# source://coderay//lib/coderay/scanners/html.rb#39 +CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#42 +CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#20 +CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/html.rb#41 +CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/html.rb#35 +CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/html.rb#13 +CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/html.rb#57 +CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/html.rb#40 +CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp) + +# Scanner for JSON (JavaScript Object Notation). +# +# source://coderay//lib/coderay/scanners/json.rb#5 +class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner + protected + + # See http://json.org/ for a definition of the JSON lexic/grammar. + # + # source://coderay//lib/coderay/scanners/json.rb#26 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/json.rb#21 + def setup; end +end + +# source://coderay//lib/coderay/scanners/json.rb#15 +CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/json.rb#17 +CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/json.rb#10 +CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/json.rb#16 +CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for Java. +# +# source://coderay//lib/coderay/scanners/java.rb#5 +class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/java.rb#51 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4 +module CodeRay::Scanners::Java::BuiltinTypes; end + +# source://coderay//lib/coderay/scanners/java/builtin_types.rb#7 +CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#19 +CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#25 +CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#40 +CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java.rb#47 +CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java.rb#30 +CodeRay::Scanners::Java::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html +# +# source://coderay//lib/coderay/scanners/java.rb#12 +CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#20 +CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#18 +CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#42 +CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java.rb#21 +CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java.rb#41 +CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for JavaScript. +# +# Aliases: +ecmascript+, +ecma_script+, +javascript+ +# +# source://coderay//lib/coderay/scanners/java_script.rb#7 +class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/java_script.rb#224 + def reset_instance; end + + # source://coderay//lib/coderay/scanners/java_script.rb#61 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/java_script.rb#57 + def setup; end + + # source://coderay//lib/coderay/scanners/java_script.rb#229 + def xml_scanner; end +end + +# source://coderay//lib/coderay/scanners/java_script.rb#42 +CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/java_script.rb#36 +CodeRay::Scanners::JavaScript::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# The actual JavaScript keywords. +# +# source://coderay//lib/coderay/scanners/java_script.rb#13 +CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#24 +CodeRay::Scanners::JavaScript::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/java_script.rb#50 +CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java_script.rb#22 +CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#18 +CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#44 +CodeRay::Scanners::JavaScript::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Reserved for future use. +# +# source://coderay//lib/coderay/scanners/java_script.rb#29 +CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/java_script.rb#45 +CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/java_script.rb#43 +CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# Scanner for the Lua[http://lua.org] programming lanuage. +# +# The language’s complete syntax is defined in +# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html], +# which is what this scanner tries to conform to. +# +# source://coderay//lib/coderay/scanners/lua.rb#11 +class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner + protected + + # CodeRay entry hook. Starts parsing. + # + # source://coderay//lib/coderay/scanners/lua.rb#60 + def scan_tokens(encoder, options); end + + # Scanner initialization. + # + # source://coderay//lib/coderay/scanners/lua.rb#54 + def setup; end +end + +# Automatic token kind selection for normal words. +# +# source://coderay//lib/coderay/scanners/lua.rb#46 +CodeRay::Scanners::Lua::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# Keywords used in Lua. +# +# source://coderay//lib/coderay/scanners/lua.rb#18 +CodeRay::Scanners::Lua::KEYWORDS = T.let(T.unsafe(nil), Array) + +# Constants set by the Lua core. +# +# source://coderay//lib/coderay/scanners/lua.rb#25 +CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# The expressions contained in this array are parts of Lua’s `basic' +# library. Although it’s not entirely necessary to load that library, +# it is highly recommended and one would have to provide own implementations +# of some of these expressions if one does not do so. They however aren’t +# keywords, neither are they constants, but nearly predefined, so they +# get tagged as `predefined' rather than anything else. +# +# This list excludes values of form `_UPPERCASE' because the Lua manual +# requires such identifiers to be reserved by Lua anyway and they are +# highlighted directly accordingly, without the need for specific +# identifiers to be listed here. +# +# source://coderay//lib/coderay/scanners/lua.rb#38 +CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array) + +# Scanner for PHP. +# +# Original by Stefan Walk. +# +# source://coderay//lib/coderay/scanners/php.rb#10 +class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/php.rb#23 + def reset_instance; end + + # source://coderay//lib/coderay/scanners/php.rb#234 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/php.rb#19 + def setup; end +end + +# source://coderay//lib/coderay/scanners/php.rb#15 +CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#197 +module CodeRay::Scanners::PHP::RE; end + +# source://coderay//lib/coderay/scanners/php.rb#211 +CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#213 +CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#216 +CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#206 +CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#199 +CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#214 +CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/php.rb#28 +module CodeRay::Scanners::PHP::Words; end + +# according to http://php.net/quickref.php on 2009-04-21; +# all functions with _ excluded (module functions) and selected additional functions +# +# source://coderay//lib/coderay/scanners/php.rb#50 +CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#46 +CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#145 +CodeRay::Scanners::PHP::Words::CONSTANTS = T.let(T.unsafe(nil), Array) + +# TODO: more built-in PHP functions? +# +# source://coderay//lib/coderay/scanners/php.rb#140 +CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#184 +CodeRay::Scanners::PHP::Words::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# according to http://www.php.net/manual/en/reserved.keywords.php +# +# source://coderay//lib/coderay/scanners/php.rb#31 +CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#41 +CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#178 +CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#39 +CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/php.rb#193 +CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# Scanner for Python. Supports Python 3. +# +# Based on pygments' PythonLexer, see +# http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. +# +# source://coderay//lib/coderay/scanners/python.rb#8 +class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/python.rb#103 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/python.rb#86 +CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/python.rb#91 +CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#97 +CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#65 +CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#57 +CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/python.rb#13 +CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#64 +CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#21 +CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#68 +CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/python.rb#37 +CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#25 +CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#52 +CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/python.rb#82 +CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/python.rb#78 +CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/python.rb#66 +CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# = Raydebug Scanner +# +# Highlights the output of the Encoders::Debug encoder. +# +# source://coderay//lib/coderay/scanners/raydebug.rb#9 +class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/raydebug.rb#22 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/raydebug.rb#17 + def setup; end +end + +# This scanner is really complex, since Ruby _is_ a complex language! +# +# It tries to highlight 100% of all common code, +# and 90% of strange codes. +# +# It is optimized for HTML highlighting, and is not very useful for +# parsing or pretty printing. +# +# source://coderay//lib/coderay/scanners/ruby.rb#11 +class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/ruby.rb#19 + def interpreted_string_state; end + + protected + + # source://coderay//lib/coderay/scanners/ruby.rb#29 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/ruby.rb#25 + def setup; end +end + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5 +module CodeRay::Scanners::Ruby::Patterns; end + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72 +CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#106 +CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#55 +CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#96 +CodeRay::Scanners::Ruby::Patterns::CONTROL_META_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#132 +CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#69 +CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#102 +CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#74 +CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#168 +CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_INTERPRETED = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#161 +CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_KIND = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#160 +CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_START = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#76 +CodeRay::Scanners::Ruby::Patterns::FLOAT_OR_INT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#75 +CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#57 +CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#116 +CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#71 +CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#38 +CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#28 +CodeRay::Scanners::Ruby::Patterns::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#54 +CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#7 +CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#151 +CodeRay::Scanners::Ruby::Patterns::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#32 +CodeRay::Scanners::Ruby::Patterns::KEYWORD_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#53 +CodeRay::Scanners::Ruby::Patterns::METHOD_AFTER_DOT = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#40 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#52 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_EX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#41 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OPERATOR = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#87 +CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OR_SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#51 +CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#77 +CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#56 +CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#70 +CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#17 +CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#58 +CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#61 +CodeRay::Scanners::Ruby::Patterns::QUOTE_TO_TYPE = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#67 +CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#126 +CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#138 +CodeRay::Scanners::Ruby::Patterns::RUBYDOC_OR_DATA = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#89 +CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#79 +CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#142 +CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/patterns.rb#59 +CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#8 +class CodeRay::Scanners::Ruby::StringState < ::Struct + # @return [StringState] a new instance of StringState + # + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48 + def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#63 + def heredoc_pattern(delim, interpreted, indented); end + + class << self + # source://coderay//lib/coderay/scanners/ruby/string_state.rb#40 + def simple_key_pattern(delim); end + end +end + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#10 +CodeRay::Scanners::Ruby::StringState::CLOSING_PAREN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/ruby/string_state.rb#17 +CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash) + +# by Josh Goebel +# +# source://coderay//lib/coderay/scanners/sql.rb#5 +class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner + # source://coderay//lib/coderay/scanners/sql.rb#66 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/sql.rb#23 +CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#38 +CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#55 +CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/sql.rb#46 +CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) + +# source://coderay//lib/coderay/scanners/sql.rb#9 +CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#18 +CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#44 +CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#36 +CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#28 +CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/scanners/sql.rb#60 +CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/sql.rb#58 +CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp) + +# source://coderay//lib/coderay/scanners/sql.rb#56 +CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# A scanner for Sass. +# +# source://coderay//lib/coderay/scanners/sass.rb#5 +class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS + protected + + # source://coderay//lib/coderay/scanners/sass.rb#16 + def scan_tokens(encoder, options); end + + # source://coderay//lib/coderay/scanners/sass.rb#12 + def setup; end +end + +# = Scanner +# +# The base class for all Scanners. +# +# It is a subclass of Ruby's great +StringScanner+, which +# makes it easy to access the scanning methods inside. +# +# It is also +Enumerable+, so you can use it like an Array of +# Tokens: +# +# require 'coderay' +# +# c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;" +# +# for text, kind in c_scanner +# puts text if kind == :operator +# end +# +# # prints: (*==)++; +# +# OK, this is a very simple example :) +# You can also use +map+, +any?+, +find+ and even +sort_by+, +# if you want. +# +# source://coderay//lib/coderay/scanners/scanner.rb#29 +class CodeRay::Scanners::Scanner < ::StringScanner + include ::Enumerable + extend ::CodeRay::Plugin + + # Create a new Scanner. + # + # * +code+ is the input String and is handled by the superclass + # StringScanner. + # * +options+ is a Hash with Symbols as keys. + # It is merged with the default options of the class (you can + # overwrite default options here.) + # + # Else, a Tokens object is used. + # + # @return [Scanner] a new instance of Scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#125 + def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end + + # The string in binary encoding. + # + # To be used with #pos, which is the index of the byte the scanner + # will scan next. + # + # source://coderay//lib/coderay/scanners/scanner.rb#218 + def binary_string; end + + # The current column position of the scanner, starting with 1. + # See also: #line. + # + # source://coderay//lib/coderay/scanners/scanner.rb#209 + def column(pos = T.unsafe(nil)); end + + # Traverse the tokens. + # + # source://coderay//lib/coderay/scanners/scanner.rb#192 + def each(&block); end + + # the default file extension for this scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#160 + def file_extension; end + + # the Plugin ID for this scanner + # + # source://coderay//lib/coderay/scanners/scanner.rb#155 + def lang; end + + # The current line position of the scanner, starting with 1. + # See also: #column. + # + # Beware, this is implemented inefficiently. It should be used + # for debugging only. + # + # source://coderay//lib/coderay/scanners/scanner.rb#202 + def line(pos = T.unsafe(nil)); end + + # Sets back the scanner. Subclasses should redefine the reset_instance + # method instead of this one. + # + # source://coderay//lib/coderay/scanners/scanner.rb#142 + def reset; end + + # Returns the value of attribute state. + # + # source://coderay//lib/coderay/scanners/scanner.rb#44 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://coderay//lib/coderay/scanners/scanner.rb#44 + def state=(_arg0); end + + # Set a new string to be scanned. + # + # source://coderay//lib/coderay/scanners/scanner.rb#148 + def string=(code); end + + # Scan the code and returns all tokens in a Tokens object. + # + # source://coderay//lib/coderay/scanners/scanner.rb#165 + def tokenize(source = T.unsafe(nil), options = T.unsafe(nil)); end + + # Cache the result of tokenize. + # + # source://coderay//lib/coderay/scanners/scanner.rb#187 + def tokens; end + + protected + + # Scanner error with additional status information + # + # @raise [ScanError] + # + # source://coderay//lib/coderay/scanners/scanner.rb#314 + def raise_inspect(message, tokens, state = T.unsafe(nil), ambit = T.unsafe(nil), backtrace = T.unsafe(nil)); end + + # source://coderay//lib/coderay/scanners/scanner.rb#289 + def raise_inspect_arguments(message, tokens, state, ambit); end + + # Resets the scanner. + # + # source://coderay//lib/coderay/scanners/scanner.rb#265 + def reset_instance; end + + # Shorthand for scan_until(/\z/). + # This method also avoids a JRuby 1.9 mode bug. + # + # source://coderay//lib/coderay/scanners/scanner.rb#328 + def scan_rest; end + + # This is the central method, and commonly the only one a + # subclass implements. + # + # Subclasses must implement this method; it must return +tokens+ + # and must only use Tokens#<< for storing scanned tokens! + # + # @raise [NotImplementedError] + # + # source://coderay//lib/coderay/scanners/scanner.rb#260 + def scan_tokens(tokens, options); end + + # source://coderay//lib/coderay/scanners/scanner.rb#305 + def scanner_state_info(state); end + + # source://coderay//lib/coderay/scanners/scanner.rb#239 + def set_string_from_source(source); end + + # source://coderay//lib/coderay/scanners/scanner.rb#250 + def set_tokens_from_options(options); end + + # Can be implemented by subclasses to do some initialization + # that has to be done once per instance. + # + # Use reset for initialization that has to be done once per + # scan. + # + # source://coderay//lib/coderay/scanners/scanner.rb#236 + def setup; end + + # source://coderay//lib/coderay/scanners/scanner.rb#322 + def tokens_last(tokens, n); end + + # source://coderay//lib/coderay/scanners/scanner.rb#318 + def tokens_size(tokens); end + + class << self + # The encoding used internally by this scanner. + # + # source://coderay//lib/coderay/scanners/scanner.rb#71 + def encoding(name = T.unsafe(nil)); end + + # The typical filename suffix for this scanner's language. + # + # source://coderay//lib/coderay/scanners/scanner.rb#66 + def file_extension(extension = T.unsafe(nil)); end + + # The lang of this Scanner class, which is equal to its Plugin ID. + # + # source://coderay//lib/coderay/scanners/scanner.rb#76 + def lang; end + + # Normalizes the given code into a string with UNIX newlines, in the + # scanner's internal encoding, with invalid and undefined charachters + # replaced by placeholders. Always returns a new object. + # + # source://coderay//lib/coderay/scanners/scanner.rb#51 + def normalize(code); end + + protected + + # source://coderay//lib/coderay/scanners/scanner.rb#82 + def encode_with_encoding(code, target_encoding); end + + # source://coderay//lib/coderay/scanners/scanner.rb#100 + def guess_encoding(s); end + + # source://coderay//lib/coderay/scanners/scanner.rb#96 + def to_unix(code); end + end +end + +# The default options for all scanner classes. +# +# Define @default_options for subclasses. +# +# source://coderay//lib/coderay/scanners/scanner.rb#40 +CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/scanners/scanner.rb#42 +CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 +CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners + +# source://coderay//lib/coderay/scanners/scanner.rb#299 +CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/scanners/scanner.rb#271 +CodeRay::Scanners::Scanner::SCAN_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# Raised if a Scanner fails while scanning +# +# source://coderay//lib/coderay/scanners/scanner.rb#35 +class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end + +# source://coderay//lib/coderay/scanners/taskpaper.rb#4 +class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/taskpaper.rb#11 + def scan_tokens(encoder, options); end +end + +# Scanner for plain text. +# +# Yields just one token of the kind :plain. +# +# Alias: +plaintext+, +plain+ +# +# source://coderay//lib/coderay/scanners/text.rb#9 +class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/text.rb#18 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/text.rb#14 +CodeRay::Scanners::Text::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) + +# Scanner for XML. +# +# Currently this is the same scanner as Scanners::HTML. +# +# source://coderay//lib/coderay/scanners/xml.rb#9 +class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end + +# Scanner for YAML. +# +# Based on the YAML scanner from Syntax by Jamis Buck. +# +# source://coderay//lib/coderay/scanners/yaml.rb#7 +class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner + protected + + # source://coderay//lib/coderay/scanners/yaml.rb#16 + def scan_tokens(encoder, options); end +end + +# source://coderay//lib/coderay/scanners/yaml.rb#12 +CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol) + +# This module holds the Style class and its subclasses. +# +# See Plugin. +# +# source://coderay//lib/coderay/styles.rb#6 +module CodeRay::Styles + extend ::CodeRay::PluginHost +end + +# A colorful theme using CSS 3 colors (with alpha channel). +# +# source://coderay//lib/coderay/styles/alpha.rb#5 +class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end + +# source://coderay//lib/coderay/styles/alpha.rb#14 +CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String) + +# source://coderay//lib/coderay/styles/alpha.rb#53 +CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String) + +# Base class for styles. +# +# Styles are used by Encoders::HTML to colorize tokens. +# +# source://coderay//lib/coderay/styles/style.rb#8 +class CodeRay::Styles::Style + extend ::CodeRay::Plugin +end + +# source://coderay//lib/coderay/styles/style.rb#12 +CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://coderay//lib/coderay/helpers/plugin.rb#41 +CodeRay::Styles::Style::PLUGIN_HOST = CodeRay::Styles + +# A Hash of all known token kinds and their associated CSS classes. +# +# source://coderay//lib/coderay/token_kinds.rb#4 +CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash) + +# The Tokens class represents a list of tokens returned from +# a Scanner. It's actually just an Array with a few helper methods. +# +# A token itself is not a special object, just two elements in an Array: +# * the _token_ _text_ (the original source of the token in a String) or +# a _token_ _action_ (begin_group, end_group, begin_line, end_line) +# * the _token_ _kind_ (a Symbol representing the type of the token) +# +# It looks like this: +# +# ..., '# It looks like this', :comment, ... +# ..., '3.1415926', :float, ... +# ..., '$^', :error, ... +# +# Some scanners also yield sub-tokens, represented by special +# token actions, for example :begin_group and :end_group. +# +# The Ruby scanner, for example, splits "a string" into: +# +# [ +# :begin_group, :string, +# '"', :delimiter, +# 'a string', :content, +# '"', :delimiter, +# :end_group, :string +# ] +# +# Tokens can be used to save the output of a Scanners in a simple +# Ruby object that can be send to an Encoder later: +# +# tokens = CodeRay.scan('price = 2.59', :ruby).tokens +# tokens.encode(:html) +# tokens.html +# CodeRay.encoder(:html).encode_tokens(tokens) +# +# Tokens gives you the power to handle pre-scanned code very easily: +# You can serialize it to a JSON string and store it in a database, pass it +# around to encode it more than once, send it to other algorithms... +# +# source://coderay//lib/coderay/tokens.rb#41 +class CodeRay::Tokens < ::Array + # source://coderay//lib/coderay/tokens.rb#156 + def begin_group(kind); end + + # source://coderay//lib/coderay/tokens.rb#158 + def begin_line(kind); end + + # Return the actual number of tokens. + # + # source://coderay//lib/coderay/tokens.rb#151 + def count; end + + # Encode the tokens using encoder. + # + # encoder can be + # * a plugin name like :html oder 'statistic' + # * an Encoder object + # + # options are passed to the encoder. + # + # source://coderay//lib/coderay/tokens.rb#56 + def encode(encoder, options = T.unsafe(nil)); end + + # source://coderay//lib/coderay/tokens.rb#157 + def end_group(kind); end + + # source://coderay//lib/coderay/tokens.rb#159 + def end_line(kind); end + + # Redirects unknown methods to encoder calls. + # + # For example, if you call +tokens.html+, the HTML encoder + # is used to highlight the tokens. + # + # source://coderay//lib/coderay/tokens.rb#70 + def method_missing(meth, options = T.unsafe(nil)); end + + # The Scanner instance that created the tokens. + # + # source://coderay//lib/coderay/tokens.rb#47 + def scanner; end + + # The Scanner instance that created the tokens. + # + # source://coderay//lib/coderay/tokens.rb#47 + def scanner=(_arg0); end + + # Split the tokens into parts of the given +sizes+. + # + # The result will be an Array of Tokens objects. The parts have + # the text size specified by the parameter. In addition, each + # part closes all opened tokens. This is useful to insert tokens + # betweem them. + # + # This method is used by @Scanner#tokenize@ when called with an Array + # of source strings. The Diff encoder uses it for inline highlighting. + # + # source://coderay//lib/coderay/tokens.rb#85 + def split_into_parts(*sizes); end + + # source://coderay//lib/coderay/tokens.rb#155 + def text_token(*_arg0); end + + # Turn tokens into a string by concatenating them. + # + # source://coderay//lib/coderay/tokens.rb#62 + def to_s; end + + # source://coderay//lib/coderay/tokens.rb#160 + def tokens(*_arg0); end +end + +# The result of a scan operation is a TokensProxy, but should act like Tokens. +# +# This proxy makes it possible to use the classic CodeRay.scan.encode API +# while still providing the benefits of direct streaming. +# +# source://coderay//lib/coderay/tokens_proxy.rb#7 +class CodeRay::TokensProxy + # Create a new TokensProxy with the arguments of CodeRay.scan. + # + # @return [TokensProxy] a new instance of TokensProxy + # + # source://coderay//lib/coderay/tokens_proxy.rb#12 + def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end + + # Returns the value of attribute block. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def block=(_arg0); end + + # Overwrite Struct#each. + # + # source://coderay//lib/coderay/tokens_proxy.rb#48 + def each(*args, &blk); end + + # Call CodeRay.encode if +encoder+ is a Symbol; + # otherwise, convert the receiver to tokens and call encoder.encode_tokens. + # + # source://coderay//lib/coderay/tokens_proxy.rb#21 + def encode(encoder, options = T.unsafe(nil)); end + + # Returns the value of attribute input. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def input; end + + # Sets the attribute input + # + # @param value the value to set the attribute input to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def input=(_arg0); end + + # Returns the value of attribute lang. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def lang; end + + # Sets the attribute lang + # + # @param value the value to set the attribute lang to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def lang=(_arg0); end + + # Tries to call encode; + # delegates to tokens otherwise. + # + # source://coderay//lib/coderay/tokens_proxy.rb#31 + def method_missing(method, *args, &blk); end + + # Returns the value of attribute options. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://coderay//lib/coderay/tokens_proxy.rb#9 + def options=(_arg0); end + + # A (cached) scanner instance to use for the scan task. + # + # source://coderay//lib/coderay/tokens_proxy.rb#43 + def scanner; end + + # The (cached) result of the tokenized input; a Tokens instance. + # + # source://coderay//lib/coderay/tokens_proxy.rb#38 + def tokens; end +end + +# source://coderay//lib/coderay/version.rb#2 +CodeRay::VERSION = T.let(T.unsafe(nil), String) + +# = WordList +# +# A Hash subclass designed for mapping word lists to token types. +# +# A WordList is a Hash with some additional features. +# It is intended to be used for keyword recognition. +# +# WordList is optimized to be used in Scanners, +# typically to decide whether a given ident is a special token. +# +# For case insensitive words use WordList::CaseIgnoring. +# +# Example: +# +# # define word arrays +# RESERVED_WORDS = %w[ +# asm break case continue default do else +# ] +# +# PREDEFINED_TYPES = %w[ +# int long short char void +# ] +# +# # make a WordList +# IDENT_KIND = WordList.new(:ident). +# add(RESERVED_WORDS, :reserved). +# add(PREDEFINED_TYPES, :predefined_type) +# +# ... +# +# def scan_tokens tokens, options +# ... +# +# elsif scan(/[A-Za-z_][A-Za-z_0-9]*/) +# # use it +# kind = IDENT_KIND[match] +# ... +# +# source://coderay//lib/coderay/helpers/word_list.rb#40 +class CodeRay::WordList < ::Hash + # Create a new WordList with +default+ as default value. + # + # @return [WordList] a new instance of WordList + # + # source://coderay//lib/coderay/helpers/word_list.rb#43 + def initialize(default = T.unsafe(nil)); end + + # Add words to the list and associate them with +value+. + # + # Returns +self+, so you can concat add calls. + # + # source://coderay//lib/coderay/helpers/word_list.rb#50 + def add(words, value = T.unsafe(nil)); end +end + +# A CaseIgnoring WordList is like a WordList, only that +# keys are compared case-insensitively (normalizing keys using +downcase+). +# +# source://coderay//lib/coderay/helpers/word_list.rb#60 +class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList + # source://coderay//lib/coderay/helpers/word_list.rb#62 + def [](key); end + + # source://coderay//lib/coderay/helpers/word_list.rb#66 + def []=(key, value); end +end diff --git a/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi b/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi deleted file mode 100644 index 56979c3..0000000 --- a/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +++ /dev/null @@ -1,2396 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `concurrent-ruby` gem. -# Please instead update this file by running `bin/tapioca gem concurrent-ruby`. - -module Concurrent - extend ::Concurrent::Utility::EngineDetector - extend ::Concurrent::Utility::NativeExtensionLoader - extend ::Logger::Severity - extend ::Concurrent::Concern::Logging - extend ::Concurrent::Concern::Deprecation - - private - - def abort_transaction; end - def atomically; end - def call_dataflow(method, executor, *inputs, &block); end - def dataflow(*inputs, &block); end - def dataflow!(*inputs, &block); end - def dataflow_with(executor, *inputs, &block); end - def dataflow_with!(executor, *inputs, &block); end - def leave_transaction; end - def monotonic_time(unit = T.unsafe(nil)); end - - class << self - def abort_transaction; end - def atomically; end - def call_dataflow(method, executor, *inputs, &block); end - def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - def dataflow(*inputs, &block); end - def dataflow!(*inputs, &block); end - def dataflow_with(executor, *inputs, &block); end - def dataflow_with!(executor, *inputs, &block); end - def disable_at_exit_handlers!; end - def executor(executor_identifier); end - def global_fast_executor; end - def global_immediate_executor; end - def global_io_executor; end - def global_logger; end - def global_logger=(value); end - def global_timer_set; end - def leave_transaction; end - def monotonic_time(unit = T.unsafe(nil)); end - def new_fast_executor(opts = T.unsafe(nil)); end - def new_io_executor(opts = T.unsafe(nil)); end - def physical_processor_count; end - def processor_count; end - def processor_counter; end - def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end - end -end - -class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object - def initialize; end - - def exchange(value, timeout = T.unsafe(nil)); end - def exchange!(value, timeout = T.unsafe(nil)); end - def try_exchange(value, timeout = T.unsafe(nil)); end - - private - - def do_exchange(value, timeout); end -end - -Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) - -class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject - include ::Logger::Severity - include ::Concurrent::Concern::Logging - include ::Concurrent::ExecutorService - include ::Concurrent::Concern::Deprecation - - def initialize(opts = T.unsafe(nil), &block); end - - def auto_terminate=(value); end - def auto_terminate?; end - def fallback_policy; end - def kill; end - def name; end - def running?; end - def shutdown; end - def shutdown?; end - def shuttingdown?; end - def to_s; end - def wait_for_termination(timeout = T.unsafe(nil)); end - - private - - def fallback_action(*args); end - def ns_auto_terminate?; end - def ns_execute(*args, &task); end - def ns_kill_execution; end - def ns_shutdown_execution; end -end - -Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) - -class Concurrent::AbstractThreadLocalVar - def initialize(default = T.unsafe(nil), &default_block); end - - def bind(value, &block); end - def value; end - def value=(value); end - - protected - - def allocate_storage; end - def default; end -end - -class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Observable - - def initialize(initial, opts = T.unsafe(nil)); end - - def <<(action); end - def await; end - def await_for(timeout); end - def await_for!(timeout); end - def deref; end - def error; end - def error_mode; end - def failed?; end - def post(*args, &action); end - def reason; end - def restart(new_value, opts = T.unsafe(nil)); end - def send(*args, &action); end - def send!(*args, &action); end - def send_off(*args, &action); end - def send_off!(*args, &action); end - def send_via(executor, *args, &action); end - def send_via!(executor, *args, &action); end - def stopped?; end - def value; end - def wait(timeout = T.unsafe(nil)); end - - private - - def enqueue_action_job(action, args, executor); end - def enqueue_await_job(latch); end - def execute_next_job; end - def handle_error(error); end - def ns_enqueue_job(job, index = T.unsafe(nil)); end - def ns_find_last_job_for_thread; end - def ns_initialize(initial, opts); end - def ns_post_next_job; end - def ns_validate(value); end - - class << self - def await(*agents); end - def await_for(timeout, *agents); end - def await_for!(timeout, *agents); end - end -end - -Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) -Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) -Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) -Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) -Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) - -class Concurrent::Agent::Error < ::StandardError - def initialize(message = T.unsafe(nil)); end -end - -class Concurrent::Agent::Job < ::Struct - def action; end - def action=(_); end - def args; end - def args=(_); end - def caller; end - def caller=(_); end - def executor; end - def executor=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error - def initialize(message = T.unsafe(nil)); end -end - -class Concurrent::Array < ::Array; end -Concurrent::ArrayImplementation = Array - -module Concurrent::Async - mixes_in_class_methods ::Concurrent::Async::ClassMethods - - def async; end - def await; end - def call; end - def cast; end - def init_synchronization; end - - class << self - def included(base); end - def validate_argc(obj, method, *args); end - end -end - -class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject - def initialize(delegate); end - - def method_missing(method, *args, &block); end - def perform; end - def reset_if_forked; end - - private - - def respond_to_missing?(method, include_private = T.unsafe(nil)); end -end - -class Concurrent::Async::AwaitDelegator - def initialize(delegate); end - - def method_missing(method, *args, &block); end - - private - - def respond_to_missing?(method, include_private = T.unsafe(nil)); end -end - -module Concurrent::Async::ClassMethods - def new(*args, &block); end -end - -class Concurrent::Atom < ::Concurrent::Synchronization::Object - include ::Concurrent::Concern::Observable - - def initialize(value, opts = T.unsafe(nil)); end - - def __initialize_atomic_fields__; end - def compare_and_set(old_value, new_value); end - def deref; end - def reset(new_value); end - def swap(*args); end - def value; end - - private - - def compare_and_set_value(expected, value); end - def swap_value(value); end - def update_value(&block); end - def valid?(new_value); end - def value=(value); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean - def inspect; end - def to_s; end -end - -Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean - -module Concurrent::AtomicDirectUpdate - def try_update; end - def try_update!; end - def update; end -end - -class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum - def inspect; end - def to_s; end -end - -Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum - -class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object - def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end - - def __initialize_atomic_fields__; end - def compare_and_set(expected_val, new_val, expected_mark, new_mark); end - def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end - def get; end - def mark; end - def marked?; end - def set(new_val, new_mark); end - def try_update; end - def try_update!; end - def update; end - def value; end - - private - - def compare_and_set_reference(expected, value); end - def immutable_array(*args); end - def reference; end - def reference=(value); end - def swap_reference(value); end - def update_reference(&block); end - - class << self - def new(*args, &block); end - end -end - -module Concurrent::AtomicNumericCompareAndSetWrapper - def compare_and_set(old_value, new_value); end -end - -class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference - def inspect; end - def to_s; end -end - -Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference - -class Concurrent::CRubySet < ::Set - def initialize(*args, &block); end - - def &(*args); end - def +(*args); end - def -(*args); end - def <(*args); end - def <<(*args); end - def <=(*args); end - def ==(*args); end - def ===(*args); end - def >(*args); end - def >=(*args); end - def ^(*args); end - def add(*args); end - def add?(*args); end - def classify(*args); end - def clear(*args); end - def collect!(*args); end - def compare_by_identity(*args); end - def compare_by_identity?(*args); end - def delete(*args); end - def delete?(*args); end - def delete_if(*args); end - def difference(*args); end - def disjoint?(*args); end - def divide(*args); end - def each(*args); end - def empty?(*args); end - def eql?(*args); end - def filter!(*args); end - def flatten(*args); end - def flatten!(*args); end - def flatten_merge(*args); end - def freeze(*args); end - def hash(*args); end - def include?(*args); end - def inspect(*args); end - def intersect?(*args); end - def intersection(*args); end - def keep_if(*args); end - def length(*args); end - def map!(*args); end - def member?(*args); end - def merge(*args); end - def pretty_print(*args); end - def pretty_print_cycle(*args); end - def proper_subset?(*args); end - def proper_superset?(*args); end - def reject!(*args); end - def replace(*args); end - def reset(*args); end - def select!(*args); end - def size(*args); end - def subset?(*args); end - def subtract(*args); end - def superset?(*args); end - def to_a(*args); end - def to_s(*args); end - def to_set(*args); end - def union(*args); end - def |(*args); end - - private - - def initialize_copy(other); end -end - -class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor - def initialize(opts = T.unsafe(nil)); end - - private - - def ns_initialize(opts); end -end - -class Concurrent::CancelledOperationError < ::Concurrent::Error; end -module Concurrent::Collection; end - -class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject - def initialize; end - - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - def count_observers; end - def delete_observer(observer); end - def delete_observers; end - def notify_and_delete_observers(*args, &block); end - def notify_observers(*args, &block); end - - protected - - def ns_initialize; end - - private - - def duplicate_and_clear_observers; end - def duplicate_observers; end - def notify_to(observers, *args); end -end - -class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject - def initialize; end - - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - def count_observers; end - def delete_observer(observer); end - def delete_observers; end - def notify_and_delete_observers(*args, &block); end - def notify_observers(*args, &block); end - - protected - - def ns_initialize; end - - private - - def clear_observers_and_return_old; end - def notify_to(observers, *args); end - def observers; end - def observers=(new_set); end -end - -Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend - -class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend - def initialize(options = T.unsafe(nil)); end - - def []=(key, value); end - def clear; end - def compute(key); end - def compute_if_absent(key); end - def compute_if_present(key); end - def delete(key); end - def delete_pair(key, value); end - def get_and_set(key, value); end - def merge_pair(key, value); end - def replace_if_exists(key, new_value); end - def replace_pair(key, old_value, new_value); end -end - -class Concurrent::Collection::NonConcurrentMapBackend - def initialize(options = T.unsafe(nil)); end - - def [](key); end - def []=(key, value); end - def clear; end - def compute(key); end - def compute_if_absent(key); end - def compute_if_present(key); end - def delete(key); end - def delete_pair(key, value); end - def each_pair; end - def get_and_set(key, value); end - def get_or_default(key, default_value); end - def key?(key); end - def merge_pair(key, value); end - def replace_if_exists(key, new_value); end - def replace_pair(key, old_value, new_value); end - def size; end - - private - - def _get(key); end - def _set(key, value); end - def dupped_backend; end - def initialize_copy(other); end - def pair?(key, expected_value); end - def store_computed_value(key, new_value); end -end - -class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue - def <<(item); end - def deq; end - def enq(item); end - def has_priority?(item); end - def shift; end - def size; end -end - -Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue - -class Concurrent::Collection::RubyNonConcurrentPriorityQueue - def initialize(opts = T.unsafe(nil)); end - - def <<(item); end - def clear; end - def delete(item); end - def deq; end - def empty?; end - def enq(item); end - def has_priority?(item); end - def include?(item); end - def length; end - def peek; end - def pop; end - def push(item); end - def shift; end - def size; end - - private - - def ordered?(x, y); end - def sink(k); end - def swap(x, y); end - def swim(k); end - - class << self - def from_list(list, opts = T.unsafe(nil)); end - end -end - -module Concurrent::Concern; end - -module Concurrent::Concern::Deprecation - include ::Logger::Severity - include ::Concurrent::Concern::Logging - extend ::Logger::Severity - extend ::Concurrent::Concern::Logging - extend ::Concurrent::Concern::Deprecation - - def deprecated(message, strip = T.unsafe(nil)); end - def deprecated_method(old_name, new_name); end -end - -module Concurrent::Concern::Dereferenceable - def deref; end - def value; end - - protected - - def apply_deref_options(value); end - def ns_set_deref_options(opts); end - def set_deref_options(opts = T.unsafe(nil)); end - def value=(value); end -end - -module Concurrent::Concern::Logging - include ::Logger::Severity - - def log(level, progname, message = T.unsafe(nil), &block); end -end - -module Concurrent::Concern::Obligation - include ::Concurrent::Concern::Dereferenceable - - def complete?; end - def exception(*args); end - def fulfilled?; end - def incomplete?; end - def no_error!(timeout = T.unsafe(nil)); end - def pending?; end - def realized?; end - def reason; end - def rejected?; end - def state; end - def unscheduled?; end - def value(timeout = T.unsafe(nil)); end - def value!(timeout = T.unsafe(nil)); end - def wait(timeout = T.unsafe(nil)); end - def wait!(timeout = T.unsafe(nil)); end - - protected - - def compare_and_set_state(next_state, *expected_current); end - def event; end - def get_arguments_from(opts = T.unsafe(nil)); end - def if_state(*expected_states); end - def init_obligation; end - def ns_check_state?(expected); end - def ns_set_state(value); end - def set_state(success, value, reason); end - def state=(value); end -end - -module Concurrent::Concern::Observable - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - def count_observers; end - def delete_observer(observer); end - def delete_observers; end - def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - - protected - - def observers; end - def observers=(_arg0); end -end - -class Concurrent::ConcurrentUpdateError < ::ThreadError; end -Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) -class Concurrent::ConfigurationError < ::Concurrent::Error; end -class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end -Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch - -class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject - def initialize(parties, &block); end - - def broken?; end - def number_waiting; end - def parties; end - def reset; end - def wait(timeout = T.unsafe(nil)); end - - protected - - def ns_generation_done(generation, status, continue = T.unsafe(nil)); end - def ns_initialize(parties, &block); end - def ns_next_generation; end -end - -class Concurrent::CyclicBarrier::Generation < ::Struct - def status; end - def status=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Dereferenceable - include ::Concurrent::Concern::Obligation - - def initialize(opts = T.unsafe(nil), &block); end - - def reconfigure(&block); end - def value(timeout = T.unsafe(nil)); end - def value!(timeout = T.unsafe(nil)); end - def wait(timeout = T.unsafe(nil)); end - - protected - - def ns_initialize(opts, &block); end - - private - - def execute_task_once; end -end - -class Concurrent::DependencyCounter - def initialize(count, &block); end - - def update(time, value, reason); end -end - -class Concurrent::Error < ::StandardError; end - -class Concurrent::Event < ::Concurrent::Synchronization::LockableObject - def initialize; end - - def reset; end - def set; end - def set?; end - def try?; end - def wait(timeout = T.unsafe(nil)); end - - protected - - def ns_initialize; end - def ns_set; end -end - -class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end -Concurrent::ExchangerImplementation = Concurrent::RubyExchanger - -module Concurrent::ExecutorService - include ::Logger::Severity - include ::Concurrent::Concern::Logging - - def <<(task); end - def can_overflow?; end - def post(*args, &task); end - def serialized?; end -end - -class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor - def initialize(num_threads, opts = T.unsafe(nil)); end -end - -class Concurrent::Future < ::Concurrent::IVar - def initialize(opts = T.unsafe(nil), &block); end - - def cancel; end - def cancelled?; end - def execute; end - def set(value = T.unsafe(nil), &block); end - def wait_or_cancel(timeout); end - - protected - - def ns_initialize(value, opts); end - - class << self - def execute(opts = T.unsafe(nil), &block); end - end -end - -Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) -Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) -Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) -Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) -Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) -class Concurrent::Hash < ::Hash; end -Concurrent::HashImplementation = Hash - -class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::Concern::Dereferenceable - include ::Concurrent::Concern::Obligation - include ::Concurrent::Concern::Observable - - def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end - - def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end - def fail(reason = T.unsafe(nil)); end - def set(value = T.unsafe(nil)); end - def try_set(value = T.unsafe(nil), &block); end - - protected - - def check_for_block_or_value!(block_given, value); end - def complete(success, value, reason); end - def complete_without_notification(success, value, reason); end - def notify_observers(value, reason); end - def ns_complete_without_notification(success, value, reason); end - def ns_initialize(value, opts); end - def safe_execute(task, args = T.unsafe(nil)); end -end - -class Concurrent::IllegalOperationError < ::Concurrent::Error; end - -class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService - include ::Concurrent::SerialExecutorService - - def initialize; end - - def <<(task); end - def kill; end - def post(*args, &task); end - def running?; end - def shutdown; end - def shutdown?; end - def shuttingdown?; end - def wait_for_termination(timeout = T.unsafe(nil)); end -end - -class Concurrent::ImmutabilityError < ::Concurrent::Error; end - -module Concurrent::ImmutableStruct - include ::Concurrent::Synchronization::AbstractStruct - - def ==(other); end - def [](member); end - def each(&block); end - def each_pair(&block); end - def inspect; end - def merge(other, &block); end - def select(&block); end - def to_a; end - def to_h; end - def to_s; end - def values; end - def values_at(*indexes); end - - private - - def initialize_copy(original); end - - class << self - def included(base); end - def new(*args, &block); end - end -end - -Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) - -class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor - def initialize; end - - def post(*args, &task); end -end - -class Concurrent::InitializationError < ::Concurrent::Error; end -class Concurrent::LifecycleError < ::Concurrent::Error; end - -class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object - include ::Enumerable - - def initialize(head = T.unsafe(nil)); end - - def __initialize_atomic_fields__; end - def clear; end - def clear_each(&block); end - def clear_if(head); end - def compare_and_clear(head); end - def compare_and_pop(head); end - def compare_and_push(head, value); end - def each(head = T.unsafe(nil)); end - def empty?(head = T.unsafe(nil)); end - def inspect; end - def peek; end - def pop; end - def push(value); end - def replace_if(head, new_head); end - def to_s; end - - private - - def compare_and_set_head(expected, value); end - def head; end - def head=(value); end - def swap_head(value); end - def update_head(&block); end - - class << self - def new(*args, &block); end - def of1(value); end - def of2(value1, value2); end - end -end - -Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) - -class Concurrent::LockFreeStack::Node - def initialize(value, next_node); end - - def next_node; end - def value; end - def value=(_arg0); end - - class << self - def [](*_arg0); end - end -end - -class Concurrent::MVar < ::Concurrent::Synchronization::Object - include ::Concurrent::Concern::Dereferenceable - - def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end - - def borrow(timeout = T.unsafe(nil)); end - def empty?; end - def full?; end - def modify(timeout = T.unsafe(nil)); end - def modify!; end - def put(value, timeout = T.unsafe(nil)); end - def set!(value); end - def take(timeout = T.unsafe(nil)); end - def try_put!(value); end - def try_take!; end - - protected - - def synchronize(&block); end - - private - - def unlocked_empty?; end - def unlocked_full?; end - def wait_for_empty(timeout); end - def wait_for_full(timeout); end - def wait_while(condition, timeout); end - - class << self - def new(*args, &block); end - end -end - -Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) -Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) - -class Concurrent::Map < ::Concurrent::Collection::MriMapBackend - def initialize(options = T.unsafe(nil), &block); end - - def [](key); end - def []=(key, value); end - def each; end - def each_key; end - def each_pair; end - def each_value; end - def empty?; end - def fetch(key, default_value = T.unsafe(nil)); end - def fetch_or_store(key, default_value = T.unsafe(nil)); end - def get(key); end - def inspect; end - def key(value); end - def keys; end - def marshal_dump; end - def marshal_load(hash); end - def put(key, value); end - def put_if_absent(key, value); end - def value?(value); end - def values; end - - private - - def initialize_copy(other); end - def populate_from(hash); end - def raise_fetch_no_key; end - def validate_options_hash!(options); end -end - -class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end - -class Concurrent::Maybe < ::Concurrent::Synchronization::Object - include ::Comparable - - def initialize(just, nothing); end - - def <=>(other); end - def fulfilled?; end - def just; end - def just?; end - def nothing; end - def nothing?; end - def or(other); end - def reason; end - def rejected?; end - def value; end - - class << self - def from(*args); end - def just(value); end - def nothing(error = T.unsafe(nil)); end - - private - - def new(*args, &block); end - end -end - -Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) - -class Concurrent::MultipleAssignmentError < ::Concurrent::Error - def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end - - def inspect; end - def inspection_data; end -end - -class Concurrent::MultipleErrors < ::Concurrent::Error - def initialize(errors, message = T.unsafe(nil)); end - - def errors; end -end - -module Concurrent::MutableStruct - include ::Concurrent::Synchronization::AbstractStruct - - def ==(other); end - def [](member); end - def []=(member, value); end - def each(&block); end - def each_pair(&block); end - def inspect; end - def merge(other, &block); end - def select(&block); end - def to_a; end - def to_h; end - def to_s; end - def values; end - def values_at(*indexes); end - - private - - def initialize_copy(original); end - - class << self - def new(*args, &block); end - end -end - -Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) - -class Concurrent::MutexAtomicBoolean < ::Concurrent::Synchronization::LockableObject - def initialize(initial = T.unsafe(nil)); end - - def false?; end - def make_false; end - def make_true; end - def true?; end - def value; end - def value=(value); end - - protected - - def ns_initialize(initial); end - - private - - def ns_make_value(value); end -end - -class Concurrent::MutexAtomicFixnum < ::Concurrent::Synchronization::LockableObject - def initialize(initial = T.unsafe(nil)); end - - def compare_and_set(expect, update); end - def decrement(delta = T.unsafe(nil)); end - def down(delta = T.unsafe(nil)); end - def increment(delta = T.unsafe(nil)); end - def up(delta = T.unsafe(nil)); end - def update; end - def value; end - def value=(value); end - - protected - - def ns_initialize(initial); end - - private - - def ns_set(value); end -end - -class Concurrent::MutexAtomicReference < ::Concurrent::Synchronization::LockableObject - include ::Concurrent::AtomicDirectUpdate - include ::Concurrent::AtomicNumericCompareAndSetWrapper - - def initialize(value = T.unsafe(nil)); end - - def _compare_and_set(old_value, new_value); end - def compare_and_swap(old_value, new_value); end - def get; end - def get_and_set(new_value); end - def set(new_value); end - def swap(new_value); end - def value; end - def value=(new_value); end - - protected - - def ns_initialize(value); end -end - -class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject - def initialize(count = T.unsafe(nil)); end - - def count; end - def count_down; end - def wait(timeout = T.unsafe(nil)); end - - protected - - def ns_initialize(count); end -end - -class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject - def initialize(count); end - - def acquire(permits = T.unsafe(nil)); end - def available_permits; end - def drain_permits; end - def reduce_permits(reduction); end - def release(permits = T.unsafe(nil)); end - def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end - - protected - - def ns_initialize(count); end - - private - - def try_acquire_now(permits); end - def try_acquire_timed(permits, timeout); end -end - -Concurrent::NULL = T.let(T.unsafe(nil), Object) -Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) - -module Concurrent::Options - class << self - def executor(executor_identifier); end - def executor_from_options(opts = T.unsafe(nil)); end - end -end - -class Concurrent::Promise < ::Concurrent::IVar - def initialize(opts = T.unsafe(nil), &block); end - - def catch(&block); end - def execute; end - def fail(reason = T.unsafe(nil)); end - def flat_map(&block); end - def on_error(&block); end - def on_success(&block); end - def rescue(&block); end - def set(value = T.unsafe(nil), &block); end - def then(*args, &block); end - def zip(*others); end - - protected - - def complete(success, value, reason); end - def notify_child(child); end - def ns_initialize(value, opts); end - def on_fulfill(result); end - def on_reject(reason); end - def realize(task); end - def root?; end - def set_pending; end - def set_state!(success, value, reason); end - def synchronized_set_state!(success, value, reason); end - - class << self - def aggregate(method, *promises); end - def all?(*promises); end - def any?(*promises); end - def execute(opts = T.unsafe(nil), &block); end - def fulfill(value, opts = T.unsafe(nil)); end - def reject(reason, opts = T.unsafe(nil)); end - def zip(*promises); end - end -end - -class Concurrent::PromiseExecutionError < ::StandardError; end - -module Concurrent::Promises - extend ::Concurrent::Promises::FactoryMethods::Configuration - extend ::Concurrent::Promises::FactoryMethods -end - -class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end - -class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object - include ::Concurrent::Promises::InternalStates - - def initialize(promise, default_executor); end - - def __initialize_atomic_fields__; end - def add_callback_clear_delayed_node(node); end - def add_callback_notify_blocked(promise, index); end - def blocks; end - def callbacks; end - def chain(*args, &task); end - def chain_on(executor, *args, &task); end - def chain_resolvable(resolvable); end - def default_executor; end - def inspect; end - def internal_state; end - def on_resolution(*args, &callback); end - def on_resolution!(*args, &callback); end - def on_resolution_using(executor, *args, &callback); end - def pending?; end - def promise; end - def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - def resolved?; end - def state; end - def tangle(resolvable); end - def to_s; end - def touch; end - def touched?; end - def wait(timeout = T.unsafe(nil)); end - def waiting_threads; end - def with_default_executor(executor); end - def with_hidden_resolvable; end - - private - - def add_callback(method, *args); end - def async_callback_on_resolution(state, executor, args, callback); end - def call_callback(method, state, args); end - def call_callbacks(state); end - def callback_clear_delayed_node(state, node); end - def callback_notify_blocked(state, promise, index); end - def compare_and_set_internal_state(expected, value); end - def internal_state=(value); end - def swap_internal_state(value); end - def update_internal_state(&block); end - def wait_until_resolved(timeout); end - def with_async(executor, *args, &block); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed_because, blockers_count, event_or_future); end - - def touch; end - - private - - def add_delayed_of(future); end - def on_resolvable(resolved_future, index); end - def resolvable?(countdown, future, index); end - def touched?; end -end - -class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object - include ::Concurrent::Promises::InternalStates - - def initialize(future); end - - def default_executor; end - def delayed_because; end - def event; end - def future; end - def inspect; end - def state; end - def to_s; end - def touch; end - - private - - def evaluate_to(*args, block); end - def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise - private - - def resolvable?(countdown, future, index); end -end - -class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end - def resolvable?(countdown, future, index); end -end - -class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end - def resolvable?(countdown, future, index); end -end - -class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise - def initialize(delayed, blockers_count, future); end - - def blocked_by; end - def delayed_because; end - def on_blocker_resolution(future, index); end - def touch; end - - private - - def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end - def on_resolvable(resolved_future, index); end - def process_on_blocker_resolution(future, index); end - def resolvable?(countdown, future, index); end - - class << self - def add_delayed(delayed1, delayed2); end - def new_blocked_by(blockers, *args, &block); end - def new_blocked_by1(blocker, *args, &block); end - def new_blocked_by2(blocker1, blocker2, *args, &block); end - end -end - -class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - - def executor; end -end - -class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise - private - - def on_resolvable(resolved_future, index); end -end - -class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise - def initialize(default_executor); end - - def delayed_because; end - def touch; end -end - -class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture - def &(other); end - def any(event_or_future); end - def delay; end - def schedule(intended_time); end - def then(*args, &task); end - def to_event; end - def to_future; end - def with_default_executor(executor); end - def zip(other); end - def |(event_or_future); end - - private - - def callback_on_resolution(state, args, callback); end - def rejected_resolution(raise_on_reassign, state); end -end - -class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end -end - -module Concurrent::Promises::FactoryMethods - include ::Concurrent::Promises::FactoryMethods::Configuration - extend ::Concurrent::ReInclude - extend ::Concurrent::Promises::FactoryMethods - extend ::Concurrent::Promises::FactoryMethods::Configuration - - def any(*futures_and_or_events); end - def any_event(*futures_and_or_events); end - def any_event_on(default_executor, *futures_and_or_events); end - def any_fulfilled_future(*futures_and_or_events); end - def any_fulfilled_future_on(default_executor, *futures_and_or_events); end - def any_resolved_future(*futures_and_or_events); end - def any_resolved_future_on(default_executor, *futures_and_or_events); end - def delay(*args, &task); end - def delay_on(default_executor, *args, &task); end - def fulfilled_future(value, default_executor = T.unsafe(nil)); end - def future(*args, &task); end - def future_on(default_executor, *args, &task); end - def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end - def rejected_future(reason, default_executor = T.unsafe(nil)); end - def resolvable_event; end - def resolvable_event_on(default_executor = T.unsafe(nil)); end - def resolvable_future; end - def resolvable_future_on(default_executor = T.unsafe(nil)); end - def resolved_event(default_executor = T.unsafe(nil)); end - def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end - def schedule(intended_time, *args, &task); end - def schedule_on(default_executor, intended_time, *args, &task); end - def zip(*futures_and_or_events); end - def zip_events(*futures_and_or_events); end - def zip_events_on(default_executor, *futures_and_or_events); end - def zip_futures(*futures_and_or_events); end - def zip_futures_on(default_executor, *futures_and_or_events); end -end - -module Concurrent::Promises::FactoryMethods::Configuration - def default_executor; end -end - -class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def process_on_blocker_resolution(future, index); end -end - -class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise - def initialize(delayed, blockers_count, levels, default_executor); end - - private - - def process_on_blocker_resolution(future, index); end -end - -class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture - def &(other); end - def any(event_or_future); end - def apply(args, block); end - def delay; end - def exception(*args); end - def flat(level = T.unsafe(nil)); end - def flat_event; end - def flat_future(level = T.unsafe(nil)); end - def fulfilled?; end - def inspect; end - def on_fulfillment(*args, &callback); end - def on_fulfillment!(*args, &callback); end - def on_fulfillment_using(executor, *args, &callback); end - def on_rejection(*args, &callback); end - def on_rejection!(*args, &callback); end - def on_rejection_using(executor, *args, &callback); end - def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - def rejected?; end - def rescue(*args, &task); end - def rescue_on(executor, *args, &task); end - def result(timeout = T.unsafe(nil)); end - def run(run_test = T.unsafe(nil)); end - def schedule(intended_time); end - def then(*args, &task); end - def then_on(executor, *args, &task); end - def to_event; end - def to_future; end - def to_s; end - def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end - def wait!(timeout = T.unsafe(nil)); end - def with_default_executor(executor); end - def zip(other); end - def |(event_or_future); end - - private - - def async_callback_on_fulfillment(state, executor, args, callback); end - def async_callback_on_rejection(state, executor, args, callback); end - def callback_on_fulfillment(state, args, callback); end - def callback_on_rejection(state, args, callback); end - def callback_on_resolution(state, args, callback); end - def rejected_resolution(raise_on_reassign, state); end - def run_test(v); end - def wait_until_resolved!(timeout = T.unsafe(nil)); end -end - -class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end -end - -class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise - def initialize(default_executor); end -end - -class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise - def initialize(default_executor, fulfilled, value, reason); end -end - -class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end -module Concurrent::Promises::InternalStates; end - -class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult - def initialize(value); end - - def apply(args, block); end - def fulfilled?; end - def reason; end - def to_sym; end - def value; end -end - -class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled - def apply(args, block); end -end - -Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) - -class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult - def initialize(value, reason); end - - def apply(args, block); end - def fulfilled?; end - def reason; end - def to_sym; end - def value; end -end - -class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State - def resolved?; end - def to_sym; end -end - -Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) -Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) - -class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult - def initialize(reason); end - - def apply(args, block); end - def fulfilled?; end - def reason; end - def to_sym; end - def value; end -end - -class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end - -class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State - def apply; end - def fulfilled?; end - def reason; end - def resolved?; end - def result; end - def to_sym; end - def value; end -end - -class Concurrent::Promises::InternalStates::State - def resolved?; end - def to_sym; end -end - -class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - - private - - def on_resolvable(resolved_future, index); end -end - -module Concurrent::Promises::Resolvable - include ::Concurrent::Promises::InternalStates -end - -class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event - include ::Concurrent::Promises::Resolvable - - def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def with_hidden_resolvable; end -end - -class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise - def initialize(default_executor); end -end - -class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future - include ::Concurrent::Promises::Resolvable - - def evaluate_to(*args, &block); end - def evaluate_to!(*args, &block); end - def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end - def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end - def with_hidden_resolvable; end -end - -class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise - def initialize(default_executor); end -end - -class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise - def initialize(delayed, blockers_count, default_executor, run_test); end - - private - - def process_on_blocker_resolution(future, index); end -end - -class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise - def initialize(default_executor, intended_time); end - - def inspect; end - def intended_time; end -end - -class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise - def initialize(delayed, blockers_count, default_executor, executor, args, &task); end - - private - - def on_resolvable(resolved_future, index); end -end - -class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end -end - -class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end -end - -class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end - def process_on_blocker_resolution(future, index); end -end - -class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise - def initialize(delayed, blockers_count, default_executor); end - - private - - def on_resolvable(resolved_future, index); end - def process_on_blocker_resolution(future, index); end -end - -module Concurrent::ReInclude - def extended(base); end - def include(*modules); end - def included(base); end -end - -class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object - def initialize; end - - def acquire_read_lock; end - def acquire_write_lock; end - def has_waiters?; end - def release_read_lock; end - def release_write_lock; end - def with_read_lock; end - def with_write_lock; end - def write_locked?; end - - private - - def max_readers?(c = T.unsafe(nil)); end - def max_writers?(c = T.unsafe(nil)); end - def running_readers(c = T.unsafe(nil)); end - def running_readers?(c = T.unsafe(nil)); end - def running_writer?(c = T.unsafe(nil)); end - def waiting_writer?(c = T.unsafe(nil)); end - def waiting_writers(c = T.unsafe(nil)); end - - class << self - def new(*args, &block); end - end -end - -Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) -Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) -Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) -Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) - -class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object - def initialize; end - - def acquire_read_lock; end - def acquire_write_lock; end - def release_read_lock; end - def release_write_lock; end - def try_read_lock; end - def try_write_lock; end - def with_read_lock; end - def with_write_lock; end - - private - - def max_readers?(c = T.unsafe(nil)); end - def max_writers?(c = T.unsafe(nil)); end - def running_readers(c = T.unsafe(nil)); end - def running_readers?(c = T.unsafe(nil)); end - def running_writer?(c = T.unsafe(nil)); end - def waiting_or_running_writer?(c = T.unsafe(nil)); end - def waiting_writers(c = T.unsafe(nil)); end - - class << self - def new(*args, &block); end - end -end - -Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) -Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) -class Concurrent::RejectedExecutionError < ::Concurrent::Error; end -class Concurrent::ResourceLimitError < ::Concurrent::Error; end - -class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger - def initialize; end - - def __initialize_atomic_fields__; end - def compare_and_set_slot(expected, value); end - def slot; end - def slot=(value); end - def swap_slot(value); end - def update_slot(&block); end - - private - - def do_exchange(value, timeout); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object - def initialize(item); end - - def __initialize_atomic_fields__; end - def compare_and_set_value(expected, value); end - def item; end - def latch; end - def swap_value(value); end - def update_value(&block); end - def value; end - def value=(value); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService - def initialize(*args, &block); end - - def kill; end - def post(*args, &task); end - def shutdown; end - def wait_for_termination(timeout = T.unsafe(nil)); end - - private - - def ns_running?; end - def ns_shutdown?; end - def ns_shutdown_execution; end - def ns_shuttingdown?; end - def stop_event; end - def stopped_event; end -end - -class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor - def initialize(opts = T.unsafe(nil)); end -end - -class Concurrent::RubyThreadLocalVar < ::Concurrent::AbstractThreadLocalVar - def value; end - def value=(value); end - - protected - - def allocate_storage; end - - private - - def get_default; end - def get_threadlocal_array(thread = T.unsafe(nil)); end - def next_index; end - def set_threadlocal_array(array, thread = T.unsafe(nil)); end - def value_for(thread); end - - class << self - def semi_sync(&block); end - def thread_finalizer(id); end - def thread_local_finalizer(index); end - end -end - -Concurrent::RubyThreadLocalVar::FREE = T.let(T.unsafe(nil), Array) -Concurrent::RubyThreadLocalVar::LOCK = T.let(T.unsafe(nil), Thread::Mutex) -Concurrent::RubyThreadLocalVar::THREAD_LOCAL_ARRAYS = T.let(T.unsafe(nil), Hash) - -class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService - def initialize(opts = T.unsafe(nil)); end - - def can_overflow?; end - def completed_task_count; end - def idletime; end - def largest_length; end - def length; end - def max_length; end - def max_queue; end - def min_length; end - def prune_pool; end - def queue_length; end - def ready_worker(worker, last_message); end - def remaining_capacity; end - def remove_busy_worker(worker); end - def scheduled_task_count; end - def synchronous; end - def worker_died(worker); end - def worker_task_completed; end - - private - - def ns_add_busy_worker; end - def ns_assign_worker(*args, &task); end - def ns_enqueue(*args, &task); end - def ns_execute(*args, &task); end - def ns_initialize(opts); end - def ns_kill_execution; end - def ns_limited_queue?; end - def ns_prune_pool; end - def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end - def ns_remove_busy_worker(worker); end - def ns_reset_if_forked; end - def ns_shutdown_execution; end - def ns_worker_died(worker); end -end - -Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) -Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) -Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) -Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) - -class Concurrent::RubyThreadPoolExecutor::Worker - include ::Logger::Severity - include ::Concurrent::Concern::Logging - - def initialize(pool, id); end - - def <<(message); end - def kill; end - def stop; end - - private - - def create_worker(queue, pool, idletime); end - def run_task(pool, task, args); end -end - -class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject - def initialize(task, opts = T.unsafe(nil)); end - - def execute(*args); end -end - -class Concurrent::ScheduledTask < ::Concurrent::IVar - include ::Comparable - - def initialize(delay, opts = T.unsafe(nil), &task); end - - def <=>(other); end - def cancel; end - def cancelled?; end - def execute; end - def executor; end - def initial_delay; end - def process_task; end - def processing?; end - def reschedule(delay); end - def reset; end - def schedule_time; end - - protected - - def ns_reschedule(delay); end - def ns_schedule(delay); end - - class << self - def execute(delay, opts = T.unsafe(nil), &task); end - end -end - -class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end -Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore - -module Concurrent::SerialExecutorService - include ::Logger::Severity - include ::Concurrent::Concern::Logging - include ::Concurrent::ExecutorService - - def serialized?; end -end - -class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject - include ::Logger::Severity - include ::Concurrent::Concern::Logging - - def initialize; end - - def post(executor, *args, &task); end - def posts(posts); end - - private - - def call_job(job); end - def ns_initialize; end - def work(job); end -end - -class Concurrent::SerializedExecution::Job < ::Struct - def args; end - def args=(_); end - def block; end - def block=(_); end - def call; end - def executor; end - def executor=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator - include ::Logger::Severity - include ::Concurrent::Concern::Logging - include ::Concurrent::ExecutorService - include ::Concurrent::SerialExecutorService - - def initialize(executor); end - - def post(*args, &task); end -end - -class Concurrent::Set < ::Concurrent::CRubySet; end -Concurrent::SetImplementation = Concurrent::CRubySet - -module Concurrent::SettableStruct - include ::Concurrent::Synchronization::AbstractStruct - - def ==(other); end - def [](member); end - def []=(member, value); end - def each(&block); end - def each_pair(&block); end - def inspect; end - def merge(other, &block); end - def select(&block); end - def to_a; end - def to_h; end - def to_s; end - def values; end - def values_at(*indexes); end - - private - - def initialize_copy(original); end - - class << self - def new(*args, &block); end - end -end - -Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) - -class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService - def <<(task); end - def kill; end - def post(*args, &task); end - def running?; end - def shutdown; end - def shutdown?; end - def shuttingdown?; end - def wait_for_termination(timeout = T.unsafe(nil)); end - - private - - def ns_initialize(*args); end - - class << self - def <<(task); end - def post(*args); end - end -end - -class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end -Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor -module Concurrent::Synchronization; end - -class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object - protected - - def ns_broadcast; end - def ns_signal; end - def ns_wait(timeout = T.unsafe(nil)); end - def ns_wait_until(timeout = T.unsafe(nil), &condition); end - def synchronize; end -end - -class Concurrent::Synchronization::AbstractObject - def initialize; end - - def full_memory_barrier; end - - class << self - def attr_volatile(*names); end - end -end - -module Concurrent::Synchronization::AbstractStruct - def initialize(*values); end - - def length; end - def members; end - def size; end - - protected - - def ns_each; end - def ns_each_pair; end - def ns_equality(other); end - def ns_get(member); end - def ns_initialize_copy; end - def ns_inspect; end - def ns_merge(other, &block); end - def ns_select; end - def ns_to_h; end - def ns_values; end - def ns_values_at(indexes); end - def pr_underscore(clazz); end - - class << self - def define_struct_class(parent, base, name, members, &block); end - end -end - -class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject - def initialize(lock); end - - def broadcast; end - def ns_broadcast; end - def ns_signal; end - def ns_wait(timeout = T.unsafe(nil)); end - def ns_wait_until(timeout = T.unsafe(nil), &condition); end - def signal; end - def wait(timeout = T.unsafe(nil)); end - def wait_until(timeout = T.unsafe(nil), &condition); end - - class << self - def private_new(*args, &block); end - end -end - -module Concurrent::Synchronization::ConditionSignalling - protected - - def ns_broadcast; end - def ns_signal; end -end - -class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject - def broadcast; end - def signal; end - def wait(timeout = T.unsafe(nil)); end - def wait_until(timeout = T.unsafe(nil), &condition); end -end - -class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject - def new_condition; end -end - -Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject - -class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - include ::Concurrent::Synchronization::ConditionSignalling - - def initialize(*defaults); end - - protected - - def ns_wait(timeout = T.unsafe(nil)); end - def synchronize; end - - private - - def initialize_copy(other); end - - class << self - def new(*args, &block); end - end -end - -module Concurrent::Synchronization::MriAttrVolatile - mixes_in_class_methods ::Concurrent::Synchronization::MriAttrVolatile::ClassMethods - - def full_memory_barrier; end - - class << self - def included(base); end - end -end - -module Concurrent::Synchronization::MriAttrVolatile::ClassMethods - def attr_volatile(*names); end -end - -class Concurrent::Synchronization::MriObject < ::Concurrent::Synchronization::AbstractObject - include ::Concurrent::Synchronization::MriAttrVolatile - extend ::Concurrent::Synchronization::MriAttrVolatile::ClassMethods - - def initialize; end -end - -class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - include ::Concurrent::Synchronization::ConditionSignalling - - def initialize(*defaults); end - - protected - - def ns_wait(timeout = T.unsafe(nil)); end - def synchronize; end - - private - - def initialize_copy(other); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::MriObject - def initialize; end - - private - - def __initialize_atomic_fields__; end - - class << self - def atomic_attribute?(name); end - def atomic_attributes(inherited = T.unsafe(nil)); end - def attr_atomic(*names); end - def ensure_safe_initialization_when_final_fields_are_present; end - def safe_initialization!; end - def safe_initialization?; end - - private - - def define_initialize_atomic_fields; end - end -end - -Concurrent::Synchronization::ObjectImplementation = Concurrent::Synchronization::MriObject - -module Concurrent::Synchronization::RbxAttrVolatile - mixes_in_class_methods ::Concurrent::Synchronization::RbxAttrVolatile::ClassMethods - - def full_memory_barrier; end - - class << self - def included(base); end - end -end - -module Concurrent::Synchronization::RbxAttrVolatile::ClassMethods - def attr_volatile(*names); end -end - -class Concurrent::Synchronization::RbxLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - def initialize(*defaults); end - - protected - - def ns_broadcast; end - def ns_signal; end - def ns_wait(timeout = T.unsafe(nil)); end - def synchronize(&block); end - - private - - def initialize_copy(other); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::Synchronization::RbxObject < ::Concurrent::Synchronization::AbstractObject - include ::Concurrent::Synchronization::RbxAttrVolatile - extend ::Concurrent::Synchronization::RbxAttrVolatile::ClassMethods - - def initialize; end -end - -module Concurrent::Synchronization::TruffleRubyAttrVolatile - mixes_in_class_methods ::Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods - - def full_memory_barrier; end - - class << self - def included(base); end - end -end - -module Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods - def attr_volatile(*names); end -end - -class Concurrent::Synchronization::TruffleRubyObject < ::Concurrent::Synchronization::AbstractObject - include ::Concurrent::Synchronization::TruffleRubyAttrVolatile - extend ::Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods - - def initialize; end -end - -Concurrent::Synchronization::Volatile = Concurrent::Synchronization::MriAttrVolatile - -class Concurrent::SynchronizedDelegator < ::SimpleDelegator - def initialize(obj); end - - def method_missing(method, *args, &block); end - def setup; end - def teardown; end -end - -class Concurrent::TVar < ::Concurrent::Synchronization::Object - def initialize(value); end - - def unsafe_lock; end - def unsafe_value; end - def unsafe_value=(value); end - def value; end - def value=(value); end - - class << self - def new(*args, &block); end - end -end - -class Concurrent::ThreadLocalVar < ::Concurrent::RubyThreadLocalVar; end -Concurrent::ThreadLocalVarImplementation = Concurrent::RubyThreadLocalVar -class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end -Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor -module Concurrent::ThreadSafe; end - -module Concurrent::ThreadSafe::Util - class << self - def make_synchronized_on_cruby(klass); end - def make_synchronized_on_rbx(klass); end - def make_synchronized_on_truffleruby(klass); end - end -end - -Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) -Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) -Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) -class Concurrent::TimeoutError < ::Concurrent::Error; end - -class Concurrent::TimerSet < ::Concurrent::RubyExecutorService - def initialize(opts = T.unsafe(nil)); end - - def kill; end - def post(delay, *args, &task); end - - private - - def ns_initialize(opts); end - def ns_post_task(task); end - def ns_reset_if_forked; end - def ns_shutdown_execution; end - def post_task(task); end - def process_tasks; end - def remove_task(task); end -end - -class Concurrent::TimerTask < ::Concurrent::RubyExecutorService - include ::Concurrent::Concern::Dereferenceable - include ::Concurrent::Concern::Observable - - def initialize(opts = T.unsafe(nil), &task); end - - def execute; end - def execution_interval; end - def execution_interval=(value); end - def running?; end - def timeout_interval; end - def timeout_interval=(value); end - - private - - def execute_task(completion); end - def ns_initialize(opts, &task); end - def ns_kill_execution; end - def ns_shutdown_execution; end - def schedule_next_task(interval = T.unsafe(nil)); end - - class << self - def execute(opts = T.unsafe(nil), &task); end - end -end - -Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) -Concurrent::TimerTask::TIMEOUT_INTERVAL = T.let(T.unsafe(nil), Integer) - -class Concurrent::Transaction - def initialize; end - - def abort; end - def commit; end - def open(tvar); end - def read(tvar); end - def unlock; end - def write(tvar, value); end - - class << self - def current; end - def current=(transaction); end - end -end - -Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) -class Concurrent::Transaction::AbortError < ::StandardError; end -class Concurrent::Transaction::LeaveError < ::StandardError; end - -class Concurrent::Transaction::OpenEntry < ::Struct - def modified; end - def modified=(_); end - def value; end - def value=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class Concurrent::Tuple - include ::Enumerable - - def initialize(size); end - - def cas(i, old_value, new_value); end - def compare_and_set(i, old_value, new_value); end - def each; end - def get(i); end - def set(i, value); end - def size; end - def volatile_get(i); end - def volatile_set(i, value); end -end - -Concurrent::Tuple::Tuple = Array -module Concurrent::Utility; end - -module Concurrent::Utility::EngineDetector - def on_cruby?; end - def on_jruby?; end - def on_jruby_9000?; end - def on_linux?; end - def on_osx?; end - def on_rbx?; end - def on_truffleruby?; end - def on_windows?; end - def ruby_engine; end - def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end -end - -module Concurrent::Utility::NativeExtensionLoader - def allow_c_extensions?; end - def c_extensions_loaded?; end - def java_extensions_loaded?; end - def load_native_extensions; end - - private - - def load_error_path(error); end - def set_c_extensions_loaded; end - def set_java_extensions_loaded; end - def try_load_c_extension(path); end -end - -module Concurrent::Utility::NativeInteger - extend ::Concurrent::Utility::NativeInteger - - def ensure_integer(value); end - def ensure_integer_and_bounds(value); end - def ensure_lower_bound(value); end - def ensure_positive(value); end - def ensure_positive_and_no_zero(value); end - def ensure_upper_bound(value); end -end - -Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) -Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) - -class Concurrent::Utility::ProcessorCounter - def initialize; end - - def physical_processor_count; end - def processor_count; end - - private - - def compute_physical_processor_count; end - def compute_processor_count; end -end - -Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi new file mode 100644 index 0000000..98fdf89 --- /dev/null +++ b/sorbet/rbi/gems/concurrent-ruby@1.3.6.rbi @@ -0,0 +1,11751 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `concurrent-ruby` gem. +# Please instead update this file by running `bin/tapioca gem concurrent-ruby`. + + +# {include:file:README.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#1 +module Concurrent + extend ::Concurrent::Utility::EngineDetector + extend ::Concurrent::Utility::NativeExtensionLoader + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + private + + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#139 + def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 + def atomically; end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 + def call_dataflow(method, executor, *inputs, &block); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#34 + def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#44 + def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#39 + def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#49 + def dataflow_with!(executor, *inputs, &block); end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#144 + def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#15 + def monotonic_time(unit = T.unsafe(nil)); end + + class << self + # Abort a currently running transaction - see `Concurrent::atomically`. + # + # @raise [Transaction::AbortError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#148 + def abort_transaction; end + + # Run a block that reads and writes `TVar`s as a single atomic transaction. + # With respect to the value of `TVar` objects, the transaction is atomic, in + # that it either happens or it does not, consistent, in that the `TVar` + # objects involved will never enter an illegal state, and isolated, in that + # transactions never interfere with each other. You may recognise these + # properties from database transactions. + # + # There are some very important and unusual semantics that you must be aware of: + # + # * Most importantly, the block that you pass to atomically may be executed + # more than once. In most cases your code should be free of + # side-effects, except for via TVar. + # + # * If an exception escapes an atomically block it will abort the transaction. + # + # * It is undefined behaviour to use callcc or Fiber with atomically. + # + # * If you create a new thread within an atomically, it will not be part of + # the transaction. Creating a thread counts as a side-effect. + # + # Transactions within transactions are flattened to a single transaction. + # + # @example + # a = new TVar(100_000) + # b = new TVar(100) + # + # Concurrent::atomically do + # a.value -= 10 + # b.value += 10 + # end + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#148 + def atomically; end + + # Number of processors cores available for process scheduling. + # This method takes in account the CPU quota if the process is inside a cgroup with a + # dedicated CPU quota (typically Docker). + # Otherwise it returns the same value as #processor_count but as a Float. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [Float] number of available processors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#194 + def available_processor_count; end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#80 + def call_dataflow(method, executor, *inputs, &block); end + + # The maximum number of processors cores available for process scheduling. + # Returns `nil` if there is no enforced limit, or a `Float` if the + # process is inside a cgroup with a dedicated CPU quota (typically Docker). + # + # Note that nothing prevents setting a CPU quota higher than the actual number of + # cores on the system. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#209 + def cpu_quota; end + + # The CPU shares requested by the process. For performance reasons the calculated + # value will be memoized on the first call. + # + # @return [Float, nil] CPU shares requested by the process, or nil if not set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#217 + def cpu_shares; end + + # Create a simple logger with provided level and output. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#38 + def create_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Create a stdlib logger with provided level and output. + # If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+. + # + # @deprecated + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#73 + def create_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available. + # {include:file:docs-source/dataflow.md} + # + # @param inputs [Future] zero or more `Future` operations that this dataflow depends upon + # @raise [ArgumentError] if no block is given + # @raise [ArgumentError] if any of the inputs are not `IVar`s + # @return [Object] the result of all the operations + # @yield The operation to perform once all the dependencies are met + # @yieldparam inputs [Future] each of the `Future` inputs to the dataflow + # @yieldreturn [Object] the result of the block operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#37 + def dataflow(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#47 + def dataflow!(*inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#42 + def dataflow_with(executor, *inputs, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#52 + def dataflow_with!(executor, *inputs, &block); end + + # Disables AtExit handlers including pool auto-termination handlers. + # When disabled it will be the application programmer's responsibility + # to ensure that the handlers are shutdown properly prior to application + # exit by calling `AtExit.run` method. + # + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. + # @note this option should be needed only because of `at_exit` ordering + # issues which may arise when running some of the testing frameworks. + # E.g. Minitest's test-suite runs itself in `at_exit` callback which + # executes after the pools are already terminated. Then auto termination + # needs to be disabled and called manually after test-suite ends. + # @note This method should *never* be called + # from within a gem. It should *only* be used from within the main + # application and even then it should be used only when necessary. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#48 + def disable_at_exit_handlers!; end + + # General access point to global executors. + # + # @param executor_identifier [Symbol, Executor] symbols: + # - :fast - {Concurrent.global_fast_executor} + # - :io - {Concurrent.global_io_executor} + # - :immediate - {Concurrent.global_immediate_executor} + # @return [Executor] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#83 + def executor(executor_identifier); end + + # Global thread pool optimized for short, fast *operations*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#55 + def global_fast_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#66 + def global_immediate_executor; end + + # Global thread pool optimized for long, blocking (IO) *tasks*. + # + # @return [ThreadPoolExecutor] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#62 + def global_io_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#114 + def global_logger; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#118 + def global_logger=(value); end + + # Global thread pool user for global *timers*. + # + # @return [Concurrent::TimerSet] the thread pool + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#73 + def global_timer_set; end + + # Leave a transaction without committing or aborting - see `Concurrent::atomically`. + # + # @raise [Transaction::LeaveError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#148 + def leave_transaction; end + + # Returns the current time as tracked by the application monotonic clock. + # + # @param unit [Symbol] the time unit to be returned, can be either + # :float_second, :float_millisecond, :float_microsecond, :second, + # :millisecond, :microsecond, or :nanosecond default to :float_second. + # @return [Float] The current monotonic time since some unspecified + # starting point + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/monotonic_time.rb#18 + def monotonic_time(unit = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#7 + def mutex_owned_per_thread?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#87 + def new_fast_executor(opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#98 + def new_io_executor(opts = T.unsafe(nil)); end + + # Number of physical processor cores on the current system. For performance + # reasons the calculated value will be memoized on the first call. + # + # On Windows the Win32 API will be queried for the `NumberOfCores from + # Win32_Processor`. This will return the total number "of cores for the + # current instance of the processor." On Unix-like operating systems either + # the `hwprefs` or `sysctl` utility will be called in a subshell and the + # returned value will be used. In the rare case where none of these methods + # work or an exception is raised the function will simply return 1. + # + # @return [Integer] number physical processor cores on the current system + # @see http://linux.die.net/man/8/sysctl + # @see http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx + # @see http://www.unix.com/man-page/osx/1/HWPREFS/ + # @see https://github.com/grosser/parallel/blob/4fc8b89d08c7091fe0419ca8fba1ec3ce5a8d185/lib/parallel.rb + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#181 + def physical_processor_count; end + + # Number of processors seen by the OS and used for process scheduling. For + # performance reasons the calculated value will be memoized on the first + # call. + # + # When running under JRuby the Java runtime call + # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According + # to the Java documentation this "value may change during a particular + # invocation of the virtual machine... [applications] should therefore + # occasionally poll this property." We still memoize this value once under + # JRuby. + # + # Otherwise Ruby's Etc.nprocessors will be used. + # + # @return [Integer] number of processors seen by the OS or Java runtime + # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#160 + def processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#142 + def processor_counter; end + + # Use logger created by #create_simple_logger to log concurrent-ruby messages. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#66 + def use_simple_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + + # Use logger created by #create_stdlib_logger to log concurrent-ruby messages. + # + # @deprecated + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#101 + def use_stdlib_logger(level = T.unsafe(nil), output = T.unsafe(nil)); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#38 +class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object + # @return [AbstractExchanger] a new instance of AbstractExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#44 + def initialize; end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # In some edge cases when a `timeout` is given a return value of `nil` may be + # ambiguous. Specifically, if `nil` is a valid value in the exchange it will + # be impossible to tell whether `nil` is the actual return value or if it + # signifies timeout. When `nil` is a valid value in the exchange consider + # using {#exchange!} or {#try_exchange} instead. + # + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @param value [Object] the value to exchange with another thread + # @return [Object] the value exchanged by the other thread or `nil` on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#69 + def exchange(value, timeout = T.unsafe(nil)); end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # On timeout a {Concurrent::TimeoutError} exception will be raised. + # + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @param value [Object] the value to exchange with another thread + # @raise [Concurrent::TimeoutError] on timeout + # @return [Object] the value exchanged by the other thread + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#80 + def exchange!(value, timeout = T.unsafe(nil)); end + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # + # The return value will be a {Concurrent::Maybe} set to `Just` on success or + # `Nothing` on timeout. + # + # @example + # + # exchanger = Concurrent::Exchanger.new + # + # result = exchanger.exchange(:foo, 0.5) + # + # if result.just? + # puts result.value #=> :bar + # else + # puts 'timeout' + # end + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @param value [Object] the value to exchange with another thread + # @return [Concurrent::Maybe] on success a `Just` maybe will be returned with + # the item exchanged by the other thread as `#value`; on timeout a + # `Nothing` maybe will be returned with {Concurrent::TimeoutError} as `#reason` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#109 + def try_exchange(value, timeout = T.unsafe(nil)); end + + private + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @param value [Object] the value to exchange with another thread + # @raise [NotImplementedError] + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#122 + def do_exchange(value, timeout); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#41 +Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#10 +class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::Concern::Deprecation + + # Create a new thread pool. + # + # @return [AbstractExecutorService] a new instance of AbstractExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#23 + def initialize(opts = T.unsafe(nil), &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#72 + def auto_terminate=(value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#67 + def auto_terminate?; end + + # Returns the value of attribute fallback_policy. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#18 + def fallback_policy; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#42 + def kill; end + + # Returns the value of attribute name. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#20 + def name; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#52 + def running?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#37 + def shutdown; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#62 + def shutdown?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#57 + def shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#32 + def to_s; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#47 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # Returns an action which executes the `fallback_policy` once the queue + # size reaches `max_queue`. The reason for the indirection of an action + # is so that the work can be deferred outside of synchronization. + # + # @param args [Array] the arguments to the task which is being handled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#85 + def fallback_action(*args); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#126 + def ns_auto_terminate?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#106 + def ns_execute(*args, &task); end + + # Callback method called when the executor has been killed. + # The default behavior is to do nothing. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#122 + def ns_kill_execution; end + + # Callback method called when an orderly shutdown has completed. + # The default behavior is to signal all waiting threads. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#114 + def ns_shutdown_execution; end +end + +# The set of possible fallback policies that may be set at thread pool creation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb#15 +Concurrent::AbstractExecutorService::FALLBACK_POLICIES = T.let(T.unsafe(nil), Array) + +# An abstract implementation of local storage, with sub-classes for +# per-thread and per-fiber locals. +# +# Each execution context (EC, thread or fiber) has a lazily initialized array +# of local variable values. Each time a new local variable is created, we +# allocate an "index" for it. +# +# For example, if the allocated index is 1, that means slot #1 in EVERY EC's +# locals array will be used for the value of that variable. +# +# The good thing about using a per-EC structure to hold values, rather than +# a global, is that no synchronization is needed when reading and writing +# those values (since the structure is only ever accessed by a single +# thread). +# +# Of course, when a local variable is GC'd, 1) we need to recover its index +# for use by other new local variables (otherwise the locals arrays could +# get bigger and bigger with time), and 2) we need to null out all the +# references held in the now-unused slots (both to avoid blocking GC of those +# objects, and also to prevent "stale" values from being passed on to a new +# local when the index is reused). +# +# Because we need to null out freed slots, we need to keep references to +# ALL the locals arrays, so we can null out the appropriate slots in all of +# them. This is why we need to use a finalizer to clean up the locals array +# when the EC goes out of scope. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#35 +class Concurrent::AbstractLocals + # @return [AbstractLocals] a new instance of AbstractLocals + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#36 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#89 + def fetch(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#71 + def free_index(index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#55 + def next_index(local); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#102 + def set(index, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#43 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#48 + def weak_synchronize; end + + private + + # When the local goes out of scope, clean up that slot across all locals currently assigned. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#112 + def local_finalizer(index); end + + # Returns the locals for the current scope, or nil if none exist. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#128 + def locals; end + + # Returns the locals for the current scope, creating them if necessary. + # + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#133 + def locals!; end + + # When a thread/fiber goes out of scope, remove the array from @all_arrays. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#119 + def thread_fiber_finalizer(array_object_id); end +end + +# `Agent` is inspired by Clojure's [agent](http://clojure.org/agents) +# function. An agent is a shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. `Agent` is (mostly) +# functionally equivalent to Clojure's agent, except where the runtime +# prevents parity. +# +# Agents are reactive, not autonomous - there is no imperative message loop +# and no blocking receive. The state of an Agent should be itself immutable +# and the `#value` of an Agent is always immediately available for reading by +# any thread without any messages, i.e. observation does not require +# cooperation or coordination. +# +# Agent action dispatches are made using the various `#send` methods. These +# methods always return immediately. At some point later, in another thread, +# the following will happen: +# +# 1. The given `action` will be applied to the state of the Agent and the +# `args`, if any were supplied. +# 2. The return value of `action` will be passed to the validator lambda, +# if one has been set on the Agent. +# 3. If the validator succeeds or if no validator was given, the return value +# of the given `action` will become the new `#value` of the Agent. See +# `#initialize` for details. +# 4. If any observers were added to the Agent, they will be notified. See +# `#add_observer` for details. +# 5. If during the `action` execution any other dispatches are made (directly +# or indirectly), they will be held until after the `#value` of the Agent +# has been changed. +# +# If any exceptions are thrown by an action function, no nested dispatches +# will occur, and the exception will be cached in the Agent itself. When an +# Agent has errors cached, any subsequent interactions will immediately throw +# an exception, until the agent's errors are cleared. Agent errors can be +# examined with `#error` and the agent restarted with `#restart`. +# +# The actions of all Agents get interleaved amongst threads in a thread pool. +# At any point in time, at most one action for each Agent is being executed. +# Actions dispatched to an agent from another single agent or thread will +# occur in the order they were sent, potentially interleaved with actions +# dispatched to the same agent from other sources. The `#send` method should +# be used for actions that are CPU limited, while the `#send_off` method is +# appropriate for actions that may block on IO. +# +# Unlike in Clojure, `Agent` cannot participate in `Concurrent::TVar` transactions. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an agent with an initial value +# agent = Concurrent::Agent.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# agent.send{|set| next_fibonacci(set) } +# end +# +# # wait for them to complete +# agent.await +# +# # get the current value +# agent.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Agents support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time an action dispatch returns and +# the new value is successfully validated. Observation will *not* occur if the +# action raises an exception, if validation fails, or when a {#restart} occurs. +# +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Agent when the action began +# processing. The `new_value` is the value to which the Agent was set when the +# action completed. Note that `old_value` and `new_value` may be the same. +# This is not an error. It simply means that the action returned the same +# value. +# +# ## Nested Actions +# +# It is possible for an Agent action to post further actions back to itself. +# The nested actions will be enqueued normally then processed *after* the +# outer action completes, in the order they were sent, possibly interleaved +# with action dispatches from other threads. Nested actions never deadlock +# with one another and a failure in a nested action will never affect the +# outer action. +# +# Nested actions can be called using the Agent reference from the enclosing +# scope or by passing the reference in as a "send" argument. Nested actions +# cannot be post using `self` from within the action block/proc/lambda; `self` +# in this context will not reference the Agent. The preferred method for +# dispatching nested actions is to pass the Agent as an argument. This allows +# Ruby to more effectively manage the closing scope. +# +# Prefer this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send(agent) do |value, this| +# this.send {|v| v + 42 } +# 3.14 +# end +# agent.value #=> 45.14 +# ``` +# +# Over this: +# +# ``` +# agent = Concurrent::Agent.new(0) +# agent.send do |value| +# agent.send {|v| v + 42 } +# 3.14 +# end +# ``` +# +# +# **NOTE** Never, *under any circumstances*, call any of the "await" methods +# ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action +# block/proc/lambda. The call will block the Agent and will always fail. +# Calling either {#await} or {#wait} (with a timeout of `nil`) will +# hopelessly deadlock the Agent with no possibility of recovery. +# +# @see http://clojure.org/Agents Clojure Agents +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#145 +class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Observable + + # Create a new `Agent` with the given initial value and options. + # + # The `:validator` option must be `nil` or a side-effect free proc/lambda + # which takes one argument. On any intended value change the validator, if + # provided, will be called. If the new value is invalid the validator should + # return `false` or raise an error. + # + # The `:error_handler` option must be `nil` or a proc/lambda which takes two + # arguments. When an action raises an error or validation fails, either by + # returning false or raising an error, the error handler will be called. The + # arguments to the error handler will be a reference to the agent itself and + # the error object which was raised. + # + # The `:error_mode` may be either `:continue` (the default if an error + # handler is given) or `:fail` (the default if error handler nil or not + # given). + # + # If an action being run by the agent throws an error or doesn't pass + # validation the error handler, if present, will be called. After the + # handler executes if the error mode is `:continue` the Agent will continue + # as if neither the action that caused the error nor the error itself ever + # happened. + # + # If the mode is `:fail` the Agent will become {#failed?} and will stop + # accepting new action dispatches. Any previously queued actions will be + # held until {#restart} is called. The {#value} method will still work, + # returning the value of the Agent before the error. + # + # @option opts + # @option opts + # @option opts + # @param initial [Object] the initial value + # @param opts [Hash] the configuration options + # @return [Agent] a new instance of Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#220 + def initialize(initial, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Appropriate for actions that may block on IO. + # + # @param action [Proc] the action dispatch to be enqueued + # @return [Concurrent::Agent] self + # @see #send_off + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#331 + def <<(action); end + + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far, from this thread or nested by the Agent, have occurred. Will + # block when {#failed?}. Will never return if a failed Agent is {#restart} + # with `:clear_actions` true. + # + # Returns a reference to `self` to support method chaining: + # + # ``` + # current_value = agent.await.value + # ``` + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @return [Boolean] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#350 + def await; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#363 + def await_for(timeout); end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @raise [Concurrent::TimeoutError] when timeout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#377 + def await_for!(timeout); end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#233 + def deref; end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#240 + def error; end + + # The error mode this Agent is operating in. See {#initialize} for details. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#184 + def error_mode; end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#402 + def failed?; end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#298 + def post(*args, &action); end + + # When {#failed?} and {#error_mode} is `:fail`, returns the error object + # which caused the failure, else `nil`. When {#error_mode} is `:continue` + # will *always* return `nil`. + # + # @return [nil, Error] the error which caused the failure when {#failed?} + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#244 + def reason; end + + # When an Agent is {#failed?}, changes the Agent {#value} to `new_value` + # then un-fails the Agent so that action dispatches are allowed again. If + # the `:clear_actions` option is give and true, any actions queued on the + # Agent that were being held while it was failed will be discarded, + # otherwise those held actions will proceed. The `new_value` must pass the + # validator if any, or `restart` will raise an exception and the Agent will + # remain failed with its old {#value} and {#error}. Observers, if any, will + # not be notified of the new state. + # + # @option opts + # @param new_value [Object] the new value for the Agent once restarted + # @param opts [Hash] the configuration options + # @raise [Concurrent:AgentError] when not failed + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#424 + def restart(new_value, opts = T.unsafe(nil)); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#278 + def send(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#287 + def send!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#294 + def send_off(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#302 + def send_off!(*args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @return [Boolean] true if the action is successfully enqueued, false if + # the Agent is {#failed?} + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#311 + def send_via(executor, *args, &action); end + + # Dispatches an action to the Agent and returns immediately. Subsequently, + # in a thread from a thread pool, the {#value} will be set to the return + # value of the action. Action dispatches are only allowed when the Agent + # is not {#failed?}. + # + # The action must be a block/proc/lambda which takes 1 or more arguments. + # The first argument is the current {#value} of the Agent. Any arguments + # passed to the send method via the `args` parameter will be passed to the + # action as the remaining arguments. The action must return the new value + # of the Agent. + # + # * {#send} and {#send!} should be used for actions that are CPU limited + # * {#send_off}, {#send_off!}, and {#<<} are appropriate for actions that + # may block on IO + # * {#send_via} and {#send_via!} are used when a specific executor is to + # be used for the action + # + # @param action [Proc] the action dispatch to be enqueued + # @param args [Array] zero or more arguments to be passed to + # the action + # @param executor [Concurrent::ExecutorService] the executor on which the + # action is to be dispatched + # @raise [Concurrent::Agent::Error] if the Agent is {#failed?} + # @return [Boolean] true if the action is successfully enqueued + # @yield [agent, value, *args] process the old value and return the new + # @yieldparam args [Array] zero or more arguments to pass to the + # action + # @yieldparam value [Object] the current {#value} of the Agent + # @yieldreturn [Object] the new value of the Agent + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#319 + def send_via!(executor, *args, &action); end + + # Is the Agent in a failed state? + # + # @return [Boolean] + # @see #restart + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#406 + def stopped?; end + + # The current value (state) of the Agent, irrespective of any pending or + # in-progress actions. The value is always available and is non-blocking. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#229 + def value; end + + # Blocks the current thread until all actions dispatched thus far, from this + # thread or nested by the Agent, have occurred, or the timeout (in seconds) + # has elapsed. Will block indefinitely when timeout is nil or not given. + # + # Provided mainly for consistency with other classes in this library. Prefer + # the various `await` methods instead. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#393 + def wait(timeout = T.unsafe(nil)); end + + private + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#510 + def enqueue_action_job(action, args, executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#516 + def enqueue_await_job(latch); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#543 + def execute_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#576 + def handle_error(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#529 + def ns_enqueue_job(job, index = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#584 + def ns_find_last_job_for_thread; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#490 + def ns_initialize(initial, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#539 + def ns_post_next_job; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#570 + def ns_validate(value); end + + class << self + # Blocks the current thread (indefinitely!) until all actions dispatched + # thus far to all the given Agents, from this thread or nested by the + # given Agents, have occurred. Will block when any of the agents are + # failed. Will never return if a failed Agent is restart with + # `:clear_actions` true. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param agents [Array] the Agents on which to wait + # @return [Boolean] true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#449 + def await(*agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param agents [Array] the Agents on which to wait + # @param timeout [Float] the maximum number of seconds to wait + # @return [Boolean] true if all actions complete before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#463 + def await_for(timeout, *agents); end + + # Blocks the current thread until all actions dispatched thus far to all + # the given Agents, from this thread or nested by the given Agents, have + # occurred, or the timeout (in seconds) has elapsed. + # + # + # **NOTE** Never, *under any circumstances*, call any of the "await" methods + # ({#await}, {#await_for}, {#await_for!}, and {#wait}) from within an action + # block/proc/lambda. The call will block the Agent and will always fail. + # Calling either {#await} or {#wait} (with a timeout of `nil`) will + # hopelessly deadlock the Agent with no possibility of recovery. + # + # @param agents [Array] the Agents on which to wait + # @param timeout [Float] the maximum number of seconds to wait + # @raise [Concurrent::TimeoutError] when timeout is reached + # @return [Boolean] true if all actions complete before timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#482 + def await_for!(timeout, *agents); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#154 +Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#151 +Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#157 +Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#160 +Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#148 +Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) + +# Raised during action processing or any other time in an Agent's lifecycle. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#167 +class Concurrent::Agent::Error < ::StandardError + # @return [Error] a new instance of Error + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#168 + def initialize(message = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 +class Concurrent::Agent::Job < ::Struct + # Returns the value of attribute action + # + # @return [Object] the current value of action + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def action; end + + # Sets the attribute action + # + # @param value [Object] the value to set the attribute action to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def action=(_); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def args=(_); end + + # Returns the value of attribute caller + # + # @return [Object] the current value of caller + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def caller; end + + # Sets the attribute caller + # + # @param value [Object] the value to set the attribute caller to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def caller=(_); end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def executor=(_); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def [](*_arg0); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def keyword_init?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def members; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#163 + def new(*_arg0); end + end +end + +# Raised when a new value obtained during action processing or at `#restart` +# fails validation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#176 +class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error + # @return [ValidationError] a new instance of ValidationError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/agent.rb#177 + def initialize(message = T.unsafe(nil)); end +end + +# A thread-safe subclass of Array. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` +# which is concatenation of `a` and `b`, then it writes the concatenation to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#concat` instead. +# @see http://ruby-doc.org/core/Array.html Ruby standard library `Array` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#53 +class Concurrent::Array < ::Array; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/array.rb#22 +Concurrent::ArrayImplementation = Array + +# A mixin module that provides simple asynchronous behavior to a class, +# turning it into a simple actor. Loosely based on Erlang's +# [gen_server](http://www.erlang.org/doc/man/gen_server.html), but without +# supervision or linking. +# +# A more feature-rich {Concurrent::Actor} is also available when the +# capabilities of `Async` are too limited. +# +# ```cucumber +# Feature: +# As a stateful, plain old Ruby class +# I want safe, asynchronous behavior +# So my long-running methods don't block the main thread +# ``` +# +# The `Async` module is a way to mix simple yet powerful asynchronous +# capabilities into any plain old Ruby object or class, turning each object +# into a simple Actor. Method calls are processed on a background thread. The +# caller is free to perform other actions while processing occurs in the +# background. +# +# Method calls to the asynchronous object are made via two proxy methods: +# `async` (alias `cast`) and `await` (alias `call`). These proxy methods post +# the method call to the object's background thread and return a "future" +# which will eventually contain the result of the method call. +# +# This behavior is loosely patterned after Erlang's `gen_server` behavior. +# When an Erlang module implements the `gen_server` behavior it becomes +# inherently asynchronous. The `start` or `start_link` function spawns a +# process (similar to a thread but much more lightweight and efficient) and +# returns the ID of the process. Using the process ID, other processes can +# send messages to the `gen_server` via the `cast` and `call` methods. Unlike +# Erlang's `gen_server`, however, `Async` classes do not support linking or +# supervision trees. +# +# ## Basic Usage +# +# When this module is mixed into a class, objects of the class become inherently +# asynchronous. Each object gets its own background thread on which to post +# asynchronous method calls. Asynchronous method calls are executed in the +# background one at a time in the order they are received. +# +# To create an asynchronous class, simply mix in the `Concurrent::Async` module: +# +# ``` +# class Hello +# include Concurrent::Async +# +# def hello(name) +# "Hello, #{name}!" +# end +# end +# ``` +# +# Mixing this module into a class provides each object two proxy methods: +# `async` and `await`. These methods are thread safe with respect to the +# enclosing object. The former proxy allows methods to be called +# asynchronously by posting to the object's internal thread. The latter proxy +# allows a method to be called synchronously but does so safely with respect +# to any pending asynchronous method calls and ensures proper ordering. Both +# methods return a {Concurrent::IVar} which can be inspected for the result +# of the proxied method call. Calling a method with `async` will return a +# `:pending` `IVar` whereas `await` will return a `:complete` `IVar`. +# +# ``` +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# ``` +# +# ## Let It Fail +# +# The `async` and `await` proxy methods have built-in error protection based +# on Erlang's famous "let it fail" philosophy. Instance methods should not be +# programmed defensively. When an exception is raised by a delegated method +# the proxy will rescue the exception, expose it to the caller as the `reason` +# attribute of the returned future, then process the next method call. +# +# ## Calling Methods Internally +# +# External method calls should *always* use the `async` and `await` proxy +# methods. When one method calls another method, the `async` proxy should +# rarely be used and the `await` proxy should *never* be used. +# +# When an object calls one of its own methods using the `await` proxy the +# second call will be enqueued *behind* the currently running method call. +# Any attempt to wait on the result will fail as the second call will never +# run until after the current call completes. +# +# Calling a method using the `await` proxy from within a method that was +# itself called using `async` or `await` will irreversibly deadlock the +# object. Do *not* do this, ever. +# +# ## Instance Variables and Attribute Accessors +# +# Instance variables do not need to be thread-safe so long as they are private. +# Asynchronous method calls are processed in the order they are received and +# are processed one at a time. Therefore private instance variables can only +# be accessed by one thread at a time. This is inherently thread-safe. +# +# When using private instance variables within asynchronous methods, the best +# practice is to read the instance variable into a local variable at the start +# of the method then update the instance variable at the *end* of the method. +# This way, should an exception be raised during method execution the internal +# state of the object will not have been changed. +# +# ### Reader Attributes +# +# The use of `attr_reader` is discouraged. Internal state exposed externally, +# when necessary, should be done through accessor methods. The instance +# variables exposed by these methods *must* be thread-safe, or they must be +# called using the `async` and `await` proxy methods. These two approaches are +# subtly different. +# +# When internal state is accessed via the `async` and `await` proxy methods, +# the returned value represents the object's state *at the time the call is +# processed*, which may *not* be the state of the object at the time the call +# is made. +# +# To get the state *at the current* time, irrespective of an enqueued method +# calls, a reader method must be called directly. This is inherently unsafe +# unless the instance variable is itself thread-safe, preferably using one +# of the thread-safe classes within this library. Because the thread-safe +# classes within this library are internally-locking or non-locking, they can +# be safely used from within asynchronous methods without causing deadlocks. +# +# Generally speaking, the best practice is to *not* expose internal state via +# reader methods. The best practice is to simply use the method's return value. +# +# ### Writer Attributes +# +# Writer attributes should never be used with asynchronous classes. Changing +# the state externally, even when done in the thread-safe way, is not logically +# consistent. Changes to state need to be timed with respect to all asynchronous +# method calls which my be in-process or enqueued. The only safe practice is to +# pass all necessary data to each method as arguments and let the method update +# the internal state as necessary. +# +# ## Class Constants, Variables, and Methods +# +# ### Class Constants +# +# Class constants do not need to be thread-safe. Since they are read-only and +# immutable they may be safely read both externally and from within +# asynchronous methods. +# +# ### Class Variables +# +# Class variables should be avoided. Class variables represent shared state. +# Shared state is anathema to concurrency. Should there be a need to share +# state using class variables they *must* be thread-safe, preferably +# using the thread-safe classes within this library. When updating class +# variables, never assign a new value/object to the variable itself. Assignment +# is not thread-safe in Ruby. Instead, use the thread-safe update functions +# of the variable itself to change the value. +# +# The best practice is to *never* use class variables with `Async` classes. +# +# ### Class Methods +# +# Class methods which are pure functions are safe. Class methods which modify +# class variables should be avoided, for all the reasons listed above. +# +# ## An Important Note About Thread Safe Guarantees +# +# > Thread safe guarantees can only be made when asynchronous method calls +# > are not mixed with direct method calls. Use only direct method calls +# > when the object is used exclusively on a single thread. Use only +# > `async` and `await` when the object is shared between threads. Once you +# > call a method using `async` or `await`, you should no longer call methods +# > directly on the object. Use `async` and `await` exclusively from then on. +# +# @example +# +# class Echo +# include Concurrent::Async +# +# def echo(msg) +# print "#{msg}\n" +# end +# end +# +# horn = Echo.new +# horn.echo('zero') # synchronous, not thread-safe +# # returns the actual return value of the method +# +# horn.async.echo('one') # asynchronous, non-blocking, thread-safe +# # returns an IVar in the :pending state +# +# horn.await.echo('two') # synchronous, blocking, thread-safe +# # returns an IVar in the :complete state +# @see Concurrent::Actor +# @see http://c2.com/cgi/wiki?LetItCrash "Let It Crash" at http://c2.com/ +# @see http://www.erlang.org/doc/man/gen_server.html Erlang gen_server +# @see https://en.wikipedia.org/wiki/Actor_model "Actor Model" at Wikipedia +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#217 +module Concurrent::Async + mixes_in_class_methods ::Concurrent::Async::ClassMethods + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#412 + def async; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#430 + def await; end + + # Causes the chained method call to be performed synchronously on the + # current thread. The delegated will return a future in either the + # `:fulfilled` or `:rejected` state and the delegated method will have + # completed. The final disposition of the delegated method can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of the + # requested method + # @return [Concurrent::IVar] the completed result of the synchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#433 + def call; end + + # Causes the chained method call to be performed asynchronously on the + # object's thread. The delegated method will return a future in the + # `:pending` state and the method call will have been scheduled on the + # object's thread. The final disposition of the method call can be obtained + # by inspecting the returned future. + # + # @note The method call is guaranteed to be thread safe with respect to + # all other method calls against the same object that are called with + # either `async` or `await`. The mutable nature of Ruby references + # (and object orientation in general) prevent any other thread safety + # guarantees. Do NOT mix direct method calls with delegated method calls. + # Use *only* delegated method calls when sharing the object between threads. + # @raise [NameError] the object does not respond to the requested method + # @raise [ArgumentError] the given `args` do not match the arity of + # the requested method + # @return [Concurrent::IVar] the pending result of the asynchronous operation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#415 + def cast; end + + # Initialize the internal serializer and other stnchronization mechanisms. + # + # @note This method *must* be called immediately upon object construction. + # This is the only way thread-safe initialization can be guaranteed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#441 + def init_synchronization; end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#262 + def included(base); end + + # Check for the presence of a method on an object and determine if a given + # set of arguments matches the required arity. + # + # @note This check is imperfect because of the way Ruby reports the arity of + # methods with a variable number of arguments. It is possible to determine + # if too few arguments are given but impossible to determine if too many + # arguments are given. This check may also fail to recognize dynamic behavior + # of the object, such as methods simulated with `method_missing`. + # @param args [Array] zero or more arguments for the arity check + # @param method [Symbol] the method to check the object for + # @param obj [Object] the object to check against + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @see http://ruby-doc.org/core-2.1.0/Object.html#method-i-respond_to-3F Object#respond_to? + # @see http://www.ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing BasicObject#method_missing + # @see http://www.ruby-doc.org/core-2.1.1/Method.html#method-i-arity Method#arity + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#250 + def validate_argc(obj, method, *args); end + end +end + +# Delegates asynchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#282 +class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [Object] the object to wrap and delegate method calls to + # @return [AsyncDelegator] a new instance of AsyncDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#288 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param args [Array] zero or more arguments to the method + # @param method [Symbol] the method being called + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#305 + def method_missing(method, *args, &block); end + + # Perform all enqueued tasks. + # + # This method must be called from within the executor. It must not be + # called while already running. It will loop until the queue is empty. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#330 + def perform; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#348 + def reset_if_forked; end + + private + + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#322 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# Delegates synchronous, thread-safe method calls to the wrapped object. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#360 +class Concurrent::Async::AwaitDelegator + # Create a new delegator object wrapping the given delegate. + # + # @param delegate [AsyncDelegator] the object to wrap and delegate method calls to + # @return [AwaitDelegator] a new instance of AwaitDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#365 + def initialize(delegate); end + + # Delegates method calls to the wrapped object. + # + # @param args [Array] zero or more arguments to the method + # @param method [Symbol] the method being called + # @raise [NameError] the object does not respond to `method` method + # @raise [ArgumentError] the given `args` do not match the arity of `method` + # @return [IVar] the result of the method call + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#378 + def method_missing(method, *args, &block); end + + private + + # Check whether the method is responsive + # + # @param method [Symbol] the method being called + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#387 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#269 +module Concurrent::Async::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/async.rb#270 + def new(*args, **_arg1, &block); end +end + +# Atoms provide a way to manage shared, synchronous, independent state. +# +# An atom is initialized with an initial value and an optional validation +# proc. At any time the value of the atom can be synchronously and safely +# changed. If a validator is given at construction then any new value +# will be checked against the validator and will be rejected if the +# validator returns false or raises an exception. +# +# There are two ways to change the value of an atom: {#compare_and_set} and +# {#swap}. The former will set the new value if and only if it validates and +# the current value matches the new value. The latter will atomically set the +# new value to the result of running the given block if and only if that +# value validates. +# +# ## Example +# +# ``` +# def next_fibonacci(set = nil) +# return [0, 1] if set.nil? +# set + [set[-2..-1].reduce{|sum,x| sum + x }] +# end +# +# # create an atom with an initial value +# atom = Concurrent::Atom.new(next_fibonacci) +# +# # send a few update requests +# 5.times do +# atom.swap{|set| next_fibonacci(set) } +# end +# +# # get the current value +# atom.value #=> [0, 1, 1, 2, 3, 5, 8] +# ``` +# +# ## Observation +# +# Atoms support observers through the {Concurrent::Observable} mixin module. +# Notification of observers occurs every time the value of the Atom changes. +# When notified the observer will receive three arguments: `time`, `old_value`, +# and `new_value`. The `time` argument is the time at which the value change +# occurred. The `old_value` is the value of the Atom when the change began +# The `new_value` is the value to which the Atom was set when the change +# completed. Note that `old_value` and `new_value` may be the same. This is +# not an error. It simply means that the change operation returned the same +# value. +# +# Unlike in Clojure, `Atom` cannot participate in {Concurrent::TVar} transactions. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://clojure.org/atoms Clojure Atoms +# @see http://clojure.org/state Values and Change - Clojure's approach to Identity and State +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#95 +class Concurrent::Atom < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Observable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new atom with the given initial value. + # + # @option opts + # @param opts [Hash] The options used to configure the atom + # @param value [Object] The initial value + # @raise [ArgumentError] if the validator is not a `Proc` (when given) + # @return [Atom] a new instance of Atom + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#121 + def initialize(value, opts = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#99 + def __initialize_atomic_fields__; end + + # Atomically sets the value of atom to the new value if and only if the + # current value of the atom is identical to the old value and the new + # value successfully validates against the (optional) validator given + # at construction. + # + # @param new_value [Object] The intended new value. + # @param old_value [Object] The expected current value. + # @return [Boolean] True if the value is changed else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#181 + def compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#102 + def deref; end + + # Atomically sets the value of atom to the new value without regard for the + # current value so long as the new value successfully validates against the + # (optional) validator given at construction. + # + # @param new_value [Object] The intended new value. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#198 + def reset(new_value); end + + # Atomically swaps the value of atom using the given block. The current + # value will be passed to the block, as will any arguments passed as + # arguments to the function. The new value will be validated against the + # (optional) validator proc given at construction. If validation fails the + # value will not be changed. + # + # Internally, {#swap} reads the current value, applies the block to it, and + # attempts to compare-and-set it in. Since another thread may have changed + # the value in the intervening time, it may have to retry, and does so in a + # spin loop. The net effect is that the value will always be the result of + # the application of the supplied block to a current value, atomically. + # However, because the block might be called multiple times, it must be free + # of side effects. + # + # @note The given block may be called multiple times, and thus should be free + # of side effects. + # @param args [Object] Zero or more arguments passed to the block. + # @raise [ArgumentError] When no block is given. + # @return [Object] The final value of the atom after all operations and + # validations are complete. + # @yield [value, args] Calculates a new value for the atom based on the + # current value and any supplied arguments. + # @yieldparam args [Object] All arguments passed to the function, in order. + # @yieldparam value [Object] The current value of the atom. + # @yieldreturn [Object] The intended new value of the atom. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#157 + def swap(*args); end + + # The current value of the atom. + # + # @return [Object] The current value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#99 + def value; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#99 + def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#99 + def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#99 + def update_value(&block); end + + # Is the new value valid? + # + # @param new_value [Object] The intended new value. + # @return [Boolean] false if the validator function returns false or raises + # an exception else true + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#216 + def valid?(new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atom.rb#99 + def value=(value); end +end + +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#119 +class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#125 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#121 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb#82 +Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean + +# Define update methods that use direct paths +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#9 +module Concurrent::AtomicDirectUpdate + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#15 + def try_update; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#24 + def try_update!; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/atomic_direct_update.rb#10 + def update; end +end + +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#136 +class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#142 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#138 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb#99 +Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum + +# An atomic reference which maintains an object reference along with a mark bit +# that can be updated atomically. +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicMarkableReference.html java.util.concurrent.atomic.AtomicMarkableReference +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#10 +class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AtomicMarkableReference] a new instance of AtomicMarkableReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#15 + def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#12 + def __initialize_atomic_fields__; end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_mark [Boolean] the expected mark + # @param expected_val [Object] the expected value + # @param new_mark [Boolean] the new mark + # @param new_val [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#33 + def compare_and_set(expected_val, new_val, expected_mark, new_mark); end + + # Atomically sets the value and mark to the given updated value and + # mark given both: + # - the current value == the expected value && + # - the current mark == the expected mark + # + # that the actual value was not equal to the expected value or the + # actual mark was not equal to the expected mark + # + # @param expected_mark [Boolean] the expected mark + # @param expected_val [Object] the expected value + # @param new_mark [Boolean] the new mark + # @param new_val [Object] the new value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#59 + def compare_and_swap(expected_val, new_val, expected_mark, new_mark); end + + # Gets the current reference and marked values. + # + # @return [Array] the current reference and marked values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#64 + def get; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#78 + def mark; end + + # Gets the current marked value + # + # @return [Boolean] the current marked value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#82 + def marked?; end + + # _Unconditionally_ sets to the given value of both the reference and + # the mark. + # + # @param new_mark [Boolean] the new mark + # @param new_val [Object] the new value + # @return [Array] both the new value and the new mark + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#91 + def set(new_val, new_mark); end + + # Pass the current value to the given block, replacing it with the + # block's result. Simply return nil if update fails. + # + # the update failed + # + # @return [Array] the new value and marked state, or nil if + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_mark [Boolean] the starting state of marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#152 + def try_update; end + + # Pass the current value to the given block, replacing it + # with the block's result. Raise an exception if the update + # fails. + # + # @raise [Concurrent::ConcurrentUpdateError] if the update fails + # @return [Array] the new value and marked state + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_mark [Boolean] the starting state of marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#128 + def try_update!; end + + # Pass the current value and marked state to the given block, replacing it + # with the block's results. May retry if the value changes during the + # block's execution. + # + # @return [Array] the new value and new mark + # @yield [Object] Calculate a new value and marked state for the atomic + # reference using given (old) value and (old) marked + # @yieldparam old_mark [Boolean] the starting state of marked + # @yieldparam old_val [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#105 + def update; end + + # Gets the current value of the reference + # + # @return [Object] the current value of the reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#71 + def value; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#12 + def compare_and_set_reference(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#163 + def immutable_array(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#12 + def reference; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#12 + def reference=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#12 + def swap_reference(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb#12 + def update_reference(&block); end +end + +# Special "compare and set" handling of numeric values. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#7 +module Concurrent::AtomicNumericCompareAndSetWrapper + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param new_value [Object] the new value + # @param old_value [Object] the expected value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb#10 + def compare_and_set(old_value, new_value); end +end + +# An object reference that may be updated atomically. All read and write +# operations have java volatile semantic. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/package-summary.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#126 +class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#133 + def inspect; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#129 + def to_s; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb#18 +Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#30 +class Concurrent::CRubySet < ::Set + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def initialize(*args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def &(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def +(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def -(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def <(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def <<(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def <=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def <=>(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def ==(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def ===(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def >(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def >=(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def ^(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def add(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def add?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def classify(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def clear(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def collect!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def compare_by_identity(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def compare_by_identity?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def delete(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def delete?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def delete_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def difference(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def disjoint?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def divide(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def each(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def empty?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def eql?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def filter!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def flatten(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def flatten!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def flatten_merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def freeze(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def hash(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def include?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def inspect(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def intersect?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def intersection(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def join(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def keep_if(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def length(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def map!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def member?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def merge(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def pretty_print(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def pretty_print_cycle(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def proper_subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def proper_superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def reject!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def replace(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def reset(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def select!(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def size(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def subset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def subtract(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def superset?(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def to_a(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def to_s(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def to_set(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def union(*args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def |(*args); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#33 + def initialize_copy(other); end +end + +# A thread pool that dynamically grows and shrinks to fit the current workload. +# New threads are created as needed, existing threads are reused, and threads +# that remain idle for too long are killed and removed from the pool. These +# pools are particularly suited to applications that perform a high volume of +# short-lived tasks. +# +# On creation a `CachedThreadPool` has zero running threads. New threads are +# created on the pool as new operations are `#post`. The size of the pool +# will grow until `#max_length` threads are in the pool or until the number +# of threads exceeds the number of running and pending operations. When a new +# operation is post to the pool the first available idle thread will be tasked +# with the new operation. +# +# Should a thread crash for any reason the thread will immediately be removed +# from the pool. Similarly, threads which remain idle for an extended period +# of time will be killed and reclaimed. Thus these thread pools are very +# efficient at reclaiming unused resources. +# +# The API and behavior of this class are based on Java's `CachedThreadPool` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#27 +class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [CachedThreadPool] a new instance of CachedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#39 + def initialize(opts = T.unsafe(nil)); end + + private + + # Create a new thread pool. + # + # @option opts + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb#51 + def ns_initialize(opts); end +end + +# Raised when an asynchronous operation is cancelled before execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#9 +class Concurrent::CancelledOperationError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 +module Concurrent::Collection; end + +# A thread safe observer set implemented using copy-on-read approach: +# observers are added and removed from a thread safe collection; every time +# a notification is required the internal data structure is copied to +# prevent concurrency issues +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#12 +class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnNotifyObserverSet] a new instance of CopyOnNotifyObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#14 + def initialize; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#20 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#55 + def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#39 + def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#47 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#62 + def notify_observers(*args, &block); end + + protected + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#80 + def ns_initialize; end + + private + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#86 + def duplicate_and_clear_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#94 + def duplicate_observers; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb#98 + def notify_to(observers, *args); end +end + +# A thread safe observer set implemented using copy-on-write approach: +# every time an observer is added or removed the whole internal data structure is +# duplicated and replaced with a new one. +# +# @api private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#11 +class Concurrent::Collection::CopyOnWriteObserverSet < ::Concurrent::Synchronization::LockableObject + # @api private + # @return [CopyOnWriteObserverSet] a new instance of CopyOnWriteObserverSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#13 + def initialize; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#19 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#56 + def count_observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#40 + def delete_observer(observer); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#50 + def delete_observers; end + + # Notifies all registered observers with optional args and deletes them. + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#72 + def notify_and_delete_observers(*args, &block); end + + # Notifies all registered observers with optional args + # + # @api private + # @param args [Object] arguments to be passed to each observer + # @return [CopyOnWriteObserverSet] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#63 + def notify_observers(*args, &block); end + + protected + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#80 + def ns_initialize; end + + private + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#102 + def clear_observers_and_return_old; end + + # @api private + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#86 + def notify_to(observers, *args); end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#94 + def observers; end + + # @api private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb#98 + def observers=(new_set); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#10 +Concurrent::Collection::MapImplementation = Concurrent::Collection::MriMapBackend + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#10 +class Concurrent::Collection::MriMapBackend < ::Concurrent::Collection::NonConcurrentMapBackend + # @return [MriMapBackend] a new instance of MriMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#12 + def initialize(options = T.unsafe(nil), &default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#17 + def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#61 + def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#33 + def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#21 + def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#29 + def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#53 + def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#57 + def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#49 + def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#37 + def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#45 + def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb#41 + def replace_pair(key, old_value, new_value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#9 +class Concurrent::Collection::NonConcurrentMapBackend + # WARNING: all public methods of the class must operate on the @backend + # directly without calling each other. This is important because of the + # SynchronizedMapBackend which uses a non-reentrant mutex for performance + # reasons. + # + # @return [NonConcurrentMapBackend] a new instance of NonConcurrentMapBackend + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#15 + def initialize(options = T.unsafe(nil), &default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#21 + def [](key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#25 + def []=(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#94 + def clear; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#59 + def compute(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#29 + def compute_if_absent(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#53 + def compute_if_present(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#81 + def delete(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#85 + def delete_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#99 + def each_pair; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#71 + def get_and_set(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#110 + def get_or_default(key, default_value); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#77 + def key?(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#63 + def merge_pair(key, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#46 + def replace_if_exists(key, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#37 + def replace_pair(key, old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#106 + def size; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#130 + def dupped_backend; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#124 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#134 + def pair?(key, expected_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#116 + def set_backend(default_proc); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb#138 + def store_computed_value(key, new_value); end +end + +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#50 +class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collection::RubyNonConcurrentPriorityQueue + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#59 + def <<(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#56 + def deq; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#60 + def enq(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#52 + def has_priority?(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#57 + def shift; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#54 + def size; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb#10 +Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue + +# A queue collection in which the elements are sorted based on their +# comparison (spaceship) operator `<=>`. Items are added to the queue +# at a position relative to their priority. On removal the element +# with the "highest" priority is removed. By default the sort order is +# from highest to lowest, but a lowest-to-highest sort order can be +# set on construction. +# +# The API is based on the `Queue` class from the Ruby standard library. +# +# The pure Ruby implementation, `RubyNonConcurrentPriorityQueue` uses a heap algorithm +# stored in an array. The algorithm is based on the work of Robert Sedgewick +# and Kevin Wayne. +# +# The JRuby native implementation is a thin wrapper around the standard +# library `java.util.NonConcurrentPriorityQueue`. +# +# When running under JRuby the class `NonConcurrentPriorityQueue` extends `JavaNonConcurrentPriorityQueue`. +# When running under all other interpreters it extends `RubyNonConcurrentPriorityQueue`. +# +# @note This implementation is *not* thread safe. +# @see http://algs4.cs.princeton.edu/24pq/MaxPQ.java.html +# @see http://algs4.cs.princeton.edu/24pq/index.php#2.6 +# @see http://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html +# @see http://en.wikipedia.org/wiki/Priority_queue +# @see http://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#8 +class Concurrent::Collection::RubyNonConcurrentPriorityQueue + # Create a new priority queue with no items. + # + # @option opts + # @param opts [Hash] the options for creating the queue + # @return [RubyNonConcurrentPriorityQueue] a new instance of RubyNonConcurrentPriorityQueue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#11 + def initialize(opts = T.unsafe(nil)); end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#85 + def <<(item); end + + # Removes all of the elements from this priority queue. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#18 + def clear; end + + # Deletes all items from `self` that are equal to `item`. + # + # @param item [Object] the item to be removed from the queue + # @return [Object] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#25 + def delete(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#74 + def deq; end + + # Returns `true` if `self` contains no elements. + # + # @return [Boolean] true if there are no items in the queue else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#43 + def empty?; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#86 + def enq(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#51 + def has_priority?(item); end + + # Returns `true` if the given item is present in `self` (that is, if any + # element == `item`), otherwise returns false. + # + # @param item [Object] the item to search for + # @return [Boolean] true if the item is found else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#48 + def include?(item); end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#54 + def length; end + + # Retrieves, but does not remove, the head of this queue, or returns `nil` + # if this queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#60 + def peek; end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#65 + def pop; end + + # Inserts the specified element into this priority queue. + # + # @param item [Object] the item to insert onto the queue + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#78 + def push(item); end + + # Retrieves and removes the head of this queue, or returns `nil` if this + # queue is empty. + # + # @return [Object] the head of the queue or `nil` when empty + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#75 + def shift; end + + # The current length of the queue. + # + # @return [Fixnum] the number of items in the queue + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#57 + def size; end + + private + + # Are the items at the given indexes ordered based on the priority + # order specified at construction? + # + # @param x [Integer] the first index from which to retrieve a comparable value + # @param y [Integer] the second index from which to retrieve a comparable value + # @return [Boolean] true if the two elements are in the correct priority order + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#119 + def ordered?(x, y); end + + # Percolate down to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#128 + def sink(k); end + + # Exchange the values at the given indexes within the internal array. + # + # @param x [Integer] the first index to swap + # @param y [Integer] the second index to swap + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#103 + def swap(x, y); end + + # Percolate up to maintain heap invariant. + # + # @param k [Integer] the index at which to start the percolation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#147 + def swim(k); end + + class << self + # @!macro priority_queue_method_from_list + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb#89 + def from_list(list, opts = T.unsafe(nil)); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/timeout_queue.rb#15 +class Concurrent::Collection::TimeoutQueue < ::Thread::Queue; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/timeout_queue.rb#5 +Concurrent::Collection::TimeoutQueueImplementation = Thread::Queue + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#2 +module Concurrent::Concern; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#8 +module Concurrent::Concern::Deprecation + include ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#12 + def deprecated(message, strip = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/deprecation.rb#27 + def deprecated_method(old_name, new_name); end +end + +# Object references in Ruby are mutable. This can lead to serious problems when +# the `#value` of a concurrent object is a mutable reference. Which is always the +# case unless the value is a `Fixnum`, `Symbol`, or similar "primitive" data type. +# Most classes in this library that expose a `#value` getter method do so using the +# `Dereferenceable` mixin module. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#11 +module Concurrent::Concern::Dereferenceable + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#24 + def deref; end + + # Return the value this object represents after applying the options specified + # by the `#set_deref_options` method. + # + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#21 + def value; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#63 + def apply_deref_options(value); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#54 + def ns_set_deref_options(opts); end + + # Set the options which define the operations #value performs before + # returning data to the caller (dereferencing). + # + # @note Most classes that include this module will call `#set_deref_options` + # from within the constructor, thus allowing these options to be set at + # object creation. + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining dereference behavior. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#48 + def set_deref_options(opts = T.unsafe(nil)); end + + # Set the internal value of this object + # + # @param value [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/dereferenceable.rb#31 + def value=(value); end +end + +# Include where logging is needed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#9 +module Concurrent::Concern::Logging + # Logs through {Concurrent.global_logger}, it can be overridden by setting @logger + # + # @param level [Integer] one of Concurrent::Concern::Logging constants + # @param message [String, nil] when nil block is used to generate the message + # @param progname [String] e.g. a path of an Actor + # @yieldreturn [String] a message + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#19 + def log(level, progname, message = T.unsafe(nil), &block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 +Concurrent::Concern::Logging::DEBUG = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 +Concurrent::Concern::Logging::ERROR = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 +Concurrent::Concern::Logging::FATAL = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 +Concurrent::Concern::Logging::INFO = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#12 +Concurrent::Concern::Logging::SEV_LABEL = T.let(T.unsafe(nil), Array) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 +Concurrent::Concern::Logging::UNKNOWN = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#11 +Concurrent::Concern::Logging::WARN = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#10 +module Concurrent::Concern::Obligation + include ::Concurrent::Concern::Dereferenceable + + # Has the obligation completed processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#49 + def complete?; end + + # @example allows Obligation to be risen + # rejected_ivar = Ivar.new.fail + # raise rejected_ivar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#126 + def exception(*args); end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#20 + def fulfilled?; end + + # Is the obligation still awaiting completion of processing? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#56 + def incomplete?; end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#89 + def no_error!(timeout = T.unsafe(nil)); end + + # Is obligation completion still pending? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#35 + def pending?; end + + # Has the obligation been fulfilled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#23 + def realized?; end + + # If an exception was raised during processing this will return the + # exception object. Will return `nil` when the state is pending or if + # the obligation has been successfully fulfilled. + # + # @return [Exception] the exception raised during processing or `nil` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#119 + def reason; end + + # Has the obligation been rejected? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#28 + def rejected?; end + + # The current state of the obligation. + # + # @return [Symbol] the current state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#110 + def state; end + + # Is the obligation still unscheduled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#42 + def unscheduled?; end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#65 + def value(timeout = T.unsafe(nil)); end + + # The current value of the obligation. Will be `nil` while the state is + # pending or the operation has been rejected. Will re-raise any exceptions + # raised during processing (but will not raise an exception on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Object] see Dereferenceable#deref + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#98 + def value!(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout has been reached. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#74 + def wait(timeout = T.unsafe(nil)); end + + # Wait until obligation is complete or the timeout is reached. Will re-raise + # any exceptions raised during processing (but will not raise an exception + # on timeout). + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @raise [Exception] raises the reason when rejected + # @return [Obligation] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#86 + def wait!(timeout = T.unsafe(nil)); end + + protected + + # Atomic compare and set operation + # State is set to `next_state` only if `current state == expected_current`. + # + # @param expected_current [Symbol] + # @param next_state [Symbol] + # @return [Boolean] true is state is changed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#174 + def compare_and_set_state(next_state, *expected_current); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#145 + def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#134 + def get_arguments_from(opts = T.unsafe(nil)); end + + # Executes the block within mutex if current state is included in expected_states + # + # @return block value if executed, false otherwise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#190 + def if_state(*expected_states); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#139 + def init_obligation; end + + # Am I in the current state? + # + # @param expected [Symbol] The state to check against + # @return [Boolean] true if in the expected state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#210 + def ns_check_state?(expected); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#215 + def ns_set_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#150 + def set_state(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/obligation.rb#161 + def state=(value); end +end + +# The [observer pattern](http://en.wikipedia.org/wiki/Observer_pattern) is one +# of the most useful design patterns. +# +# The workflow is very simple: +# - an `observer` can register itself to a `subject` via a callback +# - many `observers` can be registered to the same `subject` +# - the `subject` notifies all registered observers when its status changes +# - an `observer` can deregister itself when is no more interested to receive +# event notifications +# +# In a single threaded environment the whole pattern is very easy: the +# `subject` can use a simple data structure to manage all its subscribed +# `observer`s and every `observer` can react directly to every event without +# caring about synchronization. +# +# In a multi threaded environment things are more complex. The `subject` must +# synchronize the access to its data structure and to do so currently we're +# using two specialized ObserverSet: {Concurrent::Concern::CopyOnWriteObserverSet} +# and {Concurrent::Concern::CopyOnNotifyObserverSet}. +# +# When implementing and `observer` there's a very important rule to remember: +# **there are no guarantees about the thread that will execute the callback** +# +# Let's take this example +# ``` +# class Observer +# def initialize +# @count = 0 +# end +# +# def update +# @count += 1 +# end +# end +# +# obs = Observer.new +# [obj1, obj2, obj3, obj4].each { |o| o.add_observer(obs) } +# # execute [obj1, obj2, obj3, obj4] +# ``` +# +# `obs` is wrong because the variable `@count` can be accessed by different +# threads at the same time, so it should be synchronized (using either a Mutex +# or an AtomicFixum) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#50 +module Concurrent::Concern::Observable + # Adds an observer to this set. If a block is passed, the observer will be + # created by this method and no other params should be passed. + # + # @param func [Symbol] the function to call on the observer during notification. + # Default is :update + # @param observer [Object] the observer to add + # @return [Object] the added observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#61 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Return the number of observers associated with this object. + # + # @return [Integer] the observers count + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#101 + def count_observers; end + + # Remove `observer` as an observer on this object so that it will no + # longer receive notifications. + # + # @param observer [Object] the observer to remove + # @return [Object] the deleted observer + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#82 + def delete_observer(observer); end + + # Remove all observers associated with this object. + # + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#91 + def delete_observers; end + + # As `#add_observer` but can be used for chaining. + # + # @param func [Symbol] the function to call on the observer during notification. + # @param observer [Object] the observer to add + # @return [Observable] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#70 + def with_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + protected + + # Returns the value of attribute observers. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 + def observers; end + + # Sets the attribute observers + # + # @param value the value to set the attribute observers to. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/observable.rb#107 + def observers=(_arg0); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#70 +class Concurrent::ConcurrentUpdateError < ::ThreadError; end + +# frozen pre-allocated backtrace to speed ConcurrentUpdateError +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#72 +Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) + +# Raised when errors occur during configuration. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#6 +class Concurrent::ConfigurationError < ::Concurrent::Error; end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# @example Waiter and Decrementer +# latch = Concurrent::CountDownLatch.new(3) +# +# waiter = Thread.new do +# latch.wait() +# puts ("Waiter released") +# end +# +# decrementer = Thread.new do +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# +# sleep(1) +# latch.count_down +# puts latch.count +# end +# +# [waiter, decrementer].each(&:join) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#98 +class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb#56 +Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch + +# A synchronization aid that allows a set of threads to all wait for each +# other to reach a common barrier point. +# +# @example +# barrier = Concurrent::CyclicBarrier.new(3) +# jobs = Array.new(3) { |i| -> { sleep i; p done: i } } +# process = -> (i) do +# # waiting to start at the same time +# barrier.wait +# # execute job +# jobs[i].call +# # wait for others to finish +# barrier.wait +# end +# threads = 2.times.map do |i| +# Thread.new(i, &process) +# end +# +# # use main as well +# process.call 2 +# +# # here we can be sure that all jobs are processed +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#27 +class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject + # Create a new `CyclicBarrier` that waits for `parties` threads + # + # @param parties [Fixnum] the number of parties + # @raise [ArgumentError] if `parties` is not an integer or is less than zero + # @return [CyclicBarrier] a new instance of CyclicBarrier + # @yield an optional block that will be executed that will be executed after + # the last thread arrives and before the others are released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#40 + def initialize(parties, &block); end + + # A barrier can be broken when: + # - a thread called the `reset` method while at least one other thread was waiting + # - at least one thread timed out on `wait` method + # + # A broken barrier can be restored using `reset` it's safer to create a new one + # + # @return [Boolean] true if the barrier is broken otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#105 + def broken?; end + + # @return [Fixnum] the number of threads currently waiting on the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#54 + def number_waiting; end + + # @return [Fixnum] the number of threads needed to pass the barrier + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#49 + def parties; end + + # resets the barrier to its initial state + # If there is at least one waiting thread, it will be woken up, the `wait` + # method will return false and the barrier will be broken + # If the barrier is broken, this method restores it to the original state + # + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#95 + def reset; end + + # Blocks on the barrier until the number of waiting threads is equal to + # `parties` or until `timeout` is reached or `reset` is called + # If a block has been passed to the constructor, it will be executed once by + # the last arrived thread before releasing the others + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or + # `nil` to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on + # `timeout` or on `reset` or if the barrier is broken + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#66 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#111 + def ns_generation_done(generation, status, continue = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#122 + def ns_initialize(parties, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#117 + def ns_next_generation; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 +class Concurrent::CyclicBarrier::Generation < ::Struct + # Returns the value of attribute status + # + # @return [Object] the current value of status + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def status; end + + # Sets the attribute status + # + # @param value [Object] the value to set the attribute status to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def status=(_); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def [](*_arg0); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def keyword_init?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def members; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb#30 + def new(*_arg0); end + end +end + +# Lazy evaluation of a block yielding an immutable result. Useful for +# expensive operations that may never be needed. It may be non-blocking, +# supports the `Concern::Obligation` interface, and accepts the injection of +# custom executor upon which to execute the block. Processing of +# block will be deferred until the first time `#value` is called. +# At that time the caller can choose to return immediately and let +# the block execute asynchronously, block indefinitely, or block +# with a timeout. +# +# When a `Delay` is created its state is set to `pending`. The value and +# reason are both `nil`. The first time the `#value` method is called the +# enclosed operation will be run and the calling thread will block. Other +# threads attempting to call `#value` will block as well. Once the operation +# is complete the *value* will be set to the result of the operation or the +# *reason* will be set to the raised exception, as appropriate. All threads +# blocked on `#value` will return. Subsequent calls to `#value` will immediately +# return the cached value. The operation will only be run once. This means that +# any side effects created by the operation will only happen once as well. +# +# `Delay` includes the `Concurrent::Concern::Dereferenceable` mixin to support thread +# safety of the reference returned by `#value`. +# +# @note The default behavior of `Delay` is to block indefinitely when +# calling either `value` or `wait`, executing the delayed operation on +# the current thread. This makes the `timeout` value completely +# irrelevant. To enable non-blocking behavior, use the `executor` +# constructor option. This will cause the delayed operation to be +# execute on the given executor, allowing the call to timeout. +# @see Concurrent::Concern::Dereferenceable +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#44 +class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + + # Create a new `Delay` in the `:pending` state. + # + # @raise [ArgumentError] if no block is given + # @return [Delay] a new instance of Delay + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#62 + def initialize(opts = T.unsafe(nil), &block); end + + # Reconfigures the block returning the value if still `#incomplete?` + # + # @return [true, false] if success + # @yield the delayed operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#146 + def reconfigure(&block); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception this method will return nil. The exception object + # can be accessed via the `#reason` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#77 + def value(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. If the delayed operation + # raised an exception, this method will raise that exception (even when) + # the operation has already been executed). + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Numeric] the maximum number of seconds to wait + # @raise [Exception] when `#rejected?` raises `#reason` + # @return [Object] the current value of the object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#113 + def value!(timeout = T.unsafe(nil)); end + + # Return the value this object represents after applying the options + # specified by the `#set_deref_options` method. + # + # @note The default behavior of `Delay` is to block indefinitely when + # calling either `value` or `wait`, executing the delayed operation on + # the current thread. This makes the `timeout` value completely + # irrelevant. To enable non-blocking behavior, use the `executor` + # constructor option. This will cause the delayed operation to be + # execute on the given executor, allowing the call to timeout. + # @param timeout [Integer] (nil) the maximum number of seconds to wait for + # the value to be computed. When `nil` the caller will block indefinitely. + # @return [Object] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#132 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#160 + def ns_initialize(opts, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/delay.rb#173 + def execute_task_once; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#7 +class Concurrent::DependencyCounter + # @return [DependencyCounter] a new instance of DependencyCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#9 + def initialize(count, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#14 + def update(time, value, reason); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#3 +class Concurrent::Error < ::StandardError; end + +# Old school kernel-style event reminiscent of Win32 programming in C++. +# +# When an `Event` is created it is in the `unset` state. Threads can choose to +# `#wait` on the event, blocking until released by another thread. When one +# thread wants to alert all blocking threads it calls the `#set` method which +# will then wake up all listeners. Once an `Event` has been set it remains set. +# New threads calling `#wait` will return immediately. An `Event` may be +# `#reset` at any time once it has been set. +# +# @example +# event = Concurrent::Event.new +# +# t1 = Thread.new do +# puts "t1 is waiting" +# event.wait(1) +# puts "event occurred" +# end +# +# t2 = Thread.new do +# puts "t2 calling set" +# event.set +# end +# +# [t1, t2].each(&:join) +# +# # prints: +# # t1 is waiting +# # t2 calling set +# # event occurred +# @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms682655.aspx +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#36 +class Concurrent::Event < ::Concurrent::Synchronization::LockableObject + # Creates a new `Event` in the unset state. Threads calling `#wait` on the + # `Event` will block. + # + # @return [Event] a new instance of Event + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#40 + def initialize; end + + # Reset a previously set event back to the `unset` state. + # Has no effect if the `Event` has not yet been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#68 + def reset; end + + # Trigger the event, setting the state to `set` and releasing all threads + # waiting on the event. Has no effect if the `Event` has already been set. + # + # @return [Boolean] should always return `true` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#56 + def set; end + + # Is the object in the set state? + # + # @return [Boolean] indicating whether or not the `Event` has been set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#48 + def set?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#60 + def try?; end + + # Wait a given number of seconds for the `Event` to be set by another + # thread. Will wait forever when no `timeout` value is given. Returns + # immediately if the `Event` has already been set. + # + # @return [Boolean] true if the `Event` was set before timeout else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#83 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#104 + def ns_initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/event.rb#96 + def ns_set; end +end + +# A synchronization point at which threads can pair and swap elements within +# pairs. Each thread presents some object on entry to the exchange method, +# matches with a partner thread, and receives its partner's object on return. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# This implementation is very simple, using only a single slot for each +# exchanger (unlike more advanced implementations which use an "arena"). +# This approach will work perfectly fine when there are only a few threads +# accessing a single `Exchanger`. Beyond a handful of threads the performance +# will degrade rapidly due to contention on the single slot, but the algorithm +# will remain correct. +# +# @example +# +# exchanger = Concurrent::Exchanger.new +# +# threads = [ +# Thread.new { puts "first: " << exchanger.exchange('foo', 1) }, #=> "first: bar" +# Thread.new { puts "second: " << exchanger.exchange('bar', 1) } #=> "second: foo" +# ] +# threads.each {|t| t.join(2) } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Exchanger.html java.util.concurrent.Exchanger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#336 +class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#327 +Concurrent::ExchangerImplementation = Concurrent::RubyExchanger + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#157 +module Concurrent::ExecutorService + include ::Concurrent::Concern::Logging + + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#166 + def <<(task); end + + # Does the task queue have a maximum size? + # + # @note Always returns `false` + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#174 + def can_overflow?; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#161 + def post(*args, &task); end + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `false` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/executor_service.rb#181 + def serialized?; end +end + +# A `FiberLocalVar` is a variable where the value is different for each fiber. +# Each variable may have a default value, but when you modify the variable only +# the current fiber will ever see that change. +# +# This is similar to Ruby's built-in fiber-local variables (`Thread.current[:name]`), +# but with these major advantages: +# * `FiberLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in fiber-local variable leaks some memory forever (it's a Symbol held forever on the fiber), +# so it's only OK to create a small amount of them. +# `FiberLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in fiber-local variables leak forever the value set on each fiber (unless set to nil explicitly). +# `FiberLocalVar` automatically removes the mapping for each fiber once the `FiberLocalVar` instance is GC'd. +# +# @example +# v = FiberLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = FiberLocalVar.new(14) +# +# Fiber.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end.resume +# +# Fiber.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end.resume +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#41 +class Concurrent::FiberLocalVar + # Creates a fiber local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each fiber + # @return [FiberLocalVar] a new instance of FiberLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#49 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to fiber local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#86 + def bind(value); end + + # Returns the value in the current fiber's copy of this fiber-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#68 + def value; end + + # Sets the current fiber's copy of this fiber-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#76 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#101 + def default; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/fiber_local_var.rb#42 +Concurrent::FiberLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::FiberLocals) + +# An array-backed storage of indexed variables per fiber. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#166 +class Concurrent::FiberLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#167 + def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#171 + def locals!; end +end + +# A thread pool that reuses a fixed number of threads operating off an unbounded queue. +# At any point, at most `num_threads` will be active processing tasks. When all threads are busy new +# tasks `#post` to the thread pool are enqueued until a thread becomes available. +# Should a thread crash for any reason the thread will immediately be removed +# from the pool and replaced. +# +# The API and behavior of this class are based on Java's `FixedThreadPool` +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#199 +class Concurrent::FixedThreadPool < ::Concurrent::ThreadPoolExecutor + # Create a new thread pool. + # + # @option opts + # @param num_threads [Integer] the number of threads to allocate + # @param opts [Hash] the options defining pool behavior. + # @raise [ArgumentError] if `num_threads` is less than or equal to zero + # @raise [ArgumentError] if `fallback_policy` is not a known policy + # @return [FixedThreadPool] a new instance of FixedThreadPool + # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int- + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb#213 + def initialize(num_threads, opts = T.unsafe(nil)); end +end + +# {include:file:docs-source/future.md} +# +# @see http://clojuredocs.org/clojure_core/clojure.core/future Clojure's future function +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html java.util.concurrent.Future +# @see http://ruby-doc.org/stdlib-2.1.1/libdoc/observer/rdoc/Observable.html Ruby Observable module +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#21 +class Concurrent::Future < ::Concurrent::IVar + # Create a new `Future` in the `:unscheduled` state. + # + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] a new instance of Future + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#33 + def initialize(opts = T.unsafe(nil), &block); end + + # Attempt to cancel the operation if it has not already processed. + # The operation can only be cancelled while still `pending`. It cannot + # be cancelled once it has begun processing or has completed. + # + # @return [Boolean] was the operation successfully cancelled. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#99 + def cancel; end + + # Has the operation been successfully cancelled? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#111 + def cancelled?; end + + # Execute an `:unscheduled` `Future`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Future` is in any state other than `:unscheduled`. + # + # @example Instance and execute in one line + # future = Concurrent::Future.new{ sleep(1); 42 }.execute + # future.state #=> :pending + # @example Instance and execute in separate steps + # future = Concurrent::Future.new{ sleep(1); 42 } + # future.state #=> :unscheduled + # future.execute + # future.state #=> :pending + # @return [Future] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#53 + def execute; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#82 + def set(value = T.unsafe(nil), &block); end + + # Wait the given number of seconds for the operation to complete. + # On timeout attempt to cancel the operation. + # + # @param timeout [Numeric] the maximum time in seconds to wait. + # @return [Boolean] true if the operation completed before the timeout + # else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#121 + def wait_or_cancel(timeout); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#133 + def ns_initialize(value, opts); end + + class << self + # Create a new `Future` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # future = Concurrent::Future.execute{ sleep(1); 42 } + # future.state #=> :pending + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Future] the newly created `Future` in the `:pending` state + # @yield the asynchronous operation to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/future.rb#77 + def execute(opts = T.unsafe(nil), &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#18 +Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#30 +Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#22 +Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#111 +Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/configuration.rb#26 +Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) + +# A thread-safe subclass of Hash. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`, +# which takes the lock repeatedly when reading an item. +# +# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#49 +class Concurrent::Hash < ::Hash; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 +Concurrent::HashImplementation = Hash + +# An `IVar` is like a future that you can assign. As a future is a value that +# is being computed that you can wait on, an `IVar` is a value that is waiting +# to be assigned, that you can wait on. `IVars` are single assignment and +# deterministic. +# +# Then, express futures as an asynchronous computation that assigns an `IVar`. +# The `IVar` becomes the primitive on which [futures](Future) and +# [dataflow](Dataflow) are built. +# +# An `IVar` is a single-element container that is normally created empty, and +# can only be set once. The I in `IVar` stands for immutable. Reading an +# `IVar` normally blocks until it is set. It is safe to set and read an `IVar` +# from different threads. +# +# If you want to have some parallel task set the value in an `IVar`, you want +# a `Future`. If you want to create a graph of parallel tasks all executed +# when the values they depend on are ready you want `dataflow`. `IVar` is +# generally a low-level primitive. +# +# ## Examples +# +# Create, set and get an `IVar` +# +# ```ruby +# ivar = Concurrent::IVar.new +# ivar.set 14 +# ivar.value #=> 14 +# ivar.set 2 # would now be an error +# ``` +# +# ## See Also +# +# 1. For the theory: Arvind, R. Nikhil, and K. Pingali. +# [I-Structures: Data structures for parallel computing](http://dl.acm.org/citation.cfm?id=69562). +# In Proceedings of Workshop on Graph Reduction, 1986. +# 2. For recent application: +# [DataDrivenFuture in Habanero Java from Rice](http://www.cs.rice.edu/~vs3/hjlib/doc/edu/rice/hj/api/HjDataDrivenFuture.html). +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#48 +class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + include ::Concurrent::Concern::Observable + + # Create a new `IVar` in the `:pending` state with the (optional) initial value. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options to create a message with + # @param value [Object] the initial value + # @return [IVar] a new instance of IVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#62 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end + + # Add an observer on this object that will receive notification on update. + # + # Upon completion the `IVar` will notify all observers in a thread-safe way. + # The `func` method of the observer will be called with three arguments: the + # `Time` at which the `Future` completed the asynchronous operation, the + # final `value` (or `nil` on rejection), and the final `reason` (or `nil` on + # fulfillment). + # + # @param func [Symbol] symbol naming the method to call when this + # `Observable` has changes` + # @param observer [Object] the object that will be notified of changes + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#81 + def add_observer(observer = T.unsafe(nil), func = T.unsafe(nil), &block); end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#135 + def fail(reason = T.unsafe(nil)); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#113 + def set(value = T.unsafe(nil)); end + + # Attempt to set the `IVar` with the given value or block. Return a + # boolean indicating the success or failure of the set operation. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @return [Boolean] true if the value was set else false + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#145 + def try_set(value = T.unsafe(nil), &block); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#202 + def check_for_block_or_value!(block_given, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#177 + def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#184 + def complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#190 + def notify_observers(value, reason); end + + # @raise [MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#195 + def ns_complete_without_notification(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#155 + def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/ivar.rb#168 + def safe_execute(task, args = T.unsafe(nil)); end +end + +# Raised when an operation is attempted which is not legal given the +# receiver's current state +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#20 +class Concurrent::IllegalOperationError < ::Concurrent::Error; end + +# An executor service which runs all operations on the current thread, +# blocking as necessary. Operations are performed in the order they are +# received and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used +# it immediately runs every `#post` operation on the current thread, blocking +# that thread until the operation is complete. This can be very beneficial +# during testing because it makes all operations deterministic. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#17 +class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService + include ::Concurrent::SerialExecutorService + + # Creates a new executor + # + # @return [ImmediateExecutor] a new instance of ImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#21 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#34 + def <<(task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#59 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#26 + def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#40 + def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#55 + def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#50 + def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#45 + def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/immediate_executor.rb#62 + def wait_for_termination(timeout = T.unsafe(nil)); end +end + +# Raised when an attempt is made to violate an immutability guarantee. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#16 +class Concurrent::ImmutabilityError < ::Concurrent::Error; end + +# A thread-safe, immutable variation of Ruby's standard `Struct`. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#9 +module Concurrent::ImmutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#51 + def ==(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#46 + def [](member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#56 + def each(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#62 + def each_pair(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#29 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#36 + def merge(other, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#68 + def select(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#21 + def to_a; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#41 + def to_h; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#33 + def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#17 + def values; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#24 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#76 + def initialize_copy(original); end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#12 + def included(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#82 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/immutable_struct.rb#92 +Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service which runs all operations on a new thread, blocking +# until it completes. Operations are performed in the order they are received +# and no two operations can be performed simultaneously. +# +# This executor service exists mainly for testing an debugging. When used it +# immediately runs every `#post` operation on a new thread, blocking the +# current thread until the operation is complete. This is similar to how the +# ImmediateExecutor works, but the operation has the full stack of the new +# thread at its disposal. This can be helpful when the operations will spawn +# more operations on the same executor and so on - such a situation might +# overflow the single stack in case of an ImmediateExecutor, which is +# inconsistent with how it would behave for a threaded executor. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#19 +class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor + # Creates a new executor + # + # @return [IndirectImmediateExecutor] a new instance of IndirectImmediateExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#21 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb#27 + def post(*args, &task); end +end + +# Raised when an object's methods are called when it has not been +# properly initialized. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#24 +class Concurrent::InitializationError < ::Concurrent::Error; end + +# Raised when a lifecycle method (such as `stop`) is called in an improper +# sequence or when the object is in an inappropriate state. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#13 +class Concurrent::LifecycleError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#6 +class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object + include ::Enumerable + extend ::Concurrent::Synchronization::SafeInitialization + + # @param head [Node] + # @return [LockFreeStack] a new instance of LockFreeStack + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#51 + def initialize(head = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#37 + def __initialize_atomic_fields__; end + + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#118 + def clear; end + + # @return [self] + # @yield over the cleared stack + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#142 + def clear_each(&block); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#128 + def clear_if(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#99 + def compare_and_clear(head); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#85 + def compare_and_pop(head); end + + # @param head [Node] + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#65 + def compare_and_push(head, value); end + + # @param head [Node] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#107 + def each(head = T.unsafe(nil)); end + + # @param head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#58 + def empty?(head = T.unsafe(nil)); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#158 + def inspect; end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#79 + def peek; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#90 + def pop; end + + # @param value [Object] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#71 + def push(value); end + + # @param head [Node] + # @param new_head [Node] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#135 + def replace_if(head, new_head); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#154 + def to_s; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#37 + def compare_and_set_head(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#37 + def head; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#37 + def head=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#37 + def swap_head(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#37 + def update_head(&block); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#41 + def of1(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#46 + def of2(value1, value2); end + end +end + +# The singleton for empty node +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#32 +Concurrent::LockFreeStack::EMPTY = T.let(T.unsafe(nil), Concurrent::LockFreeStack::Node) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#10 +class Concurrent::LockFreeStack::Node + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#23 + def initialize(value, next_node); end + + # @return [Node] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#14 + def next_node; end + + # @return [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#17 + def value; end + + # allow to nil-ify to free GC when the entry is no longer relevant, not synchronised + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#21 + def value=(_arg0); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb#28 + def [](*_arg0); end + end +end + +# Either {FiberLocalVar} or {ThreadLocalVar} depending on whether Mutex (and Monitor) +# are held, respectively, per Fiber or per Thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/lock_local_var.rb#22 +Concurrent::LockLocalVar = Concurrent::FiberLocalVar + +# An `MVar` is a synchronized single element container. They are empty or +# contain one item. Taking a value from an empty `MVar` blocks, as does +# putting a value into a full one. You can either think of them as blocking +# queue of length one, or a special kind of mutable variable. +# +# On top of the fundamental `#put` and `#take` operations, we also provide a +# `#modify` that is atomic with respect to operations on the same instance. +# These operations all support timeouts. +# +# We also support non-blocking operations `#try_put!` and `#try_take!`, a +# `#set!` that ignores existing values, a `#value` that returns the value +# without removing it or returns `MVar::EMPTY`, and a `#modify!` that yields +# `MVar::EMPTY` if the `MVar` is empty and can be used to set `MVar::EMPTY`. +# You shouldn't use these operations in the first instance. +# +# `MVar` is a [Dereferenceable](Dereferenceable). +# +# `MVar` is related to M-structures in Id, `MVar` in Haskell and `SyncVar` in Scala. +# +# Note that unlike the original Haskell paper, our `#take` is blocking. This is how +# Haskell and Scala do it today. +# +# ## See Also +# +# 1. P. Barth, R. Nikhil, and Arvind. [M-Structures: Extending a parallel, non- strict, functional language with state](http://dl.acm.org/citation.cfm?id=652538). In Proceedings of the 5th +# ACM Conference on Functional Programming Languages and Computer Architecture (FPCA), 1991. +# +# 2. S. Peyton Jones, A. Gordon, and S. Finne. [Concurrent Haskell](http://dl.acm.org/citation.cfm?id=237794). +# In Proceedings of the 23rd Symposium on Principles of Programming Languages +# (PoPL), 1996. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#38 +class Concurrent::MVar < ::Concurrent::Synchronization::Object + include ::Concurrent::Concern::Dereferenceable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `MVar`, either empty or with an initial value. + # + # @param opts [Hash] the options controlling how the future will be processed + # @return [MVar] a new instance of MVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#54 + def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end + + # acquires lock on the from an `MVAR`, yields the value to provided block, + # and release lock. A timeout can be set to limit the time spent blocked, + # in which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value returned by the block, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#86 + def borrow(timeout = T.unsafe(nil)); end + + # Returns if the `MVar` is currently empty. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#195 + def empty?; end + + # Returns if the `MVar` currently contains a value. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#200 + def full?; end + + # Atomically `take`, yield the value to a block for transformation, and then + # `put` the transformed value. Returns the pre-transform value. A timeout can + # be set to limit the time spent blocked, in which case it returns `TIMEOUT` + # if the time is exceeded. + # + # @raise [ArgumentError] + # @return [Object] the pre-transform value, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#123 + def modify(timeout = T.unsafe(nil)); end + + # Non-blocking version of `modify` that will yield with `EMPTY` if there is no value yet. + # + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#179 + def modify!; end + + # Put a value into an `MVar`, blocking if there is already a value until + # it is empty. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was put, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#103 + def put(value, timeout = T.unsafe(nil)); end + + # Non-blocking version of `put` that will overwrite an existing value. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#169 + def set!(value); end + + # Remove the value from an `MVar`, leaving it empty, and blocking if there + # isn't a value. A timeout can be set to limit the time spent blocked, in + # which case it returns `TIMEOUT` if the time is exceeded. + # + # @return [Object] the value that was taken, or `TIMEOUT` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#66 + def take(timeout = T.unsafe(nil)); end + + # Non-blocking version of `put`, that returns whether or not it was successful. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#156 + def try_put!(value); end + + # Non-blocking version of `take`, that returns `EMPTY` instead of blocking. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#142 + def try_take!; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#206 + def synchronize(&block); end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#212 + def unlocked_empty?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#216 + def unlocked_full?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#224 + def wait_for_empty(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#220 + def wait_for_full(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#228 + def wait_while(condition, timeout); end +end + +# Unique value that represents that an `MVar` was empty +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#43 +Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) + +# Unique value that represents that an `MVar` timed out before it was able +# to produce a value. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mvar.rb#47 +Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) + +# `Concurrent::Map` is a hash-like object and should have much better performance +# characteristics, especially under high concurrency, than `Concurrent::Hash`. +# However, `Concurrent::Map `is not strictly semantically equivalent to a ruby `Hash` +# -- for instance, it does not necessarily retain ordering by insertion time as `Hash` +# does. For most uses it should do fine though, and we recommend you consider +# `Concurrent::Map` instead of `Concurrent::Hash` for your concurrency-safe hash needs. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#39 +class Concurrent::Map < ::Concurrent::Collection::MriMapBackend + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#279 + def each; end + + # Iterates over each key. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key in the map + # @yieldparam key [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#255 + def each_key; end + + # Iterates over each key value pair. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each key value pair in the map + # @yieldparam key [Object] + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#274 + def each_pair; end + + # Iterates over each value. + # This method is atomic. + # + # @note Atomic methods taking a block do not allow the `self` instance + # to be used within the block. Doing so will cause a deadlock. + # @return [self] + # @yield for each value in the map + # @yieldparam value [Object] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#264 + def each_value; end + + # Is map empty? + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#291 + def empty?; end + + # Get a value with key, or default_value when key is absent, + # or fail when no default_value is given. + # + # @note The "fetch-then-act" methods of `Map` are not atomic. `Map` is intended + # to be use as a concurrency primitive with strong happens-before + # guarantees. It is not intended to be used as a high-level abstraction + # supporting complex operations. All read and write operations are + # thread safe, but no guarantees are made regarding race conditions + # between the fetch operation and yielding to the block. Additionally, + # this method does not support recursion. This is due to internal + # constraints that are very unlikely to change in the near future. + # @param default_value [Object] + # @param key [Object] + # @raise [KeyError] when key is missing and no default_value is provided + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#183 + def fetch(key, default_value = T.unsafe(nil)); end + + # Fetch value with key, or store default value when key is absent, + # or fail when no default_value is given. This is a two step operation, + # therefore not atomic. The store can overwrite other concurrently + # stored value. + # + # @param default_value [Object] + # @param key [Object] + # @return [Object] the value or default value + # @yield default value for a key + # @yieldparam key [Object] + # @yieldreturn [Object] default value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#205 + def fetch_or_store(key, default_value = T.unsafe(nil)); end + + # Get a value with key + # + # @param key [Object] + # @return [Object] the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#162 + def get(key); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#321 + def inspect; end + + # Find key of a value. + # + # @param value [Object] + # @return [Object, nil] key or nil when not found + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#284 + def key(value); end + + # All keys + # + # @return [::Array] keys + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#236 + def keys; end + + # @raise [TypeError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#305 + def marshal_dump; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#313 + def marshal_load(hash); end + + # Set a value with key + # + # @param key [Object] + # @param value [Object] + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#163 + def put(key, value); end + + # Insert value into map with key if key is absent in one atomic step. + # + # @param key [Object] + # @param value [Object] + # @return [Object, nil] the previous value when key was present or nil when there was no key + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#215 + def put_if_absent(key, value); end + + # Is the value stored in the map. Iterates over all values. + # + # @param value [Object] + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#227 + def value?(value); end + + # All values + # + # @return [::Array] values + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#244 + def values; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#331 + def initialize_copy(other); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#336 + def populate_from(hash); end + + # @raise [KeyError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#327 + def raise_fetch_no_key; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#341 + def validate_options_hash!(options); end +end + +# Raised when an object with a start/stop lifecycle has been started an +# excessive number of times. Often used in conjunction with a restart +# policy or strategy. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#29 +class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end + +# A `Maybe` encapsulates an optional value. A `Maybe` either contains a value +# of (represented as `Just`), or it is empty (represented as `Nothing`). Using +# `Maybe` is a good way to deal with errors or exceptional cases without +# resorting to drastic measures such as exceptions. +# +# `Maybe` is a replacement for the use of `nil` with better type checking. +# +# For compatibility with {Concurrent::Concern::Obligation} the predicate and +# accessor methods are aliased as `fulfilled?`, `rejected?`, `value`, and +# `reason`. +# +# ## Motivation +# +# A common pattern in languages with pattern matching, such as Erlang and +# Haskell, is to return *either* a value *or* an error from a function +# Consider this Erlang code: +# +# ```erlang +# case file:consult("data.dat") of +# {ok, Terms} -> do_something_useful(Terms); +# {error, Reason} -> lager:error(Reason) +# end. +# ``` +# +# In this example the standard library function `file:consult` returns a +# [tuple](http://erlang.org/doc/reference_manual/data_types.html#id69044) +# with two elements: an [atom](http://erlang.org/doc/reference_manual/data_types.html#id64134) +# (similar to a ruby symbol) and a variable containing ancillary data. On +# success it returns the atom `ok` and the data from the file. On failure it +# returns `error` and a string with an explanation of the problem. With this +# pattern there is no ambiguity regarding success or failure. If the file is +# empty the return value cannot be misinterpreted as an error. And when an +# error occurs the return value provides useful information. +# +# In Ruby we tend to return `nil` when an error occurs or else we raise an +# exception. Both of these idioms are problematic. Returning `nil` is +# ambiguous because `nil` may also be a valid value. It also lacks +# information pertaining to the nature of the error. Raising an exception +# is both expensive and usurps the normal flow of control. All of these +# problems can be solved with the use of a `Maybe`. +# +# A `Maybe` is unambiguous with regard to whether or not it contains a value. +# When `Just` it contains a value, when `Nothing` it does not. When `Just` +# the value it contains may be `nil`, which is perfectly valid. When +# `Nothing` the reason for the lack of a value is contained as well. The +# previous Erlang example can be duplicated in Ruby in a principled way by +# having functions return `Maybe` objects: +# +# ```ruby +# result = MyFileUtils.consult("data.dat") # returns a Maybe +# if result.just? +# do_something_useful(result.value) # or result.just +# else +# logger.error(result.reason) # or result.nothing +# end +# ``` +# +# @example Returning a Maybe from a Function +# module MyFileUtils +# def self.consult(path) +# file = File.open(path, 'r') +# Concurrent::Maybe.just(file.read) +# rescue => ex +# return Concurrent::Maybe.nothing(ex) +# ensure +# file.close if file +# end +# end +# +# maybe = MyFileUtils.consult('bogus.file') +# maybe.just? #=> false +# maybe.nothing? #=> true +# maybe.reason #=> # +# +# maybe = MyFileUtils.consult('README.md') +# maybe.just? #=> true +# maybe.nothing? #=> false +# maybe.value #=> "# Concurrent Ruby\n[![Gem Version..." +# @example Using Maybe with a Block +# result = Concurrent::Maybe.from do +# Client.find(10) # Client is an ActiveRecord model +# end +# +# # -- if the record was found +# result.just? #=> true +# result.value #=> # +# +# # -- if the record was not found +# result.just? #=> false +# result.reason #=> ActiveRecord::RecordNotFound +# @example Using Maybe with the Null Object Pattern +# # In a Rails controller... +# result = ClientService.new(10).find # returns a Maybe +# render json: result.or(NullClient.new) +# @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe +# @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#104 +class Concurrent::Maybe < ::Concurrent::Synchronization::Object + include ::Comparable + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `Maybe` with the given attributes. + # + # @param just [Object] The value when `Just` else `NONE`. + # @param nothing [Exception, Object] The exception when `Nothing` else `NONE`. + # @return [Maybe] The new `Maybe`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#224 + def initialize(just, nothing); end + + # Comparison operator. + # + # @return [Integer] 0 if self and other are both `Nothing`; + # -1 if self is `Nothing` and other is `Just`; + # 1 if self is `Just` and other is nothing; + # `self.just <=> other.just` if both self and other are `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#199 + def <=>(other); end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#179 + def fulfilled?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#114 + def just; end + + # Is this `Maybe` a `Just` (successfully fulfilled with a value)? + # + # @return [Boolean] True if `Just` or false if `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#176 + def just?; end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#117 + def nothing; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#184 + def nothing?; end + + # Return either the value of self or the given default value. + # + # @return [Object] The value of self when `Just`; else the given default. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#210 + def or(other); end + + # The reason for the `Maybe` when `Nothing`. Will be `NONE` when `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#191 + def reason; end + + # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)? + # + # @return [Boolean] True if `Nothing` or false if `Just`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#187 + def rejected?; end + + # The value of a `Maybe` when `Just`. Will be `NONE` when `Nothing`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#189 + def value; end + + class << self + # Create a new `Maybe` using the given block. + # + # Runs the given block passing all function arguments to the block as block + # arguments. If the block runs to completion without raising an exception + # a new `Just` is created with the value set to the return value of the + # block. If the block raises an exception a new `Nothing` is created with + # the reason being set to the raised exception. + # + # @param args [Array] Zero or more arguments to pass to the block. + # @raise [ArgumentError] when no block given. + # @return [Maybe] The newly created object. + # @yield The block from which to create a new `Maybe`. + # @yieldparam args [Array] Zero or more block arguments passed as + # arguments to the function. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#137 + def from(*args); end + + # Create a new `Just` with the given value. + # + # @param value [Object] The value to set for the new `Maybe` object. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#152 + def just(value); end + + # Create a new `Nothing` with the given (optional) reason. + # + # @param error [Exception] The reason to set for the new `Maybe` object. + # When given a string a new `StandardError` will be created with the + # argument as the message. When no argument is given a new + # `StandardError` with an empty message will be created. + # @return [Maybe] The newly created object. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#164 + def nothing(error = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#119 + def new(*args, &block); end + end +end + +# Indicates that the given attribute has not been set. +# When `Just` the {#nothing} getter will return `NONE`. +# When `Nothing` the {#just} getter will return `NONE`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/maybe.rb#111 +Concurrent::Maybe::NONE = T.let(T.unsafe(nil), Object) + +# Raised when an attempt is made to modify an immutable object +# (such as an `IVar`) after its final state has been set. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#33 +class Concurrent::MultipleAssignmentError < ::Concurrent::Error + # @return [MultipleAssignmentError] a new instance of MultipleAssignmentError + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#36 + def initialize(message = T.unsafe(nil), inspection_data = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#41 + def inspect; end + + # Returns the value of attribute inspection_data. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#34 + def inspection_data; end +end + +# Aggregates multiple exceptions. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#58 +class Concurrent::MultipleErrors < ::Concurrent::Error + # @return [MultipleErrors] a new instance of MultipleErrors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#61 + def initialize(errors, message = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#59 + def errors; end +end + +# An thread-safe variation of Ruby's standard `Struct`. Values can be set at +# construction or safely changed at any time during the object's lifecycle. +# +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#10 +module Concurrent::MutableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#128 + def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#118 + def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#185 + def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#139 + def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#152 + def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#72 + def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam othervalue [Object] the value of the member in `other` + # @yieldparam selfvalue [Object] the value of the member in `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#94 + def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#167 + def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#54 + def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#103 + def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#75 + def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#51 + def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#63 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#202 + def initialize_copy(original); end + + class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#210 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/mutable_struct.rb#220 +Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# A boolean value that can be updated atomically. Reads and writes to an atomic +# boolean and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicBoolean... +# 2.790000 0.000000 2.790000 ( 2.791454) +# Testing with Concurrent::CAtomicBoolean... +# 0.740000 0.000000 0.740000 ( 0.740206) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicBoolean... +# 5.240000 2.520000 7.760000 ( 3.683000) +# Testing with Concurrent::JavaAtomicBoolean... +# 3.340000 0.010000 3.350000 ( 0.855000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html java.util.concurrent.atomic.AtomicBoolean +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#8 +class Concurrent::MutexAtomicBoolean + extend ::Concurrent::Synchronization::SafeInitialization + + # Creates a new `AtomicBoolean` with the given initial value. + # + # @param initial [Boolean] the initial value + # @return [MutexAtomicBoolean] a new instance of MutexAtomicBoolean + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#12 + def initialize(initial = T.unsafe(nil)); end + + # Is the current value `false` + # + # @return [Boolean] true if the current value is `false`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#34 + def false?; end + + # Explicitly sets the value to false. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#44 + def make_false; end + + # Explicitly sets the value to true. + # + # @return [Boolean] true if value has changed, otherwise false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#39 + def make_true; end + + # Is the current value `true` + # + # @return [Boolean] true if the current value is `true`, else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#29 + def true?; end + + # Retrieves the current `Boolean` value. + # + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#19 + def value; end + + # Explicitly sets the value. + # + # @param value [Boolean] the new value to be set + # @return [Boolean] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#24 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#51 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb#62 + def ns_make_value(value); end +end + +# A numeric value that can be updated atomically. Reads and writes to an atomic +# fixnum and thread-safe and guaranteed to succeed. Reads and writes may block +# briefly but no explicit locking is required. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# Performance: +# +# ``` +# Testing with ruby 2.1.2 +# Testing with Concurrent::MutexAtomicFixnum... +# 3.130000 0.000000 3.130000 ( 3.136505) +# Testing with Concurrent::CAtomicFixnum... +# 0.790000 0.000000 0.790000 ( 0.785550) +# +# Testing with jruby 1.9.3 +# Testing with Concurrent::MutexAtomicFixnum... +# 5.460000 2.460000 7.920000 ( 3.715000) +# Testing with Concurrent::JavaAtomicFixnum... +# 4.520000 0.030000 4.550000 ( 1.187000) +# ``` +# +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicLong.html java.util.concurrent.atomic.AtomicLong +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#9 +class Concurrent::MutexAtomicFixnum + extend ::Concurrent::Synchronization::SafeInitialization + + # Creates a new `AtomicFixnum` with the given initial value. + # + # @param initial [Fixnum] the initial value + # @raise [ArgumentError] if the initial value is not a `Fixnum` + # @return [MutexAtomicFixnum] a new instance of MutexAtomicFixnum + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#13 + def initialize(initial = T.unsafe(nil)); end + + # Atomically sets the value to the given updated value if the current + # value == the expected value. + # + # @param expect [Fixnum] the expected value + # @param update [Fixnum] the new value + # @return [Boolean] true if the value was updated else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#44 + def compare_and_set(expect, update); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#37 + def decrement(delta = T.unsafe(nil)); end + + # Decreases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to decrease the current value + # @return [Fixnum] the current value after decrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#41 + def down(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#30 + def increment(delta = T.unsafe(nil)); end + + # Increases the current value by the given amount (defaults to 1). + # + # @param delta [Fixnum] the amount by which to increase the current value + # @return [Fixnum] the current value after incrementation + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#34 + def up(delta = T.unsafe(nil)); end + + # Pass the current value to the given block, replacing it + # with the block's result. May retry if the value changes + # during the block's execution. + # + # @return [Object] the new value + # @yield [Object] Calculate a new value for the atomic reference using + # given (old) value + # @yieldparam old_value [Object] the starting value of the atomic reference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#56 + def update; end + + # Retrieves the current `Fixnum` value. + # + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#20 + def value; end + + # Explicitly sets the value. + # + # @param value [Fixnum] the new value to be set + # @raise [ArgumentError] if the new value is not a `Fixnum` + # @return [Fixnum] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#25 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#65 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb#76 + def ns_set(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#9 +class Concurrent::MutexAtomicReference + include ::Concurrent::AtomicDirectUpdate + include ::Concurrent::AtomicNumericCompareAndSetWrapper + extend ::Concurrent::Synchronization::SafeInitialization + + # @param value [Object] The initial value. + # @return [MutexAtomicReference] a new instance of MutexAtomicReference + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#16 + def initialize(value = T.unsafe(nil)); end + + # Atomically sets the value to the given updated value if + # the current value == the expected value. + # + # that the actual value was not equal to the expected value. + # + # @param new_value [Object] the new value + # @param old_value [Object] the expected value + # @return [Boolean] `true` if successful. A `false` return indicates + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#45 + def _compare_and_set(old_value, new_value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#13 + def compare_and_swap(old_value, new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#23 + def get; end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#35 + def get_and_set(new_value); end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#29 + def set(new_value); end + + # Atomically sets to the given value and returns the old value. + # + # @param new_value [Object] the new value + # @return [Object] the old value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#42 + def swap(new_value); end + + # Gets the current value. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#26 + def value; end + + # Sets to the given value. + # + # @param new_value [Object] the new value + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#32 + def value=(new_value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb#59 + def synchronize; end +end + +# A synchronization object that allows one thread to wait on multiple other threads. +# The thread that will wait creates a `CountDownLatch` and sets the initial value +# (normally equal to the number of other threads). The initiating thread passes the +# latch to the other threads then waits for the other threads by calling the `#wait` +# method. Each of the other threads calls `#count_down` when done with its work. +# When the latch counter reaches zero the waiting thread is unblocked and continues +# with its work. A `CountDownLatch` can be used only once. Its value cannot be reset. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#9 +class Concurrent::MutexCountDownLatch < ::Concurrent::Synchronization::LockableObject + # Create a new `CountDownLatch` with the initial `count`. + # + # @param count [new] the initial count + # @raise [ArgumentError] if `count` is not an integer or is less than zero + # @return [MutexCountDownLatch] a new instance of MutexCountDownLatch + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#12 + def initialize(count = T.unsafe(nil)); end + + # The current value of the counter. + # + # @return [Fixnum] the current value of the counter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#34 + def count; end + + # Signal the latch to decrement the counter. Will signal all blocked threads when + # the `count` reaches zero. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#26 + def count_down; end + + # Block on the latch until the counter reaches zero or until `timeout` is reached. + # + # @param timeout [Fixnum] the number of seconds to wait for the counter or `nil` + # to block indefinitely + # @return [Boolean] `true` if the `count` reaches zero else false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#21 + def wait(timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb#40 + def ns_initialize(count); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#9 +class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject + # @return [MutexSemaphore] a new instance of MutexSemaphore + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#12 + def initialize(count); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#20 + def acquire(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#38 + def available_permits; end + + # Acquires and returns all permits that are immediately available. + # + # @return [Integer] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#47 + def drain_permits; end + + # Shrinks the number of available permits by the indicated reduction. + # + # @param reduction [Fixnum] Number of permits to remove. + # @raise [ArgumentError] if `reduction` is not an integer or is negative + # @raise [ArgumentError] if `@free` - `@reduction` is less than zero + # @return [nil] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#99 + def reduce_permits(reduction); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#77 + def release(permits = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#54 + def try_acquire(permits = T.unsafe(nil), timeout = T.unsafe(nil)); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#110 + def ns_initialize(count); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#117 + def try_acquire_now(permits); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb#127 + def try_acquire_timed(permits, timeout); end +end + +# Various classes within allows for +nil+ values to be stored, +# so a special +NULL+ token is required to indicate the "nil-ness". +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#6 +Concurrent::NULL = T.let(T.unsafe(nil), Object) + +# Suppresses all output when used for logging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#108 +Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#6 +module Concurrent::Options + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#27 + def executor(executor_identifier); end + + # Get the requested `Executor` based on the values set in the options hash. + # + # @option opts + # @param opts [Hash] the options defining the requested executor + # @return [Executor, nil] the requested thread pool, or nil when no option specified + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/options.rb#19 + def executor_from_options(opts = T.unsafe(nil)); end + end +end + +# Promises are inspired by the JavaScript [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) +# and [Promises/A+](http://promises-aplus.github.io/promises-spec/) specifications. +# +# > A promise represents the eventual value returned from the single +# > completion of an operation. +# +# Promises are similar to futures and share many of the same behaviours. +# Promises are far more robust, however. Promises can be chained in a tree +# structure where each promise may have zero or more children. Promises are +# chained using the `then` method. The result of a call to `then` is always +# another promise. Promises are resolved asynchronously (with respect to the +# main thread) but in a strict order: parents are guaranteed to be resolved +# before their children, children before their younger siblings. The `then` +# method takes two parameters: an optional block to be executed upon parent +# resolution and an optional callable to be executed upon parent failure. The +# result of each promise is passed to each of its children upon resolution. +# When a promise is rejected all its children will be summarily rejected and +# will receive the reason. +# +# Promises have several possible states: *:unscheduled*, *:pending*, +# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as +# `#incomplete?` and `#complete?`. When a Promise is created it is set to +# *:unscheduled*. Once the `#execute` method is called the state becomes +# *:pending*. Once a job is pulled from the thread pool's queue and is given +# to a thread for processing (often immediately upon `#post`) the state +# becomes *:processing*. The future will remain in this state until processing +# is complete. A future that is in the *:unscheduled*, *:pending*, or +# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either +# *:rejected*, indicating that an exception was thrown during processing, or +# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value` +# will be updated to reflect the result of the operation. If *:rejected* the +# `reason` will be updated with a reference to the thrown exception. The +# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and +# `#fulfilled?` can be called at any time to obtain the state of the Promise, +# as can the `#state` method, which returns a symbol. +# +# Retrieving the value of a promise is done through the `value` (alias: +# `deref`) method. Obtaining the value of a promise is a potentially blocking +# operation. When a promise is *rejected* a call to `value` will return `nil` +# immediately. When a promise is *fulfilled* a call to `value` will +# immediately return the current value. When a promise is *pending* a call to +# `value` will block until the promise is either *rejected* or *fulfilled*. A +# *timeout* value can be passed to `value` to limit how long the call will +# block. If `nil` the call will block indefinitely. If `0` the call will not +# block. Any other integer or float value will indicate the maximum number of +# seconds to block. +# +# Promises run on the global thread pool. +# +# ### Examples +# +# Start by requiring promises +# +# ```ruby +# require 'concurrent/promise' +# ``` +# +# Then create one +# +# ```ruby +# p = Concurrent::Promise.execute do +# # do something +# 42 +# end +# ``` +# +# Promises can be chained using the `then` method. The `then` method accepts a +# block and an executor, to be executed on fulfillment, and a callable argument to be executed +# on rejection. The result of the each promise is passed as the block argument +# to chained promises. +# +# ```ruby +# p = Concurrent::Promise.new{10}.then{|x| x * 2}.then{|result| result - 10 }.execute +# ``` +# +# And so on, and so on, and so on... +# +# ```ruby +# p = Concurrent::Promise.fulfill(20). +# then{|result| result - 10 }. +# then{|result| result * 3 }. +# then(executor: different_executor){|result| result % 5 }.execute +# ``` +# +# The initial state of a newly created Promise depends on the state of its parent: +# - if parent is *unscheduled* the child will be *unscheduled* +# - if parent is *pending* the child will be *pending* +# - if parent is *fulfilled* the child will be *pending* +# - if parent is *rejected* the child will be *pending* (but will ultimately be *rejected*) +# +# Promises are executed asynchronously from the main thread. By the time a +# child Promise finishes initialization it may be in a different state than its +# parent (by the time a child is created its parent may have completed +# execution and changed state). Despite being asynchronous, however, the order +# of execution of Promise objects in a chain (or tree) is strictly defined. +# +# There are multiple ways to create and execute a new `Promise`. Both ways +# provide identical behavior: +# +# ```ruby +# # create, operate, then execute +# p1 = Concurrent::Promise.new{ "Hello World!" } +# p1.state #=> :unscheduled +# p1.execute +# +# # create and immediately execute +# p2 = Concurrent::Promise.new{ "Hello World!" }.execute +# +# # execute during creation +# p3 = Concurrent::Promise.execute{ "Hello World!" } +# ``` +# +# Once the `execute` method is called a `Promise` becomes `pending`: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# p.state #=> :pending +# p.pending? #=> true +# ``` +# +# Wait a little bit, and the promise will resolve and provide a value: +# +# ```ruby +# p = Concurrent::Promise.execute{ "Hello, world!" } +# sleep(0.1) +# +# p.state #=> :fulfilled +# p.fulfilled? #=> true +# p.value #=> "Hello, world!" +# ``` +# +# If an exception occurs, the promise will be rejected and will provide +# a reason for the rejection: +# +# ```ruby +# p = Concurrent::Promise.execute{ raise StandardError.new("Here comes the Boom!") } +# sleep(0.1) +# +# p.state #=> :rejected +# p.rejected? #=> true +# p.reason #=> "#" +# ``` +# +# #### Rejection +# +# When a promise is rejected all its children will be rejected and will +# receive the rejection `reason` as the rejection callable parameter: +# +# ```ruby +# p = Concurrent::Promise.execute { Thread.pass; raise StandardError } +# +# c1 = p.then(-> reason { 42 }) +# c2 = p.then(-> reason { raise 'Boom!' }) +# +# c1.wait.state #=> :fulfilled +# c1.value #=> 42 +# c2.wait.state #=> :rejected +# c2.reason #=> # +# ``` +# +# Once a promise is rejected it will continue to accept children that will +# receive immediately rejection (they will be executed asynchronously). +# +# #### Aliases +# +# The `then` method is the most generic alias: it accepts a block to be +# executed upon parent fulfillment and a callable to be executed upon parent +# rejection. At least one of them should be passed. The default block is `{ +# |result| result }` that fulfills the child with the parent value. The +# default callable is `{ |reason| raise reason }` that rejects the child with +# the parent reason. +# +# - `on_success { |result| ... }` is the same as `then {|result| ... }` +# - `rescue { |reason| ... }` is the same as `then(Proc.new { |reason| ... } )` +# - `rescue` is aliased by `catch` and `on_error` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#190 +class Concurrent::Promise < ::Concurrent::IVar + # Initialize a new Promise with the provided options. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] a new instance of Promise + # @see http://promises-aplus.github.io/promises-spec/ + # @see http://wiki.commonjs.org/wiki/Promises/A + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#210 + def initialize(opts = T.unsafe(nil), &block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#364 + def catch(&block); end + + # Execute an `:unscheduled` `Promise`. Immediately sets the state to `:pending` and + # passes the block to a new thread/thread pool for eventual execution. + # Does nothing if the `Promise` is in any state other than `:unscheduled`. + # + # @return [Promise] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#246 + def execute; end + + # Set the `IVar` to failed due to some error and wake or notify all threads waiting on it. + # + # @param reason [Object] for the failure + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#278 + def fail(reason = T.unsafe(nil)); end + + # Yield the successful result to the block that returns a promise. If that + # promise is also successful the result is the result of the yielded promise. + # If either part fails the whole also fails. + # + # @example + # Promise.execute { 1 }.flat_map { |v| Promise.execute { v + 2 } }.value! #=> 3 + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#375 + def flat_map(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#365 + def on_error(&block); end + + # Chain onto this promise an action to be undertaken on success + # (fulfillment). + # + # @raise [ArgumentError] + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#349 + def on_success(&block); end + + # Chain onto this promise an action to be undertaken on failure + # (rejection). + # + # @return [Promise] self + # @yield The block to execute + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#360 + def rescue(&block); end + + # Set the `IVar` to a value and wake or notify all threads waiting on it. + # + # @param value [Object] the value to store in the `IVar` + # @raise [ArgumentError] if both a value and a block are given + # @raise [Concurrent::MultipleAssignmentError] if the `IVar` has already + # been set or otherwise completed + # @raise [Concurrent::PromiseExecutionError] if not the root promise + # @return [IVar] self + # @yield A block operation to use for setting the value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#262 + def set(value = T.unsafe(nil), &block); end + + # Chain a new promise off the current promise. + # + # @overload then + # @overload then + # @raise [ArgumentError] + # @return [Promise] the new promise + # @yield The block operation to be performed asynchronously. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#314 + def then(*args, &block); end + + # Builds a promise that produces the result of self and others in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#440 + def zip(*others); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#551 + def complete(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#545 + def notify_child(child); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#481 + def ns_initialize(value, opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#533 + def on_fulfill(result); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#539 + def on_reject(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#562 + def realize(task); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#528 + def root?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#520 + def set_pending; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#570 + def set_state!(success, value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#576 + def synchronized_set_state!(success, value, reason); end + + class << self + # Aggregate a collection of zero or more promises under a composite promise, + # execute the aggregated promises and collect them into a standard Ruby array, + # call the given Ruby `Ennnumerable` predicate (such as `any?`, `all?`, `none?`, + # or `one?`) on the collection checking for the success or failure of each, + # then executing the composite's `#then` handlers if the predicate returns + # `true` or executing the composite's `#rescue` handlers if the predicate + # returns false. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#505 + def aggregate(method, *promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if all aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#464 + def all?(*promises); end + + # Aggregates a collection of promises and executes the `then` condition + # if any aggregated promises succeed. Executes the `rescue` handler with + # a `Concurrent::PromiseExecutionError` if any of the aggregated promises + # fail. Upon execution will execute any of the aggregate promises that + # were not already executed. + # + # + # The returned promise will not yet have been executed. Additional `#then` + # and `#rescue` handlers may still be provided. Once the returned promise + # is execute the aggregate promises will be also be executed (if they have + # not been executed already). The results of the aggregate promises will + # be checked upon completion. The necessary `#then` and `#rescue` blocks + # on the aggregating promise will then be executed as appropriate. If the + # `#rescue` handlers are executed the raises exception will be + # `Concurrent::PromiseExecutionError`. + # + # @param promises [Array] Zero or more promises to aggregate + # @return [Promise] an unscheduled (not executed) promise that aggregates + # the promises given as arguments + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#475 + def any?(*promises); end + + # Create a new `Promise` object with the given block, execute it, and return the + # `:pending` object. + # + # @example + # promise = Concurrent::Promise.execute{ sleep(1); 42 } + # promise.state #=> :pending + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#296 + def execute(opts = T.unsafe(nil), &block); end + + # Create a new `Promise` and fulfill it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#224 + def fulfill(value, opts = T.unsafe(nil)); end + + # Create a new `Promise` and reject it immediately. + # + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] if no block is given + # @return [Promise] the newly created `Promise` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#237 + def reject(reason, opts = T.unsafe(nil)); end + + # Builds a promise that produces the result of promises in an Array + # and fails if any of them fails. + # + # @overload zip + # @overload zip + # @return [Promise] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#409 + def zip(*promises); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promise.rb#11 +class Concurrent::PromiseExecutionError < ::StandardError; end + +# {include:file:docs-source/promises-main.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#13 +module Concurrent::Promises + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2047 +class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end + +# Common ancestor of {Event} and {Future} classes, many shared methods are defined here. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#513 +class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AbstractEventFuture] a new instance of AbstractEventFuture + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#522 + def initialize(promise, default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#515 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#738 + def add_callback_clear_delayed_node(node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#733 + def add_callback_notify_blocked(promise, index); end + + # For inspection. + # + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#702 + def blocks; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#710 + def callbacks; end + + # Shortcut of {#chain_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #chain_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#596 + def chain(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it is resolved. + # + # @overload a_future.chain_on + # @overload an_event.chain_on + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @return [Future] + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#614 + def chain_on(executor, *args, &task); end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#629 + def chain_resolvable(resolvable); end + + # Returns default executor. + # + # @return [Executor] default executor + # @see #with_default_executor + # @see FactoryMethods#any_fulfilled_future_on + # @see FactoryMethods#future_on + # @see FactoryMethods#resolvable_future + # @see similar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#590 + def default_executor; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#623 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#515 + def internal_state; end + + # Shortcut of {#on_resolution_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_resolution_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#637 + def on_resolution(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # resolved. + # + # @overload a_future.on_resolution! + # @overload an_event.on_resolution! + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#655 + def on_resolution!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is resolved. + # + # @overload a_future.on_resolution_using + # @overload an_event.on_resolution_using + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @return [self] + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#673 + def on_resolution_using(executor, *args, &callback); end + + # Is it in pending state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#549 + def pending?; end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#716 + def promise; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#688 + def resolve_with(state, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Is it in resolved state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#555 + def resolved?; end + + # Returns its state. + # + # @overload a_future.state + # @overload an_event.state + # @return [Symbol] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#543 + def state; end + + # Resolves the resolvable when receiver is resolved. + # + # @param resolvable [Resolvable] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#633 + def tangle(resolvable); end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#619 + def to_s; end + + # Propagates touch. Requests all the delayed futures, which it depends on, to be + # executed. This method is called by any other method requiring resolved state, like {#wait}. + # + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#562 + def touch; end + + # For inspection. + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#722 + def touched?; end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#578 + def wait(timeout = T.unsafe(nil)); end + + # For inspection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#728 + def waiting_threads; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @abstract + # @raise [NotImplementedError] + # @return [AbstractEventFuture] + # @see Event#with_default_executor + # @see Future#with_default_executor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#683 + def with_default_executor(executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#743 + def with_hidden_resolvable; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#750 + def add_callback(method, *args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#812 + def async_callback_on_resolution(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#796 + def call_callback(method, state, args); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#800 + def call_callbacks(state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#763 + def callback_clear_delayed_node(state, node); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#818 + def callback_notify_blocked(state, promise, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#515 + def compare_and_set_internal_state(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#515 + def internal_state=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#515 + def swap_internal_state(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#515 + def update_internal_state(&block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#768 + def wait_until_resolved(timeout); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#808 + def with_async(executor, *args, &block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1796 +class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise + # @return [AbstractFlatPromise] a new instance of AbstractFlatPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1798 + def initialize(delayed_because, blockers_count, event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1808 + def touch; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1828 + def add_delayed_of(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1820 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1824 + def resolvable?(countdown, future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1816 + def touched?; end +end + +# @abstract +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1549 +class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [AbstractPromise] a new instance of AbstractPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1553 + def initialize(future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1564 + def default_executor; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1581 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1562 + def event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1558 + def future; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1579 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1568 + def state; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1575 + def to_s; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1572 + def touch; end + + private + + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1592 + def evaluate_to(*args, block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1587 + def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2084 +class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2088 + def resolvable?(countdown, event_or_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2050 +class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedEventPromise] a new instance of AnyResolvedEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2054 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2062 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2058 + def resolvable?(countdown, future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2067 +class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise + # @return [AnyResolvedFuturePromise] a new instance of AnyResolvedFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2071 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2079 + def on_resolvable(resolved_future, index); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2075 + def resolvable?(countdown, future, index); end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1619 +class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise + # @return [BlockedPromise] a new instance of BlockedPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1661 + def initialize(delayed, blockers_count, future); end + + # for inspection only + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1683 + def blocked_by; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1674 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1667 + def on_blocker_resolution(future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1678 + def touch; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1691 + def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1710 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1706 + def process_on_blocker_resolution(future, index); end + + # @return [true, false] if resolvable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1702 + def resolvable?(countdown, future, index); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1652 + def add_delayed(delayed1, delayed2); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1645 + def new_blocked_by(blockers, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1623 + def new_blocked_by1(blocker, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1630 + def new_blocked_by2(blocker1, blocker2, *args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1621 + def new(*args, &block); end + end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1716 +class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise + # @raise [ArgumentError] + # @return [BlockedTaskPromise] a new instance of BlockedTaskPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1717 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1725 + def executor; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1766 +class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1769 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2095 +class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise + # @return [DelayPromise] a new instance of DelayPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2097 + def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2108 + def delayed_because; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2104 + def touch; end +end + +# Represents an event which will happen in future (will be resolved). The event is either +# pending or resolved. It should be always resolved. Use {Future} to communicate rejections and +# cancellation. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#826 +class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#847 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#853 + def any(event_or_future); end + + # Creates new event dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#863 + def delay; end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#875 + def schedule(intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#828 + def then(*args, &task); end + + # Returns self, since this is event + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#893 + def to_event; end + + # Converts event to a future. The future is fulfilled when the event is resolved, the future may never fail. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#885 + def to_future; end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#899 + def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future, Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#839 + def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#857 + def |(event_or_future); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#910 + def callback_on_resolution(state, args, callback); end + + # @raise [Concurrent::MultipleAssignmentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#905 + def rejected_resolution(raise_on_reassign, state); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1972 +class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [EventWrapperPromise] a new instance of EventWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1973 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1979 + def on_resolvable(resolved_future, index); end +end + +# Container of all {Future}, {Event} factory methods. They are never constructed directly with +# new. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#46 +module Concurrent::Promises::FactoryMethods + include ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::ReInclude + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#282 + def any(*futures_and_or_events); end + + # Shortcut of {#any_event_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #any_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#319 + def any_event(*futures_and_or_events); end + + # Creates a new event which becomes resolved after the first futures_and_or_events resolves. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#329 + def any_event_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_fulfilled_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_fulfilled_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#300 + def any_fulfilled_future(*futures_and_or_events); end + + # Creates a new future which is resolved after the first futures_and_or_events is fulfilled. + # Its result equals the result of the first resolved future or if all futures_and_or_events reject, + # it has reason of the last rejected future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#313 + def any_fulfilled_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#any_resolved_future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #any_resolved_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#278 + def any_resolved_future(*futures_and_or_events); end + + # Creates a new future which is resolved after the first futures_and_or_events is resolved. + # Its result equals the result of the first resolved future. + # If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed + # futures un-executed if they are not required any more. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#294 + def any_resolved_future_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#delay_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #delay_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#190 + def delay(*args, &task); end + + # Creates a new event or future which is resolved only after it is touched, + # see {Concurrent::AbstractEventFuture#touch}. + # + # @overload delay_on + # @overload delay_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#207 + def delay_on(default_executor, *args, &task); end + + # Creates a resolved future which will be fulfilled with the given value. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param value [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#127 + def fulfilled_future(value, default_executor = T.unsafe(nil)); end + + # Shortcut of {#future_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#94 + def future(*args, &task); end + + # Constructs a new Future which will be resolved after block is evaluated on default executor. + # Evaluation begins immediately. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Future] + # @yield [*args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#106 + def future_on(default_executor, *args, &task); end + + # General constructor. Behaves differently based on the argument's type. It's provided for convenience + # but it's better to be explicit. + # + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @overload make_future + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event, Future] + # @see rejected_future, resolved_event, fulfilled_future + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#174 + def make_future(argument = T.unsafe(nil), default_executor = T.unsafe(nil)); end + + # Creates a resolved future which will be rejected with the given reason. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param reason [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#136 + def rejected_future(reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_event_on} with default `:io` executor supplied. + # + # @return [ResolvableEvent] + # @see #resolvable_event_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#63 + def resolvable_event; end + + # Creates a resolvable event, user is responsible for resolving the event once + # by calling {Promises::ResolvableEvent#resolve}. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableEvent] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#72 + def resolvable_event_on(default_executor = T.unsafe(nil)); end + + # Shortcut of {#resolvable_future_on} with default `:io` executor supplied. + # + # @return [ResolvableFuture] + # @see #resolvable_future_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#78 + def resolvable_future; end + + # Creates resolvable future, user is responsible for resolving the future once by + # {Promises::ResolvableFuture#resolve}, {Promises::ResolvableFuture#fulfill}, + # or {Promises::ResolvableFuture#reject} + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [ResolvableFuture] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#88 + def resolvable_future_on(default_executor = T.unsafe(nil)); end + + # Creates resolved event. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#144 + def resolved_event(default_executor = T.unsafe(nil)); end + + # Creates a resolved future with will be either fulfilled with the given value or rejected with + # the given reason. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param fulfilled [true, false] + # @param reason [Object] + # @param value [Object] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#118 + def resolved_future(fulfilled, value, reason, default_executor = T.unsafe(nil)); end + + # Shortcut of {#schedule_on} with default `:io` executor supplied. + # + # @return [Future, Event] + # @see #schedule_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#214 + def schedule(intended_time, *args, &task); end + + # Creates a new event or future which is resolved in intended_time. + # + # @overload schedule_on + # @overload schedule_on + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#233 + def schedule_on(default_executor, intended_time, *args, &task); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#258 + def zip(*futures_and_or_events); end + + # Shortcut of {#zip_events_on} with default `:io` executor supplied. + # + # @return [Event] + # @see #zip_events_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#262 + def zip_events(*futures_and_or_events); end + + # Creates a new event which is resolved after all futures_and_or_events are resolved. + # (Future is resolved when fulfilled or rejected.) + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#272 + def zip_events_on(default_executor, *futures_and_or_events); end + + # Shortcut of {#zip_futures_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #zip_futures_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#240 + def zip_futures(*futures_and_or_events); end + + # Creates a new future which is resolved after all futures_and_or_events are resolved. + # Its value is an array of zipped future values. Its reason is an array of reasons for rejection. + # If there is an error it rejects. + # If event is supplied, which does not have value and can be only resolved, it's + # represented as `:fulfilled` with value `nil`. + # + # @param default_executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. Default executor propagates to chained futures unless overridden with + # executor parameter or changed with {AbstractEventFuture#with_default_executor}. + # @param futures_and_or_events [AbstractEventFuture] + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#254 + def zip_futures_on(default_executor, *futures_and_or_events); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#50 +module Concurrent::Promises::FactoryMethods::Configuration + # @return [Executor, :io, :fast] the executor which is used when none is supplied + # to a factory method. The method can be overridden in the receivers of + # `include FactoryMethod` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#54 + def default_executor; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1840 +class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [FlatEventPromise] a new instance of FlatEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1844 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1848 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1873 +class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @raise [ArgumentError] + # @return [FlatFuturePromise] a new instance of FlatFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1877 + def initialize(delayed, blockers_count, levels, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1884 + def process_on_blocker_resolution(future, index); end +end + +# Represents a value which will become available in future. May reject with a reason instead, +# e.g. when the tasks raises an exception. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#917 +class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1078 + def &(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1085 + def any(event_or_future); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1215 + def apply(args, block); end + + # Creates new future dependent on receiver which will not evaluate until touched, see {#touch}. + # In other words, it inserts delay into the chain of Futures making rest of it lazy evaluated. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1095 + def delay; end + + # Allows rejected Future to be risen with `raise` method. + # If the reason is not an exception `Runtime.new(reason)` is returned. + # + # @example + # raise Promises.rejected_future(StandardError.new("boom")) + # raise Promises.rejected_future("or just boom") + # @raise [Concurrent::Error] when raising not rejected future + # @return [Exception] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1013 + def exception(*args); end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1124 + def flat(level = T.unsafe(nil)); end + + # Creates new event which will be resolved when the returned event by receiver is. + # Be careful if the receiver rejects it will just resolve since Event does not hold reason. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1130 + def flat_event; end + + # Creates new future which will have result of the future returned by receiver. If receiver + # rejects it will have its rejection. + # + # @param level [Integer] how many levels of futures should flatten + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1120 + def flat_future(level = T.unsafe(nil)); end + + # Is it in fulfilled state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#921 + def fulfilled?; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1243 + def inspect; end + + # Shortcut of {#on_fulfillment_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_fulfillment_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1136 + def on_fulfillment(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # fulfilled. Does nothing on rejection. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1147 + def on_fulfillment!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # fulfilled. Does nothing on rejection. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @return [self] + # @yield [value, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1159 + def on_fulfillment_using(executor, *args, &callback); end + + # Shortcut of {#on_rejection_using} with default `:io` executor supplied. + # + # @return [self] + # @see #on_rejection_using + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1165 + def on_rejection(*args, &callback); end + + # Stores the callback to be executed synchronously on resolving thread after it is + # rejected. Does nothing on fulfillment. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1176 + def on_rejection!(*args, &callback); end + + # Stores the callback to be executed asynchronously on executor after it is + # rejected. Does nothing on fulfillment. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @return [self] + # @yield [reason, *args] to the callback. + # @yieldreturn is forgotten. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1188 + def on_rejection_using(executor, *args, &callback); end + + # Returns reason of future's rejection. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, timeout_value] the reason, or timeout_value on timeout, or nil on fulfillment. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#966 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Is it in rejected state? + # + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#928 + def rejected?; end + + # Shortcut of {#rescue_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #rescue_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1052 + def rescue(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it rejects. Does not run + # the task if it fulfills. It will resolve though, triggering any dependent futures. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @return [Future] + # @yield [reason, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1064 + def rescue_on(executor, *args, &task); end + + # Returns triplet fulfilled?, value, reason. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @return [Array(Boolean, Object, Object), nil] triplet of fulfilled?, value, reason, or nil + # on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#981 + def result(timeout = T.unsafe(nil)); end + + # Allows to use futures as green threads. The receiver has to evaluate to a future which + # represents what should be done next. It basically flattens indefinitely until non Future + # values is returned which becomes result of the returned future. Any encountered exception + # will become reason of the returned future. + # + # @example + # body = lambda do |v| + # v += 1 + # v < 5 ? Promises.future(v, &body) : v + # end + # Promises.future(0, &body).run.value! # => 5 + # @param run_test [#call(value)] an object which when called returns either Future to keep running with + # or nil, then the run completes with the value. + # The run_test can be used to extract the Future from deeper structure, + # or to distinguish Future which is a resulting value from a future + # which is suppose to continue running. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1210 + def run(run_test = T.unsafe(nil)); end + + # Creates new event dependent on receiver scheduled to execute on/in intended_time. + # In time is interpreted from the moment the receiver is resolved, therefore it inserts + # delay into the chain. + # + # @param intended_time [Numeric, Time] `Numeric` means to run in `intended_time` seconds. + # `Time` means to run on `intended_time`. + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1102 + def schedule(intended_time); end + + # Shortcut of {#then_on} with default `:io` executor supplied. + # + # @return [Future] + # @see #then_on + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1034 + def then(*args, &task); end + + # Chains the task to be executed asynchronously on executor after it fulfills. Does not run + # the task if it rejects. It will resolve though, triggering any dependent futures. + # + # @param args [Object] arguments which are passed to the task when it's executed. + # (It might be prepended with other arguments, see the @yield section). + # @param executor [Executor, :io, :fast] Instance of an executor or a name of the + # global executor. The task is executed on it, default executor remains unchanged. + # @return [Future] + # @yield [value, *args] to the task. + # @yieldreturn will become result of the returned Future. + # Its returned value becomes {Future#value} fulfilling it, + # raised exception becomes {Future#reason} rejecting it. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1046 + def then_on(executor, *args, &task); end + + # Converts future to event which is resolved when future is resolved by fulfillment or rejection. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1222 + def to_event; end + + # Returns self, since this is a future + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1230 + def to_future; end + + # @return [String] Short string representation. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1235 + def to_s; end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # timeout_value on timeout, + # nil on rejection. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#950 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Return value of the future. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @note Make sure returned `nil` is not confused with timeout, no value when rejected, + # no reason when fulfilled, etc. + # Use more exact methods if needed, like {#wait}, {#value!}, {#result}, etc. + # @param timeout [Numeric] the maximum time in second to wait. + # @param timeout_value [Object] a value returned by the method when it times out + # @raise [Exception] {#reason} on rejection + # @return [Object, nil, timeout_value] the value of the Future when fulfilled, + # or nil on rejection, + # or timeout_value on timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#997 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil)); end + + # Wait (block the Thread) until receiver is {#resolved?}. + # Calls {Concurrent::AbstractEventFuture#touch}. + # + # @note This function potentially blocks current thread until the Future is resolved. + # Be careful it can deadlock. Try to chain instead. + # @param timeout [Numeric] the maximum time in second to wait. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] self implies timeout was not used, true implies timeout was used + # and it was resolved, false implies it was not resolved within timeout. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#987 + def wait!(timeout = T.unsafe(nil)); end + + # Crates new object with same class with the executor set as its new default executor. + # Any futures depending on it will use the new default executor. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1111 + def with_default_executor(executor); end + + # Creates a new event or a future which will be resolved when receiver and other are. + # Returns an event if receiver and other are events, otherwise returns a future. + # If just one of the parties is Future then the result + # of the returned future is equal to the result of the supplied future. If both are futures + # then the result is as described in {FactoryMethods#zip_futures_on}. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1070 + def zip(other); end + + # Creates a new event which will be resolved when the first of receiver, `event_or_future` + # resolves. Returning future will have value nil if event_or_future is event and resolves + # first. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1089 + def |(event_or_future); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1272 + def async_callback_on_fulfillment(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1278 + def async_callback_on_rejection(state, executor, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1284 + def callback_on_fulfillment(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1288 + def callback_on_rejection(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1292 + def callback_on_resolution(state, args, callback); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1251 + def rejected_resolution(raise_on_reassign, state); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1247 + def run_test(v); end + + # @raise [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1266 + def wait_until_resolved!(timeout = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1984 +class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise + # @return [FutureWrapperPromise] a new instance of FutureWrapperPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1985 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1991 + def on_resolvable(resolved_future, index); end +end + +# will be immediately resolved +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1783 +class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateEventPromise] a new instance of ImmediateEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1784 + def initialize(default_executor); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1789 +class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise + # @return [ImmediateFuturePromise] a new instance of ImmediateFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1790 + def initialize(default_executor, fulfilled, value, reason); end +end + +# @abstract +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1615 +class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#338 +module Concurrent::Promises::InternalStates; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#397 +class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Fulfilled] a new instance of Fulfilled + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#399 + def initialize(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#407 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#403 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#415 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#419 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#411 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#425 +class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#426 + def apply(args, block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#488 +Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#459 +class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [PartiallyRejected] a new instance of PartiallyRejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#460 + def initialize(value, reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#482 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#466 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#478 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#470 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#474 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#351 +class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#352 + def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#356 + def to_sym; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#490 +Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#492 +Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#432 +class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + # @return [Rejected] a new instance of Rejected + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#433 + def initialize(reason); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#453 + def apply(args, block); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#437 + def fulfilled?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#445 + def reason; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#449 + def to_sym; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#441 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#362 +class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#366 +class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#391 + def apply; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#379 + def fulfilled?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#387 + def reason; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#367 + def resolved?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#375 + def result; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#371 + def to_sym; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#383 + def value; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#340 +class Concurrent::Promises::InternalStates::State + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#341 + def resolved?; end + + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#345 + def to_sym; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1748 +class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [RescuePromise] a new instance of RescuePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1751 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1755 + def on_resolvable(resolved_future, index); end +end + +# Marker module of Future, Event resolved manually. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1299 +module Concurrent::Promises::Resolvable + include ::Concurrent::Promises::InternalStates +end + +# A Event which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1304 +class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event + include ::Concurrent::Promises::Resolvable + + # Makes the event resolved, which triggers all dependent futures. + # + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1324 + def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [true, false] If it times out and the argument is true it will also resolve the event. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1342 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new event wrapping receiver, effectively hiding the resolve method. + # + # @return [Event] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1331 + def with_hidden_resolvable; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1600 +class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableEventPromise] a new instance of ResolvableEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1601 + def initialize(default_executor); end +end + +# A Future which can be resolved by user. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1354 +class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future + include ::Concurrent::Promises::Resolvable + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1395 + def evaluate_to(*args, &block); end + + # Evaluates the block and sets its result as future's value fulfilling, if the block raises + # an exception the future rejects with it. + # + # @raise [Exception] also raise reason on rejection. + # @return [self] + # @yield [*args] to the block. + # @yieldreturn [Object] value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1406 + def evaluate_to!(*args, &block); end + + # Makes the future fulfilled with `value`, + # which triggers all dependent futures. + # + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @param value [Object] + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1375 + def fulfill(value, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#reason} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Exception, timeout_value, nil] + # @see Future#reason + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1503 + def reason(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Makes the future rejected with `reason`, + # which triggers all dependent futures. + # + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reason [Object] + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1385 + def reject(reason, raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Makes the future resolved with result of triplet `fulfilled?`, `value`, `reason`, + # which triggers all dependent futures. + # + # @param fulfilled [true, false] + # @param raise_on_reassign [Boolean] should method raise exception if already resolved + # @param reason [Object] + # @param reserved [true, false] Set to true if the resolvable is {#reserve}d by you, + # marks resolution of reserved resolvable events and futures explicitly. + # Advanced feature, ignore unless you use {Resolvable#reserve} from edge. + # @param value [Object] + # @return [self, false] false is returned when raise_on_reassign is false and the receiver + # is already resolved. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1365 + def resolve(fulfilled = T.unsafe(nil), value = T.unsafe(nil), reason = T.unsafe(nil), raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end + + # Behaves as {Future#result} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [::Array(Boolean, Object, Exception), nil] + # @see Future#result + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1524 + def result(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [Object, timeout_value, nil] + # @see Future#value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1459 + def value(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#value!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [Object, timeout_value, nil] + # @see Future#value! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1481 + def value!(timeout = T.unsafe(nil), timeout_value = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {AbstractEventFuture#wait} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @return [self, true, false] + # @see AbstractEventFuture#wait + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1421 + def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Behaves as {Future#wait!} but has one additional optional argument + # resolve_on_timeout. + # + # @param resolve_on_timeout [::Array(true, Object, nil), ::Array(false, nil, Exception), nil] If it times out and the argument is not nil it will also resolve the future + # to the provided resolution. + # @raise [Exception] {#reason} on rejection + # @return [self, true, false] + # @see Future#wait! + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1438 + def wait!(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end + + # Creates new future wrapping receiver, effectively hiding the resolve method and similar. + # + # @return [Future] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1542 + def with_hidden_resolvable; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1606 +class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise + # @return [ResolvableFuturePromise] a new instance of ResolvableFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1607 + def initialize(default_executor); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1611 + def evaluate_to(*args, block); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1909 +class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + # @return [RunFuturePromise] a new instance of RunFuturePromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1913 + def initialize(delayed, blockers_count, default_executor, run_test); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1918 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2114 +class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise + # @return [ScheduledPromise] a new instance of ScheduledPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2125 + def initialize(default_executor, intended_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2119 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2115 + def intended_time; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1730 +class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise + # @return [ThenPromise] a new instance of ThenPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1733 + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1737 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1940 +class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventEventPromise] a new instance of ZipEventEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1941 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1947 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2031 +class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipEventsPromise] a new instance of ZipEventsPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2035 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2041 + def on_resolvable(resolved_future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1952 +class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFutureEventPromise] a new instance of ZipFutureEventPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1953 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1967 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1960 + def process_on_blocker_resolution(future, index); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#1996 +class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise + # @return [ZipFuturesPromise] a new instance of ZipFuturesPromise + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2000 + def initialize(delayed, blockers_count, default_executor); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2013 + def on_resolvable(resolved_future, index); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/promises.rb#2007 + def process_on_blocker_resolution(future, index); end +end + +# Methods form module A included to a module B, which is already included into class C, +# will not be visible in the C class. If this module is extended to B then A's methods +# are correctly made visible to C. +# +# @example +# module A +# def a +# :a +# end +# end +# +# module B1 +# end +# +# class C1 +# include B1 +# end +# +# module B2 +# extend Concurrent::ReInclude +# end +# +# class C2 +# include B2 +# end +# +# B1.send :include, A +# B2.send :include, A +# +# C1.new.respond_to? :a # => false +# C2.new.respond_to? :a # => true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#36 +module Concurrent::ReInclude + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#44 + def extended(base); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#50 + def include(*modules); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/re_include.rb#38 + def included(base); end +end + +# Ruby read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And if the "write" lock is taken, any readers who come along will have to wait) +# +# If readers are already active when a writer comes along, the writer will wait for +# all the readers to finish before going ahead. +# Any additional readers that come when the writer is already waiting, will also +# wait (so writers are not starved). +# +# This implementation is based on `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @note Do **not** try to acquire the write lock while already holding a read lock +# **or** try to acquire the write lock while you already have it. +# This will lead to deadlock +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#31 +class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReadWriteLock` in the unlocked state. + # + # @return [ReadWriteLock] a new instance of ReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#59 + def initialize; end + + # Acquire a read lock. If a write lock has been acquired will block until + # it is released. Will not block if other read locks have been acquired. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#111 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#160 + def acquire_write_lock; end + + # Queries whether any threads are waiting to acquire the read or write lock. + # + # @return [Boolean] true if any threads are waiting for a lock else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#214 + def has_waiters?; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#140 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#196 + def release_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#75 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#94 + def with_write_lock; end + + # Queries if the write lock is held by any thread. + # + # @return [Boolean] true if the write lock is held else false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#207 + def write_locked?; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#246 + def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#251 + def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#221 + def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#226 + def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#231 + def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#241 + def waiting_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#236 + def waiting_writers(c = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#40 +Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#43 +Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#37 +Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb#34 +Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# Re-entrant read-write lock implementation +# +# Allows any number of concurrent readers, but only one concurrent writer +# (And while the "write" lock is taken, no read locks can be obtained either. +# Hence, the write lock can also be called an "exclusive" lock.) +# +# If another thread has taken a read lock, any thread which wants a write lock +# will block until all the readers release their locks. However, once a thread +# starts waiting to obtain a write lock, any additional readers that come along +# will also wait (so writers are not starved). +# +# A thread can acquire both a read and write lock at the same time. A thread can +# also acquire a read lock OR a write lock more than once. Only when the read (or +# write) lock is released as many times as it was acquired, will the thread +# actually let it go, allowing other threads which might have been waiting +# to proceed. Therefore the lock can be upgraded by first acquiring +# read lock and then write lock and that the lock can be downgraded by first +# having both read and write lock a releasing just the write lock. +# +# If both read and write locks are acquired by the same thread, it is not strictly +# necessary to release them in the same order they were acquired. In other words, +# the following code is legal: +# +# This implementation was inspired by `java.util.concurrent.ReentrantReadWriteLock`. +# +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.acquire_write_lock +# lock.acquire_read_lock +# lock.release_write_lock +# # At this point, the current thread is holding only a read lock, not a write +# # lock. So other threads can take read locks, but not a write lock. +# lock.release_read_lock +# # Now the current thread is not holding either a read or write lock, so +# # another thread could potentially acquire a write lock. +# @example +# lock = Concurrent::ReentrantReadWriteLock.new +# lock.with_read_lock { data.retrieve } +# lock.with_write_lock { data.modify! } +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html java.util.concurrent.ReentrantReadWriteLock +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#53 +class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `ReentrantReadWriteLock` in the unlocked state. + # + # @return [ReentrantReadWriteLock] a new instance of ReentrantReadWriteLock + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#109 + def initialize; end + + # Acquire a read lock. If a write lock is held by another thread, will block + # until it is released. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#162 + def acquire_read_lock; end + + # Acquire a write lock. Will block and wait for all active readers and writers. + # + # @raise [Concurrent::ResourceLimitError] if the maximum number of writers + # is exceeded. + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#257 + def acquire_write_lock; end + + # Release a previously acquired read lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#236 + def release_read_lock; end + + # Release a previously acquired write lock. + # + # @return [Boolean] true if the lock is successfully released + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#329 + def release_write_lock; end + + # Try to acquire a read lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#215 + def try_read_lock; end + + # Try to acquire a write lock and return true if we succeed. If it cannot be + # acquired immediately, return false. + # + # @return [Boolean] true if the lock is successfully acquired + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#310 + def try_write_lock; end + + # Execute a block operation within a read lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#126 + def with_read_lock; end + + # Execute a block operation within a write lock. + # + # @raise [ArgumentError] when no block is given. + # @raise [Concurrent::ResourceLimitError] if the maximum number of readers + # is exceeded. + # @return [Object] the result of the block operation. + # @yield the task to be performed within the lock. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#145 + def with_write_lock; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#370 + def max_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#375 + def max_writers?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#345 + def running_readers(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#350 + def running_readers?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#355 + def running_writer?(c = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#365 + def waiting_or_running_writer?(c = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#360 + def waiting_writers(c = T.unsafe(nil)); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#94 +Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#96 +Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#84 +Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#102 +Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#92 +Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) + +# Used with @Counter: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#90 +Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#86 +Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) + +# Used with @HeldCount: +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#100 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb#104 +Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) + +# Raised by an `Executor` when it is unable to process a given task, +# possibly because of a reject policy or other internal error. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#48 +class Concurrent::RejectedExecutionError < ::Concurrent::Error; end + +# Raised when any finite resource, such as a lock counter, exceeds its +# maximum limit/threshold. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#52 +class Concurrent::ResourceLimitError < ::Concurrent::Error; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#129 +class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [RubyExchanger] a new instance of RubyExchanger + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#159 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#165 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#165 + def compare_and_set_slot(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#165 + def slot; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#165 + def slot=(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#165 + def swap_slot(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#165 + def update_slot(&block); end + + private + + # Waits for another thread to arrive at this exchange point (unless the + # current thread is interrupted), and then transfers the given object to + # it, receiving its object in return. The timeout value indicates the + # approximate number of seconds the method should block while waiting + # for the exchange. When the timeout value is `nil` the method will + # block indefinitely. + # + # @param timeout [Numeric, nil] in seconds, `nil` blocks indefinitely + # @param value [Object] the value to exchange with another thread + # @return [Object, CANCEL] the value exchanged by the other thread; {CANCEL} on timeout + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#170 + def do_exchange(value, timeout); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#138 +class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [Node] a new instance of Node + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#142 + def initialize(item); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#139 + def __initialize_atomic_fields__; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#139 + def compare_and_set_value(expected, value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#153 + def item; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#149 + def latch; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#139 + def swap_value(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#139 + def update_value(&block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#139 + def value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/exchanger.rb#139 + def value=(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#8 +class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService + # @return [RubyExecutorService] a new instance of RubyExecutorService + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#11 + def initialize(*args, &block); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#42 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#17 + def post(*args, &task); end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#33 + def shutdown; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#52 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#70 + def ns_running?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#78 + def ns_shutdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#66 + def ns_shutdown_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#74 + def ns_shuttingdown?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#58 + def stop_event; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb#62 + def stopped_event; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#9 +class Concurrent::RubySingleThreadExecutor < ::Concurrent::RubyThreadPoolExecutor + include ::Concurrent::SerialExecutorService + + # @return [RubySingleThreadExecutor] a new instance of RubySingleThreadExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb#13 + def initialize(opts = T.unsafe(nil)); end +end + +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#13 +class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService + # @return [RubyThreadPoolExecutor] a new instance of RubyThreadPoolExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#47 + def initialize(opts = T.unsafe(nil)); end + + # The number of threads that are actively executing tasks. + # + # @return [Integer] The number of threads that are actively executing tasks. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#67 + def active_count; end + + # Does the task queue have a maximum size? + # + # @return [Boolean] True if the task queue has a maximum size else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#74 + def can_overflow?; end + + # The number of tasks that have been completed by the pool since construction. + # + # @return [Integer] The number of tasks that have been completed by the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#62 + def completed_task_count; end + + # The number of seconds that a thread may be idle before being reclaimed. + # + # @return [Integer] The number of seconds that a thread may be idle before being reclaimed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#38 + def idletime; end + + # The largest number of threads that have been created in the pool since construction. + # + # @return [Integer] The largest number of threads that have been created in the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#52 + def largest_length; end + + # The number of threads currently in the pool. + # + # @return [Integer] The number of threads currently in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#79 + def length; end + + # The maximum number of threads that may be created in the pool. + # + # @return [Integer] The maximum number of threads that may be created in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#32 + def max_length; end + + # The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time. + # When the queue size reaches `max_queue` subsequent tasks will be rejected in + # accordance with the configured `fallback_policy`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#41 + def max_queue; end + + # The minimum number of threads that may be retained in the pool. + # + # @return [Integer] The minimum number of threads that may be retained in the pool. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#35 + def min_length; end + + # Prune the thread pool of unneeded threads + # + # What is being pruned is controlled by the min_threads and idletime + # parameters passed at pool creation time + # + # This is a no-op on all pool implementations as they prune themselves + # automatically, and has been deprecated. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#139 + def prune_pool; end + + # removes the worker if it can be pruned + # + # @return [true, false] if the worker was pruned + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#104 + def prune_worker(worker); end + + # The number of tasks in the queue awaiting execution. + # + # @return [Integer] The number of tasks in the queue awaiting execution. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#84 + def queue_length; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#124 + def ready_worker(worker, last_message); end + + # Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting + # new tasks. A value of -1 indicates that the queue may grow without bound. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#89 + def remaining_capacity; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#116 + def remove_worker(worker); end + + # The number of tasks that have been scheduled for execution on the pool since construction. + # + # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#57 + def scheduled_task_count; end + + # Whether or not a value of 0 for :max_queue option means the queue must perform direct hand-off or rather unbounded queue. + # + # @return [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#44 + def synchronous; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#129 + def worker_died(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#134 + def worker_task_completed; end + + private + + # creates new worker which has to receive work to do after it's added + # + # @return [nil, Worker] nil of max capacity is reached + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#257 + def ns_add_busy_worker; end + + # tries to assign task to a worker, tries to get one from @ready or to create new one + # + # @return [true, false] if task is assigned to a worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#217 + def ns_assign_worker(*args, &task); end + + # tries to enqueue task + # + # @return [true, false] if enqueued + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#235 + def ns_enqueue(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#178 + def ns_execute(*args, &task); end + + # @raise [ArgumentError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#146 + def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#205 + def ns_kill_execution; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#173 + def ns_limited_queue?; end + + # @return [Integer] number of excess idle workers which can be removed without + # going below min_length, or all workers if not running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#305 + def ns_prunable_capacity; end + + # handle ready worker, giving it new job or assigning back to @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#269 + def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end + + # removes a worker which is not tracked in @ready + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#287 + def ns_remove_busy_worker(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#294 + def ns_remove_ready_worker(worker); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#314 + def ns_reset_if_forked; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#190 + def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#247 + def ns_worker_died(worker); end +end + +# Default maximum number of threads that will be created in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#17 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default maximum number of tasks that may be added to the task queue. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#23 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) + +# Default minimum number of threads that will be retained in the pool. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#20 +Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Default value of the :synchronous option. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#29 +Concurrent::RubyThreadPoolExecutor::DEFAULT_SYNCHRONOUS = T.let(T.unsafe(nil), FalseClass) + +# Default maximum number of seconds a thread in the pool may remain idle +# before being reclaimed. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#26 +Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#328 +class Concurrent::RubyThreadPoolExecutor::Worker + include ::Concurrent::Concern::Logging + + # @return [Worker] a new instance of Worker + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#331 + def initialize(pool, id); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#342 + def <<(message); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#350 + def kill; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#346 + def stop; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#356 + def create_worker(queue, pool, idletime); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb#381 + def run_task(pool, task, args); end +end + +# A simple utility class that executes a callable and returns and array of three elements: +# success - indicating if the callable has been executed without errors +# value - filled by the callable result if it has been executed without errors, nil otherwise +# reason - the error risen by the callable if it has been executed with errors, nil otherwise +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#9 +class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject + # @return [SafeTaskExecutor] a new instance of SafeTaskExecutor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#11 + def initialize(task, opts = T.unsafe(nil)); end + + # @return [Array] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb#18 + def execute(*args); end +end + +# `ScheduledTask` is a close relative of `Concurrent::Future` but with one +# important difference: A `Future` is set to execute as soon as possible +# whereas a `ScheduledTask` is set to execute after a specified delay. This +# implementation is loosely based on Java's +# [ScheduledExecutorService](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html). +# It is a more feature-rich variant of {Concurrent.timer}. +# +# The *intended* schedule time of task execution is set on object construction +# with the `delay` argument. The delay is a numeric (floating point or integer) +# representing a number of seconds in the future. Any other value or a numeric +# equal to or less than zero will result in an exception. The *actual* schedule +# time of task execution is set when the `execute` method is called. +# +# The constructor can also be given zero or more processing options. Currently +# the only supported options are those recognized by the +# [Dereferenceable](Dereferenceable) module. +# +# The final constructor argument is a block representing the task to be performed. +# If no block is given an `ArgumentError` will be raised. +# +# **States** +# +# `ScheduledTask` mixes in the [Obligation](Obligation) module thus giving it +# "future" behavior. This includes the expected lifecycle states. `ScheduledTask` +# has one additional state, however. While the task (block) is being executed the +# state of the object will be `:processing`. This additional state is necessary +# because it has implications for task cancellation. +# +# **Cancellation** +# +# A `:pending` task can be cancelled using the `#cancel` method. A task in any +# other state, including `:processing`, cannot be cancelled. The `#cancel` +# method returns a boolean indicating the success of the cancellation attempt. +# A cancelled `ScheduledTask` cannot be restarted. It is immutable. +# +# **Obligation and Observation** +# +# The result of a `ScheduledTask` can be obtained either synchronously or +# asynchronously. `ScheduledTask` mixes in both the [Obligation](Obligation) +# module and the +# [Observable](http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html) +# module from the Ruby standard library. With one exception `ScheduledTask` +# behaves identically to [Future](Observable) with regard to these modules. +# +# @example Basic usage +# +# require 'concurrent/scheduled_task' +# require 'csv' +# require 'open-uri' +# +# class Ticker +# def get_year_end_closing(symbol, year, api_key) +# uri = "https://www.alphavantage.co/query?function=TIME_SERIES_MONTHLY&symbol=#{symbol}&apikey=#{api_key}&datatype=csv" +# data = [] +# csv = URI.parse(uri).read +# if csv.include?('call frequency') +# return :rate_limit_exceeded +# end +# CSV.parse(csv, headers: true) do |row| +# data << row['close'].to_f if row['timestamp'].include?(year.to_s) +# end +# year_end = data.first +# year_end +# rescue => e +# p e +# end +# end +# +# api_key = ENV['ALPHAVANTAGE_KEY'] +# abort(error_message) unless api_key +# +# # Future +# price = Concurrent::Future.execute{ Ticker.new.get_year_end_closing('TWTR', 2013, api_key) } +# price.state #=> :pending +# price.pending? #=> true +# price.value(0) #=> nil (does not block) +# +# sleep(1) # do other stuff +# +# price.value #=> 63.65 (after blocking if necessary) +# price.state #=> :fulfilled +# price.fulfilled? #=> true +# price.value #=> 63.65 +# @example Failed task execution +# +# task = Concurrent::ScheduledTask.execute(2){ raise StandardError.new('Call me maybe?') } +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> false +# task.rejected? #=> true +# task.value #=> nil +# task.reason #=> # +# @example One line creation and execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' }.execute +# task.state #=> pending +# +# task = Concurrent::ScheduledTask.execute(2){ 'What do you get when you multiply 6 by 9?' } +# task.state #=> pending +# @example Successful task execution +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.state #=> :unscheduled +# task.execute +# task.state #=> pending +# +# # wait for it... +# sleep(3) +# +# task.unscheduled? #=> false +# task.pending? #=> false +# task.fulfilled? #=> true +# task.rejected? #=> false +# task.value #=> 'What does the fox say?' +# @example Task execution with observation +# +# observer = Class.new{ +# def update(time, value, reason) +# puts "The task completed at #{time} with value '#{value}'" +# end +# }.new +# +# task = Concurrent::ScheduledTask.new(2){ 'What does the fox say?' } +# task.add_observer(observer) +# task.execute +# task.pending? #=> true +# +# # wait for it... +# sleep(3) +# +# #>> The task completed at 2013-11-07 12:26:09 -0500 with value 'What does the fox say?' +# @see Concurrent.timer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#158 +class Concurrent::ScheduledTask < ::Concurrent::IVar + include ::Comparable + + # Schedule a task for execution at a specified future time. + # + # @option opts + # @param delay [Float] the number of seconds to wait for before executing the task + # @param opts [Hash] a customizable set of options + # @raise [ArgumentError] When no block is given + # @raise [ArgumentError] When given a time that is in the past + # @return [ScheduledTask] a new instance of ScheduledTask + # @yield the task to be performed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#178 + def initialize(delay, opts = T.unsafe(nil), &task); end + + # Comparator which orders by schedule time. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#213 + def <=>(other); end + + # Cancel this task and prevent it from executing. A task can only be + # cancelled if it is pending or unscheduled. + # + # @return [Boolean] true if successfully cancelled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#235 + def cancel; end + + # Has the task been cancelled? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#220 + def cancelled?; end + + # Execute an `:unscheduled` `ScheduledTask`. Immediately sets the state to `:pending` + # and starts counting down toward execution. Does nothing if the `ScheduledTask` is + # in any state other than `:unscheduled`. + # + # @return [ScheduledTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#273 + def execute; end + + # The executor on which to execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#163 + def executor; end + + # The `delay` value given at instantiation. + # + # @return [Float] the initial delay. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#199 + def initial_delay; end + + # Execute the task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#297 + def process_task; end + + # In the task execution in progress? + # + # @return [Boolean] true if the task is in the given state else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#227 + def processing?; end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] When given a time that is in the past + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#262 + def reschedule(delay); end + + # Reschedule the task using the original delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#250 + def reset; end + + # The monotonic time at which the the task is scheduled to be executed. + # + # @return [Float] the schedule time or nil if `unscheduled` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#206 + def schedule_time; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#301 + def fail(reason = T.unsafe(nil)); end + + # Reschedule the task using the given delay and the current time. + # A task can only be reset while it is `:pending`. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#326 + def ns_reschedule(delay); end + + # Schedule the task using the given delay and the current time. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @return [Boolean] true if successfully rescheduled else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#312 + def ns_schedule(delay); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#301 + def set(value = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#301 + def try_set(value = T.unsafe(nil), &block); end + + class << self + # Create a new `ScheduledTask` object with the given block, execute it, and return the + # `:pending` object. + # + # @param delay [Float] the number of seconds to wait for before executing the task + # @raise [ArgumentError] if no block is given + # @return [ScheduledTask] the newly created `ScheduledTask` in the `:pending` state + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/scheduled_task.rb#290 + def execute(delay, opts = T.unsafe(nil), &task); end + end +end + +# A counting semaphore. Conceptually, a semaphore maintains a set of +# permits. Each {#acquire} blocks if necessary until a permit is +# available, and then takes it. Each {#release} adds a permit, potentially +# releasing a blocking acquirer. +# However, no actual permit objects are used; the Semaphore just keeps a +# count of the number available and acts accordingly. +# Alternatively, permits may be acquired within a block, and automatically +# released after the block finishes executing. +# +# @example +# semaphore = Concurrent::Semaphore.new(2) +# +# t1 = Thread.new do +# semaphore.acquire +# puts "Thread 1 acquired semaphore" +# end +# +# t2 = Thread.new do +# semaphore.acquire +# puts "Thread 2 acquired semaphore" +# end +# +# t3 = Thread.new do +# semaphore.acquire +# puts "Thread 3 acquired semaphore" +# end +# +# t4 = Thread.new do +# sleep(2) +# puts "Thread 4 releasing semaphore" +# semaphore.release +# end +# +# [t1, t2, t3, t4].each(&:join) +# +# # prints: +# # Thread 3 acquired semaphore +# # Thread 2 acquired semaphore +# # Thread 4 releasing semaphore +# # Thread 1 acquired semaphore +# @example +# semaphore = Concurrent::Semaphore.new(1) +# +# puts semaphore.available_permits +# semaphore.acquire do +# puts semaphore.available_permits +# end +# puts semaphore.available_permits +# +# # prints: +# # 1 +# # 0 +# # 1 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#161 +class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/semaphore.rb#96 +Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore + +# Indicates that the including `ExecutorService` guarantees +# that all operations will occur in the order they are post and that no +# two operations may occur simultaneously. This module provides no +# functionality and provides no guarantees. That is the responsibility +# of the including class. This module exists solely to allow the including +# object to be interrogated for its serialization status. +# +# @example +# class Foo +# include Concurrent::SerialExecutor +# end +# +# foo = Foo.new +# +# foo.is_a? Concurrent::ExecutorService #=> true +# foo.is_a? Concurrent::SerialExecutor #=> true +# foo.serialized? #=> true +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#24 +module Concurrent::SerialExecutorService + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + + # Does this executor guarantee serialization of its operations? + # + # @note Always returns `true` + # @return [Boolean] True if the executor guarantees that all operations + # will be post in the order they are received and no two operations may + # occur simultaneously. Else false. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb#30 + def serialized?; end +end + +# Ensures passed jobs in a serialized order never running at the same time. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#8 +class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject + include ::Concurrent::Concern::Logging + + # @return [SerializedExecution] a new instance of SerializedExecution + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#11 + def initialize; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @param executor [Executor] to be used for this job + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#34 + def post(executor, *args, &task); end + + # As {#post} but allows to submit multiple tasks at once, it's guaranteed that they will not + # be interleaved by other tasks. + # + # @param posts [Array, Proc)>] array of triplets where + # first is a {ExecutorService}, second is array of args for task, third is a task (Proc) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#44 + def posts(posts); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#75 + def call_job(job); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#70 + def ns_initialize; end + + # ensures next job is executed if any is stashed + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#95 + def work(job); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 +class Concurrent::SerializedExecution::Job < ::Struct + # Returns the value of attribute args + # + # @return [Object] the current value of args + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def block=(_); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#17 + def call; end + + # Returns the value of attribute executor + # + # @return [Object] the current value of executor + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def executor; end + + # Sets the attribute executor + # + # @param value [Object] the value to set the attribute executor to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def executor=(_); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def [](*_arg0); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def keyword_init?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def members; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution.rb#16 + def new(*_arg0); end + end +end + +# A wrapper/delegator for any `ExecutorService` that +# guarantees serialized execution of tasks. +# +# @see Concurrent::SerializedExecution +# @see [SimpleDelegator](http://www.ruby-doc.org/stdlib-2.1.2/libdoc/delegate/rdoc/SimpleDelegator.html) +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#12 +class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::SerialExecutorService + + # @return [SerializedExecutionDelegator] a new instance of SerializedExecutionDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#15 + def initialize(executor); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb#22 + def post(*args, &task); end +end + +# A thread-safe subclass of Set. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`. +# +# @note `a += b` is **not** a **thread-safe** operation on +# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` +# which is union of `a` and `b`, then it writes the union to `a`. +# The read and write are independent operations they do not form a single atomic +# operation therefore when two `+=` operations are executed concurrently updates +# may be lost. Use `#merge` instead. +# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#61 +class Concurrent::Set < ::Concurrent::CRubySet; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/set.rb#23 +Concurrent::SetImplementation = Concurrent::CRubySet + +# An thread-safe, write-once variation of Ruby's standard `Struct`. +# Each member can have its value set at most once, either at construction +# or any time thereafter. Attempting to assign a value to a member +# that has already been set will result in a `Concurrent::ImmutabilityError`. +# +# @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keyword +# @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#14 +module Concurrent::SettableStruct + include ::Concurrent::Synchronization::AbstractStruct + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#50 + def ==(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#45 + def [](member); end + + # Attribute Assignment + # + # Sets the value of the given struct member or the member at the given index. + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the name does not exist + # @raise [IndexError] if the index is out of range. + # @raise [Concurrent::ImmutabilityError] if the given member has already been set + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#75 + def []=(member, value); end + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#55 + def each(&block); end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#61 + def each_pair(&block); end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#29 + def inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam othervalue [Object] the value of the member in `other` + # @yieldparam selfvalue [Object] the value of the member in `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#35 + def merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#67 + def select(&block); end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#21 + def to_a; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#40 + def to_h; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#32 + def to_s; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#18 + def values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#24 + def values_at(*indexes); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#97 + def initialize_copy(original); end + + class << self + # Factory for creating new struct classes. + # + # ``` + # new([class_name] [, member_name]+>) -> StructClass click to toggle source + # new([class_name] [, member_name]+>) {|StructClass| block } -> StructClass + # new(value, ...) -> obj + # StructClass[value, ...] -> obj + # ``` + # + # The first two forms are used to create a new struct subclass `class_name` + # that can contain a value for each member_name . This subclass can be + # used to create instances of the structure like any other Class . + # + # If the `class_name` is omitted an anonymous struct class will be created. + # Otherwise, the name of this struct will appear as a constant in the struct class, + # so it must be unique for all structs under this base class and must start with a + # capital letter. Assigning a struct class to a constant also gives the class + # the name of the constant. + # + # If a block is given it will be evaluated in the context of `StructClass`, passing + # the created class as a parameter. This is the recommended way to customize a struct. + # Subclassing an anonymous struct creates an extra anonymous class that will never be used. + # + # The last two forms create a new instance of a struct subclass. The number of value + # parameters must be less than or equal to the number of attributes defined for the + # struct. Unset parameters default to nil. Passing more parameters than number of attributes + # will raise an `ArgumentError`. + # + # @see http://ruby-doc.org/core/Struct.html#method-c-new Ruby standard library `Struct#new` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#105 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/settable_struct.rb#115 +Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + +# An executor service in which every operation spawns a new, +# independently operating thread. +# +# This is perhaps the most inefficient executor service in this +# library. It exists mainly for testing an debugging. Thread creation +# and management is expensive in Ruby and this executor performs no +# resource pooling. This can be very beneficial during testing and +# debugging because it decouples the using code from the underlying +# executor implementation. In production this executor will likely +# lead to suboptimal performance. +# +# @note Intended for use primarily in testing and debugging. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#21 +class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#56 + def <<(task); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#84 + def kill; end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#40 + def post(*args, &task); end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#62 + def running?; end + + # Begin an orderly shutdown. Tasks already in the queue will be executed, + # but no new tasks will be accepted. Has no additional effect if the + # thread pool is not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#77 + def shutdown; end + + # Is the executor shutdown? + # + # @return [Boolean] `true` when shutdown, `false` when shutting down or running + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#72 + def shutdown?; end + + # Is the executor shuttingdown? + # + # @return [Boolean] `true` when not running and not shutdown, else `false` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#67 + def shuttingdown?; end + + # Block until executor shutdown is complete or until `timeout` seconds have + # passed. + # + # @note Does not initiate shutdown or termination. Either `shutdown` or `kill` + # must be called before this method (or on another thread). + # @param timeout [Integer] the maximum number of seconds to wait for shutdown to complete + # @return [Boolean] `true` if shutdown complete or false on `timeout` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#91 + def wait_for_termination(timeout = T.unsafe(nil)); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#97 + def ns_initialize(*args); end + + class << self + # Submit a task to the executor for asynchronous processing. + # + # @param task [Proc] the asynchronous task to perform + # @return [self] returns itself + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#34 + def <<(task); end + + # Submit a task to the executor for asynchronous processing. + # + # @param args [Array] zero or more arguments to be passed to the task + # @raise [ArgumentError] if no task is given + # @return [Boolean] `true` if the task is queued, `false` if the executor + # is not running + # @yield the asynchronous task to perform + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb#24 + def post(*args); end + end +end + +# A thread pool with a single thread an unlimited queue. Should the thread +# die for any reason it will be removed and replaced, thus ensuring that +# the executor will always remain viable and available to process jobs. +# +# A common pattern for background processing is to create a single thread +# on which an infinite loop is run. The thread's loop blocks on an input +# source (perhaps blocking I/O or a queue) and processes each input as it +# is received. This pattern has several issues. The thread itself is highly +# susceptible to errors during processing. Also, the thread itself must be +# constantly monitored and restarted should it die. `SingleThreadExecutor` +# encapsulates all these behaviors. The task processor is highly resilient +# to errors from within tasks. Also, should the thread die it will +# automatically be restarted. +# +# The API and behavior of this class are based on Java's `SingleThreadExecutor`. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#37 +class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb#10 +Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#2 +module Concurrent::Synchronization + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/full_memory_barrier.rb#7 + def full_memory_barrier; end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#9 +class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object + protected + + # Broadcast to all waiting threads. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def broadcast + # synchronize { ns_broadcast } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#96 + def ns_broadcast; end + + # Signal one waiting thread. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def signal + # synchronize { ns_signal } + # end + # ``` + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#81 + def ns_signal; end + + # Wait until another thread calls #signal or #broadcast, + # spurious wake-ups can happen. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait(timeout = nil) + # synchronize { ns_wait(timeout) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @raise [NotImplementedError] + # @return [self] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#66 + def ns_wait(timeout = T.unsafe(nil)); end + + # Wait until condition is met or timeout passes, + # protects against spurious wake-ups. + # + # @note only to be used inside synchronized block + # @note to provide direct access to this method in a descendant add method + # ``` + # def wait_until(timeout = nil, &condition) + # synchronize { ns_wait_until(timeout, &condition) } + # end + # ``` + # @param timeout [Numeric, nil] in seconds, `nil` means no timeout + # @return [true, false] if condition met + # @yield condition to be met + # @yieldreturn [true, false] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#37 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # @note can by made public in descendants if required by `public :synchronize` + # @raise [NotImplementedError] + # @yield runs the block synchronized against this object, + # equivalent of java's `synchronize(this) {}` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb#18 + def synchronize; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#6 +class Concurrent::Synchronization::AbstractObject + # @return [AbstractObject] a new instance of AbstractObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#7 + def initialize; end + + # @abstract + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#13 + def full_memory_barrier; end + + class << self + # @raise [NotImplementedError] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb#17 + def attr_volatile(*names); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#6 +module Concurrent::Synchronization::AbstractStruct + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#9 + def initialize(*values); end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#19 + def length; end + + # Returns the struct members as an array of symbols. + # + # @return [Array] the struct members as an array of symbols + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#29 + def members; end + + # Returns the number of struct members. + # + # @return [Fixnum] the number of struct members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#22 + def size; end + + protected + + # Yields the value of each struct member in order. If no block is given + # an enumerator is returned. + # + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#82 + def ns_each; end + + # Yields the name and value of each struct member in order. If no block is + # given an enumerator is returned. + # + # @yield the operation to be performed on each struct member/value pair + # @yieldparam member [Object] each struct member (in order) + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#89 + def ns_each_pair; end + + # Equality + # + # @return [Boolean] true if other has the same struct subclass and has + # equal member values (according to `Object#==`) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#75 + def ns_equality(other); end + + # Attribute Reference + # + # @param member [Symbol, String, Integer] the string or symbol name of the member + # for which to obtain the value or the member's index + # @raise [NameError] if the member does not exist + # @raise [IndexError] if the index is out of range. + # @return [Object] the value of the given struct member or the member at the given index. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#59 + def ns_get(member); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#119 + def ns_initialize_copy; end + + # Describe the contents of this struct in a string. + # + # @return [String] the contents of this struct in a string + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#105 + def ns_inspect; end + + # Returns a new struct containing the contents of `other` and the contents + # of `self`. If no block is specified, the value for entries with duplicate + # keys will be that of `other`. Otherwise the value for each duplicate key + # is determined by calling the block with the key, its value in `self` and + # its value in `other`. + # + # @param other [Hash] the hash from which to set the new values + # @raise [ArgumentError] of given a member that is not defined in the struct + # @return [Synchronization::AbstractStruct] a new struct with the new values + # @yield an options block for resolving duplicate keys + # @yieldparam member [String, Symbol] the name of the member which is duplicated + # @yieldparam othervalue [Object] the value of the member in `other` + # @yieldparam selfvalue [Object] the value of the member in `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#114 + def ns_merge(other, &block); end + + # Yields each member value from the struct to the block and returns an Array + # containing the member values from the struct for which the given block + # returns a true value (equivalent to `Enumerable#select`). + # + # @return [Array] an array containing each value for which the block returns true + # @yield the operation to be performed on each struct member + # @yieldparam value [Object] each struct value (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#98 + def ns_select; end + + # Returns a hash containing the names and values for the struct’s members. + # + # @return [Hash] the names and values for the struct’s members + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#52 + def ns_to_h; end + + # Returns the values for this struct as an Array. + # + # @return [Array] the values for this struct + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#38 + def ns_values; end + + # Returns the struct member values for each selector as an Array. + # + # A selector may be either an Integer offset or a Range of offsets (as in `Array#values_at`). + # + # @param indexes [Fixnum, Range] the index(es) from which to obatin the values (in order) + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#45 + def ns_values_at(indexes); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#130 + def pr_underscore(clazz); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb#141 + def define_struct_class(parent, base, name, members, &block); end + end +end + +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#8 +class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::LockableObject + # @return [Condition] a new instance of Condition + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#18 + def initialize(lock); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#47 + def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#51 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#43 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#27 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#35 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#39 + def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#23 + def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#31 + def wait_until(timeout = T.unsafe(nil), &condition); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#15 + def private_new(*args, &block); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#16 + def new(*args, &block); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#8 +module Concurrent::Synchronization::ConditionSignalling + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#16 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#11 + def ns_signal; end +end + +# TODO (pitr-ch 04-Dec-2016): should be in edge +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#8 +class Concurrent::Synchronization::Lock < ::Concurrent::Synchronization::LockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#31 + def broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#35 + def ns_broadcast; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#29 + def ns_signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#17 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#23 + def ns_wait_until(timeout = T.unsafe(nil), &condition); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#25 + def signal; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#11 + def synchronize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#13 + def wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lock.rb#19 + def wait_until(timeout = T.unsafe(nil), &condition); end +end + +# Safe synchronization under any Ruby implementation. +# It provides methods like {#synchronize}, {#wait}, {#signal} and {#broadcast}. +# Provides a single layer which can improve its implementation over time without changes needed to +# the classes using it. Use {Synchronization::Object} not this abstract class. +# +# @note this object does not support usage together with +# [`Thread#wakeup`](http://ruby-doc.org/core/Thread.html#method-i-wakeup) +# and [`Thread#raise`](http://ruby-doc.org/core/Thread.html#method-i-raise). +# `Thread#sleep` and `Thread#wakeup` will work as expected but mixing `Synchronization::Object#wait` and +# `Thread#wakeup` will not work on all platforms. +# +# @see Event implementation as an example of this class use +# +# @example simple +# class AnClass < Synchronization::Object +# def initialize +# super +# synchronize { @value = 'asd' } +# end +# +# def value +# synchronize { @value } +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#50 +class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronization::MutexLockableObject + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/condition.rb#57 + def new_condition; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb#11 +Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#60 +class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [MonitorLockableObject] a new instance of MonitorLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#65 + def initialize; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#83 + def ns_wait(timeout = T.unsafe(nil)); end + + # TODO may be a problem with lock.synchronize { lock.wait } + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#79 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#71 + def initialize_copy(other); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#25 +class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject + include ::Concurrent::Synchronization::ConditionSignalling + extend ::Concurrent::Synchronization::SafeInitialization + + # @return [MutexLockableObject] a new instance of MutexLockableObject + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#30 + def initialize; end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#52 + def ns_wait(timeout = T.unsafe(nil)); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#44 + def synchronize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb#36 + def initialize_copy(other); end +end + +# Abstract object providing final, volatile, ans CAS extensions to build other concurrent abstractions. +# - final instance variables see {Object.safe_initialization!} +# - volatile instance variables see {Object.attr_volatile} +# - volatile instance variables see {Object.attr_atomic} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#15 +class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::AbstractObject + include ::Concurrent::Synchronization::Volatile + extend ::Concurrent::Synchronization::Volatile::ClassMethods + + # Has to be called by children. + # + # @return [Object] a new instance of Object + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#28 + def initialize; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#146 + def __initialize_atomic_fields__; end + + class << self + # @return [true, false] is the attribute with name atomic? + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#125 + def atomic_attribute?(name); end + + # @param inherited [true, false] should inherited volatile with CAS fields be returned? + # @return [::Array] Returns defined volatile with CAS fields on this class. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#119 + def atomic_attributes(inherited = T.unsafe(nil)); end + + # Creates methods for reading and writing to a instance variable with + # volatile (Java) semantic as {.attr_volatile} does. + # The instance variable should be accessed only through generated methods. + # This method generates following methods: `value`, `value=(new_value) #=> new_value`, + # `swap_value(new_value) #=> old_value`, + # `compare_and_set_value(expected, value) #=> true || false`, `update_value(&block)`. + # + # @param names [::Array] of the instance variables to be volatile with CAS. + # @return [::Array] names of defined method names. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#84 + def attr_atomic(*names); end + + # For testing purposes, quite slow. Injects assert code to new method which will raise if class instance contains + # any instance variables with CamelCase names and isn't {.safe_initialization?}. + # + # @raise when offend found + # @return [true] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#45 + def ensure_safe_initialization_when_final_fields_are_present; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#33 + def safe_initialization!; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#37 + def safe_initialization?; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/object.rb#131 + def define_initialize_atomic_fields; end + end +end + +# By extending this module, a class and all its children are marked to be constructed safely. Meaning that +# all writes (ivar initializations) are made visible to all readers of newly constructed object. It ensures +# same behaviour as Java's final fields. +# +# Due to using Kernel#extend, the module is not included again if already present in the ancestors, +# which avoids extra overhead. +# +# @example +# class AClass < Concurrent::Synchronization::Object +# extend Concurrent::Synchronization::SafeInitialization +# +# def initialize +# @AFinalValue = 'value' # published safely, #foo will never return nil +# end +# +# def foo +# @AFinalValue +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#28 +module Concurrent::Synchronization::SafeInitialization + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/safe_initialization.rb#29 + def new(*args, &block); end +end + +# Volatile adds the attr_volatile class method when included. +# +# foo = Foo.new +# foo.bar +# => 1 +# foo.bar = 2 +# => 2 +# +# @example +# class Foo +# include Concurrent::Synchronization::Volatile +# +# attr_volatile :bar +# +# def initialize +# self.bar = 1 +# end +# end +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#28 +module Concurrent::Synchronization::Volatile + mixes_in_class_methods ::Concurrent::Synchronization::Volatile::ClassMethods + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#33 + def full_memory_barrier; end + + class << self + # @private + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#29 + def included(base); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#37 +module Concurrent::Synchronization::Volatile::ClassMethods + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/synchronization/volatile.rb#39 + def attr_volatile(*names); end +end + +# This class provides a trivial way to synchronize all calls to a given object +# by wrapping it with a `Delegator` that performs `Monitor#enter/exit` calls +# around the delegated `#send`. Example: +# +# array = [] # not thread-safe on many impls +# array = SynchronizedDelegator.new([]) # thread-safe +# +# A simple `Monitor` provides a very coarse-grained way to synchronize a given +# object, in that it will cause synchronization for methods that have no need +# for it, but this is a trivial way to get thread-safety where none may exist +# currently on some implementations. +# +# This class is currently being considered for inclusion into stdlib, via +# https://bugs.ruby-lang.org/issues/8556 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#21 +class Concurrent::SynchronizedDelegator < ::SimpleDelegator + # @return [SynchronizedDelegator] a new instance of SynchronizedDelegator + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#31 + def initialize(obj); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#36 + def method_missing(method, *args, &block); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#22 + def setup; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb#27 + def teardown; end +end + +# A `TVar` is a transactional variable - a single-element container that +# is used as part of a transaction - see `Concurrent::atomically`. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# {include:file:docs-source/tvar.md} +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#12 +class Concurrent::TVar < ::Concurrent::Synchronization::Object + extend ::Concurrent::Synchronization::SafeInitialization + + # Create a new `TVar` with an initial value. + # + # @return [TVar] a new instance of TVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#16 + def initialize(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#46 + def unsafe_lock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#36 + def unsafe_value; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#41 + def unsafe_value=(value); end + + # Get the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#22 + def value; end + + # Set the value of a `TVar`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#29 + def value=(value); end +end + +# A `ThreadLocalVar` is a variable where the value is different for each thread. +# Each variable may have a default value, but when you modify the variable only +# the current thread will ever see that change. +# +# This is similar to Ruby's built-in thread-local variables (`Thread#thread_variable_get`), +# but with these major advantages: +# * `ThreadLocalVar` has its own identity, it doesn't need a Symbol. +# * Each Ruby's built-in thread-local variable leaks some memory forever (it's a Symbol held forever on the thread), +# so it's only OK to create a small amount of them. +# `ThreadLocalVar` has no such issue and it is fine to create many of them. +# * Ruby's built-in thread-local variables leak forever the value set on each thread (unless set to nil explicitly). +# `ThreadLocalVar` automatically removes the mapping for each thread once the `ThreadLocalVar` instance is GC'd. +# +# +# ## Thread-safe Variable Classes +# +# Each of the thread-safe variable classes is designed to solve a different +# problem. In general: +# +# * *{Concurrent::Agent}:* Shared, mutable variable providing independent, +# uncoordinated, *asynchronous* change of individual values. Best used when +# the value will undergo frequent, complex updates. Suitable when the result +# of an update does not need to be known immediately. +# * *{Concurrent::Atom}:* Shared, mutable variable providing independent, +# uncoordinated, *synchronous* change of individual values. Best used when +# the value will undergo frequent reads but only occasional, though complex, +# updates. Suitable when the result of an update must be known immediately. +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated +# atomically. Updates are synchronous but fast. Best used when updates a +# simple set operations. Not suitable when updates are complex. +# {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar +# but optimized for the given data type. +# * *{Concurrent::Exchanger}:* Shared, stateless synchronization point. Used +# when two or more threads need to exchange data. The threads will pair then +# block on each other until the exchange is complete. +# * *{Concurrent::MVar}:* Shared synchronization point. Used when one thread +# must give a value to another, which must take the value. The threads will +# block on each other until the exchange is complete. +# * *{Concurrent::ThreadLocalVar}:* Shared, mutable, isolated variable which +# holds a different value for each thread which has access. Often used as +# an instance variable in objects which must maintain different state +# for different threads. +# * *{Concurrent::TVar}:* Shared, mutable variables which provide +# *coordinated*, *synchronous*, change of *many* stated. Used when multiple +# value must change together, in an all-or-nothing transaction. +# +# @example +# v = ThreadLocalVar.new(14) +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# @example +# v = ThreadLocalVar.new(14) +# +# t1 = Thread.new do +# v.value #=> 14 +# v.value = 1 +# v.value #=> 1 +# end +# +# t2 = Thread.new do +# v.value #=> 14 +# v.value = 2 +# v.value #=> 2 +# end +# +# v.value #=> 14 +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#43 +class Concurrent::ThreadLocalVar + # Creates a thread local variable. + # + # @param default [Object] the default value when otherwise unset + # @param default_block [Proc] Optional block that gets called to obtain the + # default value for each thread + # @return [ThreadLocalVar] a new instance of ThreadLocalVar + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#51 + def initialize(default = T.unsafe(nil), &default_block); end + + # Bind the given value to thread local storage during + # execution of the given block. + # + # @param value [Object] the value to bind + # @return [Object] the value + # @yield the operation to be performed with the bound variable + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#88 + def bind(value); end + + # Returns the value in the current thread's copy of this thread-local variable. + # + # @return [Object] the current value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#70 + def value; end + + # Sets the current thread's copy of this thread-local variable to the specified value. + # + # @param value [Object] the value to set + # @return [Object] the new value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#78 + def value=(value); end + + protected + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#103 + def default; end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb#44 +Concurrent::ThreadLocalVar::LOCALS = T.let(T.unsafe(nil), Concurrent::ThreadLocals) + +# An array-backed storage of indexed variables per thread. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#141 +class Concurrent::ThreadLocals < ::Concurrent::AbstractLocals + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#142 + def locals; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/atomic/locals.rb#146 + def locals!; end +end + +# An abstraction composed of one or more threads and a task queue. Tasks +# (blocks or `proc` objects) are submitted to the pool and added to the queue. +# The threads in the pool remove the tasks and execute them in the order +# they were received. +# +# A `ThreadPoolExecutor` will automatically adjust the pool size according +# to the bounds set by `min-threads` and `max-threads`. When a new task is +# submitted and fewer than `min-threads` threads are running, a new thread +# is created to handle the request, even if other worker threads are idle. +# If there are more than `min-threads` but less than `max-threads` threads +# running, a new thread will be created only if the queue is full. +# +# Threads that are idle for too long will be garbage collected, down to the +# configured minimum options. Should a thread crash it, too, will be garbage collected. +# +# `ThreadPoolExecutor` is based on the Java class of the same name. From +# the official Java documentation; +# +# > Thread pools address two different problems: they usually provide +# > improved performance when executing large numbers of asynchronous tasks, +# > due to reduced per-task invocation overhead, and they provide a means +# > of bounding and managing the resources, including threads, consumed +# > when executing a collection of tasks. Each ThreadPoolExecutor also +# > maintains some basic statistics, such as the number of completed tasks. +# > +# > To be useful across a wide range of contexts, this class provides many +# > adjustable parameters and extensibility hooks. However, programmers are +# > urged to use the more convenient Executors factory methods +# > [CachedThreadPool] (unbounded thread pool, with automatic thread reclamation), +# > [FixedThreadPool] (fixed size thread pool) and [SingleThreadExecutor] (single +# > background thread), that preconfigure settings for the most common usage +# > scenarios. +# +# **Thread Pool Options** +# +# Thread pools support several configuration options: +# +# * `idletime`: The number of seconds that a thread may be idle before being reclaimed. +# * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and +# a `-worker-` name is given to its threads if supported by used Ruby +# implementation. `` is uniq for each thread. +# * `max_queue`: The maximum number of tasks that may be waiting in the work queue at +# any one time. When the queue size reaches `max_queue` and no new threads can be created, +# subsequent tasks will be rejected in accordance with the configured `fallback_policy`. +# * `auto_terminate`: When true (default), the threads started will be marked as daemon. +# * `fallback_policy`: The policy defining how rejected tasks are handled. +# +# Three fallback policies are supported: +# +# * `:abort`: Raise a `RejectedExecutionError` exception and discard the task. +# * `:discard`: Discard the task and return false. +# * `:caller_runs`: Execute the task on the calling thread. +# +# **Shutting Down Thread Pools** +# +# Killing a thread pool while tasks are still being processed, either by calling +# the `#kill` method or at application exit, will have unpredictable results. There +# is no way for the thread pool to know what resources are being used by the +# in-progress tasks. When those tasks are killed the impact on those resources +# cannot be predicted. The *best* practice is to explicitly shutdown all thread +# pools using the provided methods: +# +# * Call `#shutdown` to initiate an orderly termination of all in-progress tasks +# * Call `#wait_for_termination` with an appropriate timeout interval an allow +# the orderly shutdown to complete +# * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time +# +# On some runtime platforms (most notably the JVM) the application will not +# exit until all thread pools have been shutdown. To prevent applications from +# "hanging" on exit, all threads can be marked as daemon according to the +# `:auto_terminate` option. +# +# ```ruby +# pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon +# pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon +# ``` +# +# @note Failure to properly shutdown a thread pool can lead to unpredictable results. +# Please read *Shutting Down Thread Pools* for more information. +# @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class +# @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface +# @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools +# @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#56 +class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb#10 +Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#4 +module Concurrent::ThreadSafe; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#7 +module Concurrent::ThreadSafe::Util + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#16 + def make_synchronized_on_cruby(klass); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb#41 + def make_synchronized_on_truffleruby(klass); end + end +end + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::ProcessorCounter +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#13 +Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) + +# TODO (pitr-ch 15-Oct-2016): migrate to Utility::NativeInteger +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#10 +Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/thread_safe/util.rb#11 +Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) + +# Raised when an operation times out. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/errors.rb#55 +class Concurrent::TimeoutError < ::Concurrent::Error; end + +# Executes a collection of tasks, each after a given delay. A master task +# monitors the set and schedules each task for execution at the appropriate +# time. Tasks are run on the global thread pool or on the supplied executor. +# Each task is represented as a `ScheduledTask`. +# +# @see Concurrent::ScheduledTask +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#19 +class Concurrent::TimerSet < ::Concurrent::RubyExecutorService + # Create a new set of timed tasks. + # + # @option opts + # @param opts [Hash] the options used to specify the executor on which to perform actions + # @return [TimerSet] a new instance of TimerSet + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#30 + def initialize(opts = T.unsafe(nil)); end + + # Begin an immediate shutdown. In-progress tasks will be allowed to + # complete but enqueued tasks will be dismissed and no new tasks + # will be accepted. Has no additional effect if the thread pool is + # not running. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#62 + def kill; end + + # Post a task to be execute run after a given delay (in seconds). If the + # delay is less than 1/100th of a second the task will be immediately post + # to the executor. + # + # @param args [Array] the arguments passed to the task on execution. + # @param delay [Float] the number of seconds to wait for before executing the task. + # @raise [ArgumentError] if the intended execution time is not in the future. + # @raise [ArgumentError] if no block is given. + # @return [Concurrent::ScheduledTask, false] IVar representing the task if the post + # is successful; false after shutdown. + # @yield the task to be performed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#48 + def post(delay, *args, &task); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#67 + def <<(task); end + + # Initialize the object. + # + # @param opts [Hash] the options to create the object with. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#75 + def ns_initialize(opts); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#95 + def ns_post_task(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#132 + def ns_reset_if_forked; end + + # `ExecutorService` callback called during shutdown. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#123 + def ns_shutdown_execution; end + + # Post the task to the internal queue. + # + # @note This is intended as a callback method from ScheduledTask + # only. It is not intended to be used directly. Post a task + # by using the `SchedulesTask#execute` method. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#90 + def post_task(task); end + + # Run a loop and execute tasks in the scheduled order and at the approximate + # scheduled time. If no tasks remain the thread will exit gracefully so that + # garbage collection can occur. If there are no ready tasks it will sleep + # for up to 60 seconds waiting for the next scheduled task. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#146 + def process_tasks; end + + # Remove the given task from the queue. + # + # @note This is intended as a callback method from `ScheduledTask` + # only. It is not intended to be used directly. Cancel a task + # by using the `ScheduledTask#cancel` method. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/executor/timer_set.rb#116 + def remove_task(task); end +end + +# A very common concurrency pattern is to run a thread that performs a task at +# regular intervals. The thread that performs the task sleeps for the given +# interval then wakes up and performs the task. Lather, rinse, repeat... This +# pattern causes two problems. First, it is difficult to test the business +# logic of the task because the task itself is tightly coupled with the +# concurrency logic. Second, an exception raised while performing the task can +# cause the entire thread to abend. In a long-running application where the +# task thread is intended to run for days/weeks/years a crashed task thread +# can pose a significant problem. `TimerTask` alleviates both problems. +# +# When a `TimerTask` is launched it starts a thread for monitoring the +# execution interval. The `TimerTask` thread does not perform the task, +# however. Instead, the TimerTask launches the task on a separate thread. +# Should the task experience an unrecoverable crash only the task thread will +# crash. This makes the `TimerTask` very fault tolerant. Additionally, the +# `TimerTask` thread can respond to the success or failure of the task, +# performing logging or ancillary operations. +# +# One other advantage of `TimerTask` is that it forces the business logic to +# be completely decoupled from the concurrency logic. The business logic can +# be tested separately then passed to the `TimerTask` for scheduling and +# running. +# +# A `TimerTask` supports two different types of interval calculations. +# A fixed delay will always wait the same amount of time between the +# completion of one task and the start of the next. A fixed rate will +# attempt to maintain a constant rate of execution regardless of the +# duration of the task. For example, if a fixed rate task is scheduled +# to run every 60 seconds but the task itself takes 10 seconds to +# complete, the next task will be scheduled to run 50 seconds after +# the start of the previous task. If the task takes 70 seconds to +# complete, the next task will be start immediately after the previous +# task completes. Tasks will not be executed concurrently. +# +# In some cases it may be necessary for a `TimerTask` to affect its own +# execution cycle. To facilitate this, a reference to the TimerTask instance +# is passed as an argument to the provided block every time the task is +# executed. +# +# The `TimerTask` class includes the `Dereferenceable` mixin module so the +# result of the last execution is always available via the `#value` method. +# Dereferencing options can be passed to the `TimerTask` during construction or +# at any later time using the `#set_deref_options` method. +# +# `TimerTask` supports notification through the Ruby standard library +# {http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# Observable} module. On execution the `TimerTask` will notify the observers +# with three arguments: time of execution, the result of the block (or nil on +# failure), and any raised exceptions (or nil on success). +# +# @example Basic usage +# task = Concurrent::TimerTask.new{ puts 'Boom!' } +# task.execute +# +# task.execution_interval #=> 60 (default) +# +# # wait 60 seconds... +# #=> 'Boom!' +# +# task.shutdown #=> true +# @example Configuring `:execution_interval` +# task = Concurrent::TimerTask.new(execution_interval: 5) do +# puts 'Boom!' +# end +# +# task.execution_interval #=> 5 +# @example Configuring `:interval_type` with either :fixed_delay or :fixed_rate, default is :fixed_delay +# task = Concurrent::TimerTask.new(execution_interval: 5, interval_type: :fixed_rate) do +# puts 'Boom!' +# end +# task.interval_type #=> :fixed_rate +# @example Controlling execution from within the block +# timer_task = Concurrent::TimerTask.new(execution_interval: 1) do |task| +# task.execution_interval.to_i.times{ print 'Boom! ' } +# print "\n" +# task.execution_interval += 1 +# if task.execution_interval > 5 +# puts 'Stopping...' +# task.shutdown +# end +# end +# +# timer_task.execute +# #=> Boom! +# #=> Boom! Boom! +# #=> Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! +# #=> Boom! Boom! Boom! Boom! Boom! +# #=> Stopping... +# @example Immediate execution with `:run_now` +# task = Concurrent::TimerTask.new(run_now: true){ puts 'Boom!' } +# task.execute +# +# #=> 'Boom!' +# @example Last `#value` and `Dereferenceable` mixin +# task = Concurrent::TimerTask.new( +# dup_on_deref: true, +# execution_interval: 5 +# ){ Time.now } +# +# task.execute +# Time.now #=> 2013-11-07 18:06:50 -0500 +# sleep(10) +# task.value #=> 2013-11-07 18:06:55 -0500 +# @example Observation +# class TaskObserver +# def update(time, result, ex) +# if result +# print "(#{time}) Execution successfully returned #{result}\n" +# else +# print "(#{time}) Execution failed with error #{ex}\n" +# end +# end +# end +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ 42 } +# task.add_observer(TaskObserver.new) +# task.execute +# sleep 4 +# +# #=> (2013-10-13 19:08:58 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:08:59 -0400) Execution successfully returned 42 +# #=> (2013-10-13 19:09:00 -0400) Execution successfully returned 42 +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ sleep } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:07:25 -0400) Execution timed out +# #=> (2013-10-13 19:07:27 -0400) Execution timed out +# #=> (2013-10-13 19:07:29 -0400) Execution timed out +# task.shutdown +# +# task = Concurrent::TimerTask.new(execution_interval: 1){ raise StandardError } +# task.add_observer(TaskObserver.new) +# task.execute +# +# #=> (2013-10-13 19:09:37 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:38 -0400) Execution failed with error StandardError +# #=> (2013-10-13 19:09:39 -0400) Execution failed with error StandardError +# task.shutdown +# @see http://docs.oracle.com/javase/7/docs/api/java/util/TimerTask.html +# @see http://ruby-doc.org/stdlib-2.0/libdoc/observer/rdoc/Observable.html +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#166 +class Concurrent::TimerTask < ::Concurrent::RubyExecutorService + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Observable + + # Create a new TimerTask with the given task and configuration. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#210 + def initialize(opts = T.unsafe(nil), &task); end + + # Execute a previously created `TimerTask`. + # + # @example Instance and execute in one line + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" }.execute + # task.running? #=> true + # @example Instance and execute in separate steps + # task = Concurrent::TimerTask.new(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> false + # task.execute + # task.running? #=> true + # @return [TimerTask] a reference to `self` + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#236 + def execute; end + + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#261 + def execution_interval; end + + # @return [Fixnum] Number of seconds after the task completes before the + # task is performed again. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#268 + def execution_interval=(value); end + + # @return [Symbol] method to calculate the interval between executions + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#278 + def interval_type; end + + # Is the executor running? + # + # @return [Boolean] `true` when running, `false` when shutting down or shutdown + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#219 + def running?; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#283 + def timeout_interval; end + + # @return [Fixnum] Number of seconds the task can run before it is + # considered to have failed. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#290 + def timeout_interval=(value); end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#294 + def <<(task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#357 + def calculate_next_interval(start_time); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#339 + def execute_task(completion, age_when_scheduled); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#298 + def ns_initialize(opts, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#327 + def ns_kill_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#321 + def ns_shutdown_execution; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#294 + def post(*args, &task); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#333 + def schedule_next_task(interval = T.unsafe(nil)); end + + class << self + # Create and execute a new `TimerTask`. + # + # @example + # task = Concurrent::TimerTask.execute(execution_interval: 10){ print "Hello World\n" } + # task.running? #=> true + # @option opts + # @option opts + # @option opts + # @param opts [Hash] the options defining task execution. + # @raise ArgumentError when no block is given. + # @return [TimerTask] the new `TimerTask` + # @yield to the block after :execution_interval seconds have passed since + # the last yield + # @yieldparam task a reference to the `TimerTask` instance so that the + # block can control its own lifecycle. Necessary since `self` will + # refer to the execution context of the block rather than the running + # `TimerTask`. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#254 + def execute(opts = T.unsafe(nil), &task); end + end +end + +# Default `:interval_type` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#182 +Concurrent::TimerTask::DEFAULT_INTERVAL_TYPE = T.let(T.unsafe(nil), Symbol) + +# Default `:execution_interval` in seconds. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#171 +Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) + +# Maintain the interval between the end of one execution and the start of the next execution. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#174 +Concurrent::TimerTask::FIXED_DELAY = T.let(T.unsafe(nil), Symbol) + +# Maintain the interval between the start of one execution and the start of the next. +# If execution time exceeds the interval, the next execution will start immediately +# after the previous execution finishes. Executions will not run concurrently. +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/timer_task.rb#179 +Concurrent::TimerTask::FIXED_RATE = T.let(T.unsafe(nil), Symbol) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#153 +class Concurrent::Transaction + # @return [Transaction] a new instance of Transaction + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#162 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#192 + def abort; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#196 + def commit; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#177 + def open(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#166 + def read(tvar); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#206 + def unlock; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#171 + def write(tvar, value); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#212 + def current; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#216 + def current=(transaction); end + end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#155 +Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#159 +class Concurrent::Transaction::AbortError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#160 +class Concurrent::Transaction::LeaveError < ::StandardError; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 +class Concurrent::Transaction::OpenEntry < ::Struct + # Returns the value of attribute modified + # + # @return [Object] the current value of modified + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def modified; end + + # Sets the attribute modified + # + # @param value [Object] the value to set the attribute modified to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def modified=(_); end + + # Returns the value of attribute value + # + # @return [Object] the current value of value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def value; end + + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def value=(_); end + + class << self + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def [](*_arg0); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def inspect; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def keyword_init?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def members; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#157 + def new(*_arg0); end + end +end + +# A fixed size array with volatile (synchronized, thread safe) getters/setters. +# Mixes in Ruby's `Enumerable` module for enhanced search, sort, and traversal. +# +# @example +# tuple = Concurrent::Tuple.new(16) +# +# tuple.set(0, :foo) #=> :foo | volatile write +# tuple.get(0) #=> :foo | volatile read +# tuple.compare_and_set(0, :foo, :bar) #=> true | strong CAS +# tuple.cas(0, :foo, :baz) #=> false | strong CAS +# tuple.get(0) #=> :bar | volatile read +# @see http://ruby-doc.org/core-2.2.2/Enumerable.html Enumerable +# @see http://www.erlang.org/doc/reference_manual/data_types.html#id70396 Erlang Tuple +# @see https://en.wikipedia.org/wiki/Tuple Tuple entry at Wikipedia +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#20 +class Concurrent::Tuple + include ::Enumerable + + # Create a new tuple of the given size. + # + # @param size [Integer] the number of elements in the tuple + # @return [Tuple] a new instance of Tuple + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#29 + def initialize(size); end + + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param new_value [Object] the value to set at the given index + # @param old_value [Object] the value to compare against the current value + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#73 + def cas(i, old_value, new_value); end + + # Set the value at the given index to the new value if and only if the current + # value matches the given old value. + # + # @param i [Integer] the index for the element to set + # @param new_value [Object] the value to set at the given index + # @param old_value [Object] the value to compare against the current value + # @return [Boolean] true if the value at the given element was set else false + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#69 + def compare_and_set(i, old_value, new_value); end + + # Calls the given block once for each element in self, passing that element as a parameter. + # + # @yieldparam ref [Object] the `Concurrent::AtomicReference` object at the current index + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#78 + def each; end + + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#43 + def get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#55 + def set(i, value); end + + # The (fixed) size of the tuple. + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#24 + def size; end + + # Get the value of the element at the given index. + # + # @param i [Integer] the index from which to retrieve the value + # @return [Object] the value at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#47 + def volatile_get(i); end + + # Set the element at the given index to the given value + # + # @param i [Integer] the index for the element to set + # @param value [Object] the value to set at the given index + # @return [Object] the new value of the element at the given index or nil if the index is out of bounds + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tuple.rb#59 + def volatile_set(i, value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#3 +module Concurrent::Utility; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#6 +module Concurrent::Utility::EngineDetector + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#7 + def on_cruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#11 + def on_jruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#27 + def on_linux?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#23 + def on_osx?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#15 + def on_truffleruby?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#19 + def on_windows?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/engine.rb#31 + def ruby_version(version = T.unsafe(nil), comparison, major, minor, patch); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#9 +module Concurrent::Utility::NativeExtensionLoader + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#11 + def allow_c_extensions?; end + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#15 + def c_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#19 + def load_native_extensions; end + + private + + # @return [Boolean] + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#50 + def java_extensions_loaded?; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#38 + def load_error_path(error); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#46 + def set_c_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#54 + def set_java_extensions_loaded; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb#58 + def try_load_c_extension(path); end +end + +# @private +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#5 +module Concurrent::Utility::NativeInteger + extend ::Concurrent::Utility::NativeInteger + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#24 + def ensure_integer(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#31 + def ensure_integer_and_bounds(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#17 + def ensure_lower_bound(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#37 + def ensure_positive(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#44 + def ensure_positive_and_no_zero(value); end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#10 + def ensure_upper_bound(value); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#8 +Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# http://stackoverflow.com/questions/535721/ruby-max-integer +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/native_integer.rb#7 +Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#10 +class Concurrent::Utility::ProcessorCounter + # @return [ProcessorCounter] a new instance of ProcessorCounter + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 + def initialize; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + def available_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#41 + def cpu_quota; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#45 + def cpu_shares; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#22 + def physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#18 + def processor_count; end + + private + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#104 + def compute_cpu_quota; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#124 + def compute_cpu_shares; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#59 + def compute_physical_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#51 + def compute_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#99 + def run(command); end +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/version.rb#2 +Concurrent::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/connection_pool@3.0.2.rbi b/sorbet/rbi/gems/connection_pool@3.0.2.rbi new file mode 100644 index 0000000..3d9f595 --- /dev/null +++ b/sorbet/rbi/gems/connection_pool@3.0.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `connection_pool` gem. +# Please instead update this file by running `bin/tapioca gem connection_pool`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/constant_resolver@0.2.0.rbi b/sorbet/rbi/gems/constant_resolver@0.2.0.rbi deleted file mode 100644 index 4fc1ad1..0000000 --- a/sorbet/rbi/gems/constant_resolver@0.2.0.rbi +++ /dev/null @@ -1,30 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `constant_resolver` gem. -# Please instead update this file by running `bin/tapioca gem constant_resolver`. - -class ConstantResolver - def initialize(root_path:, load_paths:, inflector: T.unsafe(nil)); end - - def config; end - def file_map; end - def resolve(const_name, current_namespace_path: T.unsafe(nil)); end - - private - - def ambiguous_constant_message(const_name, paths); end - def coerce_load_paths(load_paths); end - def glob_path(path); end - def resolve_constant(const_name, current_namespace_path, original_name: T.unsafe(nil)); end - def resolve_traversing_namespace_path(const_name, current_namespace_path); end -end - -class ConstantResolver::ConstantContext < ::Struct; end - -class ConstantResolver::DefaultInflector - def camelize(string); end -end - -class ConstantResolver::Error < ::StandardError; end -ConstantResolver::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/constant_resolver@0.3.0.rbi b/sorbet/rbi/gems/constant_resolver@0.3.0.rbi new file mode 100644 index 0000000..a80924e --- /dev/null +++ b/sorbet/rbi/gems/constant_resolver@0.3.0.rbi @@ -0,0 +1,100 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `constant_resolver` gem. +# Please instead update this file by running `bin/tapioca gem constant_resolver`. + + +# Get information about (partially qualified) constants without loading the application code. +# We infer the fully qualified name and the filepath. +# +# The implementation makes a few assumptions about the code base: +# - `Something::SomeOtherThing` is defined in a path of either `something/some_other_thing.rb` or `something.rb`, +# relative to the load path. Constants that have their own file do not have all-uppercase names like MAGIC_NUMBER or +# all-uppercase parts like SomeID. Rails' `zeitwerk` autoloader makes the same assumption. +# - It is OK to not always infer the exact file defining the constant. For example, when a constant is inherited, we +# have no way of inferring the file it is defined in. You could argue though that inheritance means that another +# constant with the same name exists in the inheriting class, and this view is sufficient for all our use cases. +# +# source://constant_resolver//lib/constant_resolver/version.rb#3 +class ConstantResolver + # @example usage in a Rails app + # config = Rails.application.config + # load_paths = (config.eager_load_paths + config.autoload_paths + config.autoload_once_paths) + # .map { |p| Pathname.new(p).relative_path_from(Rails.root).to_s } + # ConstantResolver.new( + # root_path: Rails.root.to_s, + # load_paths: load_paths + # ) + # @param exclude [Array] Paths to exclude to scan for constants. + # @param inflector [Object] Any object that implements a `camelize` function. + # @param load_paths [Array] The autoload paths of the application. + # @param root_path [String] The root path of the application to analyze + # @return [ConstantResolver] a new instance of ConstantResolver + # + # source://constant_resolver//lib/constant_resolver.rb#46 + def initialize(root_path:, load_paths:, exclude: T.unsafe(nil), inflector: T.unsafe(nil)); end + + # @api private + # + # source://constant_resolver//lib/constant_resolver.rb#122 + def config; end + + # Maps constant names to file paths. + # + # @return [Hash] + # + # source://constant_resolver//lib/constant_resolver.rb#78 + def file_map; end + + # Resolve a constant via its name. + # If the name is partially qualified, we need the current namespace path to correctly infer its full name + # + # @param const_name [String] The constant's name, fully or partially qualified. + # @param current_namespace_path [Array] (optional) The namespace of the context in which the constant is + # used, e.g. ["Apps", "Models"] for `Apps::Models`. Defaults to [] which means top level. + # @return [ConstantResolver::ConstantContext] + # + # source://constant_resolver//lib/constant_resolver.rb#63 + def resolve(const_name, current_namespace_path: T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://constant_resolver//lib/constant_resolver.rb#131 + def allowed?(path); end + + # source://constant_resolver//lib/constant_resolver.rb#144 + def ambiguous_constant_message(const_name, paths); end + + # source://constant_resolver//lib/constant_resolver.rb#135 + def coerce_load_paths(load_paths); end + + # source://constant_resolver//lib/constant_resolver.rb#151 + def glob_path(path); end + + # source://constant_resolver//lib/constant_resolver.rb#155 + def resolve_constant(const_name, current_namespace_path, original_name: T.unsafe(nil)); end + + # source://constant_resolver//lib/constant_resolver.rb#168 + def resolve_traversing_namespace_path(const_name, current_namespace_path); end +end + +# source://constant_resolver//lib/constant_resolver.rb#19 +class ConstantResolver::ConstantContext < ::Struct; end + +# source://constant_resolver//lib/constant_resolver.rb#21 +class ConstantResolver::DefaultInflector + # source://constant_resolver//lib/constant_resolver.rb#22 + def camelize(string); end +end + +# source://constant_resolver//lib/constant_resolver.rb#18 +class ConstantResolver::Error < ::StandardError; end + +# source://constant_resolver//lib/constant_resolver.rb#16 +ConstantResolver::RUBY_FILES_GLOB = T.let(T.unsafe(nil), String) + +# source://constant_resolver//lib/constant_resolver/version.rb#4 +ConstantResolver::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/crass@1.0.6.rbi b/sorbet/rbi/gems/crass@1.0.6.rbi new file mode 100644 index 0000000..0979e2f --- /dev/null +++ b/sorbet/rbi/gems/crass@1.0.6.rbi @@ -0,0 +1,623 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `crass` gem. +# Please instead update this file by running `bin/tapioca gem crass`. + + +# A CSS parser based on the CSS Syntax Module Level 3 spec. +# +# source://crass//lib/crass/token-scanner.rb#3 +module Crass + class << self + # Parses _input_ as a CSS stylesheet and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # source://crass//lib/crass.rb#10 + def parse(input, options = T.unsafe(nil)); end + + # Parses _input_ as a string of CSS properties (such as the contents of an + # HTML element's `style` attribute) and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # source://crass//lib/crass.rb#18 + def parse_properties(input, options = T.unsafe(nil)); end + end +end + +# Parses a CSS string or list of tokens. +# +# 5. http://dev.w3.org/csswg/css-syntax/#parsing +# +# source://crass//lib/crass/parser.rb#10 +class Crass::Parser + # Initializes a parser based on the given _input_, which may be a CSS string + # or an array of tokens. + # + # See {Tokenizer#initialize} for _options_. + # + # @return [Parser] a new instance of Parser + # + # source://crass//lib/crass/parser.rb#126 + def initialize(input, options = T.unsafe(nil)); end + + # Consumes an at-rule and returns it. + # + # 5.4.2. http://dev.w3.org/csswg/css-syntax-3/#consume-at-rule + # + # source://crass//lib/crass/parser.rb#137 + def consume_at_rule(input = T.unsafe(nil)); end + + # Consumes a component value and returns it, or `nil` if there are no more + # tokens. + # + # 5.4.6. http://dev.w3.org/csswg/css-syntax-3/#consume-a-component-value + # + # source://crass//lib/crass/parser.rb#184 + def consume_component_value(input = T.unsafe(nil)); end + + # Consumes a declaration and returns it, or `nil` on parse error. + # + # 5.4.5. http://dev.w3.org/csswg/css-syntax-3/#consume-a-declaration + # + # source://crass//lib/crass/parser.rb#209 + def consume_declaration(input = T.unsafe(nil)); end + + # Consumes a list of declarations and returns them. + # + # By default, the returned list may include `:comment`, `:semicolon`, and + # `:whitespace` nodes, which is non-standard. + # + # Options: + # + # * **:strict** - Set to `true` to exclude non-standard `:comment`, + # `:semicolon`, and `:whitespace` nodes. + # + # 5.4.4. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-declarations + # + # source://crass//lib/crass/parser.rb#276 + def consume_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end + + # Consumes a function and returns it. + # + # 5.4.8. http://dev.w3.org/csswg/css-syntax-3/#consume-a-function + # + # source://crass//lib/crass/parser.rb#326 + def consume_function(input = T.unsafe(nil)); end + + # Consumes a qualified rule and returns it, or `nil` if a parse error + # occurs. + # + # 5.4.3. http://dev.w3.org/csswg/css-syntax-3/#consume-a-qualified-rule + # + # source://crass//lib/crass/parser.rb#357 + def consume_qualified_rule(input = T.unsafe(nil)); end + + # Consumes a list of rules and returns them. + # + # 5.4.1. http://dev.w3.org/csswg/css-syntax/#consume-a-list-of-rules + # + # source://crass//lib/crass/parser.rb#398 + def consume_rules(flags = T.unsafe(nil)); end + + # Consumes and returns a simple block associated with the current input + # token. + # + # 5.4.7. http://dev.w3.org/csswg/css-syntax/#consume-a-simple-block + # + # source://crass//lib/crass/parser.rb#434 + def consume_simple_block(input = T.unsafe(nil)); end + + # Creates and returns a new parse node with the given _properties_. + # + # source://crass//lib/crass/parser.rb#458 + def create_node(type, properties = T.unsafe(nil)); end + + # Parses the given _input_ tokens into a selector node and returns it. + # + # Doesn't bother splitting the selector list into individual selectors or + # validating them. Feel free to do that yourself! It'll be fun! + # + # source://crass//lib/crass/parser.rb#466 + def create_selector(input); end + + # Creates a `:style_rule` node from the given qualified _rule_, and returns + # it. + # + # source://crass//lib/crass/parser.rb#474 + def create_style_rule(rule); end + + # Parses a single component value and returns it. + # + # 5.3.7. http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value + # + # source://crass//lib/crass/parser.rb#483 + def parse_component_value(input = T.unsafe(nil)); end + + # Parses a list of component values and returns an array of parsed tokens. + # + # 5.3.8. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-component-values + # + # source://crass//lib/crass/parser.rb#510 + def parse_component_values(input = T.unsafe(nil)); end + + # Parses a single declaration and returns it. + # + # 5.3.5. http://dev.w3.org/csswg/css-syntax/#parse-a-declaration + # + # source://crass//lib/crass/parser.rb#524 + def parse_declaration(input = T.unsafe(nil)); end + + # Parses a list of declarations and returns them. + # + # See {#consume_declarations} for _options_. + # + # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations + # + # source://crass//lib/crass/parser.rb#552 + def parse_declarations(input = T.unsafe(nil), options = T.unsafe(nil)); end + + # Parses a list of declarations and returns an array of `:property` nodes + # (and any non-declaration nodes that were in the input). This is useful for + # parsing the contents of an HTML element's `style` attribute. + # + # source://crass//lib/crass/parser.rb#560 + def parse_properties(input = T.unsafe(nil)); end + + # Parses a single rule and returns it. + # + # 5.3.4. http://dev.w3.org/csswg/css-syntax-3/#parse-a-rule + # + # source://crass//lib/crass/parser.rb#586 + def parse_rule(input = T.unsafe(nil)); end + + # Returns the unescaped value of a selector name or property declaration. + # + # source://crass//lib/crass/parser.rb#615 + def parse_value(nodes); end + + # {TokenScanner} wrapping the tokens generated from this parser's input. + # + # source://crass//lib/crass/parser.rb#120 + def tokens; end + + class << self + # Parses CSS properties (such as the contents of an HTML element's `style` + # attribute) and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # 5.3.6. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations + # + # source://crass//lib/crass/parser.rb#25 + def parse_properties(input, options = T.unsafe(nil)); end + + # Parses CSS rules (such as the content of a `@media` block) and returns a + # parse tree. The only difference from {parse_stylesheet} is that CDO/CDC + # nodes (``) aren't ignored. + # + # See {Tokenizer#initialize} for _options_. + # + # 5.3.3. http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-rules + # + # source://crass//lib/crass/parser.rb#36 + def parse_rules(input, options = T.unsafe(nil)); end + + # Parses a CSS stylesheet and returns a parse tree. + # + # See {Tokenizer#initialize} for _options_. + # + # 5.3.2. http://dev.w3.org/csswg/css-syntax/#parse-a-stylesheet + # + # source://crass//lib/crass/parser.rb#54 + def parse_stylesheet(input, options = T.unsafe(nil)); end + + # Converts a node or array of nodes into a CSS string based on their + # original tokenized input. + # + # Options: + # + # * **:exclude_comments** - When `true`, comments will be excluded. + # + # source://crass//lib/crass/parser.rb#74 + def stringify(nodes, options = T.unsafe(nil)); end + end +end + +# source://crass//lib/crass/parser.rb#11 +Crass::Parser::BLOCK_END_TOKENS = T.let(T.unsafe(nil), Hash) + +# Similar to a StringScanner, but with extra functionality needed to tokenize +# CSS while preserving the original text. +# +# source://crass//lib/crass/scanner.rb#8 +class Crass::Scanner + # Creates a Scanner instance for the given _input_ string or IO instance. + # + # @return [Scanner] a new instance of Scanner + # + # source://crass//lib/crass/scanner.rb#25 + def initialize(input); end + + # Consumes the next character and returns it, advancing the pointer, or + # an empty string if the end of the string has been reached. + # + # source://crass//lib/crass/scanner.rb#34 + def consume; end + + # Consumes the rest of the string and returns it, advancing the pointer to + # the end of the string. Returns an empty string is the end of the string + # has already been reached. + # + # source://crass//lib/crass/scanner.rb#46 + def consume_rest; end + + # Current character, or `nil` if the scanner hasn't yet consumed a + # character, or is at the end of the string. + # + # source://crass//lib/crass/scanner.rb#11 + def current; end + + # Returns `true` if the end of the string has been reached, `false` + # otherwise. + # + # @return [Boolean] + # + # source://crass//lib/crass/scanner.rb#57 + def eos?; end + + # Sets the marker to the position of the next character that will be + # consumed. + # + # source://crass//lib/crass/scanner.rb#63 + def mark; end + + # Returns the substring between {#marker} and {#pos}, without altering the + # pointer. + # + # source://crass//lib/crass/scanner.rb#69 + def marked; end + + # Current marker position. Use {#marked} to get the substring between + # {#marker} and {#pos}. + # + # source://crass//lib/crass/scanner.rb#15 + def marker; end + + # Current marker position. Use {#marked} to get the substring between + # {#marker} and {#pos}. + # + # source://crass//lib/crass/scanner.rb#15 + def marker=(_arg0); end + + # Returns up to _length_ characters starting at the current position, but + # doesn't consume them. The number of characters returned may be less than + # _length_ if the end of the string is reached. + # + # source://crass//lib/crass/scanner.rb#80 + def peek(length = T.unsafe(nil)); end + + # Position of the next character that will be consumed. This is a character + # position, not a byte position, so it accounts for multi-byte characters. + # + # source://crass//lib/crass/scanner.rb#19 + def pos; end + + # Position of the next character that will be consumed. This is a character + # position, not a byte position, so it accounts for multi-byte characters. + # + # source://crass//lib/crass/scanner.rb#19 + def pos=(_arg0); end + + # Moves the pointer back one character without changing the value of + # {#current}. The next call to {#consume} will re-consume the current + # character. + # + # source://crass//lib/crass/scanner.rb#87 + def reconsume; end + + # Resets the pointer to the beginning of the string. + # + # source://crass//lib/crass/scanner.rb#93 + def reset; end + + # Tries to match _pattern_ at the current position. If it matches, the + # matched substring will be returned and the pointer will be advanced. + # Otherwise, `nil` will be returned. + # + # source://crass//lib/crass/scanner.rb#103 + def scan(pattern); end + + # Scans the string until the _pattern_ is matched. Returns the substring up + # to and including the end of the match, and advances the pointer. If there + # is no match, `nil` is returned and the pointer is not advanced. + # + # source://crass//lib/crass/scanner.rb#115 + def scan_until(pattern); end + + # String being scanned. + # + # source://crass//lib/crass/scanner.rb#22 + def string; end +end + +# Like {Scanner}, but for tokens! +# +# source://crass//lib/crass/token-scanner.rb#6 +class Crass::TokenScanner + # @return [TokenScanner] a new instance of TokenScanner + # + # source://crass//lib/crass/token-scanner.rb#9 + def initialize(tokens); end + + # Executes the given block, collects all tokens that are consumed during its + # execution, and returns them. + # + # source://crass//lib/crass/token-scanner.rb#16 + def collect; end + + # Consumes the next token and returns it, advancing the pointer. Returns + # `nil` if there is no next token. + # + # source://crass//lib/crass/token-scanner.rb#24 + def consume; end + + # Returns the value of attribute current. + # + # source://crass//lib/crass/token-scanner.rb#7 + def current; end + + # Returns the next token without consuming it, or `nil` if there is no next + # token. + # + # source://crass//lib/crass/token-scanner.rb#32 + def peek; end + + # Returns the value of attribute pos. + # + # source://crass//lib/crass/token-scanner.rb#7 + def pos; end + + # Reconsumes the current token, moving the pointer back one position. + # + # http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/#reconsume-the-current-input-token + # + # source://crass//lib/crass/token-scanner.rb#39 + def reconsume; end + + # Resets the pointer to the first token in the list. + # + # source://crass//lib/crass/token-scanner.rb#44 + def reset; end + + # Returns the value of attribute tokens. + # + # source://crass//lib/crass/token-scanner.rb#7 + def tokens; end +end + +# Tokenizes a CSS string. +# +# 4. http://dev.w3.org/csswg/css-syntax/#tokenization +# +# source://crass//lib/crass/tokenizer.rb#9 +class Crass::Tokenizer + # Initializes a new Tokenizer. + # + # Options: + # + # * **:preserve_comments** - If `true`, comments will be preserved as + # `:comment` tokens. + # + # * **:preserve_hacks** - If `true`, certain non-standard browser hacks + # such as the IE "*" hack will be preserved even though they violate + # CSS 3 syntax rules. + # + # @return [Tokenizer] a new instance of Tokenizer + # + # source://crass//lib/crass/tokenizer.rb#62 + def initialize(input, options = T.unsafe(nil)); end + + # Consumes a token and returns the token that was consumed. + # + # 4.3.1. http://dev.w3.org/csswg/css-syntax/#consume-a-token + # + # source://crass//lib/crass/tokenizer.rb#70 + def consume; end + + # Consumes the remnants of a bad URL and returns the consumed text. + # + # 4.3.15. http://dev.w3.org/csswg/css-syntax/#consume-the-remnants-of-a-bad-url + # + # source://crass//lib/crass/tokenizer.rb#275 + def consume_bad_url; end + + # Consumes comments and returns them, or `nil` if no comments were consumed. + # + # 4.3.2. http://dev.w3.org/csswg/css-syntax/#consume-comments + # + # source://crass//lib/crass/tokenizer.rb#301 + def consume_comments; end + + # Consumes an escaped code point and returns its unescaped value. + # + # This method assumes that the `\` has already been consumed, and that the + # next character in the input has already been verified not to be a newline + # or EOF. + # + # 4.3.8. http://dev.w3.org/csswg/css-syntax/#consume-an-escaped-code-point + # + # source://crass//lib/crass/tokenizer.rb#326 + def consume_escaped; end + + # Consumes an ident-like token and returns it. + # + # 4.3.4. http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token + # + # source://crass//lib/crass/tokenizer.rb#350 + def consume_ident; end + + # Consumes a name and returns it. + # + # 4.3.12. http://dev.w3.org/csswg/css-syntax/#consume-a-name + # + # source://crass//lib/crass/tokenizer.rb#375 + def consume_name; end + + # Consumes a number and returns a 3-element array containing the number's + # original representation, its numeric value, and its type (either + # `:integer` or `:number`). + # + # 4.3.13. http://dev.w3.org/csswg/css-syntax/#consume-a-number + # + # source://crass//lib/crass/tokenizer.rb#407 + def consume_number; end + + # Consumes a numeric token and returns it. + # + # 4.3.3. http://dev.w3.org/csswg/css-syntax/#consume-a-numeric-token + # + # source://crass//lib/crass/tokenizer.rb#430 + def consume_numeric; end + + # Consumes a string token that ends at the given character, and returns the + # token. + # + # 4.3.5. http://dev.w3.org/csswg/css-syntax/#consume-a-string-token + # + # source://crass//lib/crass/tokenizer.rb#469 + def consume_string(ending = T.unsafe(nil)); end + + # Consumes a Unicode range token and returns it. Assumes the initial "u+" or + # "U+" has already been consumed. + # + # 4.3.7. http://dev.w3.org/csswg/css-syntax/#consume-a-unicode-range-token + # + # source://crass//lib/crass/tokenizer.rb#510 + def consume_unicode_range; end + + # Consumes a URL token and returns it. Assumes the original "url(" has + # already been consumed. + # + # 4.3.6. http://dev.w3.org/csswg/css-syntax/#consume-a-url-token + # + # source://crass//lib/crass/tokenizer.rb#542 + def consume_url; end + + # Converts a valid CSS number string into a number and returns the number. + # + # 4.3.14. http://dev.w3.org/csswg/css-syntax/#convert-a-string-to-a-number + # + # source://crass//lib/crass/tokenizer.rb#590 + def convert_string_to_number(str); end + + # Creates and returns a new token with the given _properties_. + # + # source://crass//lib/crass/tokenizer.rb#616 + def create_token(type, properties = T.unsafe(nil)); end + + # Preprocesses _input_ to prepare it for the tokenizer. + # + # 3.3. http://dev.w3.org/csswg/css-syntax/#input-preprocessing + # + # source://crass//lib/crass/tokenizer.rb#627 + def preprocess(input); end + + # Returns `true` if the given three-character _text_ would start an + # identifier. If _text_ is `nil`, the current and next two characters in the + # input stream will be checked, but will not be consumed. + # + # 4.3.10. http://dev.w3.org/csswg/css-syntax/#would-start-an-identifier + # + # @return [Boolean] + # + # source://crass//lib/crass/tokenizer.rb#642 + def start_identifier?(text = T.unsafe(nil)); end + + # Returns `true` if the given three-character _text_ would start a number. + # If _text_ is `nil`, the current and next two characters in the input + # stream will be checked, but will not be consumed. + # + # 4.3.11. http://dev.w3.org/csswg/css-syntax/#starts-with-a-number + # + # @return [Boolean] + # + # source://crass//lib/crass/tokenizer.rb#666 + def start_number?(text = T.unsafe(nil)); end + + # Tokenizes the input stream and returns an array of tokens. + # + # source://crass//lib/crass/tokenizer.rb#685 + def tokenize; end + + # Returns `true` if the given two-character _text_ is the beginning of a + # valid escape sequence. If _text_ is `nil`, the current and next character + # in the input stream will be checked, but will not be consumed. + # + # 4.3.9. http://dev.w3.org/csswg/css-syntax/#starts-with-a-valid-escape + # + # @return [Boolean] + # + # source://crass//lib/crass/tokenizer.rb#702 + def valid_escape?(text = T.unsafe(nil)); end + + class << self + # Tokenizes the given _input_ as a CSS string and returns an array of + # tokens. + # + # See {#initialize} for _options_. + # + # source://crass//lib/crass/tokenizer.rb#45 + def tokenize(input, options = T.unsafe(nil)); end + end +end + +# source://crass//lib/crass/tokenizer.rb#10 +Crass::Tokenizer::RE_COMMENT_CLOSE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#11 +Crass::Tokenizer::RE_DIGIT = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#12 +Crass::Tokenizer::RE_ESCAPE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#13 +Crass::Tokenizer::RE_HEX = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#14 +Crass::Tokenizer::RE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#15 +Crass::Tokenizer::RE_NAME_START = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#16 +Crass::Tokenizer::RE_NON_PRINTABLE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#17 +Crass::Tokenizer::RE_NUMBER_DECIMAL = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#18 +Crass::Tokenizer::RE_NUMBER_EXPONENT = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#19 +Crass::Tokenizer::RE_NUMBER_SIGN = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#21 +Crass::Tokenizer::RE_NUMBER_STR = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#33 +Crass::Tokenizer::RE_QUOTED_URL_START = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#35 +Crass::Tokenizer::RE_UNICODE_RANGE_END = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#34 +Crass::Tokenizer::RE_UNICODE_RANGE_START = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#36 +Crass::Tokenizer::RE_WHITESPACE = T.let(T.unsafe(nil), Regexp) + +# source://crass//lib/crass/tokenizer.rb#37 +Crass::Tokenizer::RE_WHITESPACE_ANCHORED = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/diff-lcs@1.6.2.rbi b/sorbet/rbi/gems/diff-lcs@1.6.2.rbi new file mode 100644 index 0000000..db35dab --- /dev/null +++ b/sorbet/rbi/gems/diff-lcs@1.6.2.rbi @@ -0,0 +1,1135 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `diff-lcs` gem. +# Please instead update this file by running `bin/tapioca gem diff-lcs`. + + +# source://diff-lcs//lib/diff/lcs.rb#3 +module Diff; end + +# == How Diff Works (by Mark-Jason Dominus) +# +# I once read an article written by the authors of +diff+; they said that they +# hard worked very hard on the algorithm until they found the right one. +# +# I think what they ended up using (and I hope someone will correct me, because +# I am not very confident about this) was the `longest common subsequence' +# method. In the LCS problem, you have two sequences of items: +# +# a b c d f g h j q z +# a b c d e f g i j k r x y z +# +# and you want to find the longest sequence of items that is present in both +# original sequences in the same order. That is, you want to find a new +# sequence *S* which can be obtained from the first sequence by deleting some +# items, and from the second sequence by deleting other items. You also want +# *S* to be as long as possible. In this case *S* is: +# +# a b c d f g j z +# +# From there it's only a small step to get diff-like output: +# +# e h i k q r x y +# + - + + - + + + +# +# This module solves the LCS problem. It also includes a canned function to +# generate +diff+-like output. +# +# It might seem from the example above that the LCS of two sequences is always +# pretty obvious, but that's not always the case, especially when the two +# sequences have many repeated elements. For example, consider +# +# a x b y c z p d q +# a b c a x b y c z +# +# A naive approach might start by matching up the +a+ and +b+ that appear at +# the beginning of each sequence, like this: +# +# a x b y c z p d q +# a b c a b y c z +# +# This finds the common subsequence +a b c z+. But actually, the LCS is +a x b +# y c z+: +# +# a x b y c z p d q +# a b c a x b y c z +# +# source://diff-lcs//lib/diff/lcs.rb#51 +module Diff::LCS + # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. + # + # source://diff-lcs//lib/diff/lcs.rb#76 + def diff(other, callbacks = T.unsafe(nil), &block); end + + # Returns an Array containing the longest common subsequence(s) between + # +self+ and +other+. See Diff::LCS#lcs. + # + # lcs = seq1.lcs(seq2) + # + # A note when using objects: Diff::LCS only works properly when each object + # can be used as a key in a Hash. This means that those objects must implement + # the methods +#hash+ and +#eql?+ such that two objects containing identical values + # compare identically for key purposes. That is: + # + # O.new('a').eql?(O.new('a')) == true && + # O.new('a').hash == O.new('a').hash + # + # source://diff-lcs//lib/diff/lcs.rb#71 + def lcs(other, &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#102 + def patch(patchset); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no + # patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#110 + def patch!(patchset); end + + # Attempts to patch +self+ with the provided +patchset+, using #patch!. If + # the sequence this is used on supports #replace, the value of +self+ will be + # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#124 + def patch_me(patchset); end + + # Returns the balanced ("side-by-side") difference set between +self+ and + # +other+. See Diff::LCS#sdiff. + # + # source://diff-lcs//lib/diff/lcs.rb#82 + def sdiff(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+ using the alternate, balanced algorithm. See + # Diff::LCS#traverse_balanced. + # + # source://diff-lcs//lib/diff/lcs.rb#95 + def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+. See Diff::LCS#traverse_sequences. + # + # source://diff-lcs//lib/diff/lcs.rb#88 + def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#105 + def unpatch(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+. A new sequence + # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. + # Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#117 + def unpatch!(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. + # If the sequence this is used on supports #replace, the value of +self+ will + # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#135 + def unpatch_me(patchset); end + + class << self + # :yields: seq1[i] for each matched + # + # source://diff-lcs//lib/diff/lcs.rb#158 + def LCS(seq1, seq2, &block); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 + def callbacks_for(callbacks); end + + # #diff computes the smallest set of additions and deletions necessary to + # turn the first sequence into the second, and returns a description of these + # changes. + # + # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # source://diff-lcs//lib/diff/lcs.rb#169 + def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # :yields: seq1[i] for each matched + # + # source://diff-lcs//lib/diff/lcs.rb#145 + def lcs(seq1, seq2, &block); end + + # Applies a +patchset+ to the sequence +src+ according to the +direction+ + # (:patch or :unpatch), producing a new sequence. + # + # If the +direction+ is not specified, Diff::LCS::patch will attempt to + # discover the direction of the +patchset+. + # + # A +patchset+ can be considered to apply forward (:patch) if the + # following expression is true: + # + # patch(s1, diff(s1, s2)) -> s2 + # + # A +patchset+ can be considered to apply backward (:unpatch) if the + # following expression is true: + # + # patch(s2, diff(s1, s2)) -> s1 + # + # If the +patchset+ contains no changes, the +src+ value will be returned as + # either src.dup or +src+. A +patchset+ can be deemed as having no + # changes if the following predicate returns true: + # + # patchset.empty? or + # patchset.flatten(1).all? { |change| change.unchanged? } + # + # === Patchsets + # + # A +patchset+ is always an enumerable sequence of changes, hunks of changes, + # or a mix of the two. A hunk of changes is an enumerable sequence of + # changes: + # + # [ # patchset + # # change + # [ # hunk + # # change + # ] + # ] + # + # The +patch+ method accepts patchsets that are enumerable sequences + # containing either Diff::LCS::Change objects (or a subclass) or the array + # representations of those objects. Prior to application, array + # representations of Diff::LCS::Change objects will be reified. + # + # source://diff-lcs//lib/diff/lcs.rb#627 + def patch(src, patchset, direction = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the next version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#737 + def patch!(src, patchset); end + + # #sdiff computes all necessary components to show two sequences and their + # minimized differences side by side, just like the Unix utility + # sdiff does: + # + # old < - + # same same + # before | after + # - > new + # + # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # Each element of a returned array is a Diff::LCS::ContextChange object, + # which can be implicitly converted to an array. + # + # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| + # case action + # when '!' + # # replace + # when '-' + # # delete + # when '+' + # # insert + # end + # end + # + # source://diff-lcs//lib/diff/lcs.rb#201 + def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # #traverse_balanced is an alternative to #traverse_sequences. It uses a + # different algorithm to iterate through the entries in the computed longest + # common subsequence. Instead of viewing the changes as insertions or + # deletions from one of the sequences, #traverse_balanced will report + # changes between the sequences. + # + # The arguments to #traverse_balanced are the two sequences to traverse and a + # callback object, like this: + # + # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # #sdiff is implemented with #traverse_balanced. + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#change:: Called when +a+ and +b+ are pointing to + # the same relative position, but + # A[a] and B[b] are not + # the same; a change has + # occurred. + # + # #traverse_balanced might be a bit slower than #traverse_sequences, + # noticeable only while processing huge amounts of data. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # === Matches + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # === Discards + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. + # + # === Changes + # + # If both +a+ and +b+ point to elements that are not part of the longest + # common subsequence, then #traverse_sequences will try to call + # callbacks#change and advance both arrows. If + # callbacks#change is not implemented, then + # callbacks#discard_a and callbacks#discard_b will be + # called in turn. + # + # The methods for callbacks#match, callbacks#discard_a, + # callbacks#discard_b, and callbacks#change are invoked + # with an event comprising the action ("=", "+", "-", or "!", respectively), + # the indexes +i+ and +j+, and the elements A[i] and B[j]. + # Return values are discarded by #traverse_balanced. + # + # === Context + # + # Note that +i+ and +j+ may not be the same index position, even if +a+ and + # +b+ are considered to be pointing to matching or changed elements. + # + # source://diff-lcs//lib/diff/lcs.rb#476 + def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end + + # #traverse_sequences is the most general facility provided by this module; + # #diff and #lcs are implemented as calls to it. + # + # The arguments to #traverse_sequences are the two sequences to traverse, and + # a callback object, like this: + # + # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#finished_a:: Called when +a+ has reached the end of + # sequence +A+. + # callbacks#finished_b:: Called when +b+ has reached the end of + # sequence +B+. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. If both + # arrows point to elements that are not part of the longest common + # subsequence, then #traverse_sequences will advance arrow +a+ and call the + # appropriate callback, then it will advance arrow +b+ and call the appropriate + # callback. + # + # The methods for callbacks#match, callbacks#discard_a, and + # callbacks#discard_b are invoked with an event comprising the + # action ("=", "+", or "-", respectively), the indexes +i+ and +j+, and the + # elements A[i] and B[j]. Return values are discarded by + # #traverse_sequences. + # + # === End of Sequences + # + # If arrow +a+ reaches the end of its sequence before arrow +b+ does, + # #traverse_sequence will try to call callbacks#finished_a with the + # last index and element of +A+ (A[-1]) and the current index and + # element of +B+ (B[j]). If callbacks#finished_a does not + # exist, then callbacks#discard_b will be called on each element of + # +B+ until the end of the sequence is reached (the call will be done with + # A[-1] and B[j] for each element). + # + # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, + # callbacks#finished_b will be called with the current index and + # element of +A+ (A[i]) and the last index and element of +B+ + # (A[-1]). Again, if callbacks#finished_b does not exist on + # the callback object, then callbacks#discard_a will be called on + # each element of +A+ until the end of the sequence is reached (A[i] + # and B[-1]). + # + # There is a chance that one additional callbacks#discard_a or + # callbacks#discard_b will be called after the end of the sequence + # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet + # reached the end of +B+. + # + # source://diff-lcs//lib/diff/lcs.rb#286 + def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the prior version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#731 + def unpatch!(src, patchset); end + + private + + # source://diff-lcs//lib/diff/lcs/internals.rb#4 + def diff_traversal(method, seq1, seq2, callbacks, &block); end + end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_balanced. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 +Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks + +# A block is an operation removing, adding, or changing a group of items. +# Basically, this is just a list of changes, where each change adds or +# deletes a single item. Used by bin/ldiff. +# +# source://diff-lcs//lib/diff/lcs/block.rb#6 +class Diff::LCS::Block + # @return [Block] a new instance of Block + # + # source://diff-lcs//lib/diff/lcs/block.rb#9 + def initialize(chunk); end + + # Returns the value of attribute changes. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def changes; end + + # source://diff-lcs//lib/diff/lcs/block.rb#21 + def diff_size; end + + # Returns the value of attribute insert. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def insert; end + + # source://diff-lcs//lib/diff/lcs/block.rb#25 + def op; end + + # Returns the value of attribute remove. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def remove; end +end + +# Represents a simplistic (non-contextual) change. Represents the removal or +# addition of an element from either the old or the new sequenced +# enumerable. +# +# source://diff-lcs//lib/diff/lcs/change.rb#6 +class Diff::LCS::Change + include ::Comparable + + # @return [Change] a new instance of Change + # + # source://diff-lcs//lib/diff/lcs/change.rb#27 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#65 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#58 + def ==(other); end + + # Returns the action this Change represents. + # + # source://diff-lcs//lib/diff/lcs/change.rb#20 + def action; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#72 + def adding?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#84 + def changed?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#76 + def deleting?; end + + # Returns the sequence element of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#25 + def element; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#88 + def finished_a?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#92 + def finished_b?; end + + # source://diff-lcs//lib/diff/lcs/change.rb#34 + def inspect(*_args); end + + # Returns the position of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#23 + def position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#42 + def to_ary; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#80 + def unchanged?; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#44 + def from_a(arr); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#15 + def valid_action?(action); end + end +end + +# Fixnum is deprecated in Ruby 2.4 # standard:disable Naming/ConstantName +# +# source://diff-lcs//lib/diff/lcs/change.rb#7 +Diff::LCS::Change::IntClass = Integer + +# The only actions valid for changes are '+' (add), '-' (delete), '=' +# (no change), '!' (changed), '<' (tail changes from first sequence), or +# '>' (tail changes from second sequence). The last two ('<>') are only +# found with Diff::LCS::diff and Diff::LCS::sdiff. +# +# source://diff-lcs//lib/diff/lcs/change.rb#13 +Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) + +# Represents a contextual change. Contains the position and values of the +# elements in the old and the new sequenced enumerables as well as the action +# taken. +# +# source://diff-lcs//lib/diff/lcs/change.rb#100 +class Diff::LCS::ContextChange < ::Diff::LCS::Change + # @return [ContextChange] a new instance of ContextChange + # + # source://diff-lcs//lib/diff/lcs/change.rb#114 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#166 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#157 + def ==(other); end + + # Returns the new element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#112 + def new_element; end + + # Returns the new position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#108 + def new_position; end + + # Returns the old element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#110 + def old_element; end + + # Returns the old position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#106 + def old_position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#130 + def to_ary; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#132 + def from_a(arr); end + + # Simplifies a context change for use in some diff callbacks. '<' actions + # are converted to '-' and '>' actions are converted to '+'. + # + # source://diff-lcs//lib/diff/lcs/change.rb#138 + def simplify(event); end + end +end + +# This will produce a compound array of contextual diff change objects. Each +# element in the #diffs array is a "hunk" array, where each element in each +# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange +# that contains both the old index and new index values for the change. The +# "hunk" provides the full context for the changes. Both old and new objects +# will be presented for changed objects. +nil+ will be substituted for a +# discarded object. +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) +# # This example shows a simplified array format. +# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 +# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 +# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 +# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], +# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 +# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 +# # [ '+', [ 9, nil ], [ 9, 'r' ] ], +# # [ '-', [ 9, 'p' ], [ 10, nil ] ], +# # [ '+', [ 10, nil ], [ 10, 's' ] ], +# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] +# +# The five hunks shown are comprised of individual changes; if there is a +# related set of changes, they are still shown individually. +# +# This callback can also be used with Diff::LCS#sdiff, which will produce +# results like: +# +# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) +# # This example shows a simplified array format. +# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 +# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 +# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 +# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 +# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 +# # [ "!", [ 9, "p" ], [ 10, "s" ] ], +# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] +# +# The five hunks are still present, but are significantly shorter in total +# presentation, because changed items are shown as changes ("!") instead of +# potentially "mismatched" pairs of additions and deletions. +# +# The result of this operation is similar to that of +# Diff::LCS::SDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and can be used by the +# Diff::LCS#diff or Diff::LCS#sdiff methods. +# +# cbo = Diff::LCS::ContextDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#225 +class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks + # source://diff-lcs//lib/diff/lcs/callbacks.rb#234 + def change(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#226 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#230 + def discard_b(event); end +end + +# This callback object implements the default set of callback events, +# which only returns the event itself. Note that #finished_a and +# #finished_b are not implemented -- I haven't yet figured out where they +# would be useful. +# +# Note that this is intended to be called as is, e.g., +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 +class Diff::LCS::DefaultCallbacks + class << self + # Called when both the old and new values have changed. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 + def change(event); end + + # Called when the old value is discarded in favour of the new value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 + def discard_a(event); end + + # Called when the new value is discarded in favour of the old value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 + def discard_b(event); end + + # Called when two items match. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 + def match(event); end + + private + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#36 + def new(*_arg0); end + end +end + +# This will produce a compound array of simple diff change objects. Each +# element in the #diffs array is a +hunk+ or +hunk+ array, where each +# element in each +hunk+ array is a single Change object representing the +# addition or removal of a single element from one of the two tested +# sequences. The +hunk+ provides the full context for the changes. +# +# diffs = Diff::LCS.diff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ [ '-', 0, 'a' ] ], # 1 +# # [ [ '+', 2, 'd' ] ], # 2 +# # [ [ '-', 4, 'h' ], # 3 +# # [ '+', 4, 'f' ] ], +# # [ [ '+', 6, 'k' ] ], # 4 +# # [ [ '-', 8, 'n' ], # 5 +# # [ '-', 9, 'p' ], +# # [ '+', 9, 'r' ], +# # [ '+', 10, 's' ], +# # [ '+', 11, 't' ] ] ] +# +# There are five hunks here. The first hunk says that the +a+ at position 0 +# of the first sequence should be deleted ('-'). The second hunk +# says that the +d+ at position 2 of the second sequence should be inserted +# ('+'). The third hunk says that the +h+ at position 4 of the +# first sequence should be removed and replaced with the +f+ from position 4 +# of the second sequence. The other two hunks are described similarly. +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#diff +# method. +# +# cbo = Diff::LCS::DiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#108 +class Diff::LCS::DiffCallbacks + # :yields: self + # + # @return [DiffCallbacks] a new instance of DiffCallbacks + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#112 + def initialize; end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#135 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#139 + def discard_b(event); end + + # Finalizes the diff process. If an unprocessed hunk still exists, then it + # is appended to the diff list. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#127 + def finish; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#131 + def match(_event); end + + private + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#143 + def finish_hunk; end +end + +# A Hunk is a group of Blocks which overlap because of the context surrounding +# each block. (So if we're not using context, every hunk will contain one +# block.) Used in the diff program (bin/ldiff). +# +# source://diff-lcs//lib/diff/lcs/hunk.rb#8 +class Diff::LCS::Hunk + # Create a hunk using references to both the old and new data, as well as the + # piece of data. + # + # @return [Hunk] a new instance of Hunk + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#16 + def initialize(data_old, data_new, piece, flag_context, file_length_difference); end + + # Returns the value of attribute blocks. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + def blocks; end + + # Returns a diff string based on a format. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#115 + def diff(format, last = T.unsafe(nil)); end + + # Returns the value of attribute end_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + def end_new; end + + # Returns the value of attribute end_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + def end_old; end + + # Returns the value of attribute file_length_difference. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#67 + def file_length_difference; end + + # Change the "start" and "end" fields to note that context should be added + # to this hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#71 + def flag_context; end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#71 + def flag_context=(context); end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#97 + def merge(hunk); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#347 + def missing_last_newline?(data); end + + # Determines whether there is an overlap between this hunk and the + # provided hunk. This will be true if the difference between the two hunks + # start or end positions is within one position of each other. + # + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#109 + def overlaps?(hunk); end + + # Returns the value of attribute start_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def start_new; end + + # Returns the value of attribute start_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def start_old; end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#104 + def unshift(hunk); end + + private + + # source://diff-lcs//lib/diff/lcs/hunk.rb#222 + def context_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print. Only print 1 number if the + # range has only one item in it. Otherwise, it's 'start,end' + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#316 + def context_range(mode, op); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#284 + def ed_diff(format, last); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#360 + def encode(literal, target_encoding = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#364 + def encode_as(string, *args); end + + # Note that an old diff can't have any context. Therefore, we know that + # there's only one block in the hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#134 + def old_diff(last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#167 + def unified_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print for unified diff. Print number + # where block starts, followed by number of lines in the block + # (don't print number of lines if it's 1) + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#331 + def unified_range(mode); end +end + +# source://diff-lcs//lib/diff/lcs/hunk.rb#10 +Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/hunk.rb#9 +Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/internals.rb#29 +module Diff::LCS::Internals + class << self + # This method will analyze the provided patchset to provide a single-pass + # normalization (conversion of the array form of Diff::LCS::Change objects to + # the object form of same) and detection of whether the patchset represents + # changes to be made. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#102 + def analyze_patchset(patchset, depth = T.unsafe(nil)); end + + # Examine the patchset and the source to see in which direction the + # patch should be applied. + # + # WARNING: By default, this examines the whole patch, so this could take + # some time. This also works better with Diff::LCS::ContextChange or + # Diff::LCS::Change as its source, as an array will cause the creation + # of one of the above. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#147 + def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end + + # Compute the longest common subsequence between the sequenced + # Enumerables +a+ and +b+. The result is an array whose contents is such + # that + # + # result = Diff::LCS::Internals.lcs(a, b) + # result.each_with_index do |e, i| + # assert_equal(a[i], b[e]) unless e.nil? + # end + # + # source://diff-lcs//lib/diff/lcs/internals.rb#41 + def lcs(a, b); end + + private + + # If +vector+ maps the matching elements of another collection onto this + # Enumerable, compute the inverse of +vector+ that maps this Enumerable + # onto the collection. (Currently unused.) + # + # source://diff-lcs//lib/diff/lcs/internals.rb#286 + def inverse_vector(a, vector); end + + # Returns a hash mapping each element of an Enumerable to the set of + # positions it occupies in the Enumerable, optionally restricted to the + # elements specified in the range of indexes specified by +interval+. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#298 + def position_hash(enum, interval); end + + # Find the place at which +value+ would normally be inserted into the + # Enumerable. If that place is already occupied by +value+, do nothing + # and return +nil+. If the place does not exist (i.e., it is off the end + # of the Enumerable), add it to the end. Otherwise, replace the element + # at that point with +value+. It is assumed that the Enumerable's values + # are numeric. + # + # This operation preserves the sort order. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#252 + def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end + end +end + +# This will produce a simple array of diff change objects. Each element in +# the #diffs array is a single ContextChange. In the set of #diffs provided +# by SDiffCallbacks, both old and new objects will be presented for both +# changed and unchanged objects. +nil+ will be substituted +# for a discarded object. +# +# The diffset produced by this callback, when provided to Diff::LCS#sdiff, +# will compute and display the necessary components to show two sequences +# and their minimized differences side by side, just like the Unix utility +# +sdiff+. +# +# same same +# before | after +# old < - +# - > new +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.sdiff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ "-", [ 0, "a"], [ 0, nil ] ], +# # [ "=", [ 1, "b"], [ 0, "b" ] ], +# # [ "=", [ 2, "c"], [ 1, "c" ] ], +# # [ "+", [ 3, nil], [ 2, "d" ] ], +# # [ "=", [ 3, "e"], [ 3, "e" ] ], +# # [ "!", [ 4, "h"], [ 4, "f" ] ], +# # [ "=", [ 5, "j"], [ 5, "j" ] ], +# # [ "+", [ 6, nil], [ 6, "k" ] ], +# # [ "=", [ 6, "l"], [ 7, "l" ] ], +# # [ "=", [ 7, "m"], [ 8, "m" ] ], +# # [ "!", [ 8, "n"], [ 9, "r" ] ], +# # [ "!", [ 9, "p"], [ 10, "s" ] ], +# # [ "+", [ 10, nil], [ 11, "t" ] ] ] +# +# The result of this operation is similar to that of +# Diff::LCS::ContextDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#sdiff +# method. +# +# cbo = Diff::LCS::SDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# +# As with the other initialisable callback objects, +# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no +# "fininishing" to be done, this has no effect on the state of the object. +# +# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.to_a } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#303 +class Diff::LCS::SDiffCallbacks + # :yields: self + # + # @return [SDiffCallbacks] a new instance of SDiffCallbacks + # @yield [_self] + # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#307 + def initialize; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#324 + def change(event); end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#316 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#320 + def discard_b(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#312 + def match(event); end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_sequences. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 +Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks + +# source://diff-lcs//lib/diff/lcs/version.rb#5 +Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/erubi@1.13.1.rbi b/sorbet/rbi/gems/erubi@1.13.1.rbi new file mode 100644 index 0000000..3a6982f --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.13.1.rbi @@ -0,0 +1,157 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erubi` gem. +# Please instead update this file by running `bin/tapioca gem erubi`. + + +# source://erubi//lib/erubi.rb#3 +module Erubi + private + + # source://erubi//lib/erubi.rb#22 + def h(_arg0); end + + class << self + # source://erubi//lib/erubi.rb#49 + def h(_arg0); end + end +end + +# source://erubi//lib/erubi.rb#51 +class Erubi::Engine + # Initialize a new Erubi::Engine. Options: + # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # @return [Engine] a new instance of Engine + # + # source://erubi//lib/erubi.rb#91 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # source://erubi//lib/erubi.rb#62 + def bufvar; end + + # The filename of the template, if one was given. + # + # source://erubi//lib/erubi.rb#59 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # source://erubi//lib/erubi.rb#56 + def src; end + + private + + # :nocov: + # + # source://erubi//lib/erubi.rb#209 + def _dup_string_if_frozen(string); end + + # Add ruby code to the template + # + # source://erubi//lib/erubi.rb#232 + def add_code(code); end + + # Add the given ruby expression result to the template, + # escaping it based on the indicator given and escape flag. + # + # source://erubi//lib/erubi.rb#241 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#250 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#255 + def add_expression_result_escaped(code); end + + # Add the given postamble to the src. Can be overridden in subclasses + # to make additional changes to src that depend on the current state. + # + # source://erubi//lib/erubi.rb#261 + def add_postamble(postamble); end + + # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. + # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). + # + # source://erubi//lib/erubi.rb#222 + def add_text(text); end + + # Raise an exception, as the base engine class does not support handling other indicators. + # + # @raise [ArgumentError] + # + # source://erubi//lib/erubi.rb#267 + def handle(indicator, code, tailch, rspace, lspace); end + + # Make sure that any current expression has been terminated. + # The default is to terminate all expressions, but when + # the chain_appends option is used, expressions may not be + # terminated. + # + # source://erubi//lib/erubi.rb#295 + def terminate_expression; end + + # Make sure the buffer variable is the target of the next append + # before yielding to the block. Mark that the buffer is the target + # of the next append after the block executes. + # + # This method should only be called if the block will result in + # code where << will append to the bufvar. + # + # source://erubi//lib/erubi.rb#277 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# source://erubi//lib/erubi.rb#53 +Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://erubi//lib/erubi.rb#17 +Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#15 +Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) + +# source://erubi//lib/erubi.rb#8 +Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#9 +Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#16 +Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#4 +Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/i18n@1.14.8.rbi b/sorbet/rbi/gems/i18n@1.14.8.rbi new file mode 100644 index 0000000..0dea2a9 --- /dev/null +++ b/sorbet/rbi/gems/i18n@1.14.8.rbi @@ -0,0 +1,2383 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `i18n` gem. +# Please instead update this file by running `bin/tapioca gem i18n`. + + +# source://i18n//lib/i18n/gettext/po_parser.rb#15 +module GetText; end + +# source://i18n//lib/i18n/gettext/po_parser.rb#17 +class GetText::PoParser < ::Racc::Parser + # source://i18n//lib/i18n/gettext/po_parser.rb#19 + def _(x); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#282 + def _reduce_10(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#295 + def _reduce_12(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#302 + def _reduce_13(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#309 + def _reduce_14(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#316 + def _reduce_15(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#235 + def _reduce_5(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#246 + def _reduce_8(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#264 + def _reduce_9(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#323 + def _reduce_none(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#23 + def next_token; end + + # source://i18n//lib/i18n/gettext/po_parser.rb#23 + def on_comment(comment); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#23 + def on_message(msgid, msgstr); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#23 + def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#23 + def unescape(orig); end +end + +# source://i18n//lib/i18n/gettext/po_parser.rb#184 +GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/gettext/po_parser.rb#221 +GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass) + +# source://i18n//lib/i18n/gettext/po_parser.rb#200 +GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# Simple Locale tag implementation that computes subtags by simply splitting +# the locale tag at '-' occurrences. +# +# source://i18n//lib/i18n/version.rb#3 +module I18n + extend ::I18n::Base + + class << self + # source://i18n//lib/i18n/backend/cache.rb#64 + def cache_key_digest; end + + # source://i18n//lib/i18n/backend/cache.rb#68 + def cache_key_digest=(key_digest); end + + # source://i18n//lib/i18n/backend/cache.rb#56 + def cache_namespace; end + + # source://i18n//lib/i18n/backend/cache.rb#60 + def cache_namespace=(namespace); end + + # source://i18n//lib/i18n/backend/cache.rb#48 + def cache_store; end + + # source://i18n//lib/i18n/backend/cache.rb#52 + def cache_store=(store); end + + # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#17 + def fallbacks; end + + # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#23 + def fallbacks=(fallbacks); end + + # Return String or raises MissingInterpolationArgument exception. + # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler. + # + # @raise [ReservedInterpolationKey] + # + # source://i18n//lib/i18n/interpolate/ruby.rb#23 + def interpolate(string, values); end + + # source://i18n//lib/i18n/interpolate/ruby.rb#29 + def interpolate_hash(string, values); end + + # source://i18n//lib/i18n.rb#38 + def new_double_nested_cache; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/cache.rb#72 + def perform_caching?; end + + # Marks a key as reserved. Reserved keys are used internally, + # and can't also be used for interpolation. If you are using any + # extra keys as I18n options, you should call I18n.reserve_key + # before any I18n.translate (etc) calls are made. + # + # source://i18n//lib/i18n.rb#46 + def reserve_key(key); end + + # source://i18n//lib/i18n.rb#51 + def reserved_keys_pattern; end + end +end + +# source://i18n//lib/i18n/exceptions.rb#14 +class I18n::ArgumentError < ::ArgumentError; end + +# source://i18n//lib/i18n/backend.rb#4 +module I18n::Backend; end + +# source://i18n//lib/i18n/backend/base.rb#8 +module I18n::Backend::Base + include ::I18n::Backend::Transliterator + + # Returns an array of locales for which translations are available + # ignoring the reserved translation meta data key :i18n. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#97 + def available_locales; end + + # source://i18n//lib/i18n/backend/base.rb#105 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#71 + def exists?(locale, key, options = T.unsafe(nil)); end + + # Accepts a list of paths to translation files. Loads translations from + # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json + # for details. + # + # source://i18n//lib/i18n/backend/base.rb#14 + def load_translations(*filenames); end + + # Acts the same as +strftime+, but uses a localized version of the + # format string. Takes a key from the date/time formats translations as + # a format argument (e.g., :short in :'date.formats'). + # + # @raise [ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#78 + def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#101 + def reload!; end + + # This method receives a locale, a data hash and options for storing translations. + # Should be implemented + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#24 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#28 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # Deep interpolation + # + # deep_interpolate { people: { ann: "Ann is %{ann}", john: "John is %{john}" } }, + # ann: 'good', john: 'big' + # #=> { people: { ann: "Ann is good", john: "John is big" } } + # + # source://i18n//lib/i18n/backend/base.rb#217 + def deep_interpolate(locale, data, values = T.unsafe(nil)); end + + # Evaluates defaults. + # If given subject is an Array, it walks the array and returns the + # first translation that can be resolved. Otherwise it tries to resolve + # the translation directly. + # + # source://i18n//lib/i18n/backend/base.rb#128 + def default(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#111 + def eager_loaded?; end + + # Interpolates values into a given subject. + # + # if the given subject is a string then: + # method interpolates "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X' + # # => "file test.txt opened by %{user}" + # + # if the given subject is an array then: + # each element of the array is recursively interpolated (until it finds a string) + # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz" + # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]] + # + # source://i18n//lib/i18n/backend/base.rb#201 + def interpolate(locale, subject, values = T.unsafe(nil)); end + + # Loads a single translations file by delegating to #load_rb or + # #load_yml depending on the file extension and directly merges the + # data to the existing translations. Raises I18n::UnknownFileType + # for all other file extensions. + # + # @raise [UnknownFileType] + # + # source://i18n//lib/i18n/backend/base.rb#240 + def load_file(filename); end + + # Loads a JSON translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#276 + def load_json(filename); end + + # Loads a plain Ruby translations file. eval'ing the file must yield + # a Hash containing translation data with locales as toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#254 + def load_rb(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#272 + def load_yaml(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#261 + def load_yml(filename); end + + # The method which actually looks up for the translation in the store. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#116 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#308 + def pluralization_key(entry, count); end + + # Picks a translation from a pluralized mnemonic subkey according to English + # pluralization rules : + # - It will pick the :one subkey if count is equal to 1. + # - It will pick the :other subkey otherwise. + # - It will pick the :zero subkey in the special case where count is + # equal to 0 and there is a :zero subkey present. This behaviour is + # not standard with regards to the CLDR pluralization rules. + # Other backends can implement more flexible or complex pluralization rules. + # + # @raise [InvalidPluralizationData] + # + # source://i18n//lib/i18n/backend/base.rb#182 + def pluralize(locale, entry, count); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#150 + def resolve(locale, object, subject, options = T.unsafe(nil)); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#172 + def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#120 + def subtrees?; end + + # source://i18n//lib/i18n/backend/base.rb#289 + def translate_localization_format(locale, object, format, options); end +end + +# TODO Should the cache be cleared if new translations are stored? +# +# source://i18n//lib/i18n/backend/cache.rb#79 +module I18n::Backend::Cache + # source://i18n//lib/i18n/backend/cache.rb#80 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/cache.rb#93 + def _fetch(cache_key, &block); end + + # source://i18n//lib/i18n/backend/cache.rb#101 + def cache_key(locale, key, options); end + + # source://i18n//lib/i18n/backend/cache.rb#86 + def fetch(cache_key, &block); end + + private + + # source://i18n//lib/i18n/backend/cache.rb#108 + def digest_item(key); end +end + +# Overwrites the Base load_file method to cache loaded file contents. +# +# source://i18n//lib/i18n/backend/cache_file.rb#8 +module I18n::Backend::CacheFile + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 + def path_roots; end + + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 + def path_roots=(_arg0); end + + protected + + # Track loaded translation files in the `i18n.load_file` scope, + # and skip loading the file if its contents are still up-to-date. + # + # source://i18n//lib/i18n/backend/cache_file.rb#17 + def load_file(filename); end + + # Translate absolute filename to relative path for i18n key. + # + # source://i18n//lib/i18n/backend/cache_file.rb#28 + def normalized_path(file); end +end + +# source://i18n//lib/i18n/backend/cascade.rb#35 +module I18n::Backend::Cascade + # source://i18n//lib/i18n/backend/cascade.rb#36 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Backend that chains multiple other backends and checks each of them when +# a translation needs to be looked up. This is useful when you want to use +# standard translations with a Simple backend but store custom application +# translations in a database or other backends. +# +# To use the Chain backend instantiate it and set it to the I18n module. +# You can add chained backends through the initializer or backends +# accessor: +# +# # preserves the existing Simple backend set to I18n.backend +# I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend) +# +# The implementation assumes that all backends added to the Chain implement +# a lookup method with the same API as Simple backend does. +# +# Fallback translations using the :default option are only used by the last backend of a chain. +# +# source://i18n//lib/i18n/backend/chain.rb#21 +class I18n::Backend::Chain + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::Chain::Implementation +end + +# source://i18n//lib/i18n/backend/chain.rb#22 +module I18n::Backend::Chain::Implementation + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # source://i18n//lib/i18n/backend/chain.rb#27 + def initialize(*backends); end + + # source://i18n//lib/i18n/backend/chain.rb#52 + def available_locales; end + + # Returns the value of attribute backends. + # + # source://i18n//lib/i18n/backend/chain.rb#25 + def backends; end + + # Sets the attribute backends + # + # @param value the value to set the attribute backends to. + # + # source://i18n//lib/i18n/backend/chain.rb#25 + def backends=(_arg0); end + + # source://i18n//lib/i18n/backend/chain.rb#44 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#76 + def exists?(locale, key, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#31 + def initialized?; end + + # source://i18n//lib/i18n/backend/chain.rb#82 + def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#40 + def reload!; end + + # source://i18n//lib/i18n/backend/chain.rb#48 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#56 + def translate(locale, key, default_options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/chain.rb#92 + def init_translations; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#108 + def namespace_lookup?(result, options); end + + # source://i18n//lib/i18n/backend/chain.rb#98 + def translations; end + + private + + # This is approximately what gets used in ActiveSupport. + # However since we are not guaranteed to run in an ActiveSupport context + # it is wise to have our own copy. We underscore it + # to not pollute the namespace of the including class. + # + # source://i18n//lib/i18n/backend/chain.rb#117 + def _deep_merge(hash, other_hash); end +end + +# source://i18n//lib/i18n/backend/fallbacks.rb#30 +module I18n::Backend::Fallbacks + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/fallbacks.rb#98 + def exists?(locale, key, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#89 + def extract_non_symbol_default!(options); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#67 + def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # Overwrites the Base backend translate method so that it will try each + # locale given by I18n.fallbacks for the given locale. E.g. for the + # locale :"de-DE" it might try the locales :"de-DE", :de and :en + # (depends on the fallbacks implementation) until it finds a result with + # the given options. If it does not find any result for any of the + # locales it will then throw MissingTranslation as usual. + # + # The default option takes precedence over fallback locales only when + # it's a Symbol. When the default contains a String, Proc or Hash + # it is evaluated last after all the fallback locales have been tried. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#41 + def translate(locale, key, options = T.unsafe(nil)); end + + private + + # Overwrite on_fallback to add specified logic when the fallback succeeds. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#114 + def on_fallback(_original_locale, _fallback_locale, _key, _options); end +end + +# This module contains several helpers to assist flattening translations. +# You may want to flatten translations for: +# +# 1) speed up lookups, as in the Memoize backend; +# 2) In case you want to store translations in a data store, as in ActiveRecord backend; +# +# You can check both backends above for some examples. +# This module also keeps all links in a hash so they can be properly resolved when flattened. +# +# source://i18n//lib/i18n/backend/flatten.rb#13 +module I18n::Backend::Flatten + # Flatten keys for nested Hashes by chaining up keys: + # + # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind + # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" } + # + # source://i18n//lib/i18n/backend/flatten.rb#59 + def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end + + # Receives a hash of translations (where the key is a locale and + # the value is another hash) and return a hash with all + # translations flattened. + # + # Nested hashes are included in the flattened hash just if subtree + # is true and Symbols are automatically stored as links. + # + # source://i18n//lib/i18n/backend/flatten.rb#74 + def flatten_translations(locale, data, escape, subtree); end + + # Store flattened links. + # + # source://i18n//lib/i18n/backend/flatten.rb#50 + def links; end + + # Shortcut to I18n::Backend::Flatten.normalize_flat_keys + # and then resolve_links. + # + # source://i18n//lib/i18n/backend/flatten.rb#44 + def normalize_flat_keys(locale, key, scope, separator); end + + protected + + # source://i18n//lib/i18n/backend/flatten.rb#112 + def escape_default_separator(key); end + + # source://i18n//lib/i18n/backend/flatten.rb#106 + def find_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#93 + def resolve_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#89 + def store_link(locale, key, link); end + + class << self + # Receives a string and escape the default separator. + # + # source://i18n//lib/i18n/backend/flatten.rb#38 + def escape_default_separator(key); end + + # normalize_keys the flatten way. This method is significantly faster + # and creates way less objects than the one at I18n.normalize_keys. + # It also handles escaping the translation keys. + # + # source://i18n//lib/i18n/backend/flatten.rb#20 + def normalize_flat_keys(locale, key, scope, separator); end + end +end + +# source://i18n//lib/i18n/backend/flatten.rb#15 +I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/backend/flatten.rb#14 +I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) + +# Experimental support for using Gettext po files to store translations. +# +# To use this you can simply include the module to the Simple backend - or +# whatever other backend you are using. +# +# I18n::Backend::Simple.include(I18n::Backend::Gettext) +# +# Now you should be able to include your Gettext translation (*.po) files to +# the +I18n.load_path+ so they're loaded to the backend and you can use them as +# usual: +# +# I18n.load_path += Dir["path/to/locales/*.po"] +# +# Following the Gettext convention this implementation expects that your +# translation files are named by their locales. E.g. the file en.po would +# contain the translations for the English locale. +# +# To translate text you must use one of the translate methods provided by +# I18n::Gettext::Helpers. +# +# include I18n::Gettext::Helpers +# puts _("some string") +# +# Without it strings containing periods (".") will not be translated. +# +# source://i18n//lib/i18n/backend/gettext.rb#33 +module I18n::Backend::Gettext + protected + + # source://i18n//lib/i18n/backend/gettext.rb#41 + def load_po(filename); end + + # source://i18n//lib/i18n/backend/gettext.rb#51 + def normalize(locale, data); end + + # source://i18n//lib/i18n/backend/gettext.rb#68 + def normalize_pluralization(locale, key, value); end + + # source://i18n//lib/i18n/backend/gettext.rb#47 + def parse(filename); end +end + +# source://i18n//lib/i18n/backend/gettext.rb#34 +class I18n::Backend::Gettext::PoData < ::Hash + # source://i18n//lib/i18n/backend/gettext.rb#35 + def set_comment(msgid_or_sym, comment); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 +module I18n::Backend::InterpolationCompiler + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#98 + def interpolate(locale, string, values); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#108 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#114 + def compile_all_strings_in(data); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21 +module I18n::Backend::InterpolationCompiler::Compiler + extend ::I18n::Backend::InterpolationCompiler::Compiler + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#26 + def compile_if_an_interpolation(string); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#39 + def interpolated_str?(str); end + + protected + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#59 + def compile_interpolation_token(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#49 + def compiled_interpolation_body(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#72 + def direct_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#92 + def escape_key_sym(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#88 + def escape_plain_str(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#55 + def handle_interpolation_token(token); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#68 + def interpolate_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#63 + def interpolate_or_raise_missing(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#80 + def missing_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#76 + def nil_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#84 + def reserved_key(key); end + + # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#45 + def tokenize(str); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 +I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp) + +# This is a basic backend for key value stores. It receives on +# initialization the store, which should respond to three methods: +# +# * store#[](key) - Used to get a value +# * store#[]=(key, value) - Used to set a value +# * store#keys - Used to get all keys +# +# Since these stores only supports string, all values are converted +# to JSON before being stored, allowing it to also store booleans, +# hashes and arrays. However, this store does not support Procs. +# +# As the ActiveRecord backend, Symbols are just supported when loading +# translations from the filesystem or through explicit store translations. +# +# Also, avoid calling I18n.available_locales since it's a somehow +# expensive operation in most stores. +# +# == Example +# +# To setup I18n to use TokyoCabinet in memory is quite straightforward: +# +# require 'rufus/tokyo/cabinet' # gem install rufus-tokyo +# I18n.backend = I18n::Backend::KeyValue.new(Rufus::Tokyo::Cabinet.new('*')) +# +# == Performance +# +# You may make this backend even faster by including the Memoize module. +# However, notice that you should properly clear the cache if you change +# values directly in the key-store. +# +# == Subtrees +# +# In most backends, you are allowed to retrieve part of a translation tree: +# +# I18n.backend.store_translations :en, :foo => { :bar => :baz } +# I18n.t "foo" #=> { :bar => :baz } +# +# This backend supports this feature by default, but it slows down the storage +# of new data considerably and makes hard to delete entries. That said, you are +# allowed to disable the storage of subtrees on initialization: +# +# I18n::Backend::KeyValue.new(@store, false) +# +# This is useful if you are using a KeyValue backend chained to a Simple backend. +# +# source://i18n//lib/i18n/backend/key_value.rb#69 +class I18n::Backend::KeyValue + include ::I18n::Backend::Flatten + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::KeyValue::Implementation +end + +# source://i18n//lib/i18n/backend/key_value.rb#70 +module I18n::Backend::KeyValue::Implementation + include ::I18n::Backend::Flatten + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # source://i18n//lib/i18n/backend/key_value.rb#75 + def initialize(store, subtrees = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/key_value.rb#102 + def available_locales; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#79 + def initialized?; end + + # Returns the value of attribute store. + # + # source://i18n//lib/i18n/backend/key_value.rb#71 + def store; end + + # Sets the attribute store + # + # @param value the value to set the attribute store to. + # + # source://i18n//lib/i18n/backend/key_value.rb#71 + def store=(_arg0); end + + # source://i18n//lib/i18n/backend/key_value.rb#83 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/key_value.rb#124 + def init_translations; end + + # source://i18n//lib/i18n/backend/key_value.rb#136 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/key_value.rb#150 + def pluralize(locale, entry, count); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#132 + def subtrees?; end + + # Queries the translations from the key-value store and converts + # them into a hash such as the one returned from loading the + # haml files + # + # source://i18n//lib/i18n/backend/key_value.rb#115 + def translations; end +end + +# source://i18n//lib/i18n/backend/key_value.rb#161 +class I18n::Backend::KeyValue::SubtreeProxy + # @return [SubtreeProxy] a new instance of SubtreeProxy + # + # source://i18n//lib/i18n/backend/key_value.rb#162 + def initialize(master_key, store); end + + # source://i18n//lib/i18n/backend/key_value.rb#172 + def [](key); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#168 + def has_key?(key); end + + # source://i18n//lib/i18n/backend/key_value.rb#196 + def inspect; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#188 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#183 + def is_a?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#186 + def kind_of?(klass); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/key_value.rb#192 + def nil?; end +end + +# source://i18n//lib/i18n/backend/lazy_loadable.rb#65 +class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple + # @return [LazyLoadable] a new instance of LazyLoadable + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#66 + def initialize(lazy_load: T.unsafe(nil)); end + + # Parse the load path and extract all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#99 + def available_locales; end + + # Eager loading is not supported in the lazy context. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#90 + def eager_load!; end + + # Returns whether the current locale is initialized. + # + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#71 + def initialized?; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#107 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # Clean up translations and uninitialize all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#80 + def reload!; end + + protected + + # Load translations from files that belong to the current locale. + # + # @raise [InvalidFilenames] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#121 + def init_translations; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#133 + def initialized_locales; end + + private + + # Checks if a filename is named in correspondence to the translations it loaded. + # The locale extracted from the path must be the single locale loaded in the translations. + # + # @raise [FilenameIncorrect] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#175 + def assert_file_named_correctly!(file, translations); end + + # Select all files from I18n load path that belong to current locale. + # These files must start with the locale identifier (ie. "en", "pt-BR"), + # followed by an "_" demarcation to separate proceeding text. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#167 + def filenames_for_current_locale; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#139 + def lazy_load?; end + + # Loads each file supplied and asserts that the file only loads + # translations as expected by the name. The method returns a list of + # errors corresponding to offending files. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#152 + def load_translations_and_collect_file_errors(files); end +end + +# source://i18n//lib/i18n/backend/lazy_loadable.rb#143 +class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError + # @return [FilenameIncorrect] a new instance of FilenameIncorrect + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#144 + def initialize(file, expected_locale, unexpected_locales); end +end + +# Backend that lazy loads translations based on the current locale. This +# implementation avoids loading all translations up front. Instead, it only +# loads the translations that belong to the current locale. This offers a +# performance incentive in local development and test environments for +# applications with many translations for many different locales. It's +# particularly useful when the application only refers to a single locales' +# translations at a time (ex. A Rails workload). The implementation +# identifies which translation files from the load path belong to the +# current locale by pattern matching against their path name. +# +# Specifically, a translation file is considered to belong to a locale if: +# a) the filename is in the I18n load path +# b) the filename ends in a supported extension (ie. .yml, .json, .po, .rb) +# c) the filename starts with the locale identifier +# d) the locale identifier and optional proceeding text is separated by an underscore, ie. "_". +# +# Examples: +# Valid files that will be selected by this backend: +# +# "files/locales/en_translation.yml" (Selected for locale "en") +# "files/locales/fr.po" (Selected for locale "fr") +# +# Invalid files that won't be selected by this backend: +# +# "files/locales/translation-file" +# "files/locales/en-translation.unsupported" +# "files/locales/french/translation.yml" +# "files/locales/fr/translation.yml" +# +# The implementation uses this assumption to defer the loading of +# translation files until the current locale actually requires them. +# +# The backend has two working modes: lazy_load and eager_load. +# +# Note: This backend should only be enabled in test environments! +# When the mode is set to false, the backend behaves exactly like the +# Simple backend, with an additional check that the paths being loaded +# abide by the format. If paths can't be matched to the format, an error is raised. +# +# You can configure lazy loaded backends through the initializer or backends +# accessor: +# +# # In test environments +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: true) +# +# # In other environments, such as production and CI +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default +# +# source://i18n//lib/i18n/backend/lazy_loadable.rb#55 +class I18n::Backend::LocaleExtractor + class << self + # source://i18n//lib/i18n/backend/lazy_loadable.rb#57 + def locale_from_path(path); end + end +end + +# source://i18n//lib/i18n/backend/memoize.rb#14 +module I18n::Backend::Memoize + # source://i18n//lib/i18n/backend/memoize.rb#15 + def available_locales; end + + # source://i18n//lib/i18n/backend/memoize.rb#29 + def eager_load!; end + + # source://i18n//lib/i18n/backend/memoize.rb#24 + def reload!; end + + # source://i18n//lib/i18n/backend/memoize.rb#19 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/memoize.rb#37 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/memoize.rb#44 + def memoized_lookup; end + + # source://i18n//lib/i18n/backend/memoize.rb#48 + def reset_memoizations!(locale = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/backend/metadata.rb#21 +module I18n::Backend::Metadata + # source://i18n//lib/i18n/backend/metadata.rb#52 + def interpolate(locale, entry, values = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/metadata.rb#57 + def pluralize(locale, entry, count); end + + # source://i18n//lib/i18n/backend/metadata.rb#40 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/metadata.rb#63 + def with_metadata(metadata, &block); end + + class << self + # @private + # + # source://i18n//lib/i18n/backend/metadata.rb#23 + def included(base); end + end +end + +# source://i18n//lib/i18n/backend/pluralization.rb#16 +module I18n::Backend::Pluralization + # Overwrites the Base backend translate method so that it will check the + # translation meta data space (:i18n) for a locale specific pluralization + # rule and use it to pluralize the given entry. I.e., the library expects + # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') + # + # Pluralization rules are expected to respond to #call(count) and + # return a pluralization key. Valid keys depend on the pluralization + # rules for the locale, as defined in the CLDR. + # As of v41, 6 locale-specific plural categories are defined: + # :few, :many, :one, :other, :two, :zero + # + # n.b., The :one plural category does not imply the number 1. + # Instead, :one is a category for any number that behaves like 1 in + # that locale. For example, in some locales, :one is used for numbers + # that end in "1" (like 1, 21, 151) but that don't end in + # 11 (like 11, 111, 10311). + # Similar notes apply to the :two, and :zero plural categories. + # + # If you want to have different strings for the categories of count == 0 + # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car") + # use the explicit `"0"` and `"1"` keys. + # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules + # + # source://i18n//lib/i18n/backend/pluralization.rb#39 + def pluralize(locale, entry, count); end + + protected + + # source://i18n//lib/i18n/backend/pluralization.rb#81 + def pluralizer(locale); end + + # source://i18n//lib/i18n/backend/pluralization.rb#77 + def pluralizers; end + + private + + # Normalizes categories of 0.0 and 1.0 + # and returns the symbolic version + # + # source://i18n//lib/i18n/backend/pluralization.rb#89 + def symbolic_count(count); end +end + +# A simple backend that reads translations from YAML files and stores them in +# an in-memory hash. Relies on the Base backend. +# +# The implementation is provided by a Implementation module allowing to easily +# extend Simple backend's behavior by including modules. E.g.: +# +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end +# +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# +# source://i18n//lib/i18n/backend/simple.rb#21 +class I18n::Backend::Simple + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::Simple::Implementation +end + +# source://i18n//lib/i18n/backend/simple.rb#22 +module I18n::Backend::Simple::Implementation + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # Get available locales from the translations hash + # + # source://i18n//lib/i18n/backend/simple.rb#49 + def available_locales; end + + # source://i18n//lib/i18n/backend/simple.rb#64 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/simple.rb#28 + def initialized?; end + + # Clean up translations hash and set initialized to false on reload! + # + # source://i18n//lib/i18n/backend/simple.rb#58 + def reload!; end + + # Stores translations for the given locale in memory. + # This uses a deep merge for the translations hash, so existing + # translations will be overwritten by new ones only at the deepest + # level of the hash. + # + # source://i18n//lib/i18n/backend/simple.rb#36 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/simple.rb#69 + def translations(do_init: T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/simple.rb#83 + def init_translations; end + + # Looks up a translation from the translations hash. Returns nil if + # either key is nil, or locale, scope or key do not exist as a key in the + # nested translations hash. Splits keys or scopes containing dots + # into multiple keys, i.e. currency.format is regarded the same as + # %w(currency format). + # + # source://i18n//lib/i18n/backend/simple.rb#93 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Mutex to ensure that concurrent translations loading will be thread-safe +# +# source://i18n//lib/i18n/backend/simple.rb#26 +I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://i18n//lib/i18n/backend/transliterator.rb#6 +module I18n::Backend::Transliterator + # Given a locale and a UTF-8 string, return the locale's ASCII + # approximation for the string. + # + # source://i18n//lib/i18n/backend/transliterator.rb#11 + def transliterate(locale, string, replacement = T.unsafe(nil)); end + + class << self + # Get a transliterator instance. + # + # source://i18n//lib/i18n/backend/transliterator.rb#19 + def get(rule = T.unsafe(nil)); end + end +end + +# source://i18n//lib/i18n/backend/transliterator.rb#7 +I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# A transliterator which accepts a Hash of characters as its translation +# rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#42 +class I18n::Backend::Transliterator::HashTransliterator + # @return [HashTransliterator] a new instance of HashTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#74 + def initialize(rule = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/transliterator.rb#80 + def transliterate(string, replacement = T.unsafe(nil)); end + + private + + # Add transliteration rules to the approximations hash. + # + # source://i18n//lib/i18n/backend/transliterator.rb#100 + def add(hash); end + + # source://i18n//lib/i18n/backend/transliterator.rb#93 + def add_default_approximations; end + + # source://i18n//lib/i18n/backend/transliterator.rb#89 + def approximations; end +end + +# source://i18n//lib/i18n/backend/transliterator.rb#43 +I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash) + +# A transliterator which accepts a Proc as its transliteration rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#30 +class I18n::Backend::Transliterator::ProcTransliterator + # @return [ProcTransliterator] a new instance of ProcTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#31 + def initialize(rule); end + + # source://i18n//lib/i18n/backend/transliterator.rb#35 + def transliterate(string, replacement = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n.rb#55 +module I18n::Base + # source://i18n//lib/i18n.rb#70 + def available_locales; end + + # source://i18n//lib/i18n.rb#70 + def available_locales=(value); end + + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#387 + def available_locales_initialized?; end + + # source://i18n//lib/i18n.rb#70 + def backend; end + + # source://i18n//lib/i18n.rb#70 + def backend=(value); end + + # Gets I18n configuration object. + # + # source://i18n//lib/i18n.rb#57 + def config; end + + # Sets I18n configuration object. + # + # source://i18n//lib/i18n.rb#63 + def config=(value); end + + # source://i18n//lib/i18n.rb#70 + def default_locale; end + + # source://i18n//lib/i18n.rb#70 + def default_locale=(value); end + + # source://i18n//lib/i18n.rb#70 + def default_separator; end + + # source://i18n//lib/i18n.rb#70 + def default_separator=(value); end + + # Tells the backend to load translations now. Used in situations like the + # Rails production environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#92 + def eager_load!; end + + # source://i18n//lib/i18n.rb#70 + def enforce_available_locales; end + + # Raises an InvalidLocale exception when the passed locale is not available. + # + # source://i18n//lib/i18n.rb#381 + def enforce_available_locales!(locale); end + + # source://i18n//lib/i18n.rb#70 + def enforce_available_locales=(value); end + + # source://i18n//lib/i18n.rb#70 + def exception_handler; end + + # source://i18n//lib/i18n.rb#70 + def exception_handler=(value); end + + # Returns true if a translation exists for a given key, otherwise returns false. + # + # @raise [Disabled] + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#266 + def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Returns an array of interpolation keys for the given translation key + # + # *Examples* + # + # Suppose we have the following: + # I18n.t 'example.zero' == 'Zero interpolations' + # I18n.t 'example.one' == 'One interpolation %{foo}' + # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}' + # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}'] + # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}' + # + # Then we can expect the following results: + # I18n.interpolation_keys('example.zero') #=> [] + # I18n.interpolation_keys('example.one') #=> ['foo'] + # I18n.interpolation_keys('example.two') #=> ['foo', 'bar'] + # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz'] + # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz'] + # I18n.interpolation_keys('does-not-exist') #=> [] + # I18n.interpolation_keys('example') #=> [] + # + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n.rb#255 + def interpolation_keys(key, **options); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#344 + def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # source://i18n//lib/i18n.rb#70 + def load_path; end + + # source://i18n//lib/i18n.rb#70 + def load_path=(value); end + + # source://i18n//lib/i18n.rb#70 + def locale; end + + # source://i18n//lib/i18n.rb#70 + def locale=(value); end + + # Returns true when the passed locale, which can be either a String or a + # Symbol, is in the list of available locales. Returns false otherwise. + # + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#376 + def locale_available?(locale); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#336 + def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # Merges the given locale, key and scope into a single array of keys. + # Splits keys that contain dots into multiple keys. Makes sure all + # keys are Symbols. + # + # source://i18n//lib/i18n.rb#364 + def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end + + # Tells the backend to reload translations. Used in situations like the + # Rails development environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#84 + def reload!; end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # BULK LOOKUP + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # Ruby 2.7+ keyword arguments warning + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#227 + def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#234 + def t!(key, **options); end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # BULK LOOKUP + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # Ruby 2.7+ keyword arguments warning + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#212 + def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#231 + def translate!(key, **options); end + + # Transliterates UTF-8 characters to ASCII. By default this method will + # transliterate only Latin strings to an ASCII approximation: + # + # I18n.transliterate("Ærøskøbing") + # # => "AEroskobing" + # + # I18n.transliterate("日本語") + # # => "???" + # + # It's also possible to add support for per-locale transliterations. I18n + # expects transliteration rules to be stored at + # i18n.transliterate.rule. + # + # Transliteration rules can either be a Hash or a Proc. Procs must accept a + # single string argument. Hash rules inherit the default transliteration + # rules, while Procs do not. + # + # *Examples* + # + # Setting a Hash in .yml: + # + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # Setting a Hash using Ruby: + # + # store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # Setting a Proc: + # + # translit = lambda {|string| MyTransliterator.transliterate(string) } + # store_translations(:xx, :i18n => {:transliterate => {:rule => translit}) + # + # Transliterating strings: + # + # I18n.locale = :en + # I18n.transliterate("Jürgen") # => "Jurgen" + # I18n.locale = :de + # I18n.transliterate("Jürgen") # => "Juergen" + # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" + # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" + # + # source://i18n//lib/i18n.rb#325 + def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end + + # Executes block with given I18n.locale set. + # + # source://i18n//lib/i18n.rb#347 + def with_locale(tmp_locale = T.unsafe(nil)); end + + private + + # Any exceptions thrown in translate will be sent to the @@exception_handler + # which can be a Symbol, a Proc or any other Object unless they're forced to + # be raised or thrown (MissingTranslation). + # + # If exception_handler is a Symbol then it will simply be sent to I18n as + # a method call. A Proc will simply be called. In any other case the + # method #call will be called on the exception_handler object. + # + # Examples: + # + # I18n.exception_handler = :custom_exception_handler # this is the default + # I18n.custom_exception_handler(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = lambda { |*args| ... } # a lambda + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = I18nExceptionHandler.new # an object + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # source://i18n//lib/i18n.rb#423 + def handle_exception(handling, exception, locale, key, options); end + + # source://i18n//lib/i18n.rb#465 + def interpolation_keys_from_translation(translation); end + + # source://i18n//lib/i18n.rb#441 + def normalize_key(key, separator); end + + # source://i18n//lib/i18n.rb#393 + def translate_key(key, throw, raise, locale, backend, options); end +end + +# source://i18n//lib/i18n/config.rb#6 +class I18n::Config + # Returns an array of locales for which translations are available. + # Unless you explicitly set these through I18n.available_locales= + # the call will be delegated to the backend. + # + # source://i18n//lib/i18n/config.rb#43 + def available_locales; end + + # Sets the available locales. + # + # source://i18n//lib/i18n/config.rb#57 + def available_locales=(locales); end + + # Returns true if the available_locales have been initialized + # + # @return [Boolean] + # + # source://i18n//lib/i18n/config.rb#64 + def available_locales_initialized?; end + + # Caches the available locales list as both strings and symbols in a Set, so + # that we can have faster lookups to do the available locales enforce check. + # + # source://i18n//lib/i18n/config.rb#50 + def available_locales_set; end + + # Returns the current backend. Defaults to +Backend::Simple+. + # + # source://i18n//lib/i18n/config.rb#20 + def backend; end + + # Sets the current backend. Used to set a custom backend. + # + # source://i18n//lib/i18n/config.rb#25 + def backend=(backend); end + + # Clears the available locales set so it can be recomputed again after I18n + # gets reloaded. + # + # source://i18n//lib/i18n/config.rb#70 + def clear_available_locales_set; end + + # Returns the current default locale. Defaults to :'en' + # + # source://i18n//lib/i18n/config.rb#30 + def default_locale; end + + # Sets the current default locale. Used to set a custom default locale. + # + # source://i18n//lib/i18n/config.rb#35 + def default_locale=(locale); end + + # Returns the current default scope separator. Defaults to '.' + # + # source://i18n//lib/i18n/config.rb#75 + def default_separator; end + + # Sets the current default scope separator. + # + # source://i18n//lib/i18n/config.rb#80 + def default_separator=(separator); end + + # source://i18n//lib/i18n/config.rb#141 + def enforce_available_locales; end + + # source://i18n//lib/i18n/config.rb#145 + def enforce_available_locales=(enforce_available_locales); end + + # Returns the current exception handler. Defaults to an instance of + # I18n::ExceptionHandler. + # + # source://i18n//lib/i18n/config.rb#86 + def exception_handler; end + + # Sets the exception handler. + # + # source://i18n//lib/i18n/config.rb#91 + def exception_handler=(exception_handler); end + + # Returns the current interpolation patterns. Defaults to + # I18n::DEFAULT_INTERPOLATION_PATTERNS. + # + # source://i18n//lib/i18n/config.rb#151 + def interpolation_patterns; end + + # Sets the current interpolation patterns. Used to set a interpolation + # patterns. + # + # E.g. using {{}} as a placeholder like "{{hello}}, world!": + # + # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/ + # + # source://i18n//lib/i18n/config.rb#161 + def interpolation_patterns=(interpolation_patterns); end + + # Allow clients to register paths providing translation data sources. The + # backend defines acceptable sources. + # + # E.g. the provided SimpleBackend accepts a list of paths to translation + # files which are either named *.rb and contain plain Ruby Hashes or are + # named *.yml and contain YAML data. So for the SimpleBackend clients may + # register translation files like this: + # I18n.load_path << 'path/to/locale/en.yml' + # + # source://i18n//lib/i18n/config.rb#126 + def load_path; end + + # Sets the load path instance. Custom implementations are expected to + # behave like a Ruby Array. + # + # source://i18n//lib/i18n/config.rb#132 + def load_path=(load_path); end + + # The only configuration value that is not global and scoped to thread is :locale. + # It defaults to the default_locale. + # + # source://i18n//lib/i18n/config.rb#9 + def locale; end + + # Sets the current locale pseudo-globally, i.e. in the Thread.current hash. + # + # source://i18n//lib/i18n/config.rb#14 + def locale=(locale); end + + # Returns the current handler for situations when interpolation argument + # is missing. MissingInterpolationArgument will be raised by default. + # + # source://i18n//lib/i18n/config.rb#97 + def missing_interpolation_argument_handler; end + + # Sets the missing interpolation argument handler. It can be any + # object that responds to #call. The arguments that will be passed to #call + # are the same as for MissingInterpolationArgument initializer. Use +Proc.new+ + # if you don't care about arity. + # + # == Example: + # You can suppress raising an exception and return string instead: + # + # I18n.config.missing_interpolation_argument_handler = Proc.new do |key| + # "#{key} is missing" + # end + # + # source://i18n//lib/i18n/config.rb#114 + def missing_interpolation_argument_handler=(exception_handler); end +end + +# source://i18n//lib/i18n/interpolate/ruby.rb#7 +I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#16 +class I18n::Disabled < ::I18n::ArgumentError + # @return [Disabled] a new instance of Disabled + # + # source://i18n//lib/i18n/exceptions.rb#17 + def initialize(method); end +end + +# source://i18n//lib/i18n.rb#36 +I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/exceptions.rb#4 +class I18n::ExceptionHandler + # source://i18n//lib/i18n/exceptions.rb#5 + def call(exception, _locale, _key, _options); end +end + +# source://i18n//lib/i18n/gettext.rb#4 +module I18n::Gettext + class << self + # source://i18n//lib/i18n/gettext.rb#21 + def extract_scope(msgid, separator); end + + # returns an array of plural keys for the given locale or the whole hash + # of locale mappings to plural keys so that we can convert from gettext's + # integer-index based style + # TODO move this information to the pluralization module + # + # source://i18n//lib/i18n/gettext.rb#17 + def plural_keys(*args); end + end +end + +# source://i18n//lib/i18n/gettext.rb#6 +I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String) + +# Implements classical Gettext style accessors. To use this include the +# module to the global namespace or wherever you want to use it. +# +# include I18n::Gettext::Helpers +# +# source://i18n//lib/i18n/gettext/helpers.rb#11 +module I18n::Gettext::Helpers + # Makes dynamic translation messages readable for the gettext parser. + # _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations, + # you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation. + # * msgid: the message id. + # * Returns: msgid. + # + # source://i18n//lib/i18n/gettext/helpers.rb#17 + def N_(msgsid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#24 + def _(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 + def gettext(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#41 + def n_(msgid, msgid_plural, n = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 + def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#72 + def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 + def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#56 + def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 + def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#36 + def p_(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 + def pgettext(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#30 + def s_(msgid, separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 + def sgettext(msgid, separator = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/gettext.rb#5 +I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/interpolate/ruby.rb#12 +I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/interpolate/ruby.rb#15 +I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/exceptions.rb#132 +class I18n::InvalidFilenames < ::I18n::ArgumentError + # @return [InvalidFilenames] a new instance of InvalidFilenames + # + # source://i18n//lib/i18n/exceptions.rb#134 + def initialize(file_errors); end +end + +# source://i18n//lib/i18n/exceptions.rb#133 +I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer) + +# source://i18n//lib/i18n/exceptions.rb#30 +class I18n::InvalidLocale < ::I18n::ArgumentError + # @return [InvalidLocale] a new instance of InvalidLocale + # + # source://i18n//lib/i18n/exceptions.rb#32 + def initialize(locale); end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#31 + def locale; end +end + +# source://i18n//lib/i18n/exceptions.rb#38 +class I18n::InvalidLocaleData < ::I18n::ArgumentError + # @return [InvalidLocaleData] a new instance of InvalidLocaleData + # + # source://i18n//lib/i18n/exceptions.rb#40 + def initialize(filename, exception_message); end + + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#39 + def filename; end +end + +# source://i18n//lib/i18n/exceptions.rb#90 +class I18n::InvalidPluralizationData < ::I18n::ArgumentError + # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData + # + # source://i18n//lib/i18n/exceptions.rb#92 + def initialize(entry, count, key); end + + # Returns the value of attribute count. + # + # source://i18n//lib/i18n/exceptions.rb#91 + def count; end + + # Returns the value of attribute entry. + # + # source://i18n//lib/i18n/exceptions.rb#91 + def entry; end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#91 + def key; end +end + +# source://i18n//lib/i18n/backend/key_value.rb#21 +I18n::JSON = ActiveSupport::JSON + +# source://i18n//lib/i18n/locale.rb#4 +module I18n::Locale; end + +# source://i18n//lib/i18n/locale/fallbacks.rb#48 +class I18n::Locale::Fallbacks < ::Hash + # @return [Fallbacks] a new instance of Fallbacks + # + # source://i18n//lib/i18n/locale/fallbacks.rb#49 + def initialize(*mappings); end + + # @raise [InvalidLocale] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#60 + def [](locale); end + + # Returns the value of attribute defaults. + # + # source://i18n//lib/i18n/locale/fallbacks.rb#58 + def defaults; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#55 + def defaults=(defaults); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#82 + def empty?; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#86 + def inspect; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#67 + def map(*args, &block); end + + protected + + # source://i18n//lib/i18n/locale/fallbacks.rb#92 + def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/locale/tag.rb#5 +module I18n::Locale::Tag + class << self + # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+. + # + # source://i18n//lib/i18n/locale/tag.rb#12 + def implementation; end + + # Sets the current locale tag implementation. Use this to set a different locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#17 + def implementation=(implementation); end + + # Factory method for locale tags. Delegates to the current locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#22 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/parents.rb#4 +module I18n::Locale::Tag::Parents + # source://i18n//lib/i18n/locale/tag/parents.rb#5 + def parent; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#18 + def parents; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#14 + def self_and_parents; end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12 +I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#11 +I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#14 +class I18n::Locale::Tag::Rfc4646 < ::Struct + include ::I18n::Locale::Tag::Parents + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def language; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def region; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def script; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46 + def to_a; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42 + def to_s; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38 + def to_sym; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def variant; end + + class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23 + def parser; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27 + def parser=(parser); end + + # Parses the given tag and returns a Tag instance if it is valid. + # Returns false if the given tag is not valid according to RFC 4646. + # + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50 +module I18n::Locale::Tag::Rfc4646::Parser + class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63 + def match(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51 +I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/locale/tag/simple.rb#6 +class I18n::Locale::Tag::Simple + include ::I18n::Locale::Tag::Parents + + # @return [Simple] a new instance of Simple + # + # source://i18n//lib/i18n/locale/tag/simple.rb#17 + def initialize(*tag); end + + # source://i18n//lib/i18n/locale/tag/simple.rb#21 + def subtags; end + + # Returns the value of attribute tag. + # + # source://i18n//lib/i18n/locale/tag/simple.rb#15 + def tag; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#33 + def to_a; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#29 + def to_s; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#25 + def to_sym; end + + class << self + # source://i18n//lib/i18n/locale/tag/simple.rb#8 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/middleware.rb#4 +class I18n::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://i18n//lib/i18n/middleware.rb#6 + def initialize(app); end + + # source://i18n//lib/i18n/middleware.rb#10 + def call(env); end +end + +# source://i18n//lib/i18n/exceptions.rb#98 +class I18n::MissingInterpolationArgument < ::I18n::ArgumentError + # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument + # + # source://i18n//lib/i18n/exceptions.rb#100 + def initialize(key, values, string); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#99 + def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#99 + def string; end + + # Returns the value of attribute values. + # + # source://i18n//lib/i18n/exceptions.rb#99 + def values; end +end + +# source://i18n//lib/i18n/exceptions.rb#46 +class I18n::MissingTranslation < ::I18n::ArgumentError + include ::I18n::MissingTranslation::Base +end + +# source://i18n//lib/i18n/exceptions.rb#47 +module I18n::MissingTranslation::Base + # source://i18n//lib/i18n/exceptions.rb#52 + def initialize(locale, key, options = T.unsafe(nil)); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#50 + def key; end + + # source://i18n//lib/i18n/exceptions.rb#57 + def keys; end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#50 + def locale; end + + # source://i18n//lib/i18n/exceptions.rb#63 + def message; end + + # source://i18n//lib/i18n/exceptions.rb#72 + def normalized_option(key); end + + # Returns the value of attribute options. + # + # source://i18n//lib/i18n/exceptions.rb#50 + def options; end + + # source://i18n//lib/i18n/exceptions.rb#78 + def to_exception; end + + # source://i18n//lib/i18n/exceptions.rb#76 + def to_s; end +end + +# source://i18n//lib/i18n/exceptions.rb#48 +I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#86 +class I18n::MissingTranslationData < ::I18n::ArgumentError + include ::I18n::MissingTranslation::Base +end + +# source://i18n//lib/i18n.rb#19 +I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#106 +class I18n::ReservedInterpolationKey < ::I18n::ArgumentError + # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey + # + # source://i18n//lib/i18n/exceptions.rb#108 + def initialize(key, string); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#107 + def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#107 + def string; end +end + +# source://i18n//lib/i18n/tests.rb#4 +module I18n::Tests; end + +# source://i18n//lib/i18n/tests/localization.rb#3 +module I18n::Tests::Localization + class << self + # @private + # + # source://i18n//lib/i18n/tests/localization.rb#9 + def included(base); end + end +end + +# source://i18n//lib/i18n/exceptions.rb#114 +class I18n::UnknownFileType < ::I18n::ArgumentError + # @return [UnknownFileType] a new instance of UnknownFileType + # + # source://i18n//lib/i18n/exceptions.rb#116 + def initialize(type, filename); end + + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#115 + def filename; end + + # Returns the value of attribute type. + # + # source://i18n//lib/i18n/exceptions.rb#115 + def type; end +end + +# source://i18n//lib/i18n/exceptions.rb#122 +class I18n::UnsupportedMethod < ::I18n::ArgumentError + # @return [UnsupportedMethod] a new instance of UnsupportedMethod + # + # source://i18n//lib/i18n/exceptions.rb#124 + def initialize(method, backend_klass, msg); end + + # Returns the value of attribute backend_klass. + # + # source://i18n//lib/i18n/exceptions.rb#123 + def backend_klass; end + + # Returns the value of attribute method. + # + # source://i18n//lib/i18n/exceptions.rb#123 + def method; end + + # Returns the value of attribute msg. + # + # source://i18n//lib/i18n/exceptions.rb#123 + def msg; end +end + +# source://i18n//lib/i18n/utils.rb#4 +module I18n::Utils + class << self + # source://i18n//lib/i18n/utils.rb#18 + def deep_merge(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#22 + def deep_merge!(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#34 + def deep_symbolize_keys(hash); end + + # source://i18n//lib/i18n/utils.rb#7 + def except(hash, *keys); end + + private + + # source://i18n//lib/i18n/utils.rb#43 + def deep_symbolize_keys_in_object(value); end + end +end + +# source://i18n//lib/i18n/version.rb#4 +I18n::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/io-console@0.8.2.rbi b/sorbet/rbi/gems/io-console@0.8.2.rbi new file mode 100644 index 0000000..73616ab --- /dev/null +++ b/sorbet/rbi/gems/io-console@0.8.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/json-schema@6.1.0.rbi b/sorbet/rbi/gems/json-schema@6.1.0.rbi new file mode 100644 index 0000000..048dbc8 --- /dev/null +++ b/sorbet/rbi/gems/json-schema@6.1.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json-schema` gem. +# Please instead update this file by running `bin/tapioca gem json-schema`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi new file mode 100644 index 0000000..5f91e74 --- /dev/null +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi new file mode 100644 index 0000000..789c5c9 --- /dev/null +++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi @@ -0,0 +1,119 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `lint_roller` gem. +# Please instead update this file by running `bin/tapioca gem lint_roller`. + + +# source://lint_roller//lib/lint_roller/context.rb#1 +module LintRoller; end + +# source://lint_roller//lib/lint_roller/context.rb#2 +class LintRoller::Context < ::Struct + # Returns the value of attribute engine + # + # @return [Object] the current value of engine + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def engine; end + + # Sets the attribute engine + # + # @param value [Object] the value to set the attribute engine to. + # @return [Object] the newly set value + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def engine=(_); end + + # Returns the value of attribute engine_version + # + # @return [Object] the current value of engine_version + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def engine_version; end + + # Sets the attribute engine_version + # + # @param value [Object] the value to set the attribute engine_version to. + # @return [Object] the newly set value + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def engine_version=(_); end + + # Returns the value of attribute rule_format + # + # @return [Object] the current value of rule_format + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def rule_format; end + + # Sets the attribute rule_format + # + # @param value [Object] the value to set the attribute rule_format to. + # @return [Object] the newly set value + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def rule_format=(_); end + + # Returns the value of attribute runner + # + # @return [Object] the current value of runner + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def runner; end + + # Sets the attribute runner + # + # @param value [Object] the value to set the attribute runner to. + # @return [Object] the newly set value + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def runner=(_); end + + # Returns the value of attribute runner_version + # + # @return [Object] the current value of runner_version + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def runner_version; end + + # Sets the attribute runner_version + # + # @param value [Object] the value to set the attribute runner_version to. + # @return [Object] the newly set value + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def runner_version=(_); end + + # Returns the value of attribute target_ruby_version + # + # @return [Object] the current value of target_ruby_version + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def target_ruby_version; end + + # Sets the attribute target_ruby_version + # + # @param value [Object] the value to set the attribute target_ruby_version to. + # @return [Object] the newly set value + # + # source://lint_roller//lib/lint_roller/context.rb#2 + def target_ruby_version=(_); end + + class << self + # source://lint_roller//lib/lint_roller/context.rb#2 + def [](*_arg0); end + + # source://lint_roller//lib/lint_roller/context.rb#2 + def inspect; end + + # source://lint_roller//lib/lint_roller/context.rb#2 + def keyword_init?; end + + # source://lint_roller//lib/lint_roller/context.rb#2 + def members; end + + # source://lint_roller//lib/lint_roller/context.rb#2 + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/loofah@2.25.0.rbi b/sorbet/rbi/gems/loofah@2.25.0.rbi new file mode 100644 index 0000000..4ff9aa2 --- /dev/null +++ b/sorbet/rbi/gems/loofah@2.25.0.rbi @@ -0,0 +1,1119 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `loofah` gem. +# Please instead update this file by running `bin/tapioca gem loofah`. + + +# == Strings and IO Objects as Input +# +# The following methods accept any IO object in addition to accepting a string: +# +# - Loofah.html4_document +# - Loofah.html4_fragment +# - Loofah.scrub_html4_document +# - Loofah.scrub_html4_fragment +# +# - Loofah.html5_document +# - Loofah.html5_fragment +# - Loofah.scrub_html5_document +# - Loofah.scrub_html5_fragment +# +# - Loofah.xml_document +# - Loofah.xml_fragment +# - Loofah.scrub_xml_document +# - Loofah.scrub_xml_fragment +# +# - Loofah.document +# - Loofah.fragment +# - Loofah.scrub_document +# - Loofah.scrub_fragment +# +# That IO object could be a file, or a socket, or a StringIO, or anything that responds to +read+ +# and +close+. +# +# source://loofah//lib/loofah.rb#5 +module Loofah + class << self + # Shortcut for Loofah::HTML4::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::Document.parse + # + # source://loofah//lib/loofah.rb#139 + def document(*args, &block); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::DocumentFragment.parse + # + # source://loofah//lib/loofah.rb#140 + def fragment(*args, &block); end + + # Shortcut for Loofah::HTML4::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::Document.parse + # + # source://loofah//lib/loofah.rb#76 + def html4_document(*args, &block); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::HTML4::DocumentFragment.parse + # + # source://loofah//lib/loofah.rb#83 + def html4_fragment(*args, &block); end + + # source://loofah//lib/loofah.rb#101 + def html5_document(*args, &block); end + + # source://loofah//lib/loofah.rb#108 + def html5_fragment(*args, &block); end + + # @return [Boolean] + # + # source://loofah//lib/loofah.rb#7 + def html5_support?; end + + # A helper to remove extraneous whitespace from text-ified HTML + # + # source://loofah//lib/loofah.rb#169 + def remove_extraneous_whitespace(string); end + + # Shortcut for Loofah::HTML4::Document.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#141 + def scrub_document(string_or_io, method); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#142 + def scrub_fragment(string_or_io, method); end + + # Shortcut for Loofah::HTML4::Document.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#88 + def scrub_html4_document(string_or_io, method); end + + # Shortcut for Loofah::HTML4::DocumentFragment.parse(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#93 + def scrub_html4_fragment(string_or_io, method); end + + # source://loofah//lib/loofah.rb#113 + def scrub_html5_document(string_or_io, method); end + + # source://loofah//lib/loofah.rb#118 + def scrub_html5_fragment(string_or_io, method); end + + # Shortcut for Loofah.xml_document(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#164 + def scrub_xml_document(string_or_io, method); end + + # Shortcut for Loofah.xml_fragment(string_or_io).scrub!(method) + # + # source://loofah//lib/loofah.rb#159 + def scrub_xml_fragment(string_or_io, method); end + + # Shortcut for Loofah::XML::Document.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::XML::Document.parse + # + # source://loofah//lib/loofah.rb#147 + def xml_document(*args, &block); end + + # Shortcut for Loofah::XML::DocumentFragment.parse(*args, &block) + # + # This method accepts the same parameters as Nokogiri::XML::DocumentFragment.parse + # + # source://loofah//lib/loofah.rb#154 + def xml_fragment(*args, &block); end + end +end + +# source://loofah//lib/loofah/concerns.rb#125 +module Loofah::DocumentDecorator + # source://loofah//lib/loofah/concerns.rb#126 + def initialize(*args, &block); end +end + +# source://loofah//lib/loofah/elements.rb#6 +module Loofah::Elements; end + +# source://loofah//lib/loofah/elements.rb#93 +Loofah::Elements::BLOCK_LEVEL = T.let(T.unsafe(nil), Set) + +# Elements that aren't block but should generate a newline in #to_text +# +# source://loofah//lib/loofah/elements.rb#90 +Loofah::Elements::INLINE_LINE_BREAK = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/elements.rb#94 +Loofah::Elements::LINEBREAKERS = T.let(T.unsafe(nil), Set) + +# The following elements may also be considered block-level +# elements since they may contain block-level elements +# +# source://loofah//lib/loofah/elements.rb#76 +Loofah::Elements::LOOSE_BLOCK_LEVEL = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/elements.rb#92 +Loofah::Elements::STRICT_BLOCK_LEVEL = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/elements.rb#7 +Loofah::Elements::STRICT_BLOCK_LEVEL_HTML4 = T.let(T.unsafe(nil), Set) + +# https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements +# +# source://loofah//lib/loofah/elements.rb#35 +Loofah::Elements::STRICT_BLOCK_LEVEL_HTML5 = T.let(T.unsafe(nil), Set) + +# Alias for Loofah::HTML4 +# +# source://loofah//lib/loofah.rb#70 +Loofah::HTML = Loofah::HTML4 + +# source://loofah//lib/loofah/html4/document.rb#4 +module Loofah::HTML4; end + +# Subclass of Nokogiri::HTML4::Document. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html4/document.rb#10 +class Loofah::HTML4::Document < ::Nokogiri::HTML4::Document + include ::Loofah::ScrubBehavior::Node + include ::Loofah::DocumentDecorator + include ::Loofah::TextBehavior + include ::Loofah::HtmlDocumentBehavior + extend ::Loofah::HtmlDocumentBehavior::ClassMethods +end + +# Subclass of Nokogiri::HTML4::DocumentFragment. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html4/document_fragment.rb#10 +class Loofah::HTML4::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment + include ::Loofah::TextBehavior + include ::Loofah::HtmlFragmentBehavior + extend ::Loofah::HtmlFragmentBehavior::ClassMethods +end + +# source://loofah//lib/loofah/html5/safelist.rb#6 +module Loofah::HTML5; end + +# Subclass of Nokogiri::HTML5::Document. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html5/document.rb#10 +class Loofah::HTML5::Document < ::Nokogiri::HTML5::Document + include ::Loofah::ScrubBehavior::Node + include ::Loofah::DocumentDecorator + include ::Loofah::TextBehavior + include ::Loofah::HtmlDocumentBehavior + extend ::Loofah::HtmlDocumentBehavior::ClassMethods +end + +# Subclass of Nokogiri::HTML5::DocumentFragment. +# +# See Loofah::ScrubBehavior and Loofah::TextBehavior for additional methods. +# +# source://loofah//lib/loofah/html5/document_fragment.rb#10 +class Loofah::HTML5::DocumentFragment < ::Nokogiri::HTML5::DocumentFragment + include ::Loofah::TextBehavior + include ::Loofah::HtmlFragmentBehavior + extend ::Loofah::HtmlFragmentBehavior::ClassMethods +end + +# source://loofah//lib/loofah/html5/safelist.rb#49 +module Loofah::HTML5::SafeList; end + +# source://loofah//lib/loofah/html5/safelist.rb#232 +Loofah::HTML5::SafeList::ACCEPTABLE_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# https://www.w3.org/TR/css-color-3/#html4 +# +# source://loofah//lib/loofah/html5/safelist.rb#738 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_COLORS = T.let(T.unsafe(nil), Set) + +# https://www.w3.org/TR/css-color-3/#svg-color +# +# source://loofah//lib/loofah/html5/safelist.rb#758 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_EXTENDED_COLORS = T.let(T.unsafe(nil), Set) + +# see https://www.quackit.com/css/functions/ +# omit `url` and `image` from that list +# +# source://loofah//lib/loofah/html5/safelist.rb#910 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#699 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#626 +Loofah::HTML5::SafeList::ACCEPTABLE_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#50 +Loofah::HTML5::SafeList::ACCEPTABLE_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#983 +Loofah::HTML5::SafeList::ACCEPTABLE_PROTOCOLS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#970 +Loofah::HTML5::SafeList::ACCEPTABLE_SVG_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1014 +Loofah::HTML5::SafeList::ACCEPTABLE_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1024 +Loofah::HTML5::SafeList::ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1027 +Loofah::HTML5::SafeList::ALLOWED_CSS_FUNCTIONS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1026 +Loofah::HTML5::SafeList::ALLOWED_CSS_KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1025 +Loofah::HTML5::SafeList::ALLOWED_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) + +# subclasses may define their own versions of these constants +# +# source://loofah//lib/loofah/html5/safelist.rb#1023 +Loofah::HTML5::SafeList::ALLOWED_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1048 +Loofah::HTML5::SafeList::ALLOWED_ELEMENTS_WITH_LIBXML2 = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1029 +Loofah::HTML5::SafeList::ALLOWED_PROTOCOLS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1028 +Loofah::HTML5::SafeList::ALLOWED_SVG_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#1030 +Loofah::HTML5::SafeList::ALLOWED_URI_DATA_MEDIATYPES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#526 +Loofah::HTML5::SafeList::ARIA_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#582 +Loofah::HTML5::SafeList::ATTR_VAL_IS_URI = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#315 +Loofah::HTML5::SafeList::MATHML_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#147 +Loofah::HTML5::SafeList::MATHML_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#981 +Loofah::HTML5::SafeList::PROTOCOL_SEPARATOR = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/safelist.rb#963 +Loofah::HTML5::SafeList::SHORTHAND_CSS_PROPERTIES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#608 +Loofah::HTML5::SafeList::SVG_ALLOW_LOCAL_HREF = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#367 +Loofah::HTML5::SafeList::SVG_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#594 +Loofah::HTML5::SafeList::SVG_ATTR_VAL_ALLOWS_REF = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/safelist.rb#183 +Loofah::HTML5::SafeList::SVG_ELEMENTS = T.let(T.unsafe(nil), Set) + +# additional tags we should consider safe since we have libxml2 fixing up our documents. +# +# source://loofah//lib/loofah/html5/safelist.rb#1043 +Loofah::HTML5::SafeList::TAGS_SAFE_WITH_LIBXML2 = T.let(T.unsafe(nil), Set) + +# TODO: remove VOID_ELEMENTS in a future major release +# and put it in the tests (it is used only for testing, not for functional behavior) +# +# source://loofah//lib/loofah/html5/safelist.rb#1034 +Loofah::HTML5::SafeList::VOID_ELEMENTS = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/scrub.rb#9 +module Loofah::HTML5::Scrub + class << self + # @return [Boolean] + # + # source://loofah//lib/loofah/html5/scrub.rb#20 + def allowed_element?(element_name); end + + # Returns true if the given URI string is safe, false otherwise. + # This method can be used to validate URI attribute values without + # requiring a Nokogiri DOM node. + # + # @return [Boolean] + # + # source://loofah//lib/loofah/html5/scrub.rb#147 + def allowed_uri?(uri_string); end + + # source://loofah//lib/loofah/html5/scrub.rb#204 + def cdata_escape(node); end + + # @return [Boolean] + # + # source://loofah//lib/loofah/html5/scrub.rb#199 + def cdata_needs_escaping?(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#219 + def escape_tags(string); end + + # libxml2 >= 2.9.2 fails to escape comments within some attributes. + # + # see comments about CVE-2018-8048 within the tests for more information + # + # source://loofah//lib/loofah/html5/scrub.rb#178 + def force_correct_attribute_escaping!(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#125 + def scrub_attribute_that_allows_local_ref(attr_node); end + + # alternative implementation of the html5lib attribute scrubbing algorithm + # + # source://loofah//lib/loofah/html5/scrub.rb#25 + def scrub_attributes(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#74 + def scrub_css(style); end + + # source://loofah//lib/loofah/html5/scrub.rb#69 + def scrub_css_attribute(node); end + + # source://loofah//lib/loofah/html5/scrub.rb#164 + def scrub_uri_attribute(attr_node); end + end +end + +# source://loofah//lib/loofah/html5/scrub.rb#10 +Loofah::HTML5::Scrub::CONTROL_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/scrub.rb#12 +Loofah::HTML5::Scrub::CRASS_SEMICOLON = T.let(T.unsafe(nil), Hash) + +# source://loofah//lib/loofah/html5/scrub.rb#13 +Loofah::HTML5::Scrub::CSS_IMPORTANT = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/html5/scrub.rb#11 +Loofah::HTML5::Scrub::CSS_KEYWORDISH = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/scrub.rb#15 +Loofah::HTML5::Scrub::CSS_PROPERTY_STRING_WITHOUT_EMBEDDED_QUOTES = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/scrub.rb#14 +Loofah::HTML5::Scrub::CSS_WHITESPACE = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/html5/scrub.rb#16 +Loofah::HTML5::Scrub::DATA_ATTRIBUTE_NAME = T.let(T.unsafe(nil), Regexp) + +# RFC 3986 +# +# source://loofah//lib/loofah/html5/scrub.rb#17 +Loofah::HTML5::Scrub::URI_PROTOCOL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://loofah//lib/loofah/html5/safelist.rb#1051 +Loofah::HTML5::WhiteList = Loofah::HTML5::SafeList + +# source://loofah//lib/loofah/concerns.rb#133 +module Loofah::HtmlDocumentBehavior + mixes_in_class_methods ::Loofah::HtmlDocumentBehavior::ClassMethods + + # source://loofah//lib/loofah/concerns.rb#164 + def serialize_root; end + + class << self + # @private + # + # source://loofah//lib/loofah/concerns.rb#159 + def included(base); end + end +end + +# source://loofah//lib/loofah/concerns.rb#134 +module Loofah::HtmlDocumentBehavior::ClassMethods + # source://loofah//lib/loofah/concerns.rb#135 + def parse(*args, &block); end + + private + + # remove comments that exist outside of the HTML element. + # + # these comments are allowed by the HTML spec: + # + # https://www.w3.org/TR/html401/struct/global.html#h-7.1 + # + # but are not scrubbed by Loofah because these nodes don't meet + # the contract that scrubbers expect of a node (e.g., it can be + # replaced, sibling and children nodes can be created). + # + # source://loofah//lib/loofah/concerns.rb#150 + def remove_comments_before_html_element(doc); end +end + +# source://loofah//lib/loofah/concerns.rb#169 +module Loofah::HtmlFragmentBehavior + mixes_in_class_methods ::Loofah::HtmlFragmentBehavior::ClassMethods + + # source://loofah//lib/loofah/concerns.rb#201 + def serialize; end + + # source://loofah//lib/loofah/concerns.rb#203 + def serialize_root; end + + # source://loofah//lib/loofah/concerns.rb#197 + def to_s; end + + class << self + # @private + # + # source://loofah//lib/loofah/concerns.rb#192 + def included(base); end + end +end + +# source://loofah//lib/loofah/concerns.rb#170 +module Loofah::HtmlFragmentBehavior::ClassMethods + # source://loofah//lib/loofah/concerns.rb#180 + def document_klass; end + + # source://loofah//lib/loofah/concerns.rb#171 + def parse(tags, encoding = T.unsafe(nil)); end +end + +# constants related to working around unhelpful libxml2 behavior +# +# ಠ_ಠ +# +# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#12 +module Loofah::LibxmlWorkarounds; end + +# these attributes and qualifying parent tags are determined by the code at: +# +# https://git.gnome.org/browse/libxml2/tree/HTMLtree.c?h=v2.9.2#n714 +# +# see comments about CVE-2018-8048 within the tests for more information +# +# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#20 +Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# source://loofah//lib/loofah/html5/libxml2_workarounds.rb#26 +Loofah::LibxmlWorkarounds::BROKEN_ESCAPING_ATTRIBUTES_QUALIFYING_TAG = T.let(T.unsafe(nil), Hash) + +# source://loofah//lib/loofah/metahelpers.rb#4 +module Loofah::MetaHelpers + class << self + # source://loofah//lib/loofah/metahelpers.rb#6 + def add_downcased_set_members_to_all_set_constants(mojule); end + end +end + +# Mixes +scrub!+ into Document, DocumentFragment, Node and NodeSet. +# +# Traverse the document or fragment, invoking the +scrubber+ on each node. +# +# +scrubber+ must either be one of the symbols representing the built-in scrubbers (see +# Scrubbers), or a Scrubber instance. +# +# span2div = Loofah::Scrubber.new do |node| +# node.name = "div" if node.name == "span" +# end +# Loofah.html5_fragment("foo

    bar

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

    bar

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

    bar

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

    bar

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

    Some text with an unprintable character at the end\u2028

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

    Some text with an unprintable character at the end

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

    tag. These characters can cause issues if +# the content is ever parsed by JavaScript - more information here: +# +# http://timelessrepo.com/json-isnt-a-javascript-subset +# +# source://loofah//lib/loofah/scrubbers.rb#104 +module Loofah::Scrubbers + class << self + # Returns an array of symbols representing the built-in scrubbers + # + # source://loofah//lib/loofah/scrubbers.rb#425 + def scrubber_symbols; end + end +end + +# === scrub!(:double_breakpoint) +# +# +:double_breakpoint+ replaces double-break tags with closing/opening paragraph tags. +# +# markup = "

    Some text here in a logical paragraph.

    Some more text, apparently a second paragraph.

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

    Some text here in a logical paragraph.

    Some more text, apparently a second paragraph.

    " +# +# source://loofah//lib/loofah/scrubbers.rb#362 +class Loofah::Scrubbers::DoubleBreakpoint < ::Loofah::Scrubber + # @return [DoubleBreakpoint] a new instance of DoubleBreakpoint + # + # source://loofah//lib/loofah/scrubbers.rb#363 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#367 + def scrub(node); end + + private + + # source://loofah//lib/loofah/scrubbers.rb#400 + def remove_blank_text_nodes(node); end +end + +# === scrub!(:escape) +# +# +:escape+ performs HTML entity escaping on the unknown/unsafe tags: +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:escape) +# => "ohai!
    div is safe
    <foo>but foo is <b>not</b></foo>" +# +# source://loofah//lib/loofah/scrubbers.rb#159 +class Loofah::Scrubbers::Escape < ::Loofah::Scrubber + # @return [Escape] a new instance of Escape + # + # source://loofah//lib/loofah/scrubbers.rb#160 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#164 + def scrub(node); end +end + +# A hash that maps a symbol (like +:prune+) to the appropriate Scrubber (Loofah::Scrubbers::Prune). +# +# source://loofah//lib/loofah/scrubbers.rb#407 +Loofah::Scrubbers::MAP = T.let(T.unsafe(nil), Hash) + +# This class probably isn't useful publicly, but is used for #to_text's current implemention +# +# source://loofah//lib/loofah/scrubbers.rb#307 +class Loofah::Scrubbers::NewlineBlockElements < ::Loofah::Scrubber + # @return [NewlineBlockElements] a new instance of NewlineBlockElements + # + # source://loofah//lib/loofah/scrubbers.rb#308 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#312 + def scrub(node); end +end + +# === scrub!(:nofollow) +# +# +:nofollow+ adds a rel="nofollow" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:nofollow) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#220 +class Loofah::Scrubbers::NoFollow < ::Loofah::Scrubber + # @return [NoFollow] a new instance of NoFollow + # + # source://loofah//lib/loofah/scrubbers.rb#221 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#225 + def scrub(node); end +end + +# === scrub!(:noopener) +# +# +:noopener+ adds a rel="noopener" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noopener) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#271 +class Loofah::Scrubbers::NoOpener < ::Loofah::Scrubber + # @return [NoOpener] a new instance of NoOpener + # + # source://loofah//lib/loofah/scrubbers.rb#272 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#276 + def scrub(node); end +end + +# === scrub!(:noreferrer) +# +# +:noreferrer+ adds a rel="noreferrer" attribute to all links +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:noreferrer) +# => "ohai! I like your blog post" +# +# source://loofah//lib/loofah/scrubbers.rb#293 +class Loofah::Scrubbers::NoReferrer < ::Loofah::Scrubber + # @return [NoReferrer] a new instance of NoReferrer + # + # source://loofah//lib/loofah/scrubbers.rb#294 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#298 + def scrub(node); end +end + +# === scrub!(:prune) +# +# +:prune+ removes unknown/unsafe tags and their contents (including their subtrees): +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:prune) +# => "ohai!
    div is safe
    " +# +# source://loofah//lib/loofah/scrubbers.rb#137 +class Loofah::Scrubbers::Prune < ::Loofah::Scrubber + # @return [Prune] a new instance of Prune + # + # source://loofah//lib/loofah/scrubbers.rb#138 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#142 + def scrub(node); end +end + +# === scrub!(:strip) +# +# +:strip+ removes unknown/unsafe tags, but leaves behind the pristine contents: +# +# unsafe_html = "ohai!
    div is safe
    but foo is not" +# Loofah.html5_fragment(unsafe_html).scrub!(:strip) +# => "ohai!
    div is safe
    but foo is not" +# +# source://loofah//lib/loofah/scrubbers.rb#114 +class Loofah::Scrubbers::Strip < ::Loofah::Scrubber + # @return [Strip] a new instance of Strip + # + # source://loofah//lib/loofah/scrubbers.rb#115 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#119 + def scrub(node); end +end + +# === scrub!(:targetblank) +# +# +:targetblank+ adds a target="_blank" attribute to all links. +# If there is a target already set, replaces it with target="_blank". +# +# link_farmers_markup = "ohai! I like your blog post" +# Loofah.html5_fragment(link_farmers_markup).scrub!(:targetblank) +# => "ohai! I like your blog post" +# +# On modern browsers, setting target="_blank" on anchor elements implicitly provides the same +# behavior as setting rel="noopener". +# +# source://loofah//lib/loofah/scrubbers.rb#246 +class Loofah::Scrubbers::TargetBlank < ::Loofah::Scrubber + # @return [TargetBlank] a new instance of TargetBlank + # + # source://loofah//lib/loofah/scrubbers.rb#247 + def initialize; end + + # source://loofah//lib/loofah/scrubbers.rb#251 + def scrub(node); end +end + +# === scrub!(:unprintable) +# +# +:unprintable+ removes unprintable Unicode characters. +# +# markup = "

    Some text with an unprintable character at the end\u2028

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

    Some text with an unprintable character at the end

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

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

    Title

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

    Title

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

    Title

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

    Title

    Content
    Next line
    ").to_text + # # => "\nTitle\n\nContent\nNext line\n" + # + # source://loofah//lib/loofah/concerns.rb#120 + def to_text(options = T.unsafe(nil)); end +end + +# The version of Loofah you are using +# +# source://loofah//lib/loofah/version.rb#5 +Loofah::VERSION = T.let(T.unsafe(nil), String) + +# source://loofah//lib/loofah/xml/document.rb#4 +module Loofah::XML; end + +# Subclass of Nokogiri::XML::Document. +# +# See Loofah::ScrubBehavior and Loofah::DocumentDecorator for additional methods. +# +# source://loofah//lib/loofah/xml/document.rb#10 +class Loofah::XML::Document < ::Nokogiri::XML::Document + include ::Loofah::ScrubBehavior::Node + include ::Loofah::DocumentDecorator +end + +# Subclass of Nokogiri::XML::DocumentFragment. +# +# See Loofah::ScrubBehavior for additional methods. +# +# source://loofah//lib/loofah/xml/document_fragment.rb#10 +class Loofah::XML::DocumentFragment < ::Nokogiri::XML::DocumentFragment + class << self + # source://loofah//lib/loofah/xml/document_fragment.rb#12 + def parse(tags); end + end +end diff --git a/sorbet/rbi/gems/mcp@0.8.0.rbi b/sorbet/rbi/gems/mcp@0.8.0.rbi new file mode 100644 index 0000000..26f0769 --- /dev/null +++ b/sorbet/rbi/gems/mcp@0.8.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `mcp` gem. +# Please instead update this file by running `bin/tapioca gem mcp`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/method_source@1.1.0.rbi b/sorbet/rbi/gems/method_source@1.1.0.rbi new file mode 100644 index 0000000..6010d0b --- /dev/null +++ b/sorbet/rbi/gems/method_source@1.1.0.rbi @@ -0,0 +1,304 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `method_source` gem. +# Please instead update this file by running `bin/tapioca gem method_source`. + + +# source://method_source//lib/method_source.rb#163 +class Method + include ::MethodSource::SourceLocation::MethodExtensions + include ::MethodSource::MethodExtensions +end + +# source://method_source//lib/method_source/version.rb#1 +module MethodSource + extend ::MethodSource::CodeHelpers + + class << self + # Clear cache. + # + # source://method_source//lib/method_source.rb#59 + def clear_cache; end + + # Helper method responsible for opening source file and buffering up + # the comments for a specified method. Defined here to avoid polluting + # `Method` class. + # + # @param method_name [String] + # @param source_location [Array] The array returned by Method#source_location + # @raise [SourceNotFoundError] + # @return [String] The comments up to the point of the method. + # + # source://method_source//lib/method_source.rb#38 + def comment_helper(source_location, name = T.unsafe(nil)); end + + # @deprecated — use MethodSource::CodeHelpers#expression_at + # + # source://method_source//lib/method_source.rb#71 + def extract_code(source_location); end + + # Load a memoized copy of the lines in a file. + # + # @param file_name [String] + # @param method_name [String] + # @raise [SourceNotFoundError] + # @return [Array] the contents of the file + # + # source://method_source//lib/method_source.rb#51 + def lines_for(file_name, name = T.unsafe(nil)); end + + # Helper method responsible for extracting method body. + # Defined here to avoid polluting `Method` class. + # + # @param method_name [String] + # @param source_location [Array] The array returned by Method#source_location + # @return [String] The method body + # + # source://method_source//lib/method_source.rb#23 + def source_helper(source_location, name = T.unsafe(nil)); end + + # @deprecated — use MethodSource::CodeHelpers#complete_expression? + # @return [Boolean] + # + # source://method_source//lib/method_source.rb#64 + def valid_expression?(str); end + end +end + +# source://method_source//lib/method_source/code_helpers.rb#3 +module MethodSource::CodeHelpers + # Retrieve the comment describing the expression on the given line of the given file. + # + # This is useful to get module or method documentation. + # + # @param file [Array, File, String] The file to parse, either as a File or as + # a String or an Array of lines. + # @param line_number [Integer] The line number at which to look. + # NOTE: The first line in a file is line 1! + # @return [String] The comment + # + # source://method_source//lib/method_source/code_helpers.rb#52 + def comment_describing(file, line_number); end + + # Determine if a string of code is a complete Ruby expression. + # + # @example + # complete_expression?("class Hello") #=> false + # complete_expression?("class Hello; end") #=> true + # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER + # @param code [String] The code to validate. + # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. + # @return [Boolean] Whether or not the code is a complete Ruby expression. + # + # source://method_source//lib/method_source/code_helpers.rb#66 + def complete_expression?(str); end + + # Retrieve the first expression starting on the given line of the given file. + # + # This is useful to get module or method source code. + # + # line 1! + # + # @option options + # @option options + # @param file [Array, File, String] The file to parse, either as a File or as + # @param line_number [Integer] The line number at which to look. + # NOTE: The first line in a file is + # @param options [Hash] The optional configuration parameters. + # @raise [SyntaxError] If the first complete expression can't be identified + # @return [String] The first complete expression + # + # source://method_source//lib/method_source/code_helpers.rb#20 + def expression_at(file, line_number, options = T.unsafe(nil)); end + + private + + # Get the first expression from the input. + # + # @param consume [Integer] A number of lines to automatically + # consume (add to the expression buffer) without checking for validity. + # @param lines [Array] + # @raise [SyntaxError] + # @return [String] a valid ruby expression + # @yield a clean-up function to run before checking for complete_expression + # + # source://method_source//lib/method_source/code_helpers.rb#92 + def extract_first_expression(lines, consume = T.unsafe(nil), &block); end + + # Get the last comment from the input. + # + # @param lines [Array] + # @return [String] + # + # source://method_source//lib/method_source/code_helpers.rb#106 + def extract_last_comment(lines); end +end + +# An exception matcher that matches only subsets of SyntaxErrors that can be +# fixed by adding more input to the buffer. +# +# source://method_source//lib/method_source/code_helpers.rb#124 +module MethodSource::CodeHelpers::IncompleteExpression + class << self + # source://method_source//lib/method_source/code_helpers.rb#137 + def ===(ex); end + + # @return [Boolean] + # + # source://method_source//lib/method_source/code_helpers.rb#149 + def rbx?; end + end +end + +# source://method_source//lib/method_source/code_helpers.rb#125 +MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) + +# source://method_source//lib/method_source/code_helpers.rb#133 +MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) + +# This module is to be included by `Method` and `UnboundMethod` and +# provides the `#source` functionality +# +# source://method_source//lib/method_source.rb#77 +module MethodSource::MethodExtensions + # Return the comments associated with the method class/module. + # + # @example + # MethodSource::MethodExtensions.method(:included).module_comment + # => + # # This module is to be included by `Method` and `UnboundMethod` and + # # provides the `#source` functionality + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#139 + def class_comment; end + + # Return the comments associated with the method as a string. + # + # @example + # Set.instance_method(:clear).comment.display + # => + # # Removes all elements and returns self. + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#126 + def comment; end + + # Return the comments associated with the method class/module. + # + # @example + # MethodSource::MethodExtensions.method(:included).module_comment + # => + # # This module is to be included by `Method` and `UnboundMethod` and + # # provides the `#source` functionality + # @raise SourceNotFoundException + # @return [String] The method's comments as a string + # + # source://method_source//lib/method_source.rb#159 + def module_comment; end + + # Return the sourcecode for the method as a string + # + # @example + # Set.instance_method(:clear).source.display + # => + # def clear + # @hash.clear + # self + # end + # @raise SourceNotFoundException + # @return [String] The method sourcecode as a string + # + # source://method_source//lib/method_source.rb#114 + def source; end + + class << self + # We use the included hook to patch Method#source on rubinius. + # We need to use the included hook as Rubinius defines a `source` + # on Method so including a module will have no effect (as it's + # higher up the MRO). + # + # @param klass [Class] The class that includes the module. + # + # source://method_source//lib/method_source.rb#84 + def included(klass); end + end +end + +# source://method_source//lib/method_source/source_location.rb#2 +module MethodSource::ReeSourceLocation + # Ruby enterprise edition provides all the information that's + # needed, in a slightly different way. + # + # source://method_source//lib/method_source/source_location.rb#5 + def source_location; end +end + +# source://method_source//lib/method_source/source_location.rb#10 +module MethodSource::SourceLocation; end + +# source://method_source//lib/method_source/source_location.rb#11 +module MethodSource::SourceLocation::MethodExtensions + # Return the source location of a method for Ruby 1.8. + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # method definition is found. + # + # source://method_source//lib/method_source/source_location.rb#40 + def source_location; end + + private + + # source://method_source//lib/method_source/source_location.rb#26 + def trace_func(event, file, line, id, binding, classname); end +end + +# source://method_source//lib/method_source/source_location.rb#54 +module MethodSource::SourceLocation::ProcExtensions + # Return the source location for a Proc (in implementations + # without Proc#source_location) + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # proc definition is found. + # + # source://method_source//lib/method_source/source_location.rb#74 + def source_location; end +end + +# source://method_source//lib/method_source/source_location.rb#81 +module MethodSource::SourceLocation::UnboundMethodExtensions + # Return the source location of an instance method for Ruby 1.8. + # + # @return [Array] A two element array. First element is the + # file, second element is the line in the file where the + # method definition is found. + # + # source://method_source//lib/method_source/source_location.rb#101 + def source_location; end +end + +# An Exception to mark errors that were raised trying to find the source from +# a given source_location. +# +# source://method_source//lib/method_source.rb#16 +class MethodSource::SourceNotFoundError < ::StandardError; end + +# source://method_source//lib/method_source/version.rb#2 +MethodSource::VERSION = T.let(T.unsafe(nil), String) + +# source://method_source//lib/method_source.rb#173 +class Proc + include ::MethodSource::SourceLocation::ProcExtensions + include ::MethodSource::MethodExtensions +end + +# source://method_source//lib/method_source.rb#168 +class UnboundMethod + include ::MethodSource::SourceLocation::UnboundMethodExtensions + include ::MethodSource::MethodExtensions +end diff --git a/sorbet/rbi/gems/minitest@5.16.3.rbi b/sorbet/rbi/gems/minitest@5.16.3.rbi deleted file mode 100644 index 8a4ceb6..0000000 --- a/sorbet/rbi/gems/minitest@5.16.3.rbi +++ /dev/null @@ -1,348 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `minitest` gem. -# Please instead update this file by running `bin/tapioca gem minitest`. - -module Minitest - class << self - def __run(reporter, options); end - def after_run(&block); end - def autorun; end - def backtrace_filter; end - def backtrace_filter=(_arg0); end - def cattr_accessor(name); end - def clock_time; end - def extensions; end - def extensions=(_arg0); end - def filter_backtrace(bt); end - def info_signal; end - def info_signal=(_arg0); end - def init_plugins(options); end - def load_plugins; end - def parallel_executor; end - def parallel_executor=(_arg0); end - def process_args(args = T.unsafe(nil)); end - def reporter; end - def reporter=(_arg0); end - def run(args = T.unsafe(nil)); end - def run_one_method(klass, method_name); end - def seed; end - def seed=(_arg0); end - end -end - -class Minitest::AbstractReporter - include ::Mutex_m - - def lock; end - def locked?; end - def passed?; end - def prerecord(klass, name); end - def record(result); end - def report; end - def start; end - def synchronize(&block); end - def try_lock; end - def unlock; end -end - -class Minitest::Assertion < ::Exception - def error; end - def location; end - def result_code; end - def result_label; end -end - -module Minitest::Assertions - def _synchronize; end - def assert(test, msg = T.unsafe(nil)); end - def assert_empty(obj, msg = T.unsafe(nil)); end - def assert_equal(exp, act, msg = T.unsafe(nil)); end - def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_includes(collection, obj, msg = T.unsafe(nil)); end - def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end - def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end - def assert_match(matcher, obj, msg = T.unsafe(nil)); end - def assert_nil(obj, msg = T.unsafe(nil)); end - def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end - def assert_path_exists(path, msg = T.unsafe(nil)); end - def assert_predicate(o1, op, msg = T.unsafe(nil)); end - def assert_raises(*exp); end - def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end - def assert_same(exp, act, msg = T.unsafe(nil)); end - def assert_send(send_ary, m = T.unsafe(nil)); end - def assert_silent; end - def assert_throws(sym, msg = T.unsafe(nil)); end - def capture_io; end - def capture_subprocess_io; end - def diff(exp, act); end - def exception_details(e, msg); end - def fail_after(y, m, d, msg); end - def flunk(msg = T.unsafe(nil)); end - def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end - def mu_pp(obj); end - def mu_pp_for_diff(obj); end - def pass(_msg = T.unsafe(nil)); end - def refute(test, msg = T.unsafe(nil)); end - def refute_empty(obj, msg = T.unsafe(nil)); end - def refute_equal(exp, act, msg = T.unsafe(nil)); end - def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - def refute_includes(collection, obj, msg = T.unsafe(nil)); end - def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end - def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end - def refute_match(matcher, obj, msg = T.unsafe(nil)); end - def refute_nil(obj, msg = T.unsafe(nil)); end - def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - def refute_path_exists(path, msg = T.unsafe(nil)); end - def refute_predicate(o1, op, msg = T.unsafe(nil)); end - def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end - def refute_same(exp, act, msg = T.unsafe(nil)); end - def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end - def skip_until(y, m, d, msg); end - def skipped?; end - def things_to_diff(exp, act); end - - class << self - def diff; end - def diff=(o); end - end -end - -Minitest::Assertions::E = T.let(T.unsafe(nil), String) -Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) - -class Minitest::BacktraceFilter - def filter(bt); end -end - -Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) - -class Minitest::CompositeReporter < ::Minitest::AbstractReporter - def initialize(*reporters); end - - def <<(reporter); end - def io; end - def passed?; end - def prerecord(klass, name); end - def record(result); end - def report; end - def reporters; end - def reporters=(_arg0); end - def start; end -end - -module Minitest::Guard - def jruby?(platform = T.unsafe(nil)); end - def maglev?(platform = T.unsafe(nil)); end - def mri?(platform = T.unsafe(nil)); end - def osx?(platform = T.unsafe(nil)); end - def rubinius?(platform = T.unsafe(nil)); end - def windows?(platform = T.unsafe(nil)); end -end - -module Minitest::Parallel; end - -class Minitest::Parallel::Executor - def initialize(size); end - - def <<(work); end - def shutdown; end - def size; end - def start; end -end - -module Minitest::Parallel::Test - def _synchronize; end -end - -module Minitest::Parallel::Test::ClassMethods - def run_one_method(klass, method_name, reporter); end - def test_order; end -end - -class Minitest::ProgressReporter < ::Minitest::Reporter - def prerecord(klass, name); end - def record(result); end -end - -module Minitest::Reportable - def class_name; end - def error?; end - def location; end - def passed?; end - def result_code; end - def skipped?; end -end - -class Minitest::Reporter < ::Minitest::AbstractReporter - def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end - - def io; end - def io=(_arg0); end - def options; end - def options=(_arg0); end -end - -class Minitest::Result < ::Minitest::Runnable - include ::Minitest::Reportable - - def class_name; end - def klass; end - def klass=(_arg0); end - def source_location; end - def source_location=(_arg0); end - def to_s; end - - class << self - def from(runnable); end - end -end - -class Minitest::Runnable - def initialize(name); end - - def assertions; end - def assertions=(_arg0); end - def failure; end - def failures; end - def failures=(_arg0); end - def marshal_dump; end - def marshal_load(ary); end - def name; end - def name=(o); end - def passed?; end - def result_code; end - def run; end - def skipped?; end - def time; end - def time=(_arg0); end - def time_it; end - - class << self - def inherited(klass); end - def methods_matching(re); end - def on_signal(name, action); end - def reset; end - def run(reporter, options = T.unsafe(nil)); end - def run_one_method(klass, method_name, reporter); end - def runnable_methods; end - def runnables; end - def with_info_handler(reporter, &block); end - end -end - -Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) - -class Minitest::Skip < ::Minitest::Assertion - def result_label; end -end - -class Minitest::StatisticsReporter < ::Minitest::Reporter - def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end - - def assertions; end - def assertions=(_arg0); end - def count; end - def count=(_arg0); end - def errors; end - def errors=(_arg0); end - def failures; end - def failures=(_arg0); end - def passed?; end - def record(result); end - def report; end - def results; end - def results=(_arg0); end - def skips; end - def skips=(_arg0); end - def start; end - def start_time; end - def start_time=(_arg0); end - def total_time; end - def total_time=(_arg0); end -end - -class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - def aggregated_results(io); end - def old_sync; end - def old_sync=(_arg0); end - def report; end - def start; end - def statistics; end - def summary; end - def sync; end - def sync=(_arg0); end - def to_s; end - - private - - def binary_string; end -end - -class Minitest::Test < ::Minitest::Runnable - include ::Minitest::Assertions - include ::Minitest::Reportable - include ::Minitest::Test::LifecycleHooks - include ::Minitest::Guard - extend ::Minitest::Guard - - def capture_exceptions; end - def class_name; end - def neuter_exception(e); end - def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end - def run; end - def sanitize_exception(e); end - def with_info_handler(&block); end - - class << self - def i_suck_and_my_tests_are_order_dependent!; end - def io_lock; end - def io_lock=(_arg0); end - def make_my_diffs_pretty!; end - def parallelize_me!; end - def runnable_methods; end - def test_order; end - end -end - -module Minitest::Test::LifecycleHooks - def after_setup; end - def after_teardown; end - def before_setup; end - def before_teardown; end - def setup; end - def teardown; end -end - -Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array) -Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) - -class Minitest::UnexpectedError < ::Minitest::Assertion - def initialize(error); end - - def backtrace; end - def error; end - def error=(_arg0); end - def message; end - def result_label; end -end - -class Minitest::Unit - class << self - def after_tests(&b); end - def autorun; end - end -end - -class Minitest::Unit::TestCase < ::Minitest::Test - class << self - def inherited(klass); end - end -end - -Minitest::Unit::VERSION = T.let(T.unsafe(nil), String) -Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/minitest@6.0.2.rbi b/sorbet/rbi/gems/minitest@6.0.2.rbi new file mode 100644 index 0000000..c705eb1 --- /dev/null +++ b/sorbet/rbi/gems/minitest@6.0.2.rbi @@ -0,0 +1,1524 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest` gem. +# Please instead update this file by running `bin/tapioca gem minitest`. + + +# The top-level namespace for Minitest. Also the location of the main +# runtime. See +Minitest.run+ for more information. +# +# source://minitest//lib/minitest/parallel.rb#3 +module Minitest + class << self + # A simple hook allowing you to run a block of code after everything + # is done running. Eg: + # + # Minitest.after_run { p $debugging_info } + # + # source://minitest//lib/minitest.rb#95 + def after_run(&block); end + + # source://minitest//lib/minitest.rb#20 + def allow_fork; end + + # source://minitest//lib/minitest.rb#20 + def allow_fork=(_arg0); end + + # Registers Minitest to run at process exit + # + # source://minitest//lib/minitest.rb#69 + def autorun; end + + # source://minitest//lib/minitest.rb#20 + def backtrace_filter; end + + # source://minitest//lib/minitest.rb#20 + def backtrace_filter=(_arg0); end + + # source://minitest//lib/minitest.rb#19 + def cattr_accessor(name); end + + # source://minitest//lib/minitest.rb#1209 + def clock_time; end + + # source://minitest//lib/minitest.rb#332 + def empty_run!(options); end + + # source://minitest//lib/minitest.rb#20 + def extensions; end + + # source://minitest//lib/minitest.rb#20 + def extensions=(_arg0); end + + # source://minitest//lib/minitest.rb#365 + def filter_backtrace(bt); end + + # source://minitest//lib/minitest.rb#20 + def info_signal; end + + # source://minitest//lib/minitest.rb#20 + def info_signal=(_arg0); end + + # source://minitest//lib/minitest.rb#134 + def init_plugins(options); end + + # Manually load plugins by name. + # + # source://minitest//lib/minitest.rb#102 + def load(*names); end + + # source://minitest//lib/minitest.rb#118 + def load_plugins; end + + # source://minitest//lib/minitest.rb#20 + def parallel_executor; end + + # source://minitest//lib/minitest.rb#20 + def parallel_executor=(_arg0); end + + # source://minitest//lib/minitest.rb#152 + def process_args(args = T.unsafe(nil)); end + + # Register a plugin to be used. Does NOT require / load it. + # + # source://minitest//lib/minitest.rb#113 + def register_plugin(name_or_mod); end + + # source://minitest//lib/minitest.rb#20 + def reporter; end + + # source://minitest//lib/minitest.rb#20 + def reporter=(_arg0); end + + # This is the top-level run method. Everything starts from here. It + # tells each Runnable sub-class to run, and each of those are + # responsible for doing whatever they do. + # + # The overall structure of a run looks like this: + # + # [Minitest.load_plugins] optional, called by user, or require what you want + # Minitest.autorun + # Minitest.run(args) + # Minitest.process_args + # Minitest.init_plugins + # Minitest.run_all_suites(reporter, options) + # Runnable.runnables.each |runnable_klass| + # runnable_klass.run_suite(reporter, options) + # filtered_methods = runnable_klass.filter_runnable_methods options + # filtered_methods.each |runnable_method| + # runnable_klass.run(self, runnable_method, reporter) + # runnable_klass.new(runnable_method).run + # + # source://minitest//lib/minitest.rb#299 + def run(args = T.unsafe(nil)); end + + # Internal run method. Responsible for telling all Runnable + # sub-classes to run. + # + # source://minitest//lib/minitest.rb#352 + def run_all_suites(reporter, options); end + + # source://minitest//lib/minitest.rb#20 + def seed; end + + # source://minitest//lib/minitest.rb#20 + def seed=(_arg0); end + end +end + +# Defines the API for Reporters. Subclass this and override whatever +# you want. Go nuts. +# +# source://minitest//lib/minitest.rb#707 +class Minitest::AbstractReporter + # @return [AbstractReporter] a new instance of AbstractReporter + # + # source://minitest//lib/minitest.rb#709 + def initialize; end + + # Did this run pass? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#744 + def passed?; end + + # About to start running a test. This allows a reporter to show + # that it is starting or that we are in the middle of a test run. + # + # source://minitest//lib/minitest.rb#723 + def prerecord(klass, name); end + + # Output and record the result of the test. Call + # {result#result_code}[rdoc-ref:Runnable#result_code] to get the + # result character string. Stores the result of the run if the run + # did not pass. + # + # source://minitest//lib/minitest.rb#732 + def record(result); end + + # Outputs the summary of the run. + # + # source://minitest//lib/minitest.rb#738 + def report; end + + # Starts reporting on the run. + # + # source://minitest//lib/minitest.rb#716 + def start; end + + # source://minitest//lib/minitest.rb#748 + def synchronize(&block); end +end + +# Represents run failures. +# +# source://minitest//lib/minitest.rb#1039 +class Minitest::Assertion < ::Exception + # source://minitest//lib/minitest.rb#1042 + def error; end + + # Where was this run before an assertion was raised? + # + # source://minitest//lib/minitest.rb#1049 + def location; end + + # source://minitest//lib/minitest.rb#1057 + def result_code; end + + # source://minitest//lib/minitest.rb#1061 + def result_label; end +end + +# source://minitest//lib/minitest.rb#1040 +Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) + +# Minitest Assertions. All assertion methods accept a +msg+ which is +# printed if the assertion fails. +# +# Protocol: Nearly everything here boils up to +assert+, which +# expects to be able to increment an instance accessor named +# +assertions+. This is not provided by Assertions and must be +# provided by the thing including Assertions. See Minitest::Runnable +# for an example. +# +# source://minitest//lib/minitest/assertions.rb#16 +module Minitest::Assertions + # source://minitest//lib/minitest/assertions.rb#181 + def _synchronize; end + + # source://minitest//lib/minitest/assertions.rb#193 + def _where; end + + # Fails unless +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#171 + def assert(test, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#188 + def assert_empty(obj, msg = T.unsafe(nil)); end + + # Fails unless exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # source://minitest//lib/minitest/assertions.rb#211 + def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # source://minitest//lib/minitest/assertions.rb#225 + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#237 + def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#244 + def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#254 + def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#265 + def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#276 + def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # source://minitest//lib/minitest/assertions.rb#288 + def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # source://minitest//lib/minitest/assertions.rb#298 + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # source://minitest//lib/minitest/assertions.rb#317 + def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#341 + def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # source://minitest//lib/minitest/assertions.rb#360 + def assert_pattern; end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#378 + def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # source://minitest//lib/minitest/assertions.rb#406 + def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # include_all defaults to false to match Object#respond_to? + # + # source://minitest//lib/minitest/assertions.rb#438 + def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails unless +exp+ and +act+ are #equal? + # + # source://minitest//lib/minitest/assertions.rb#446 + def assert_same(exp, act, msg = T.unsafe(nil)); end + + # Fails if the block outputs anything to stderr or stdout. + # + # See also: #assert_output + # + # source://minitest//lib/minitest/assertions.rb#459 + def assert_silent; end + + # Fails unless the block throws +sym+ + # + # source://minitest//lib/minitest/assertions.rb#468 + def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # source://minitest//lib/minitest/assertions.rb#504 + def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: This method is approximately 10x slower than #capture_io so + # only use it when you need to test the output of a subprocess. + # + # source://minitest//lib/minitest/assertions.rb#537 + def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # source://minitest//lib/minitest/assertions.rb#57 + def diff(exp, act); end + + # Returns details for exception +e+ + # + # source://minitest//lib/minitest/assertions.rb#569 + def exception_details(e, msg); end + + # Fails after a given date (in the local time zone). This allows + # you to put time-bombs in your tests if you need to keep + # something around until a later date lest you forget about it. + # + # source://minitest//lib/minitest/assertions.rb#585 + def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # source://minitest//lib/minitest/assertions.rb#592 + def flunk(msg = T.unsafe(nil)); end + + # Returns a proc that delays generation of an output message. If + # +msg+ is a proc (eg, from another +message+ call) return +msg+ + # as-is. Otherwise, return a proc that will output +msg+ along + # with the value of the result of the block passed to +message+. + # + # source://minitest//lib/minitest/assertions.rb#603 + def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # source://minitest//lib/minitest/assertions.rb#127 + def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # source://minitest//lib/minitest/assertions.rb#145 + def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # source://minitest//lib/minitest/assertions.rb#614 + def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#621 + def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#629 + def refute_empty(obj, msg = T.unsafe(nil)); end + + # Fails if exp == act. + # + # For floats use refute_in_delta. + # + # source://minitest//lib/minitest/assertions.rb#639 + def refute_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. + # + # refute_in_delta Math::PI, (22.0 / 7.0) + # + # source://minitest//lib/minitest/assertions.rb#651 + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ and +act+ have a relative error + # less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#663 + def refute_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +obj+ includes +sub+. + # + # source://minitest//lib/minitest/assertions.rb#670 + def refute_includes(obj, sub, msg = T.unsafe(nil)); end + + # Fails if +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#678 + def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#688 + def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#696 + def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # source://minitest//lib/minitest/assertions.rb#705 + def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # source://minitest//lib/minitest/assertions.rb#737 + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#747 + def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # source://minitest//lib/minitest/assertions.rb#722 + def refute_pattern; end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#761 + def refute_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails if +obj+ responds to the message +meth+. + # include_all defaults to false to match Object#respond_to? + # + # source://minitest//lib/minitest/assertions.rb#771 + def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails if +exp+ is the same (by object identity) as +act+. + # + # source://minitest//lib/minitest/assertions.rb#780 + def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # @raise [Minitest::Skip] + # + # source://minitest//lib/minitest/assertions.rb#793 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # source://minitest//lib/minitest/assertions.rb#805 + def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # @return [Boolean] + # + # source://minitest//lib/minitest/assertions.rb#814 + def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # source://minitest//lib/minitest/assertions.rb#102 + def things_to_diff(exp, act); end + + class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # source://minitest//lib/minitest/assertions.rb#27 + def diff; end + + # Set the diff command to use in #diff. + # + # source://minitest//lib/minitest/assertions.rb#45 + def diff=(o); end + end +end + +# source://minitest//lib/minitest/assertions.rb#17 +Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) + +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# source://minitest//lib/minitest.rb#1174 +class Minitest::BacktraceFilter + # @return [BacktraceFilter] a new instance of BacktraceFilter + # + # source://minitest//lib/minitest.rb#1183 + def initialize(regexp = T.unsafe(nil)); end + + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # source://minitest//lib/minitest.rb#1191 + def filter(bt); end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # source://minitest//lib/minitest.rb#1181 + def regexp; end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # source://minitest//lib/minitest.rb#1181 + def regexp=(_arg0); end +end + +# source://minitest//lib/minitest.rb#1176 +Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) + +# Dispatch to multiple reporters as one. +# +# source://minitest//lib/minitest.rb#989 +class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # @return [CompositeReporter] a new instance of CompositeReporter + # + # source://minitest//lib/minitest.rb#995 + def initialize(*reporters); end + + # Add another reporter to the mix. + # + # source://minitest//lib/minitest.rb#1007 + def <<(reporter); end + + # source://minitest//lib/minitest.rb#1000 + def io; end + + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1011 + def passed?; end + + # source://minitest//lib/minitest.rb#1019 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#1025 + def record(result); end + + # source://minitest//lib/minitest.rb#1031 + def report; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#993 + def reporters; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#993 + def reporters=(_arg0); end + + # source://minitest//lib/minitest.rb#1015 + def start; end +end + +# Compresses backtraces. +# +# source://minitest//lib/minitest/compress.rb#5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # source://minitest//lib/minitest/compress.rb#11 + def compress(orig); end +end + +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# source://minitest//lib/minitest.rb#1138 +module Minitest::Guard + # Is this running on jruby? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1143 + def jruby?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1150 + def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1157 + def osx?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1164 + def windows?(platform = T.unsafe(nil)); end +end + +# source://minitest//lib/minitest/parallel.rb#4 +module Minitest::Parallel; end + +# The engine used to run multiple tests in parallel. +# +# source://minitest//lib/minitest/parallel.rb#9 +class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # @return [Executor] a new instance of Executor + # + # source://minitest//lib/minitest/parallel.rb#19 + def initialize(size); end + + # Add a job to the queue + # + # source://minitest//lib/minitest/parallel.rb#45 + def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # source://minitest//lib/minitest/parallel.rb#52 + def shutdown; end + + # The size of the pool of workers. + # + # source://minitest//lib/minitest/parallel.rb#14 + def size; end + + # Start the executor + # + # source://minitest//lib/minitest/parallel.rb#28 + def start; end +end + +# source://minitest//lib/minitest/parallel.rb#58 +module Minitest::Parallel::Test + # source://minitest//lib/minitest/parallel.rb#59 + def _synchronize; end +end + +# source://minitest//lib/minitest/parallel.rb#61 +module Minitest::Parallel::Test::ClassMethods + # source://minitest//lib/minitest/parallel.rb#62 + def run(klass, method_name, reporter); end + + # source://minitest//lib/minitest/parallel.rb#66 + def run_order; end +end + +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# source://minitest//lib/minitest.rb#779 +class Minitest::ProgressReporter < ::Minitest::Reporter + # source://minitest//lib/minitest.rb#780 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#787 + def record(result); end +end + +# Shared code for anything that can get passed to a Reporter. See +# Minitest::Test & Minitest::Result. +# +# source://minitest//lib/minitest.rb#604 +module Minitest::Reportable + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#626 + def class_name; end + + # Did this run error? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#647 + def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # source://minitest//lib/minitest.rb#621 + def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#611 + def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # source://minitest//lib/minitest.rb#633 + def result_code; end + + # Was this run skipped? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#640 + def skipped?; end +end + +# source://minitest//lib/minitest.rb#615 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# AbstractReportera +# +# source://minitest//lib/minitest.rb#755 +class Minitest::Reporter < ::Minitest::AbstractReporter + # @return [Reporter] a new instance of Reporter + # + # source://minitest//lib/minitest.rb#764 + def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#757 + def io; end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#757 + def io=(_arg0); end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#762 + def options; end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#762 + def options=(_arg0); end +end + +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# blow up. By using Result.from(a_test) you can be reasonably sure +# that the test result can be marshalled. +# +# source://minitest//lib/minitest.rb#659 +class Minitest::Result < ::Minitest::Runnable + include ::Minitest::Reportable + + # source://minitest//lib/minitest.rb#690 + def class_name; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#665 + def klass; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#665 + def klass=(_arg0); end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#670 + def source_location; end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#670 + def source_location=(_arg0); end + + # source://minitest//lib/minitest.rb#694 + def to_s; end + + class << self + # Create a new test result from a Runnable instance. + # + # source://minitest//lib/minitest.rb#675 + def from(runnable); end + end +end + +# re-open +# +# source://minitest//lib/minitest.rb#378 +class Minitest::Runnable + # @return [Runnable] a new instance of Runnable + # + # source://minitest//lib/minitest.rb#535 + def initialize(name); end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#382 + def assertions; end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#382 + def assertions=(_arg0); end + + # source://minitest//lib/minitest.rb#531 + def failure; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#387 + def failures; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#387 + def failures=(_arg0); end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#550 + def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#557 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#562 + def metadata?; end + + # Name of the run. + # + # source://minitest//lib/minitest.rb#405 + def name; end + + # Set the name of the run. + # + # source://minitest//lib/minitest.rb#412 + def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#579 + def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#588 + def result_code; end + + # Runs a single method. Needs to return self. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#569 + def run; end + + # Was this run skipped? See #passed? for more information. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#595 + def skipped?; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#392 + def time; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#392 + def time=(_arg0); end + + # source://minitest//lib/minitest.rb#394 + def time_it; end + + class << self + # Returns an array of filtered +runnable_methods+. Uses + # options[:include] (--include arguments) and options[:exclude] + # (--exclude arguments) values to filter. + # + # source://minitest//lib/minitest.rb#434 + def filter_runnable_methods(options = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#1219 + def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # source://minitest//lib/minitest.rb#419 + def methods_matching(re); end + + # source://minitest//lib/minitest.rb#503 + def on_signal(name, action); end + + # source://minitest//lib/minitest.rb#423 + def reset; end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # source://minitest//lib/minitest.rb#484 + def run(klass, method_name, reporter); end + + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # source://minitest//lib/minitest.rb#493 + def run_order; end + + # Responsible for running all runnable methods in a given class, + # each in its own instance. Each instance is passed to the + # reporter to record. + # + # source://minitest//lib/minitest.rb#452 + def run_suite(reporter, options = T.unsafe(nil)); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#520 + def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # source://minitest//lib/minitest.rb#527 + def runnables; end + + # source://minitest//lib/minitest.rb#497 + def with_info_handler(_reporter = T.unsafe(nil), &block); end + end +end + +# source://minitest//lib/minitest.rb#501 +Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) + +# Assertion raised when skipping a run. +# +# source://minitest//lib/minitest.rb#1069 +class Minitest::Skip < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#1070 + def result_label; end +end + +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print " + # + #

    first

    + #

    second

    + # + # + # eohtml + # assert_equal('second', doc.html.body.p[1].text) + # + # source://nokogiri//lib/nokogiri.rb#91 + def Slop(*args, &block); end + + # Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#6 + def XML(*_arg0, **_arg1, &_arg2); end + + # Convenience method for Nokogiri::XSLT.parse + # + # source://nokogiri//lib/nokogiri/xslt.rb#7 + def XSLT(*_arg0, **_arg1, &_arg2); end + + # source://nokogiri//lib/nokogiri.rb#96 + def install_default_aliases; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#206 + def jruby?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#211 + def libxml2_patches; end + + # Create a new Nokogiri::XML::DocumentFragment + # + # source://nokogiri//lib/nokogiri.rb#68 + def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end + + # Parse an HTML or XML document. +string+ contains the document. + # + # source://nokogiri//lib/nokogiri.rb#42 + def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#201 + def uses_gumbo?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#193 + def uses_libxml?(requirement = T.unsafe(nil)); end + end +end + +# Translate a CSS selector into an XPath 1.0 query +# +# source://nokogiri//lib/nokogiri/css.rb#6 +module Nokogiri::CSS + class << self + # TODO: Deprecate this method ahead of 2.0 and delete it in 2.0. + # It is not used by Nokogiri and shouldn't be part of the public API. + # + # source://nokogiri//lib/nokogiri/css.rb#10 + def parse(selector); end + + # :call-seq: + # xpath_for(selector_list) → Array + # xpath_for(selector_list [, prefix:] [, ns:] [, visitor:] [, cache:]) → Array + # + # Translate a CSS selector list to the equivalent XPath expressions. + # + # 💡 Note that translated queries are cached by default for performance concerns. + # + # ⚠ Users should prefer Nokogiri::XML::Searchable#css, which is mixed into all document and + # node classes, for querying documents with CSS selectors. This method is the underlying + # mechanism used by XML::Searchable and is provided solely for advanced users to translate + # \CSS selectors to XPath directly. + # + # Also see Nokogiri::XML::Searchable#css for documentation on supported CSS selector features, + # some extended syntax that Nokogiri supports, and advanced CSS features like pseudo-class + # functions. + # + # [Parameters] + # - +selector_list+ (String) + # + # The CSS selector to be translated into XPath. This is always a String, but that string + # value may be a {selector list}[https://www.w3.org/TR/selectors-4/#grouping] (see + # examples). + # + # [Keyword arguments] + # - +prefix:+ (String) + # + # The XPath expression prefix which determines the search context. See Nokogiri::XML::XPath + # for standard options. Default is +XPath::GLOBAL_SEARCH_PREFIX+. + # + # - +ns:+ (Hash, nil) + # + # Namespaces that are referenced in the query, if any. This is a hash where the keys are the + # namespace prefix and the values are the namespace URIs. Default is +nil+ indicating an + # empty set of namespaces. + # + # - +visitor:+ (Nokogiri::CSS::XPathVisitor) + # + # Use this XPathVisitor object to transform the CSS AST into XPath expressions. See + # Nokogiri::CSS::XPathVisitor for more information on some of the complex behavior that can + # be customized for your document type. Default is +Nokogiri::CSS::XPathVisitor.new+. + # + # ⚠ Note that this option is mutually exclusive with +prefix+ and +ns+. If +visitor+ is + # provided, +prefix+ and +ns+ must not be present. + # + # - +cache:+ (Boolean) + # + # Whether to use the SelectorCache for the translated query to ensure that repeated queries + # don't incur the overhead of re-parsing the selector. Default is +true+. + # + # [Returns] (Array) The equivalent set of XPath expressions for +selector_list+ + # + # *Example* with a simple selector: + # + # Nokogiri::CSS.xpath_for("div") # => ["//div"] + # + # *Example* with a compound selector: + # + # Nokogiri::CSS.xpath_for("div.xl") # => ["//div[contains(concat(' ',normalize-space(@class),' '),' xl ')]"] + # + # *Example* with a complex selector: + # + # Nokogiri::CSS.xpath_for("h1 + div") # => ["//h1/following-sibling::*[1]/self::div"] + # + # *Example* with a selector list: + # + # Nokogiri::CSS.xpath_for("h1, h2, h3") # => ["//h1", "//h2", "//h3"] + # + # @raise [TypeError] + # + # source://nokogiri//lib/nokogiri/css.rb#83 + def xpath_for(selector, options = T.unsafe(nil), prefix: T.unsafe(nil), visitor: T.unsafe(nil), ns: T.unsafe(nil), cache: T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#5 +class Nokogiri::CSS::Node + # Create a new Node with +type+ and +value+ + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/css/node.rb#14 + def initialize(type, value); end + + # Accept +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#20 + def accept(visitor); end + + # Find a node by type using +types+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#36 + def find_by_type(types); end + + # Convert to array + # + # source://nokogiri//lib/nokogiri/css/node.rb#53 + def to_a; end + + # Convert to_type + # + # source://nokogiri//lib/nokogiri/css/node.rb#46 + def to_type; end + + # Convert this CSS node to xpath with +prefix+ using +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#26 + def to_xpath(visitor); end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type; end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type=(_arg0); end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value; end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#6 +Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7 +class Nokogiri::CSS::Parser < ::Racc::Parser + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#8 + def initialize; end + + # reduce 0 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#363 + def _reduce_1(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#409 + def _reduce_10(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#414 + def _reduce_11(val, _values, result); end + + # reduce 12 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#426 + def _reduce_13(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#431 + def _reduce_14(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#436 + def _reduce_15(val, _values, result); end + + # reduce 16 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#443 + def _reduce_17(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#448 + def _reduce_18(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#453 + def _reduce_19(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#369 + def _reduce_2(val, _values, result); end + + # reduce 20 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#460 + def _reduce_21(val, _values, result); end + + # reduce 22 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#467 + def _reduce_23(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#472 + def _reduce_24(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#477 + def _reduce_25(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#484 + def _reduce_26(val, _values, result); end + + # reduce 27 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#491 + def _reduce_28(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#497 + def _reduce_29(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#374 + def _reduce_3(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#503 + def _reduce_30(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#509 + def _reduce_31(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#514 + def _reduce_32(val, _values, result); end + + # reduce 33 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#521 + def _reduce_34(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#527 + def _reduce_35(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#533 + def _reduce_36(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#539 + def _reduce_37(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#545 + def _reduce_38(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#551 + def _reduce_39(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#379 + def _reduce_4(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#556 + def _reduce_40(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#561 + def _reduce_41(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#566 + def _reduce_42(val, _values, result); end + + # reduce 44 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#575 + def _reduce_45(val, _values, result); end + + # reduce 46 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#592 + def _reduce_47(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#602 + def _reduce_48(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#618 + def _reduce_49(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#384 + def _reduce_5(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#638 + def _reduce_50(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#644 + def _reduce_51(val, _values, result); end + + # reduce 53 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#653 + def _reduce_54(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#659 + def _reduce_55(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#665 + def _reduce_56(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#671 + def _reduce_57(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#677 + def _reduce_58(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#389 + def _reduce_6(val, _values, result); end + + # reduce 63 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#693 + def _reduce_64(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#698 + def _reduce_65(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#703 + def _reduce_66(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#708 + def _reduce_67(val, _values, result); end + + # reduce 68 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#715 + def _reduce_69(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#394 + def _reduce_7(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#720 + def _reduce_70(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#725 + def _reduce_71(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#730 + def _reduce_72(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#735 + def _reduce_73(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#740 + def _reduce_74(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#745 + def _reduce_75(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#750 + def _reduce_76(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#399 + def _reduce_8(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#404 + def _reduce_9(val, _values, result); end + + # reduce 81 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#766 + def _reduce_none(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#18 + def next_token; end + + # On CSS parser error, raise an exception + # + # @raise [SyntaxError] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#30 + def on_error(error_token_id, error_value, value_stack); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#13 + def parse(string); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#26 + def unescape_css_identifier(identifier); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#30 + def unescape_css_string(str); end + + # Get the xpath for +selector+ using +visitor+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#23 + def xpath_for(selector, visitor); end +end + +# source://nokogiri//lib/nokogiri/css/parser.rb#279 +Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser.rb#357 +Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://nokogiri//lib/nokogiri/css/parser.rb#296 +Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/selector_cache.rb#5 +module Nokogiri::CSS::SelectorCache + class << self + # Retrieve the cached XPath expressions for the key + # + # source://nokogiri//lib/nokogiri/css/selector_cache.rb#11 + def [](key); end + + # Insert the XPath expressions `value` at the cache key + # + # source://nokogiri//lib/nokogiri/css/selector_cache.rb#16 + def []=(key, value); end + + # Clear the cache + # + # source://nokogiri//lib/nokogiri/css/selector_cache.rb#21 + def clear_cache(create_new_object = T.unsafe(nil)); end + + # Construct a unique key cache key + # + # source://nokogiri//lib/nokogiri/css/selector_cache.rb#32 + def key(selector:, visitor:); end + end +end + +# source://nokogiri//lib/nokogiri/css/syntax_error.rb#6 +class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11 +class Nokogiri::CSS::Tokenizer + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57 + def _next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26 + def action; end + + # Returns the value of attribute filename. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17 + def filename; end + + # Returns the value of attribute lineno. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16 + def lineno; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36 + def load_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49 + def next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#34 + def scan(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43 + def scan_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20 + def scan_setup(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan_str(str); end + + # Returns the value of attribute state. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14 +class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end + +# When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor +# class allows for changing some of the behaviors related to builtin xpath functions and quirks +# of HTML5. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9 +class Nokogiri::CSS::XPathVisitor + # :call-seq: + # new() → XPathVisitor + # new(builtins:, doctype:) → XPathVisitor + # + # [Parameters] + # - +builtins:+ (BuiltinsConfig) Determine when to use Nokogiri's built-in xpath functions for performance improvements. + # - +doctype:+ (DoctypeConfig) Make document-type-specific accommodations for CSS queries. + # + # [Returns] XPathVisitor + # + # @return [XPathVisitor] a new instance of XPathVisitor + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#69 + def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil), prefix: T.unsafe(nil), namespaces: T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#298 + def accept(node); end + + # The visitor configuration set via the +builtins:+ keyword argument to XPathVisitor.new. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#48 + def builtins; end + + # :call-seq: config() → Hash + # + # [Returns] + # a Hash representing the configuration of the XPathVisitor, suitable for use as + # part of the CSS cache key. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#93 + def config; end + + # The visitor configuration set via the +doctype:+ keyword argument to XPathVisitor.new. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#51 + def doctype; end + + # The visitor configuration set via the +namespaces:+ keyword argument to XPathVisitor.new. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#57 + def namespaces; end + + # The visitor configuration set via the +prefix:+ keyword argument to XPathVisitor.new. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#54 + def prefix; end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#294 + def visit_attrib_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#175 + def visit_attribute_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#255 + def visit_child_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#237 + def visit_class_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#241 + def visit_combinator(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#262 + def visit_conditional_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#255 + def visit_descendant_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#255 + def visit_direct_adjacent_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267 + def visit_element_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#255 + def visit_following_selector(node); end + + # :stopdoc: + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#98 + def visit_function(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#170 + def visit_id(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#161 + def visit_not(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#211 + def visit_pseudo_class(node); end + + private + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#365 + def css_class(hay, needle); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#310 + def html5_element_name_needs_namespace_handling(node); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#355 + def is_of_type_pseudo_class?(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#317 + def nth(node, options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#341 + def read_a_and_positive_b(values); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304 + def validate_xpath_function_name(name); end +end + +# Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13 +module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end + +# Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol) + +# Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is +# the default when calling Nokogiri::CSS.xpath_for directly. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol) + +# Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is +# the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or +# node. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array) + +# Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document +# being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or +# node will choose the correct option automatically. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33 +module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end + +# The document being searched is an HTML4 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol) + +# The document being searched is an HTML5 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array) + +# The document being searched is an XML document. This is the default. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10 +Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass) + +# Some classes in Nokogiri are namespaced as a group, for example +# Document, DocumentFragment, and Builder. +# +# It's sometimes necessary to look up the related class, e.g.: +# +# XML::Builder → XML::Document +# HTML4::Builder → HTML4::Document +# HTML5::Document → HTML5::DocumentFragment +# +# This module is included into those key classes who need to do this. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#17 +module Nokogiri::ClassResolver + # :call-seq: + # related_class(class_name) → Class + # + # Find a class constant within the + # + # Some examples: + # + # Nokogiri::XML::Document.new.related_class("DocumentFragment") + # # => Nokogiri::XML::DocumentFragment + # Nokogiri::HTML4::Document.new.related_class("DocumentFragment") + # # => Nokogiri::HTML4::DocumentFragment + # + # Note this will also work for subclasses that follow the same convention, e.g.: + # + # Loofah::HTML::Document.new.related_class("DocumentFragment") + # # => Loofah::HTML::DocumentFragment + # + # And even if it's a subclass, this will iterate through the superclasses: + # + # class ThisIsATopLevelClass < Nokogiri::HTML4::Builder ; end + # ThisIsATopLevelClass.new.related_class("Document") + # # => Nokogiri::HTML4::Document + # + # source://nokogiri//lib/nokogiri/class_resolver.rb#44 + def related_class(class_name); end +end + +# #related_class restricts matching namespaces to those matching this set. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#19 +Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set) + +# source://nokogiri//lib/nokogiri/decorators/slop.rb#4 +module Nokogiri::Decorators; end + +# The Slop decorator implements method missing such that a methods may be +# used instead of XPath or CSS. See Nokogiri.Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#8 +module Nokogiri::Decorators::Slop + # look for node with +name+. See Nokogiri.Slop + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#14 + def method_missing(name, *args, &block); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#35 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# The default XPath search context for Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#10 +Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/encoding_handler.rb#5 +class Nokogiri::EncodingHandler + # Returns the value of attribute name. + # + # source://nokogiri//lib/nokogiri/extension.rb#7 + def name; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def [](_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def alias(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def clear_aliases!; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def delete(_arg0); end + + # source://nokogiri//lib/nokogiri/encoding_handler.rb#15 + def install_default_aliases; end + end +end + +# Popular encoding aliases not known by all iconv implementations that Nokogiri should support. +# +# source://nokogiri//lib/nokogiri/encoding_handler.rb#7 +Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/gumbo.rb#4 +module Nokogiri::Gumbo + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def fragment(*_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def parse(*_arg0); end + end +end + +# The default maximum number of attributes per element. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#6 +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# The default maximum number of errors for parsing a document or a fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#9 +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer) + +# The default maximum depth of the DOM tree produced by parsing a document +# or fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#13 +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer) + +# 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0, +# Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related +# classes. +# +# source://nokogiri//lib/nokogiri/html.rb#8 +Nokogiri::HTML = Nokogiri::HTML4 + +# Since v1.12.0 +# +# 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace +# for parsing HTML. +# +# source://nokogiri//lib/nokogiri/html4.rb#16 +module Nokogiri::HTML4 + class << self + # Convenience method for Nokogiri::HTML4::DocumentFragment.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#24 + def fragment(*_arg0, **_arg1, &_arg2); end + + # Convenience method for Nokogiri::HTML4::Document.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#19 + def parse(*_arg0, **_arg1, &_arg2); end + end +end + +# Nokogiri HTML builder is used for building HTML documents. It is very +# similar to the Nokogiri::XML::Builder. In fact, you should go read the +# documentation for Nokogiri::XML::Builder before reading this +# documentation. +# +# == Synopsis: +# +# Create an HTML document with a body that has an onload attribute, and a +# span tag with a class of "bold" that has content of "Hello world". +# +# builder = Nokogiri::HTML4::Builder.new do |doc| +# doc.html { +# doc.body(:onload => 'some_func();') { +# doc.span.bold { +# doc.text "Hello world" +# } +# } +# } +# end +# puts builder.to_html +# +# The HTML builder inherits from the XML builder, so make sure to read the +# Nokogiri::XML::Builder documentation. +# +# source://nokogiri//lib/nokogiri/html.rb#31 +class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder + # Convert the builder to HTML + # + # source://nokogiri//lib/nokogiri/html4/builder.rb#32 + def to_html; end +end + +# source://nokogiri//lib/nokogiri/html4/document.rb#8 +class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/html4/document.rb#149 + def fragment(tags = T.unsafe(nil)); end + + # Get the meta tag encoding for this document. If there is no meta tag, + # then nil is returned. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#12 + def meta_encoding; end + + # Set the meta tag encoding for this document. + # + # If an meta encoding tag is already present, its content is + # replaced with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, and before any text node or + # content element (typically ) if any. + # + # The result when trying to set an encoding that is different + # from the document encoding is undefined. + # + # Beware in CRuby, that libxml2 automatically inserts a meta tag + # into a head element. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#36 + def meta_encoding=(encoding); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) + # + # or + # + # node.serialize(:encoding => 'UTF-8') do |config| + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/html4/document.rb#142 + def serialize(options = T.unsafe(nil)); end + + # Get the title string of this document. Return nil if there is + # no title tag. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#70 + def title; end + + # Set the title string of this document. + # + # If a title element is already present, its content is replaced + # with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, right after a meta + # encoding/charset tag if any, and before any text node or + # content element (typically ) if any. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#85 + def title=(text); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def type; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#159 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/html4/document.rb#60 + def meta_content_type; end + + # source://nokogiri//lib/nokogiri/html4/document.rb#103 + def set_metadata_element(element); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + + # :call-seq: + # parse(input) { |options| ... } => Nokogiri::HTML4::Document + # + # Parse \HTML4 input from a String or IO object, and return a new HTML4::Document. + # + # [Required Parameters] + # - +input+ (String | IO) The content to be parsed. + # + # [Optional Keyword Arguments] + # - +url:+ (String) The base URI for this document. + # + # document. When not provided, the encoding will be determined based on the document + # content. + # + # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some + # behaviors during parsing. See ParseOptions for more information. The default value is + # +ParseOptions::DEFAULT_HTML+. + # + # [Yields] + # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which + # can be configured before parsing. See Nokogiri::XML::ParseOptions for more information. + # + # [Returns] Nokogiri::HTML4::Document + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document.rb#189 + def parse(input, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def read_io(_arg0, _arg1, _arg2, _arg3); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def read_memory(_arg0, _arg1, _arg2, _arg3); end + end +end + +# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#5 +class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment + # :call-seq: + # new(document) { |options| ... } → HTML4::DocumentFragment + # new(document, input) { |options| ... } → HTML4::DocumentFragment + # new(document, input, context:, options:) { |options| ... } → HTML4::DocumentFragment + # + # Parse \HTML4 fragment input from a String, and return a new HTML4::DocumentFragment. + # + # 💡 It's recommended to use either HTML4::DocumentFragment.parse or XML::Node#parse rather + # than call this method directly. + # + # [Required Parameters] + # - +document+ (HTML4::Document) The parent document to associate the returned fragment with. + # + # [Optional Parameters] + # - +input+ (String) The content to be parsed. + # + # [Optional Keyword Arguments] + # - +context:+ (Nokogiri::XML::Node) The context node for the subtree created. See + # below for more information. + # + # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some + # behaviors during parsing. See ParseOptions for more information. The default value is + # +ParseOptions::DEFAULT_HTML+. + # + # [Yields] + # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which + # can be configured before parsing. See ParseOptions for more information. + # + # [Returns] HTML4::DocumentFragment + # + # === Context \Node + # + # If a context node is specified using +context:+, then the fragment will be created by + # calling XML::Node#parse on that node, so the parser will behave as if that Node is the + # parent of the fragment subtree. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#134 + def initialize(document, input = T.unsafe(nil), context_ = T.unsafe(nil), options_ = T.unsafe(nil), context: T.unsafe(nil), options: T.unsafe(nil)); end + + class << self + # :call-seq: + # parse(input) { |options| ... } → HTML4::DocumentFragment + # + # Parse \HTML4 fragment input from a String, and return a new HTML4::DocumentFragment. This + # method creates a new, empty HTML4::Document to contain the fragment. + # + # [Required Parameters] + # - +input+ (String | IO) The content to be parsed. + # + # [Optional Keyword Arguments] + # document. When not provided, the encoding will be determined based on the document + # content. + # + # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some + # behaviors during parsing. See ParseOptions for more information. The default value is + # +ParseOptions::DEFAULT_HTML+. + # + # [Yields] + # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which + # can be configured before parsing. See ParseOptions for more information. + # + # [Returns] HTML4::DocumentFragment + # + # *Example:* Parsing a string + # + # fragment = HTML4::DocumentFragment.parse("
    Hello World
    ") + # + # *Example:* Parsing an IO + # + # fragment = File.open("fragment.html") do |file| + # HTML4::DocumentFragment.parse(file) + # end + # + # *Example:* Specifying encoding + # + # + # *Example:* Setting parse options dynamically + # + # HTML4::DocumentFragment.parse("
    Hello World") do |options| + # options.huge.pedantic + # end + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#52 + def parse(input, encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description.rb#5 +class Nokogiri::HTML4::ElementDescription + # Is this element a block element? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#8 + def block?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def default_sub_element; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/extension.rb#7 + def deprecated?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def deprecated_attributes; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def description; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def empty?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/extension.rb#7 + def implied_end_tag?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/extension.rb#7 + def implied_start_tag?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def inline?; end + + # Inspection information + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#20 + def inspect; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def name; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def optional_attributes; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def required_attributes; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/extension.rb#7 + def save_end_tag?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def sub_elements; end + + # Convert this description to a string + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#14 + def to_s; end + + private + + # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#32 + def default_desc; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def [](_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#436 +Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#423 +Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239 +Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246 +Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258 +Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212 +Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221 +Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268 +Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#546 +Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171 +Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#437 +Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271 +Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#270 +Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272 +Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#280 +Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#213 +Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#214 +Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#242 +Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#292 +Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#293 +Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#297 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#295 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#439 +Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#199 +Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#218 +Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217 +Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#549 +Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#296 +Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array) + +# This is filled in down below. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#30 +Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash) + +# Methods are defined protected by method_defined? because at +# this point the C-library or Java library is already loaded, +# and we don't want to clobber any methods that have been +# defined there. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11 +Nokogiri::HTML4::ElementDescription::Desc = Struct + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#294 +Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#377 +Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192 +Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#201 +Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#299 +Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190 +Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245 +Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array) + +# Attributes defined and categorized +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#136 +Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#300 +Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170 +Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#318 +Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#301 +Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#339 +Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#340 +Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#328 +Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168 +Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#341 +Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#342 +Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#241 +Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#352 +Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#216 +Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197 +Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#354 +Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194 +Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195 +Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196 +Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200 +Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#219 +Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#355 +Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#368 +Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189 +Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243 +Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#398 +Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#298 +Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#421 +Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#484 +Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#422 +Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#424 +Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169 +Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#547 +Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#434 +Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#438 +Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191 +Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#435 +Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#441 +Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#443 +Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#442 +Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#459 +Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#460 +Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#462 +Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#463 +Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#461 +Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#464 +Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167 +Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#137 +Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#466 +Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#420 +Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#269 +Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238 +Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#483 +Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#486 +Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#485 +Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149 +Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240 +Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#497 +Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#498 +Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#510 +Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#509 +Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#520 +Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237 +Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#533 +Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#522 +Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#521 +Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#545 +Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#519 +Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#440 +Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#548 +Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#353 +Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#465 +Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14 +class Nokogiri::HTML4::EncodingReader + # @return [EncodingReader] a new instance of EncodingReader + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82 + def initialize(io); end + + # This method is used by the C extension so that + # Nokogiri::HTML4::Document#read_io() does not leak memory when + # EncodingFound is raised. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91 + def encoding_found; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93 + def read(len); end + + class << self + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59 + def detect_encoding(chunk); end + end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15 +class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError + # @return [EncodingFound] a new instance of EncodingFound + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18 + def initialize(encoding); end + + # Returns the value of attribute found_encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16 + def found_encoding; end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46 +class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler + # @return [JumpSAXHandler] a new instance of JumpSAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47 + def initialize(jumptag); end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24 +class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document + # @return [SAXHandler] a new instance of SAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27 + def initialize; end + + # Returns the value of attribute encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25 + def encoding; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5 +class Nokogiri::HTML4::EntityDescription < ::Struct; end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7 +class Nokogiri::HTML4::EntityLookup + # Look up entity with +name+ + # + # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10 + def [](name); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def get(_arg0); end +end + +# Instance of Nokogiri::HTML4::EntityLookup +# +# source://nokogiri//lib/nokogiri/html4.rb#30 +Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityLookup) + +# Nokogiri provides a SAX parser to process HTML4 which will provide HTML recovery +# ("autocorrection") features. +# +# See Nokogiri::HTML4::SAX::Parser for a basic example of using a SAX parser with HTML. +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#5 +module Nokogiri::HTML4::SAX; end + +# This parser is a SAX style parser that reads its input as it deems necessary. The parser +# takes a Nokogiri::XML::SAX::Document, an optional encoding, then given an HTML input, sends +# messages to the Nokogiri::XML::SAX::Document. +# +# ⚠ This is an HTML4 parser and so may not support some HTML5 features and behaviors. +# +# Here is a basic usage example: +# +# class MyHandler < Nokogiri::XML::SAX::Document +# def start_element name, attributes = [] +# puts "found a #{name}" +# end +# end +# +# parser = Nokogiri::HTML4::SAX::Parser.new(MyHandler.new) +# +# # Hand an IO object to the parser, which will read the HTML from the IO. +# File.open(path_to_html) do |f| +# parser.parse(f) +# end +# +# For more information on \SAX parsers, see Nokogiri::XML::SAX or the parent class +# Nokogiri::XML::SAX::Parser. +# +# Also see Nokogiri::XML::SAX::Document for the available events. +# +# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#41 +class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_native; end +end + +# Context object to invoke the HTML4 SAX parser on the SAX::Document handler. +# +# 💡 This class is usually not instantiated by the user. Use Nokogiri::HTML4::SAX::Parser +# instead. +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#11 +class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext + # source://nokogiri//lib/nokogiri/extension.rb#7 + def parse_with(_arg0); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_file(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_memory(_arg0, _arg1); end + end +end + +# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6 +class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#26 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document; end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::HTML4::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31 + def finish; end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_native(_arg0, _arg1, _arg2); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_write(_arg0, _arg1); end +end + +# == Usage +# +# Parse an HTML5 document: +# +# doc = Nokogiri.HTML5(input) +# +# Parse an HTML5 fragment: +# +# fragment = Nokogiri::HTML5.fragment(input) +# +# ⚠ HTML5 functionality is not available when running JRuby. +# +# == Parsing options +# +# The document and fragment parsing methods support options that are different from +# Nokogiri::HTML4::Document or Nokogiri::XML::Document. +# +# +# The four currently supported parse options are +# +# - +max_errors:+ (Integer, default 0) Maximum number of parse errors to report in HTML5::Document#errors. +# - +max_tree_depth:+ (Integer, default +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) Maximum tree depth to parse. +# - +max_attributes:+ (Integer, default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) Maximum number of attributes to parse per element. +# - +parse_noscript_content_as_text:+ (Boolean, default false) When enabled, parse +noscript+ tag content as text, mimicking the behavior of web browsers. +# +# These options are explained in the following sections. +# +# === Error reporting: +max_errors:+ +# +# Nokogiri contains an experimental HTML5 parse error reporting facility. By default, no parse +# errors are reported but this can be configured by passing the +:max_errors+ option to +# HTML5.parse or HTML5.fragment. +# +# For example, this script: +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts(err) +# end +# +# Emits: +# +# 1:1: ERROR: Expected a doctype token +# Hi there! +# ^ +# 1:1: ERROR: Start tag of nonvoid HTML element ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag contains attributes. +# Hi there! +# ^ +# +# Using max_errors: -1 results in an unlimited number of errors being returned. +# +# The errors returned by HTML5::Document#errors are instances of Nokogiri::XML::SyntaxError. +# +# The {HTML standard}[https://html.spec.whatwg.org/multipage/parsing.html#parse-errors] defines a +# number of standard parse error codes. These error codes only cover the "tokenization" stage of +# parsing HTML. The parse errors in the "tree construction" stage do not have standardized error +# codes (yet). +# +# As a convenience to Nokogiri users, the defined error codes are available +# via Nokogiri::XML::SyntaxError#str1 method. +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts("#{err.line}:#{err.column}: #{err.str1}") +# end +# doc = Nokogiri::HTML5.parse('Hi there!', +# # => 1:1: generic-parser +# # 1:1: non-void-html-element-start-tag-with-trailing-solidus +# # 1:17: end-tag-with-trailing-solidus +# # 1:17: end-tag-with-attributes +# +# Note that the first error is +generic-parser+ because it's an error from the tree construction +# stage and doesn't have a standardized error code. +# +# For the purposes of semantic versioning, the error messages, error locations, and error codes +# are not part of Nokogiri's public API. That is, these are subject to change without Nokogiri's +# major version number changing. These may be stabilized in the future. +# +# === Maximum tree depth: +max_tree_depth:+ +# +# The maximum depth of the DOM tree parsed by the various parsing methods is configurable by the +# +:max_tree_depth+ option. If the depth of the tree would exceed this limit, then an +# +ArgumentError+ is thrown. +# +# This limit (which defaults to +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) can be removed by +# giving the option max_tree_depth: -1. +# +# html = '' + '
    ' * 1000 +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Document tree depth limit exceeded +# doc = Nokogiri.HTML5(html, max_tree_depth: -1) +# +# === Attribute limit per element: +max_attributes:+ +# +# The maximum number of attributes per DOM element is configurable by the +:max_attributes+ +# option. If a given element would exceed this limit, then an +ArgumentError+ is thrown. +# +# This limit (which defaults to +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) can be removed by +# giving the option max_attributes: -1. +# +# html = '
    ' +# # "
    " +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Attributes per element limit exceeded +# +# doc = Nokogiri.HTML5(html, max_attributes: -1) +# # parses successfully +# +# === Parse +noscript+ elements' content as text: +parse_noscript_content_as_text:+ +# +# By default, the content of +noscript+ elements is parsed as HTML elements. Browsers that +# support scripting parse the content of +noscript+ elements as raw text. +# +# The +:parse_noscript_content_as_text+ option causes Nokogiri to parse the content of +noscript+ +# elements as a single text node. +# +# html = "" +# doc = Nokogiri::HTML5.parse(html, parse_noscript_content_as_text: true) +# pp doc.at_xpath("/html/head/noscript") +# # => #(Element:0x878c { +# # name = "noscript", +# # children = [ #(Text "")] +# # }) +# +# In contrast, parse_noscript_content_as_text: false (the default) causes the +noscript+ +# element in the previous example to have two children, a +meta+ element and a +link+ element. +# +# doc = Nokogiri::HTML5.parse(html) +# puts doc.at_xpath("/html/head/noscript") +# # => #(Element:0x96b4 { +# # name = "noscript", +# # children = [ +# # #(Element:0x97e0 { name = "meta", attribute_nodes = [ #(Attr:0x990c { name = "charset", value = "UTF-8" })] }), +# # #(Element:0x9b00 { +# # name = "link", +# # attribute_nodes = [ +# # #(Attr:0x9c2c { name = "rel", value = "stylesheet" }), +# # #(Attr:0x9dd0 { name = "href", value = "!" })] +# # })] +# # }) +# +# == HTML Serialization +# +# After parsing HTML, it may be serialized using any of the Nokogiri::XML::Node serialization +# methods. In particular, XML::Node#serialize, XML::Node#to_html, and XML::Node#to_s will +# serialize a given node and its children. (This is the equivalent of JavaScript's +# +Element.outerHTML+.) Similarly, XML::Node#inner_html will serialize the children of a given +# node. (This is the equivalent of JavaScript's +Element.innerHTML+.) +# +# doc = Nokogiri::HTML5("Hello world!") +# puts doc.serialize +# # => Hello world! +# +# Due to quirks in how HTML is parsed and serialized, it's possible for a DOM tree to be +# serialized and then re-parsed, resulting in a different DOM. Mostly, this happens with DOMs +# produced from invalid HTML. Unfortunately, even valid HTML may not survive serialization and +# re-parsing. +# +# In particular, a newline at the start of +pre+, +listing+, and +textarea+ +# elements is ignored by the parser. +# +# doc = Nokogiri::HTML5(<<-EOF) +# +#
    +#   Content
    +# EOF +# puts doc.at('/html/body/pre').serialize +# # =>
    Content
    +# +# In this case, the original HTML is semantically equivalent to the serialized version. If the +# +pre+, +listing+, or +textarea+ content starts with two newlines, the first newline will be +# stripped on the first parse and the second newline will be stripped on the second, leading to +# semantically different DOMs. Passing the parameter preserve_newline: true will cause +# two or more newlines to be preserved. (A single leading newline will still be removed.) +# +# doc = Nokogiri::HTML5(<<-EOF) +# +# +# +# Content +# EOF +# puts doc.at('/html/body/listing').serialize(preserve_newline: true) +# # => +# # +# # Content +# +# == Encodings +# +# Nokogiri always parses HTML5 using {UTF-8}[https://en.wikipedia.org/wiki/UTF-8]; however, the +# encoding of the input can be explicitly selected via the optional +encoding+ parameter. This is +# most useful when the input comes not from a string but from an IO object. +# +# When serializing a document or node, the encoding of the output string can be specified via the +# +:encoding+ options. Characters that cannot be encoded in the selected encoding will be encoded +# as {HTML numeric +# entities}[https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references]. +# +# frag = Nokogiri::HTML5.fragment('아는 길도 물어가라') +# puts html +# # => 아는 길도 물어가라 +# +# frag = Nokogiri::HTML5.fragment(html) +# puts frag.serialize +# # => 아는 길도 물어가라 +# +# (There's a {bug}[https://bugs.ruby-lang.org/issues/15033] in all current versions of Ruby that +# can cause the entity encoding to fail. Of the mandated supported encodings for HTML, the only +# encoding I'm aware of that has this bug is 'ISO-2022-JP'. We recommend avoiding this +# encoding.) +# +# == Notes +# +# * The Nokogiri::HTML5.fragment function takes a String or IO and parses it as a HTML5 document +# in a +body+ context. As a result, the +html+, +head+, and +body+ elements are removed from +# this document, and any children of these elements that remain are returned as a +# Nokogiri::HTML5::DocumentFragment; but you can pass in a different context (e.g., "html" to +# get +head+ and +body+ tags in the result). +# +# * The Nokogiri::HTML5.parse function takes a String or IO and passes it to the +# gumbo_parse_with_options method, using the default options. The resulting Gumbo +# parse tree is then walked. +# +# * Instead of uppercase element names, lowercase element names are produced. +# +# * Instead of returning +unknown+ as the element name for unknown tags, the original tag name is +# returned verbatim. +# +# Since v1.12.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#23 +module Nokogiri::HTML5 + class << self + # Convenience method for Nokogiri::HTML5::DocumentFragment.parse + # + # source://nokogiri//lib/nokogiri/html5.rb#280 + def fragment(*_arg0, **_arg1, &_arg2); end + + # Convenience method for Nokogiri::HTML5::Document.parse + # + # source://nokogiri//lib/nokogiri/html5.rb#275 + def parse(*_arg0, **_arg1, &_arg2); end + + # source://nokogiri//lib/nokogiri/html5.rb#285 + def read_and_encode(string, encoding); end + + private + + # Charset sniffing is a complex and controversial topic that understandably isn't done _by + # default_ by the Ruby Net::HTTP library. This being said, it is a very real problem for + # consumers of HTML as the default for HTML is iso-8859-1, most "good" producers use utf-8, and + # the Gumbo parser *only* supports utf-8. + # + # Accordingly, Nokogiri::HTML4::Document.parse provides limited encoding detection. Following + # this lead, Nokogiri::HTML5 attempts to do likewise, while attempting to more closely follow + # the HTML5 standard. + # + # http://bugs.ruby-lang.org/issues/2567 + # http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding + # + # source://nokogiri//lib/nokogiri/html5.rb#323 + def reencode(body, content_type = T.unsafe(nil)); end + end +end + +# Nokogiri HTML5 builder is used for building HTML documents. It is very similar to the +# Nokogiri::XML::Builder. In fact, you should go read the documentation for +# Nokogiri::XML::Builder before reading this documentation. +# +# The construction behavior is identical to HTML4::Builder, but HTML5 documents implement the +# [HTML5 standard's serialization +# algorithm](https://www.w3.org/TR/2008/WD-html5-20080610/serializing.html). +# +# == Synopsis: +# +# Create an HTML5 document with a body that has an onload attribute, and a +# span tag with a class of "bold" that has content of "Hello world". +# +# builder = Nokogiri::HTML5::Builder.new do |doc| +# doc.html { +# doc.body(:onload => 'some_func();') { +# doc.span.bold { +# doc.text "Hello world" +# } +# } +# } +# end +# puts builder.to_html +# +# The HTML5 builder inherits from the XML builder, so make sure to read the +# Nokogiri::XML::Builder documentation. +# +# source://nokogiri//lib/nokogiri/html5/builder.rb#32 +class Nokogiri::HTML5::Builder < ::Nokogiri::XML::Builder + # Convert the builder to HTML + # + # source://nokogiri//lib/nokogiri/html5/builder.rb#35 + def to_html; end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document.rb#39 +class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/html5/document.rb#159 + def initialize(*args); end + + # :call-seq: + # fragment() → Nokogiri::HTML5::DocumentFragment + # fragment(markup) → Nokogiri::HTML5::DocumentFragment + # + # Parse a HTML5 document fragment from +markup+, returning a Nokogiri::HTML5::DocumentFragment. + # + # [Properties] + # - +markup+ (String) The HTML5 markup fragment to be parsed + # + # [Returns] + # Nokogiri::HTML5::DocumentFragment. This object's children will be empty if +markup+ is not + # passed, is empty, or is +nil+. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#178 + def fragment(markup = T.unsafe(nil)); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns +nil+ if the parser was not invoked (e.g., Nokogiri::HTML5::Document.new). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document.rb#49 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document.rb#182 + def to_xml(options = T.unsafe(nil), &block); end + + # Get the url name for this document, as passed into Document.parse, Document.read_io, or + # Document.read_memory + # + # source://nokogiri//lib/nokogiri/html5/document.rb#42 + def url; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See CSS::XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#194 + def xpath_doctype; end + + class << self + # :call-seq: + # parse(input) { |options| ... } → HTML5::Document + # parse(input, **options) → HTML5::Document + # + # Parse \HTML input with a parser compliant with the HTML5 spec. This method uses the + # parameter. + # + # [Required Parameters] + # - +input+ (String | IO) the \HTML content to be parsed. + # + # [Optional Parameters] + # - +url:+ (String) the base URI of the document. + # + # [Optional Keyword Arguments] + # document. When not provided, the encoding will be determined based on the document + # content. + # + # - +max_errors:+ (Integer) The maximum number of parse errors to record. (default + # +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS+ which is currently 0) + # + # - +max_tree_depth:+ (Integer) The maximum depth of the parse tree. (default + # +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) + # + # - +max_attributes:+ (Integer) The maximum number of attributes allowed on an + # element. (default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) + # + # - +parse_noscript_content_as_text:+ (Boolean) Whether to parse the content of +noscript+ + # elements as text. (default +false+) + # + # See rdoc-ref:HTML5@Parsing+options for a complete description of these parsing options. + # + # [Yields] + # If present, the block will be passed a Hash object to modify with parse options before the + # input is parsed. See rdoc-ref:HTML5@Parsing+options for a list of available options. + # + # + # [Returns] Nokogiri::HTML5::Document + # + # *Example:* Parse a string with a specific encoding and custom max errors limit. + # + # + # *Example:* Parse a string setting the +:parse_noscript_content_as_text+ option using the + # configuration block parameter. + # + # Nokogiri::HTML5::Document.parse(input) { |c| c[:parse_noscript_content_as_text] = true } + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#103 + def parse(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options, &block); end + + # Create a new document from an IO object. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#129 + def read_io(io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options); end + + # Create a new document from a String. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#138 + def read_memory(string, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options); end + + private + + # source://nokogiri//lib/nokogiri/html5/document.rb#146 + def do_parse(string_or_io, url, encoding, **options); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27 +class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment + # :call-seq: + # new(document, input, **options) → HTML5::DocumentFragment + # + # Parse \HTML5 fragment input from a String, and return a new HTML5::DocumentFragment. + # + # 💡 It's recommended to use either HTML5::DocumentFragment.parse or HTML5::Node#fragment + # rather than call this method directly. + # + # [Required Parameters] + # - +document+ (HTML5::Document) The parent document to associate the returned fragment with. + # + # [Optional Parameters] + # - +input+ (String) The content to be parsed. + # + # [Optional Keyword Arguments] + # used when processing the document. When not provided, the encoding will be determined + # based on the document content. Also see Nokogiri::HTML5 for a longer explanation of how + # encoding is handled by the parser. + # + # - +context:+ (String | Nokogiri::XML::Node) The node, or the name of an HTML5 element, in + # which to parse the document fragment. (default +"body"+) + # + # - +max_errors:+ (Integer) The maximum number of parse errors to record. (default + # +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS+ which is currently 0) + # + # - +max_tree_depth:+ (Integer) The maximum depth of the parse tree. (default + # +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) + # + # - +max_attributes:+ (Integer) The maximum number of attributes allowed on an + # element. (default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) + # + # - +parse_noscript_content_as_text:+ (Boolean) Whether to parse the content of +noscript+ + # elements as text. (default +false+) + # + # See rdoc-ref:HTML5@Parsing+options for a complete description of these parsing options. + # + # [Returns] HTML5::DocumentFragment + # + # === Context \Node + # + # If a context node is specified using +context:+, then the parser will behave as if that + # Node, or a hypothetical tag named as specified, is the parent of the fragment subtree. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#144 + def initialize(doc, input = T.unsafe(nil), context_ = T.unsafe(nil), positional_options_hash = T.unsafe(nil), context: T.unsafe(nil), **options); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#88 + def document; end + + # Sets the attribute document + # + # @param value the value to set the attribute document to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#88 + def document=(_arg0); end + + # Returns the value of attribute errors. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#89 + def errors; end + + # Sets the attribute errors + # + # @param value the value to set the attribute errors to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#89 + def errors=(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#175 + def extract_params(params); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., + # `Nokogiri::HTML5::DocumentFragment.new(doc)`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#97 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#169 + def serialize(options = T.unsafe(nil), &block); end + + class << self + # :call-seq: + # parse(input, **options) → HTML5::DocumentFragment + # + # Parse \HTML5 fragment input from a String, and return a new HTML5::DocumentFragment. This + # method creates a new, empty HTML5::Document to contain the fragment. + # + # [Parameters] + # - +input+ (String | IO) The HTML5 document fragment to parse. + # + # [Optional Keyword Arguments] + # used when processing the document. When not provided, the encoding will be determined + # based on the document content. Also see Nokogiri::HTML5 for a longer explanation of how + # encoding is handled by the parser. + # + # - +context:+ (String | Nokogiri::XML::Node) The node, or the name of an HTML5 element, "in + # context" of which to parse the document fragment. See below for more + # information. (default +"body"+) + # + # - +max_errors:+ (Integer) The maximum number of parse errors to record. (default + # +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS+ which is currently 0) + # + # - +max_tree_depth:+ (Integer) The maximum depth of the parse tree. (default + # +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) + # + # - +max_attributes:+ (Integer) The maximum number of attributes allowed on an + # element. (default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) + # + # - +parse_noscript_content_as_text:+ (Boolean) Whether to parse the content of +noscript+ + # elements as text. (default +false+) + # + # See rdoc-ref:HTML5@Parsing+options for a complete description of these parsing options. + # + # [Returns] Nokogiri::HTML5::DocumentFragment + # + # === Context \Node + # + # If a context node is specified using +context:+, then the parser will behave as if that + # Node, or a hypothetical tag named as specified, is the parent of the fragment subtree. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#69 + def parse(input, encoding_ = T.unsafe(nil), positional_options_hash = T.unsafe(nil), encoding: T.unsafe(nil), **options); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/node.rb#30 +module Nokogiri::HTML5::Node + # source://nokogiri//lib/nokogiri/html5/node.rb#70 + def fragment(tags); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#31 + def inner_html(options = T.unsafe(nil)); end + + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#39 + def write_to(io, *options); end + + private + + # HTML elements can have attributes that contain colons. + # Nokogiri::XML::Node#[]= treats names with colons as a prefixed QName + # and tries to create an attribute in a namespace. This is especially + # annoying with attribute names like xml:lang since libxml2 will + # actually create the xml namespace if it doesn't exist already. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#83 + def add_child_node_and_reparent_attrs(node); end +end + +# Enum for the HTML5 parser quirks mode values. Values returned by HTML5::Document#quirks_mode +# +# See https://dom.spec.whatwg.org/#concept-document-quirks for more information on HTML5 quirks +# mode. +# +# Since v1.14.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#30 +module Nokogiri::HTML5::QuirksMode; end + +# The document was parsed in "limited-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#33 +Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "no-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#31 +Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#32 +Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer) + +Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::LIBXML_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_ZLIB_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_DATETIME_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String) +Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) +Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) + +# source://nokogiri//lib/nokogiri/syntax_error.rb#4 +class Nokogiri::SyntaxError < ::StandardError; end + +module Nokogiri::Test + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def __foreign_error_handler; end + end +end + +# The version of Nokogiri you are using +# +# source://nokogiri//lib/nokogiri/version/constant.rb#5 +Nokogiri::VERSION = T.let(T.unsafe(nil), String) + +# Detailed version info about Nokogiri and the installed extension dependencies. +# +# source://nokogiri//lib/nokogiri/version/info.rb#223 +Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/version/info.rb#7 +class Nokogiri::VersionInfo + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://nokogiri//lib/nokogiri/version/info.rb#33 + def compiled_libxml_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#44 + def compiled_libxslt_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#22 + def engine; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#10 + def jruby?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#48 + def libxml2?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#52 + def libxml2_has_iconv?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#68 + def libxml2_precompiled?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#60 + def libxml2_using_packaged?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#64 + def libxml2_using_system?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#56 + def libxslt_has_datetime?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#26 + def loaded_libxml_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#37 + def loaded_libxslt_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#18 + def ruby_minor; end + + # source://nokogiri//lib/nokogiri/version/info.rb#88 + def to_hash; end + + # source://nokogiri//lib/nokogiri/version/info.rb#181 + def to_markdown; end + + # source://nokogiri//lib/nokogiri/version/info.rb#72 + def warnings; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#14 + def windows?; end + + class << self + private + + # source://nokogiri//lib/nokogiri/version/info.rb#8 + def allocate; end + + # source://nokogiri//lib/nokogiri/version/info.rb#8 + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml.rb#11 +module Nokogiri::XML + class << self + # Convenience method for Nokogiri::XML::Reader.new + # + # source://nokogiri//lib/nokogiri/xml.rb#21 + def Reader(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # RelaxNG(input) → Nokogiri::XML::RelaxNG + # RelaxNG(input, options:) → Nokogiri::XML::RelaxNG + # + # Convenience method for Nokogiri::XML::RelaxNG.new + # + # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#11 + def RelaxNG(*_arg0, **_arg1, &_arg2); end + + # :call-seq: + # Schema(input) → Nokogiri::XML::Schema + # Schema(input, parse_options) → Nokogiri::XML::Schema + # + # Convenience method for Nokogiri::XML::Schema.new + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#11 + def Schema(*_arg0, **_arg1, &_arg2); end + + # Convenience method for Nokogiri::XML::DocumentFragment.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#31 + def fragment(*_arg0, **_arg1, &_arg2); end + + # Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#26 + def parse(*_arg0, **_arg1, &_arg2); end + end +end + +# source://nokogiri//lib/nokogiri/xml/attr.rb#6 +class Nokogiri::XML::Attr < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/xml/attr.rb#9 + def content=(_arg0); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Attr, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of the attribute. + # - +value+ → (String) The value of the attribute. + # - +namespace+ → (Namespace, nil) The Namespace of the attribute, or +nil+ if there is no namespace. + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # XML + # + # attributes = doc.root.elements.first.attribute_nodes + # # => [#(Attr:0x35c { name = "foo", value = "abc" }), + # # #(Attr:0x370 { + # # name = "bar", + # # namespace = #(Namespace:0x384 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }), + # # value = "def" + # # })] + # + # attributes.first.deconstruct_keys([:name, :value, :namespace]) + # # => {:name=>"foo", :value=>"abc", :namespace=>nil} + # + # attributes.last.deconstruct_keys([:name, :value, :namespace]) + # # => {:name=>"bar", + # # :value=>"def", + # # :namespace=> + # # #(Namespace:0x384 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # })} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/attr.rb#55 + def deconstruct_keys(keys); end + + # source://nokogiri//lib/nokogiri/xml/attr.rb#8 + def to_s; end + + # source://nokogiri//lib/nokogiri/xml/attr.rb#7 + def value; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def value=(_arg0); end + + private + + # source://nokogiri//lib/nokogiri/xml/attr.rb#61 + def inspect_attributes; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# Represents an attribute declaration in a DTD +# +# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7 +class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute_type; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def default; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def enumeration; end + + private + + # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#17 + def inspect_attributes; end +end + +# Nokogiri builder can be used for building XML and HTML documents. +# +# == Synopsis: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.products { +# xml.widget { +# xml.id_ "10" +# xml.name "Awesome widget" +# } +# } +# } +# end +# puts builder.to_xml +# +# Will output: +# +# +# +# +# +# 10 +# Awesome widget +# +# +# +# +# +# === Builder scope +# +# The builder allows two forms. When the builder is supplied with a block +# that has a parameter, the outside scope is maintained. This means you +# can access variables that are outside your builder. If you don't need +# outside scope, you can use the builder without the "xml" prefix like +# this: +# +# builder = Nokogiri::XML::Builder.new do +# root { +# products { +# widget { +# id_ "10" +# name "Awesome widget" +# } +# } +# } +# end +# +# == Special Tags +# +# The builder works by taking advantage of method_missing. Unfortunately +# some methods are defined in ruby that are difficult or dangerous to +# remove. You may want to create tags with the name "type", "class", and +# "id" for example. In that case, you can use an underscore to +# disambiguate your tag name from the method call. +# +# Here is an example of using the underscore to disambiguate tag names from +# ruby methods: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object { +# xml.type_ o.type +# xml.class_ o.class.name +# xml.id_ o.id +# } +# end +# } +# } +# end +# puts builder.to_xml +# +# The underscore may be used with any tag name, and the last underscore +# will just be removed. This code will output the following XML: +# +# +# +# +# +# Object +# Object +# 48390 +# +# +# Object +# Object +# 48380 +# +# +# Object +# Object +# 48370 +# +# +# +# +# == Tag Attributes +# +# Tag attributes may be supplied as method arguments. Here is our +# previous example, but using attributes rather than tags: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object(:type => o.type, :class => o.class, :id => o.id) +# end +# } +# } +# end +# puts builder.to_xml +# +# === Tag Attribute Short Cuts +# +# A couple attribute short cuts are available when building tags. The +# short cuts are available by special method calls when building a tag. +# +# This example builds an "object" tag with the class attribute "classy" +# and the id of "thing": +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# xml.object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Which will output: +# +# +# +# +# +# +# +# +# All other options are still supported with this syntax, including +# blocks and extra tag attributes. +# +# == Namespaces +# +# Namespaces are added similarly to attributes. Nokogiri::XML::Builder +# assumes that when an attribute starts with "xmlns", it is meant to be +# a namespace: +# +# builder = Nokogiri::XML::Builder.new { |xml| +# xml.root('xmlns' => 'default', 'xmlns:foo' => 'bar') do +# xml.tenderlove +# end +# } +# puts builder.to_xml +# +# Will output XML like this: +# +# +# +# +# +# +# === Referencing declared namespaces +# +# Tags that reference non-default namespaces (i.e. a tag "foo:bar") can be +# built by using the Nokogiri::XML::Builder#[] method. +# +# For example: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root('xmlns:foo' => 'bar') { +# xml.objects { +# xml['foo'].object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Will output this XML: +# +# +# +# +# +# +# +# +# Note the "foo:object" tag. +# +# === Namespace inheritance +# +# In the Builder context, children will inherit their parent's namespace. This is the same +# behavior as if the underlying {XML::Document} set +namespace_inheritance+ to +true+: +# +# result = Nokogiri::XML::Builder.new do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# end +# end +# result.doc.to_xml +# # => +# # +# # +# # +# +# Users may turn this behavior off by passing a keyword argument +namespace_inheritance:false+ +# to the initializer: +# +# result = Nokogiri::XML::Builder.new(namespace_inheritance: false) do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# xml["soapenv"].Body # users may explicitly opt into the namespace +# end +# end +# result.doc.to_xml +# # => +# # +# #
    +# # +# # +# +# For more information on namespace inheritance, please see {XML::Document#namespace_inheritance} +# +# +# == Document Types +# +# To create a document type (DTD), use the Builder#doc method to get +# the current context document. Then call Node#create_internal_subset to +# create the DTD node. +# +# For example, this Ruby: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.doc.create_internal_subset( +# 'html', +# "-//W3C//DTD HTML 4.01 Transitional//EN", +# "http://www.w3.org/TR/html4/loose.dtd" +# ) +# xml.root do +# xml.foo +# end +# end +# +# puts builder.to_xml +# +# Will output this xml: +# +# +# +# +# +# +# +# source://nokogiri//lib/nokogiri/xml/builder.rb#264 +class Nokogiri::XML::Builder + include ::Nokogiri::ClassResolver + + # Create a new Builder object. +options+ are sent to the top level + # Document that is being built. + # + # Building a document with a particular encoding for example: + # + # Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| + # ... + # end + # + # @return [Builder] a new instance of Builder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#307 + def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end + + # Append the given raw XML +string+ to the document + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#390 + def <<(string); end + + # Build a tag that is associated with namespace +ns+. Raises an + # ArgumentError if +ns+ has not been defined higher in the tree. + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#358 + def [](ns); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity; end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity=(_arg0); end + + # Create a CDATA Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#345 + def cdata(string); end + + # Create a Comment Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#351 + def comment(string); end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context; end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context=(_arg0); end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc; end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#394 + def method_missing(method, *args, &block); end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent; end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent=(_arg0); end + + # Create a Text Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#339 + def text(string); end + + # Convert this Builder object to XML + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#377 + def to_xml(*args); end + + private + + # Insert +node+ as a child of the current Node + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#423 + def insert(node, &block); end + + class << self + # Create a builder with an existing root object. This is for use when + # you have an existing document that you would like to augment with + # builder methods. The builder context created will start with the + # given +root+ node. + # + # For example: + # + # doc = Nokogiri::XML(File.read('somedoc.xml')) + # Nokogiri::XML::Builder.with(doc.at_css('some_tag')) do |xml| + # # ... Use normal builder methods here ... + # xml.awesome # add the "awesome" tag below "some_tag" + # end + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#294 + def with(root, &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/builder.rb#267 +Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/xml/builder.rb#442 +class Nokogiri::XML::Builder::NodeBuilder + # @return [NodeBuilder] a new instance of NodeBuilder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#443 + def initialize(node, doc_builder); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#452 + def [](k); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#448 + def []=(k, v); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#456 + def method_missing(method, *args, &block); end +end + +# source://nokogiri//lib/nokogiri/xml/cdata.rb#5 +class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text + # Get the name of this CDATA node + # + # source://nokogiri//lib/nokogiri/xml/cdata.rb#8 + def name; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/character_data.rb#5 +class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node + include ::Nokogiri::XML::PP::CharacterData +end + +class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/dtd.rb#5 +class Nokogiri::XML::DTD < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attributes; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#17 + def each; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def elements; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def entities; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def external_id; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#27 + def html5_dtd?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#23 + def html_dtd?; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#13 + def keys; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def notations; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def system_id; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def validate(_arg0); end +end + +# Nokogiri::XML::Document is the main entry point for dealing with \XML documents. The Document +# is created by parsing \XML content from a String or an IO object. See +# Nokogiri::XML::Document.parse for more information on parsing. +# +# Document inherits a great deal of functionality from its superclass Nokogiri::XML::Node, so +# please read that class's documentation as well. +# +# source://nokogiri//lib/nokogiri/xml/document.rb#14 +class Nokogiri::XML::Document < ::Nokogiri::XML::Node + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/xml/document.rb#190 + def initialize(*args); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#449 + def <<(node_or_tags); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#437 + def add_child(node_or_tags); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def canonicalize(*_arg0); end + + # :call-seq: + # clone → Nokogiri::XML::Document + # clone(level) → Nokogiri::XML::Document + # + # Clone this node. + # + # [Parameters] + # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy. + # [Returns] The new Nokogiri::XML::Document + # + # source://nokogiri//lib/nokogiri/xml/document.rb#223 + def clone(level = T.unsafe(nil)); end + + # :call-seq: + # collect_namespaces() → Hash + # + # Recursively get all namespaces from this node and its subtree and return them as a + # hash. + # + # ⚠ This method will not handle duplicate namespace prefixes, since the return value is a hash. + # + # Note that this method does an xpath lookup for nodes with namespaces, and as a result the + # order (and which duplicate prefix "wins") may be dependent on the implementation of the + # underlying XML library. + # + # *Example:* Basic usage + # + # Given this document: + # + # + # + # + # + # This method will return: + # + # {"xmlns:foo"=>"bar", "xmlns"=>"default", "xmlns:hello"=>"world"} + # + # *Example:* Duplicate prefixes + # + # Given this document: + # + # + # + # + # + # The hash returned will be something like: + # + # {"xmlns:foo" => "baz"} + # + # source://nokogiri//lib/nokogiri/xml/document.rb#361 + def collect_namespaces; end + + # Create a CDATA Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#306 + def create_cdata(string, &block); end + + # Create a Comment Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#311 + def create_comment(string, &block); end + + # :call-seq: + # create_element(name, *contents_or_attrs, &block) → Nokogiri::XML::Element + # + # Create a new Element with `name` belonging to this document, optionally setting contents or + # attributes. + # + # This method is _not_ the most user-friendly option if your intention is to add a node to the + # document tree. Prefer one of the Nokogiri::XML::Node methods like Node#add_child, + # Node#add_next_sibling, Node#replace, etc. which will both create an element (or subtree) and + # place it in the document tree. + # + # Arguments may be passed to initialize the element: + # + # - a Hash argument will be used to set attributes + # - a non-Hash object that responds to \#to_s will be used to set the new node's contents + # + # A block may be passed to mutate the node. + # + # [Parameters] + # - `name` (String) + # - `contents_or_attrs` (\#to_s, Hash) + # [Yields] `node` (Nokogiri::XML::Element) + # [Returns] Nokogiri::XML::Element + # + # *Example:* An empty element without attributes + # + # doc.create_element("div") + # # =>
    + # + # *Example:* An element with contents + # + # doc.create_element("div", "contents") + # # =>
    contents
    + # + # *Example:* An element with attributes + # + # doc.create_element("div", {"class" => "container"}) + # # =>
    + # + # *Example:* An element with contents and attributes + # + # doc.create_element("div", "contents", {"class" => "container"}) + # # =>
    contents
    + # + # *Example:* Passing a block to mutate the element + # + # doc.create_element("div") { |node| node["class"] = "blue" if before_noon? } + # + # source://nokogiri//lib/nokogiri/xml/document.rb#276 + def create_element(name, *contents_or_attrs, &block); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def create_entity(*_arg0); end + + # Create a Text Node with +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#301 + def create_text_node(string, &block); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Document, to use in pattern matching. + # + # Valid keys and their values: + # - +root+ → (Node, nil) The root node of the Document, or +nil+ if the document is empty. + # + # In the future, other keys may allow accessing things like doctype and processing + # instructions. If you have a use case and would like this functionality, please let us know + # by opening an issue or a discussion on the github project. + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # XML + # + # doc.deconstruct_keys([:root]) + # # => {:root=> + # # #(Element:0x35c { + # # name = "root", + # # children = [ + # # #(Text "\n" + " "), + # # #(Element:0x370 { name = "child", children = [ #(Text "\n")] }), + # # #(Text "\n")] + # # })} + # + # *Example* of an empty document + # + # doc = Nokogiri::XML::Document.new + # + # doc.deconstruct_keys([:root]) + # # => {:root=>nil} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#501 + def deconstruct_keys(keys); end + + # Apply any decorators to +node+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#409 + def decorate(node); end + + # Get the list of decorators given +key+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#368 + def decorators(key); end + + # A reference to +self+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#321 + def document; end + + # :call-seq: + # dup → Nokogiri::XML::Document + # dup(level) → Nokogiri::XML::Document + # + # Duplicate this node. + # + # [Parameters] + # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy. + # [Returns] The new Nokogiri::XML::Document + # + # source://nokogiri//lib/nokogiri/xml/document.rb#207 + def dup(level = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def encoding; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def encoding=(_arg0); end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#141 + def errors; end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#141 + def errors=(_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # Returns an empty fragment if +tags+ is nil. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#429 + def fragment(tags = T.unsafe(nil)); end + + # The name of this document. Always returns "document" + # + # source://nokogiri//lib/nokogiri/xml/document.rb#316 + def name; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#188 + def namespace_inheritance; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#188 + def namespace_inheritance=(_arg0); end + + # Get the hash of namespaces on the root Nokogiri::XML::Node + # + # source://nokogiri//lib/nokogiri/xml/document.rb#422 + def namespaces; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def remove_namespaces!; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def root; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def root=(_arg0); end + + # Explore a document with shortcut methods. See Nokogiri::Slop for details. + # + # Note that any nodes that have been instantiated before #slop! + # is called will not be decorated with sloppy behavior. So, if you're in + # irb, the preferred idiom is: + # + # irb> doc = Nokogiri::Slop my_markup + # + # and not + # + # irb> doc = Nokogiri::HTML my_markup + # ... followed by irb's implicit inspect (and therefore instantiation of every node) ... + # irb> doc.slop! + # ... which does absolutely nothing. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#398 + def slop!; end + + # source://nokogiri//lib/nokogiri/xml/document.rb#419 + def to_xml(*args, &block); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def url; end + + # Validate this Document against its DTD. Returns a list of errors on + # the document or +nil+ when there is no DTD. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#376 + def validate; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def version; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#457 + def xpath_doctype; end + + protected + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_copy_with_args(_arg0, _arg1); end + + private + + # source://nokogiri//lib/nokogiri/xml/document.rb#509 + def inspect_attributes; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + + # call-seq: + # parse(input) { |options| ... } => Nokogiri::XML::Document + # + # Parse \XML input from a String or IO object, and return a new XML::Document. + # + # 🛡 By default, Nokogiri treats documents as untrusted, and so does not attempt to load DTDs + # or access the network. See Nokogiri::XML::ParseOptions for a complete list of options; and + # that module's DEFAULT_XML constant for what's set (and not set) by default. + # + # [Required Parameters] + # - +input+ (String | IO) The content to be parsed. + # + # [Optional Keyword Arguments] + # - +url:+ (String) The base URI for this document. + # + # document. When not provided, the encoding will be determined based on the document + # content. + # + # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some + # behaviors during parsing. See ParseOptions for more information. The default value is + # +ParseOptions::DEFAULT_XML+. + # + # [Yields] + # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which + # can be configured before parsing. See Nokogiri::XML::ParseOptions for more information. + # + # [Returns] Nokogiri::XML::Document + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#56 + def parse(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def read_io(_arg0, _arg1, _arg2, _arg3); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def read_memory(_arg0, _arg1, _arg2, _arg3); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#96 + def empty_doc?(string_or_io); end + end +end + +# source://nokogiri//lib/nokogiri/xml/document.rb#507 +Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/document.rb#19 +Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document.rb#20 +Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp) + +# See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. Note that we're not +# attempting to handle unicode characters partly because libxml2 doesn't handle unicode +# characters in NCNAMEs. +# +# source://nokogiri//lib/nokogiri/xml/document.rb#18 +Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document.rb#23 +Nokogiri::XML::Document::OBJECT_CLONE_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://nokogiri//lib/nokogiri/xml/document.rb#22 +Nokogiri::XML::Document::OBJECT_DUP_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# DocumentFragment represents a fragment of an \XML document. It provides the same functionality +# exposed by XML::Node and can be used to contain one or more \XML subtrees. +# +# source://nokogiri//lib/nokogiri/xml/document_fragment.rb#8 +class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node + # :call-seq: + # new(document, input=nil) { |options| ... } → DocumentFragment + # new(document, input=nil, context:, options:) → DocumentFragment + # + # Parse \XML fragment input from a String, and return a new DocumentFragment that is + # associated with the given +document+. + # + # 💡 It's recommended to use either XML::DocumentFragment.parse or Node#parse rather than call + # this method directly. + # + # [Required Parameters] + # - +document+ (XML::Document) The parent document to associate the returned fragment with. + # + # [Optional Parameters] + # - +input+ (String) The content to be parsed. + # + # [Optional Keyword Arguments] + # - +context:+ (Nokogiri::XML::Node) The context node for the subtree created. See + # below for more information. + # + # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some + # behaviors during parsing. See ParseOptions for more information. The default value is + # +ParseOptions::DEFAULT_XML+. + # + # [Yields] + # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which + # can be configured before parsing. See ParseOptions for more information. + # + # [Returns] XML::DocumentFragment + # + # === Context \Node + # + # If a context node is specified using +context:+, then the fragment will be created by + # calling Node#parse on that node, so the parser will behave as if that Node is the parent of + # the fragment subtree, and will resolve namespaces relative to that node. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#85 + def initialize(document, tags = T.unsafe(nil), context_ = T.unsafe(nil), options_ = T.unsafe(nil), context: T.unsafe(nil), options: T.unsafe(nil)); end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this fragment for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#173 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the root nodes of this document fragment as an array, to use in pattern matching. + # + # 💡 Note that text nodes are returned as well as elements. If you wish to operate only on + # root elements, you should deconstruct the array returned by + # DocumentFragment#elements. + # + # *Example* + # + # frag = Nokogiri::HTML5.fragment(<<~HTML) + #
    Start
    + # This is a shortcut for you. + #
    End
    + # HTML + # + # frag.deconstruct + # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }), + # # #(Text "\n" + "This is a "), + # # #(Element:0x370 { + # # name = "a", + # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })], + # # children = [ #(Text "shortcut")] + # # }), + # # #(Text " for you.\n"), + # # #(Element:0x398 { name = "div", children = [ #(Text "End")] }), + # # #(Text "\n")] + # + # *Example* only the elements, not the text nodes. + # + # frag.elements.deconstruct + # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }), + # # #(Element:0x370 { + # # name = "a", + # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })], + # # children = [ #(Text "shortcut")] + # # }), + # # #(Element:0x398 { name = "div", children = [ #(Text "End")] })] + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#261 + def deconstruct; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#113 + def dup; end + + # A list of Nokogiri::XML::SyntaxError found when parsing a document + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#207 + def errors; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#211 + def errors=(things); end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#215 + def fragment(data); end + + # return the name for DocumentFragment + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#125 + def name; end + + # The options used to parse the document fragment. Returns the value of any options that were + # passed into the constructor as a parameter or set in a config block, else the default + # options for the specific subclass. + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#12 + def parse_options; end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this fragment for +paths+. +paths+ must be one or more XPath or CSS queries. + # + # For more information see Nokogiri::XML::Searchable#search + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#192 + def search(*rules); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#204 + def serialize; end + + # Convert this DocumentFragment to html + # See Nokogiri::XML::NodeSet#to_html + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#138 + def to_html(*args); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#131 + def to_s; end + + # Convert this DocumentFragment to xhtml + # See Nokogiri::XML::NodeSet#to_xhtml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#150 + def to_xhtml(*args); end + + # Convert this DocumentFragment to xml + # See Nokogiri::XML::NodeSet#to_xml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#162 + def to_xml(*args); end + + private + + # fix for issue 770 + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#268 + def namespace_declarations(ctx); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_new(_arg0); end + + # Wrapper method to separate the concerns of: + # - the native object allocator's parameter (it only requires `document`) + # - the initializer's parameters + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#42 + def new(document, *_arg1, **_arg2, &_arg3); end + + # :call-seq: + # parse(input) { |options| ... } → XML::DocumentFragment + # parse(input, options:) → XML::DocumentFragment + # + # Parse \XML fragment input from a String, and return a new XML::DocumentFragment. This + # method creates a new, empty XML::Document to contain the fragment. + # + # [Required Parameters] + # - +input+ (String) The content to be parsed. + # + # [Optional Keyword Arguments] + # - +options+ (Nokogiri::XML::ParseOptions) Configuration object that determines some + # behaviors during parsing. See ParseOptions for more information. The default value is + # +ParseOptions::DEFAULT_XML+. + # + # [Yields] + # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which + # can be configured before parsing. See Nokogiri::XML::ParseOptions for more information. + # + # [Returns] Nokogiri::XML::DocumentFragment + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#35 + def parse(tags, options_ = T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end + +# Represents the allowed content in an Element Declaration inside a DTD: +# +# +# +# ]> +# +# +# ElementContent represents the binary tree inside the tag shown above that lists the +# possible content for the div1 tag. +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#16 +class Nokogiri::XML::ElementContent + include ::Nokogiri::XML::PP::Node + + # Get the children of this ElementContent node + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#35 + def children; end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#31 + def document; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def name; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def occur; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def prefix; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def type; end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def c1; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def c2; end + + # source://nokogiri//lib/nokogiri/xml/element_content.rb#41 + def inspect_attributes; end +end + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#21 +Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#28 +Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer) + +# Possible content occurrences +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#26 +Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#27 +Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#23 +Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer) + +# Possible definitions of type +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#20 +Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#29 +Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#22 +Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_decl.rb#5 +class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/extension.rb#7 + def content; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def element_type; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/element_decl.rb#12 + def inspect_attributes; end +end + +# source://nokogiri//lib/nokogiri/xml/entity_decl.rb#5 +class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/extension.rb#7 + def content; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def entity_type; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def external_id; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def original_content; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def system_id; end + + private + + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#18 + def inspect_attributes; end + + class << self + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#12 + def new(name, doc, *args); end + end +end + +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/entity_reference.rb#5 +class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#6 + def children; end + + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#15 + def inspect_attributes; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/namespace.rb#6 +class Nokogiri::XML::Namespace + include ::Nokogiri::XML::PP::Node + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Namespace, to use in pattern matching. + # + # Valid keys and their values: + # - +prefix+ → (String, nil) The namespace's prefix, or +nil+ if there is no prefix (e.g., default namespace). + # - +href+ → (String) The namespace's URI + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # + # XML + # + # doc.root.elements.first.namespace + # # => #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" }) + # + # doc.root.elements.first.namespace.deconstruct_keys([:prefix, :href]) + # # => {:prefix=>nil, :href=>"http://nokogiri.org/ns/default"} + # + # doc.root.elements.last.namespace + # # => #(Namespace:0x370 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }) + # + # doc.root.elements.last.namespace.deconstruct_keys([:prefix, :href]) + # # => {:prefix=>"noko", :href=>"http://nokogiri.org/ns/noko"} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#46 + def deconstruct_keys(keys); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#8 + def document; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def href; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/namespace.rb#52 + def inspect_attributes; end +end + +# Nokogiri::XML::Node is the primary API you'll use to interact with your Document. +# +# == Attributes +# +# A Nokogiri::XML::Node may be treated similarly to a hash with regard to attributes. For +# example: +# +# node = Nokogiri::XML::DocumentFragment.parse("link").at_css("a") +# node.to_html # => "link" +# node['href'] # => "#foo" +# node.keys # => ["href", "id"] +# node.values # => ["#foo", "link"] +# node['class'] = 'green' # => "green" +# node.to_html # => "link" +# +# See the method group entitled Node@Working+With+Node+Attributes for the full set of methods. +# +# == Navigation +# +# Nokogiri::XML::Node also has methods that let you move around your tree: +# +# [#parent, #children, #next, #previous] +# Navigate up, down, or through siblings. +# +# See the method group entitled Node@Traversing+Document+Structure for the full set of methods. +# +# == Serialization +# +# When printing or otherwise emitting a document or a node (and its subtree), there are a few +# methods you might want to use: +# +# [#content, #text, #inner_text, #to_str] +# These methods will all **emit plaintext**, +# meaning that entities will be replaced (e.g., +<+ will be replaced with +<+), meaning +# that any sanitizing will likely be un-done in the output. +# +# [#to_s, #to_xml, #to_html, #inner_html] +# These methods will all **emit properly-escaped markup**, meaning that it's suitable for +# consumption by browsers, parsers, etc. +# +# See the method group entitled Node@Serialization+and+Generating+Output for the full set of methods. +# +# == Searching +# +# You may search this node's subtree using methods like #xpath and #css. +# +# See the method group entitled Node@Searching+via+XPath+or+CSS+Queries for the full set of methods. +# +# source://nokogiri//lib/nokogiri/xml/node.rb#56 +class Nokogiri::XML::Node + include ::Nokogiri::HTML5::Node + include ::Nokogiri::XML::PP::Node + include ::Nokogiri::XML::Searchable + include ::Nokogiri::ClassResolver + include ::Enumerable + + # :call-seq: + # new(name, document) -> Nokogiri::XML::Node + # new(name, document) { |node| ... } -> Nokogiri::XML::Node + # + # Create a new node with +name+ that belongs to +document+. + # + # If you intend to add a node to a document tree, it's likely that you will prefer one of the + # Nokogiri::XML::Node methods like #add_child, #add_next_sibling, #replace, etc. which will + # both create an element (or subtree) and place it in the document tree. + # + # Another alternative, if you are concerned about performance, is + # Nokogiri::XML::Document#create_element which accepts additional arguments for contents or + # attributes but (like this method) avoids parsing markup. + # + # [Parameters] + # - +name+ (String) + # - +document+ (Nokogiri::XML::Document) The document to which the the returned node will belong. + # [Yields] Nokogiri::XML::Node + # [Returns] Nokogiri::XML::Node + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#126 + def initialize(name, document); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls (e.g., root << child1 << child2) + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#292 + def <<(node_or_tags); end + + # Compare two Node objects with respect to their Document. Nodes from + # different documents cannot be compared. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1340 + def <=>(other); end + + # Test to see if this Node is equal to +other+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1330 + def ==(other); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#587 + def [](name); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#625 + def []=(name, value); end + + # Accept a visitor. This method calls "visit" on +visitor+ with self. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1324 + def accept(visitor); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +<<+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#184 + def add_child(node_or_tags); end + + # :call-seq: add_class(names) → self + # + # Ensure HTML CSS classes are present on +self+. Any CSS classes in +names+ that already exist + # in the "class" attribute are _not_ added. Note that any existing duplicates in the + # "class" attribute are not removed. Compare with #append_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_add("class", names) + # + # See related: #kwattr_add, #classes, #append_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be added to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. Any class names already present + # will not be added. Any class names not present will be added. If no "class" attribute + # exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Ensure that the node has CSS class "section" + # + # node # =>
    + # node.add_class("section") # =>
    + # node.add_class("section") # =>
    # duplicate not added + # + # *Example:* Ensure that the node has CSS classes "section" and "header", via a String argument + # + # Note that the CSS class "section" is not added because it is already present. + # Note also that the pre-existing duplicate CSS class "section" is not removed. + # + # node # =>
    + # node.add_class("section header") # =>
    + # + # *Example:* Ensure that the node has CSS classes "section" and "header", via an Array argument + # + # node # =>
    + # node.add_class(["section", "header"]) # =>
    + # + # source://nokogiri//lib/nokogiri/xml/node.rb#790 + def add_class(names); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#544 + def add_namespace(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def add_namespace_definition(_arg0, _arg1); end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#324 + def add_next_sibling(node_or_tags); end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#307 + def add_previous_sibling(node_or_tags); end + + # Insert +node_or_tags+ after this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_next_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#354 + def after(node_or_tags); end + + # Get a list of ancestor Node for this Node. If +selector+ is given, + # the ancestors must match +selector+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1293 + def ancestors(selector = T.unsafe(nil)); end + + # :call-seq: append_class(names) → self + # + # Add HTML CSS classes to +self+, regardless of duplication. Compare with #add_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_append("class", names) + # + # See related: #kwattr_append, #classes, #add_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be appended to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. All class names passed in will be + # appended to the "class" attribute even if they are already present in the attribute + # value. If no "class" attribute exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "section" to the node's CSS "class" attribute + # + # node # =>
    + # node.append_class("section") # =>
    + # node.append_class("section") # =>
    # duplicate added! + # + # *Example:* Append "section" and "header" to the noded's CSS "class" attribute, via a String argument + # + # Note that the CSS class "section" is appended even though it is already present + # + # node # =>
    + # node.append_class("section header") # =>
    + # + # *Example:* Append "section" and "header" to the node's CSS "class" attribute, via an Array argument + # + # node # =>
    + # node.append_class(["section", "header"]) # =>
    + # node.append_class(["section", "header"]) # =>
    + # + # source://nokogiri//lib/nokogiri/xml/node.rb#834 + def append_class(names); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1082 + def attr(name); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute_nodes; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute_with_ns(_arg0, _arg1); end + + # :call-seq: attributes() → Hash + # + # Fetch this node's attributes. + # + # ⚠ Because the keys do not include any namespace information for the attribute, in case of a + # simple name collision, not all attributes will be returned. In this case, you will need to + # use #attribute_nodes. + # + # [Returns] + # Hash containing attributes belonging to +self+. The hash keys are String attribute + # names (without the namespace), and the hash values are Nokogiri::XML::Attr. + # + # *Example* with no namespaces: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=>#(Attr:0x550 { name = "size", value = "large" }), + # # "class"=>#(Attr:0x564 { name = "class", value = "big wide tall" })} + # + # *Example* with a namespace: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "desc", + # # href = "http://example.com/sizes" + # # }), + # # value = "large" + # # })} + # + # *Example* with an attribute name collision: + # + # ⚠ Note that only one of the attributes is returned in the Hash. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "height", + # # href = "http://example.com/heights" + # # }), + # # value = "tall" + # # })} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#684 + def attributes; end + + # Insert +node_or_tags+ before this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_previous_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#340 + def before(node_or_tags); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def blank?; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1492 + def canonicalize(mode = T.unsafe(nil), inclusive_namespaces = T.unsafe(nil), with_comments = T.unsafe(nil)); end + + # Returns true if this is a CDATA + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1214 + def cdata?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def child; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def children; end + + # Set the content for this Node +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Also see related method +inner_html=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#385 + def children=(node_or_tags); end + + # :call-seq: classes() → Array + # + # Fetch CSS class names of a Node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_values("class") + # + # See related: #kwattr_values, #add_class, #append_class, #remove_class + # + # [Returns] + # The CSS classes (Array of String) present in the Node's "class" attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example* + # + # node # =>
    + # node.classes # => ["section", "title", "header"] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#744 + def classes; end + + # :call-seq: + # clone → Nokogiri::XML::Node + # clone(level) → Nokogiri::XML::Node + # clone(level, new_parent_doc) → Nokogiri::XML::Node + # + # Clone this node. + # + # [Parameters] + # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy. + # - +new_parent_doc+ + # The new node's parent Document. Defaults to the the Document of the current node. + # [Returns] The new Nokogiri::XML::Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#162 + def clone(level = T.unsafe(nil), new_parent_doc = T.unsafe(nil)); end + + # Returns true if this is a Comment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1209 + def comment?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def content; end + + # call-seq: + # content=(input) + # + # Set the content of this node to +input+. + # + # [Parameters] + # - +input+ (String) The new content for this node. Input is considered to be raw content, and + # so will be entity-escaped in the final DOM string. + # + # [Example] + # Note how entities are handled: + # + # doc = Nokogiri::HTML::Document.parse(<<~HTML) + # + # + #
    asdf
    + #
    asdf
    + # HTML + # + # text_node = doc.at_css("div#first").children.first + # div_node = doc.at_css("div#second") + # + # value = "You & Me" + # + # text_node.content = value + # div_node.content = value + # + # doc.css("div").to_html + # # => "
    You &amp; Me
    + # #
    You &amp; Me
    " + # + # For content that is already entity-escaped, use CGI::unescapeHTML to decode it: + # + # text_node.content = CGI::unescapeHTML(value) + # div_node.content = CGI::unescapeHTML(value) + # + # doc.css("div").to_html + # # => "
    You & Me
    + # #
    You & Me
    " + # + # See also: #native_content= + # + # source://nokogiri//lib/nokogiri/xml/node.rb#487 + def content=(string); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def create_external_subset(_arg0, _arg1, _arg2); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def create_internal_subset(_arg0, _arg1, _arg2); end + + # Get the path to this node as a CSS expression + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1284 + def css_path; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def data_ptr?; end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Node, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of this node, or "text" if it is a Text node. + # - +namespace+ → (Namespace, nil) The namespace of this node, or nil if there is no namespace. + # - +attributes+ → (Array) The attributes of this node. + # - +children+ → (Array) The children of this node. 💡 Note this includes text nodes. + # - +elements+ → (Array) The child elements of this node. 💡 Note this does not include text nodes. + # - +content+ → (String) The contents of all the text nodes in this node's subtree. See #content. + # - +inner_html+ → (String) The inner markup for the children of this node. See #inner_html. + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # First + # Second + # + # XML + # + # doc.root.deconstruct_keys([:name, :namespace]) + # # => {:name=>"parent", + # # :namespace=> + # # #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" })} + # + # doc.root.deconstruct_keys([:inner_html, :content]) + # # => {:content=>"\n" + " First\n" + " Second\n", + # # :inner_html=> + # # "\n" + + # # " First\n" + + # # " Second\n"} + # + # doc.root.elements.first.deconstruct_keys([:attributes]) + # # => {:attributes=> + # # [#(Attr:0x370 { name = "foo", value = "abc" }), + # # #(Attr:0x384 { + # # name = "bar", + # # namespace = #(Namespace:0x398 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }), + # # value = "def" + # # })]} + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1553 + def deconstruct_keys(keys); end + + # Decorate this node with the decorators set up in this node's Document + # + # source://nokogiri//lib/nokogiri/xml/node.rb#168 + def decorate!; end + + # Adds a default namespace supplied as a string +url+ href, to self. + # The consequence is as an xmlns attribute with supplied argument were + # present in parsed XML. A default namespace set with this method will + # now show up in #attributes, but when this node is serialized to XML an + # "xmlns" attribute will appear. See also #namespace and #namespace= + # + # source://nokogiri//lib/nokogiri/xml/node.rb#503 + def default_namespace=(url); end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1080 + def delete(name); end + + # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns + # nil on XML documents and on unknown tags. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1251 + def description; end + + # Do xinclude substitution on the subtree below node. If given a block, a + # Nokogiri::XML::ParseOptions object initialized from +options+, will be + # passed to it, allowing more convenient modification of the parser options. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#530 + def do_xinclude(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def document; end + + # Returns true if this is a Document + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1229 + def document?; end + + # :call-seq: + # dup → Nokogiri::XML::Node + # dup(level) → Nokogiri::XML::Node + # dup(level, new_parent_doc) → Nokogiri::XML::Node + # + # Duplicate this node. + # + # [Parameters] + # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy. + # - +new_parent_doc+ (optional Nokogiri::XML::Document) + # The new node's parent Document. Defaults to the the Document of the current node. + # [Returns] The new Nokogiri::XML::Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#144 + def dup(level = T.unsafe(nil), new_parent_doc = T.unsafe(nil)); end + + # Iterate over each attribute name and value pair for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#710 + def each; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1269 + def elem?; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1265 + def element?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def element_children; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#553 + def elements; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def encode_special_chars(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def external_subset; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def first_element_child; end + + # Create a DocumentFragment containing +tags+ that is relative to _this_ + # context node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1097 + def fragment(tags); end + + # Returns true if this is a DocumentFragment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1244 + def fragment?; end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1081 + def get_attribute(name); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1084 + def has_attribute?(_arg0); end + + # Returns true if this is an HTML4::Document or HTML5::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1224 + def html?; end + + # Get the inner_html for this node's Node#children + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1279 + def inner_html(options = T.unsafe(nil)); end + + # Set the content for this Node to +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # ⚠ Please note that despite the name, this method will *not* always parse a String argument + # as HTML. A String argument will be parsed with the +DocumentFragment+ parser related to this + # node's document. + # + # For example, if the document is an HTML4::Document then the string will be parsed as HTML4 + # using HTML4::DocumentFragment; but if the document is an XML::Document then it will + # parse the string as XML using XML::DocumentFragment. + # + # Also see related method +children=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#374 + def inner_html=(node_or_tags); end + + # :section: + # + # source://nokogiri//lib/nokogiri/xml/node.rb#548 + def inner_text; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def internal_subset; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def key?(_arg0); end + + # Get the attribute names for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#704 + def keys; end + + # :call-seq: + # kwattr_add(attribute_name, keywords) → self + # + # Ensure that values are present in a keyword attribute. + # + # Any values in +keywords+ that already exist in the Node's attribute values are _not_ + # added. Note that any existing duplicates in the attribute values are not removed. Compare + # with #kwattr_append. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #add_class, #kwattr_values, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. Any values already present will + # not be added. Any values not present will be added. If the named attribute does not exist, + # it is created. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example:* Ensure that a +Node+ has "nofollow" in its +rel+ attribute. + # + # Note that duplicates are not added. + # + # node # => + # node.kwattr_add("rel", "nofollow") # => + # node.kwattr_add("rel", "nofollow") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via a + # String argument. + # + # Note that "nofollow" is not added because it is already present. Note also that the + # pre-existing duplicate "nofollow" is not removed. + # + # node # => + # node.kwattr_add("rel", "nofollow noreferrer") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via + # an Array argument. + # + # node # => + # node.kwattr_add("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#967 + def kwattr_add(attribute_name, keywords); end + + # :call-seq: + # kwattr_append(attribute_name, keywords) → self + # + # Add keywords to a Node's keyword attribute, regardless of duplication. Compare with + # #kwattr_add. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #append_class, #kwattr_values, #kwattr_add, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. All values passed in will be + # appended to the named attribute even if they are already present in the attribute. If the + # named attribute does not exist, it is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "nofollow" to the +rel+ attribute. + # + # Note that duplicates are added. + # + # node # => + # node.kwattr_append("rel", "nofollow") # => + # node.kwattr_append("rel", "nofollow") # => + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via a String argument. + # + # Note that "nofollow" is appended even though it is already present. + # + # node # => + # node.kwattr_append("rel", "nofollow noreferrer") # => + # + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via an Array argument. + # + # node # => + # node.kwattr_append("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1020 + def kwattr_append(attribute_name, keywords); end + + # :call-seq: + # kwattr_remove(attribute_name, keywords) → self + # + # Remove keywords from a keyword attribute. Any matching keywords that exist in the named + # attribute are removed, including any multiple entries. + # + # If no keywords remain after this operation, or if +keywords+ is +nil+, the attribute is + # deleted from the node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #remove_class, #kwattr_values, #kwattr_add, #kwattr_append + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be removed from the attribute named +attribute_name+. May be a string + # containing whitespace-delimited values, or an Array of String values. Any keywords present + # in the named attribute will be removed. If no keywords remain, or if +keywords+ is nil, + # the attribute is deleted. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* + # + # Note that the +rel+ attribute is deleted when empty. + # + # node # => link + # node.kwattr_remove("rel", "nofollow") # => link + # node.kwattr_remove("rel", "noreferrer") # => link + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1063 + def kwattr_remove(attribute_name, keywords); end + + # :call-seq: + # kwattr_values(attribute_name) → Array + # + # Fetch values from a keyword attribute of a Node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #classes, #kwattr_add, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be inspected. + # + # [Returns] + # (Array) The values present in the Node's +attribute_name+ attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example:* + # + # node # => link + # node.kwattr_values("rel") # => ["nofollow", "noopener", "external"] + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#913 + def kwattr_values(attribute_name); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def lang; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def lang=(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def last_element_child; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def line; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def line=(_arg0); end + + # Returns true if this Node matches +selector+ + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1090 + def matches?(selector); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#551 + def name; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#543 + def name=(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def namespace; end + + # Set the default namespace on this node (as would be defined with an + # "xmlns=" attribute in XML source), as a Namespace object +ns+. Note that + # a Namespace added this way will NOT be serialized as an xmlns attribute + # for this node. You probably want #default_namespace= instead, or perhaps + # #add_namespace_definition with a nil prefix argument. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#513 + def namespace=(ns); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def namespace_definitions; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def namespace_scopes; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def namespaced_key?(_arg0, _arg1); end + + # :call-seq: + # namespaces() → Hash + # + # Fetch all the namespaces on this node and its ancestors. + # + # Note that the keys in this hash XML attributes that would be used to define this namespace, + # such as "xmlns:prefix", not just the prefix. + # + # The default namespace for this node will be included with key "xmlns". + # + # See also #namespace_scopes + # + # [Returns] + # Hash containing all the namespaces on this node and its ancestors. The hash keys are the + # namespace prefix, and the hash value for each key is the namespace URI. + # + # *Example:* + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # + # + # EOF + # doc.at_xpath("//root:first", "root" => "http://example.com/root").namespaces + # # => {"xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//child:second", "child" => "http://example.com/child").namespaces + # # => {"xmlns"=>"http://example.com/child", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//root:third", "root" => "http://example.com/root").namespaces + # # => {"xmlns:foo"=>"http://example.com/foo", + # # "xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1200 + def namespaces; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_content=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#538 + def next; end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#540 + def next=(node_or_tags); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def next_element; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def next_sibling; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def node_name; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def node_name=(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def node_type; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def parent; end + + # Set the parent Node for this Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#493 + def parent=(parent_node); end + + # Parse +string_or_io+ as a document fragment within the context of + # *this* node. Returns a XML::NodeSet containing the nodes parsed from + # +string_or_io+. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1105 + def parse(string_or_io, options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def path; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def pointer_id; end + + # Add +node_or_tags+ as the first child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#204 + def prepend_child(node_or_tags); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#539 + def previous; end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#541 + def previous=(node_or_tags); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def previous_element; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def previous_sibling; end + + # Returns true if this is a ProcessingInstruction node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1234 + def processing_instruction?; end + + # Is this a read only node? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1259 + def read_only?; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#542 + def remove; end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#718 + def remove_attribute(name); end + + # :call-seq: + # remove_class(css_classes) → self + # + # Remove HTML CSS classes from this node. Any CSS class names in +css_classes+ that exist in + # this node's "class" attribute are removed, including any multiple entries. + # + # If no CSS classes remain after this operation, or if +css_classes+ is +nil+, the "class" + # attribute is deleted from the node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_remove("class", css_classes) + # + # Also see #kwattr_remove, #classes, #add_class, #append_class + # + # [Parameters] + # - +css_classes+ (String, Array) + # + # CSS class names to be removed from the Node's + # "class" attribute. May be a string containing whitespace-delimited names, or an Array of + # String names. Any class names already present will be removed. If no CSS classes remain, + # the "class" attribute is deleted. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example*: Deleting a CSS class + # + # Note that all instances of the class "section" are removed from the "class" attribute. + # + # node # =>
    + # node.remove_class("section") # =>
    + # + # *Example*: Deleting the only remaining CSS class + # + # Note that the attribute is removed once there are no remaining classes. + # + # node # =>
    + # node.remove_class("section") # =>
    + # + # *Example*: Deleting multiple CSS classes + # + # Note that the "class" attribute is deleted once it's empty. + # + # node # =>
    + # node.remove_class(["section", "float"]) # =>
    + # + # source://nokogiri//lib/nokogiri/xml/node.rb#884 + def remove_class(names = T.unsafe(nil)); end + + # Replace this Node with +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +swap+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#405 + def replace(node_or_tags); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # + # or + # + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1364 + def serialize(*args, &block); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1083 + def set_attribute(name, value); end + + # Swap this Node for +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # Containing markup. + # + # Returns self, to support chaining of calls. + # + # Also see related method +replace+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#439 + def swap(node_or_tags); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#549 + def text; end + + # Returns true if this is a Text node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1239 + def text?; end + + # Serialize this Node to HTML + # + # doc.to_html + # + # See Node#write_to for a list of +options+. For formatted output, + # use Node#to_xhtml instead. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1391 + def to_html(options = T.unsafe(nil)); end + + # Turn this node in to a string. If the document is HTML, this method + # returns html. If the document is XML, this method returns XML. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1274 + def to_s; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def to_str; end + + # Serialize this Node to XHTML using +options+ + # + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1412 + def to_xhtml(options = T.unsafe(nil)); end + + # Serialize this Node to XML using +options+ + # + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1401 + def to_xml(options = T.unsafe(nil)); end + + # Yields self and all children to +block+ recursively. + # + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::Node] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1317 + def traverse(&block); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#552 + def type; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def unlink; end + + # Does this Node's attributes include + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#698 + def value?(value); end + + # Get the attribute values for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#692 + def values; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap this Node with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed and used as the wrapper. This node's parent, if it exists, is used + # as the context node for parsing; otherwise the associated document is used. If the parsed + # fragment has multiple roots, the first root node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # Also see NodeSet#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap("
    ") + # doc.to_html + # # => + # # + # # + # + # *Example* with a +Node+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap(doc.create_element("div")) + # doc.to_html + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node.rb#259 + def wrap(node_or_tags); end + + # Write Node as HTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1469 + def write_html_to(io, options = T.unsafe(nil)); end + + # :call-seq: + # write_to(io, *options) + # + # Serialize this node or document to +io+. + # + # [Parameters] + # - +io+ (IO) An IO-like object to which the serialized content will be written. + # - +options+ (Hash) See below + # + # [Options] + # * +:encoding+ (String or Encoding) specify the encoding of the output (defaults to document encoding) + # * +:indent_text+ (String) the indentation text (defaults to " ") + # * +:indent+ (Integer) the number of +:indent_text+ to use (defaults to +2+) + # * +:save_with+ (Integer) a combination of SaveOptions constants + # + # To save with UTF-8 indented twice: + # + # + # To save indented with two dashes: + # + # node.write_to(io, indent_text: '-', indent: 2) + # + # @yield [config] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1440 + def write_to(io, *options); end + + # Write Node as XHTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1477 + def write_xhtml_to(io, options = T.unsafe(nil)); end + + # Write Node as XML to +io+ with +options+ + # + # doc.write_xml_to io, :encoding => 'UTF-8' + # + # See Node#write_to for a list of options + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1487 + def write_xml_to(io, options = T.unsafe(nil)); end + + # Returns true if this is an XML::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1219 + def xml?; end + + protected + + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1567 + def coerce(data); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_copy_with_args(_arg0, _arg1, _arg2); end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def add_child_node(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1639 + def add_child_node_and_reparent_attrs(node); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def add_next_sibling_node(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def add_previous_sibling_node(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1601 + def add_sibling(next_or_previous, node_or_tags); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def compare(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def dump_html; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def get(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def html_standard_serialize(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def in_context(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1633 + def inspect_attributes; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1589 + def keywordify(keywords); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_write_to(_arg0, _arg1, _arg2, _arg3); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def prepend_newline?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def process_xincludes(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def replace_node(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def set(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def set_namespace(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1623 + def to_format(save_option, options); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1628 + def write_format_to(save_option, io, options); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# Attribute declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#93 +Nokogiri::XML::Node::ATTRIBUTE_DECL = T.let(T.unsafe(nil), Integer) + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#65 +Nokogiri::XML::Node::ATTRIBUTE_NODE = T.let(T.unsafe(nil), Integer) + +# CDATA node type, see Nokogiri::XML::Node#cdata? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#69 +Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) + +# Comment node type, see Nokogiri::XML::Node#comment? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#77 +Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1500 +Nokogiri::XML::Node::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1501 +Nokogiri::XML::Node::DECONSTRUCT_METHODS = T.let(T.unsafe(nil), Hash) + +# DOCB document node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#103 +Nokogiri::XML::Node::DOCB_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Document fragment node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#83 +Nokogiri::XML::Node::DOCUMENT_FRAG_NODE = T.let(T.unsafe(nil), Integer) + +# Document node type, see Nokogiri::XML::Node#xml? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#79 +Nokogiri::XML::Node::DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Document type node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#81 +Nokogiri::XML::Node::DOCUMENT_TYPE_NODE = T.let(T.unsafe(nil), Integer) + +# DTD node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#89 +Nokogiri::XML::Node::DTD_NODE = T.let(T.unsafe(nil), Integer) + +# Element declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#91 +Nokogiri::XML::Node::ELEMENT_DECL = T.let(T.unsafe(nil), Integer) + +# Element node type, see Nokogiri::XML::Node#element? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#63 +Nokogiri::XML::Node::ELEMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Entity declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#95 +Nokogiri::XML::Node::ENTITY_DECL = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#73 +Nokogiri::XML::Node::ENTITY_NODE = T.let(T.unsafe(nil), Integer) + +# Entity reference node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#71 +Nokogiri::XML::Node::ENTITY_REF_NODE = T.let(T.unsafe(nil), Integer) + +# HTML document node type, see Nokogiri::XML::Node#html? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#87 +Nokogiri::XML::Node::HTML_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1637 +Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Namespace declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#97 +Nokogiri::XML::Node::NAMESPACE_DECL = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#85 +Nokogiri::XML::Node::NOTATION_NODE = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#75 +Nokogiri::XML::Node::PI_NODE = T.let(T.unsafe(nil), Integer) + +# Save options for serializing nodes. +# See the method group entitled Node@Serialization+and+Generating+Output for usage. +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#9 +class Nokogiri::XML::Node::SaveOptions + # Create a new SaveOptions object with +options+ + # + # @return [SaveOptions] a new instance of SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#47 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def as_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def as_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def as_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def as_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def as_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def as_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def default_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def default_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def format; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def format?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#66 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def no_declaration; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def no_declaration?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def no_empty_tags; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def no_empty_tags?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def no_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#52 + def no_xhtml?; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def options; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#64 + def to_i; end +end + +# Save as HTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#23 +Nokogiri::XML::Node::SaveOptions::AS_HTML = T.let(T.unsafe(nil), Integer) + +# Save as XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#19 +Nokogiri::XML::Node::SaveOptions::AS_XHTML = T.let(T.unsafe(nil), Integer) + +# Save as XML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#21 +Nokogiri::XML::Node::SaveOptions::AS_XML = T.let(T.unsafe(nil), Integer) + +# the default for HTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#38 +Nokogiri::XML::Node::SaveOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# the default for XHTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#40 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML = T.let(T.unsafe(nil), Integer) + +# the default for XML documents +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#36 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# Format serialized xml +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#11 +Nokogiri::XML::Node::SaveOptions::FORMAT = T.let(T.unsafe(nil), Integer) + +# Do not include declarations +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#13 +Nokogiri::XML::Node::SaveOptions::NO_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Do not include empty tags +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#15 +Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS = T.let(T.unsafe(nil), Integer) + +# Do not save XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#17 +Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) + +# Text node type, see Nokogiri::XML::Node#text? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#67 +Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) + +# XInclude end type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#101 +Nokogiri::XML::Node::XINCLUDE_END = T.let(T.unsafe(nil), Integer) + +# XInclude start type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#99 +Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) + +# A NodeSet is an Enumerable that contains a list of Nokogiri::XML::Node objects. +# +# Typically a NodeSet is returned as a result of searching a Document via +# Nokogiri::XML::Searchable#css or Nokogiri::XML::Searchable#xpath. +# +# Note that the `#dup` and `#clone` methods perform shallow copies; these methods do not copy +# the Nodes contained in the NodeSet (similar to how Array and other Enumerable classes work). +# +# source://nokogiri//lib/nokogiri/xml/node_set.rb#14 +class Nokogiri::XML::NodeSet + include ::Nokogiri::XML::Searchable + include ::Enumerable + + # Create a NodeSet with +document+ defaulting to +list+ + # + # @return [NodeSet] a new instance of NodeSet + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::NodeSet] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#22 + def initialize(document, list = T.unsafe(nil)); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#128 + def %(*args); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def &(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node_set.rb#433 + def +(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def -(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node_set.rb#75 + def <<(_arg0); end + + # Equality -- Two NodeSets are equal if the contain the same number + # of elements and if each element is equal to the corresponding + # element in the other NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#395 + def ==(other); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def [](*_arg0); end + + # Add the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#add_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#141 + def add_class(name); end + + # Insert +datum+ after the last Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#71 + def after(datum); end + + # Append the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#append_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#153 + def append_class(name); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#121 + def at(*args); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#205 + def attr(key, value = T.unsafe(nil), &block); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#221 + def attribute(key, value = T.unsafe(nil), &block); end + + # Insert +datum+ before the first Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#65 + def before(datum); end + + # Returns a new NodeSet containing all the children of all the nodes in + # the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#408 + def children; end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this node set for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#85 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the members of this NodeSet as an array, to use in pattern matching. + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#442 + def deconstruct; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def delete(_arg0); end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#19 + def document; end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#19 + def document=(_arg0); end + + # Iterate over each node, yielding to +block+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#233 + def each; end + + # Is this NodeSet empty? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#47 + def empty?; end + + # Filter this list for nodes that match +expr+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#132 + def filter(expr); end + + # Get the first element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#31 + def first(n = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def include?(_arg0); end + + # Returns the index of the first node in self that is == to +node+ or meets the given block. Returns nil if no match is found. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#53 + def index(node = T.unsafe(nil)); end + + # Get the inner html of all contained Node objects + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#262 + def inner_html(*args); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#255 + def inner_text; end + + # Return a nicely formatted string representation + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#429 + def inspect; end + + # Get the last element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#41 + def last; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def length; end + + # Removes the last element from set and returns it, or +nil+ if + # the set is empty + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#376 + def pop; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def push(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node_set.rb#76 + def remove; end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#225 + def remove_attr(name); end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#229 + def remove_attribute(name); end + + # Remove the class attribute +name+ from all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#remove_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#165 + def remove_class(name = T.unsafe(nil)); end + + # Returns a new NodeSet containing all the nodes in the NodeSet + # in reverse order + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#419 + def reverse; end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#220 + def set(key, value = T.unsafe(nil), &block); end + + # Returns the first element of the NodeSet and removes it. Returns + # +nil+ if the set is empty. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#385 + def shift; end + + # source://nokogiri//lib/nokogiri/xml/node_set.rb#370 + def size; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def slice(*_arg0); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#258 + def text; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def to_a; end + + # source://nokogiri//lib/nokogiri/xml/node_set.rb#371 + def to_ary; end + + # Convert this NodeSet to HTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#343 + def to_html(*args); end + + # Convert this NodeSet to a string. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#337 + def to_s; end + + # Convert this NodeSet to XHTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#360 + def to_xhtml(*args); end + + # Convert this NodeSet to XML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#366 + def to_xml(*args); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def unlink; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap each member of this NodeSet with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed, once per member of the NodeSet, and used as the wrapper. Each + # node's parent, if it exists, is used as the context node for parsing; otherwise the + # associated document is used. If the parsed fragment has multiple roots, the first root + # node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # ⚠ Note that if a +String+ is passed, the markup will be parsed once per node in the + # NodeSet. You can avoid this overhead in cases where you know exactly the wrapper you wish to + # use by passing a +Node+ instead. + # + # Also see Node#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap("
    ") + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # *Example* with a +Node+ argument + # + # 💡 Note that this is faster than the equivalent call passing a +String+ because it avoids + # having to reparse the wrapper markup for each node. + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap(doc.create_element("div")) + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#330 + def wrap(node_or_tags); end + + # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] + # + # Search this node set for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # For more information see Nokogiri::XML::Searchable#xpath + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#101 + def xpath(*args); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def |(_arg0); end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_copy(_arg0); end +end + +# source://nokogiri//lib/nokogiri/xml/node_set.rb#446 +Nokogiri::XML::NodeSet::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Struct representing an {XML Schema Notation}[https://www.w3.org/TR/xml/#Notations] +# +# source://nokogiri//lib/nokogiri/xml/notation.rb#6 +class Nokogiri::XML::Notation < ::Struct; end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#6 +module Nokogiri::XML::PP; end + +# source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#7 +module Nokogiri::XML::PP::CharacterData + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#15 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#8 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#7 +module Nokogiri::XML::PP::Node + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#10 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#32 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#8 +Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) + +# Options that control the parsing behavior for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# These options directly expose libxml2's parse options, which are all boolean in the sense that +# an option is "on" or "off". +# +# 💡 Note that HTML5 parsing has a separate, orthogonal set of options due to the nature of the +# HTML5 specification. See Nokogiri::HTML5. +# +# ⚠ Not all parse options are supported on JRuby. Nokogiri will attempt to invoke the equivalent +# behavior in Xerces/NekoHTML on JRuby when it's possible. +# +# == Setting and unsetting parse options +# +# You can build your own combinations of parse options by using any of the following methods: +# +# [ParseOptions method chaining] +# +# Every option has an equivalent method in lowercase. You can chain these methods together to +# set various combinations. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# Every option has an equivalent no{option} method in lowercase. You can call these +# methods on an instance of ParseOptions to unset the option. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# +# # later we want to modify the options +# po.nohuge # Unset the HUGE option +# po.nopedantic # Unset the PEDANTIC option +# +# 💡 Note that some options begin with "no" leading to the logical but perhaps unintuitive +# double negative: +# +# po.nocdata # Set the NOCDATA parse option +# po.nonocdata # Unset the NOCDATA parse option +# +# 💡 Note that negation is not available for STRICT, which is itself a negation of all other +# features. +# +# +# [Using Ruby Blocks] +# +# Most parsing methods will accept a block for configuration of parse options, and we +# recommend chaining the setter methods: +# +# doc = Nokogiri::XML::Document.parse(xml) { |config| config.huge.pedantic } +# +# +# [ParseOptions constants] +# +# You can also use the constants declared under Nokogiri::XML::ParseOptions to set various +# combinations. They are bits in a bitmask, and so can be combined with bitwise operators: +# +# po = Nokogiri::XML::ParseOptions.new(Nokogiri::XML::ParseOptions::HUGE | Nokogiri::XML::ParseOptions::PEDANTIC) +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#67 +class Nokogiri::XML::ParseOptions + # @return [ParseOptions] a new instance of ParseOptions + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#165 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#198 + def ==(other); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def big_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def big_lines?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def compact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def compact?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_schema?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def default_xslt?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def dtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def dtdattr?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def dtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def dtdload?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def dtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def dtdvalid?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def huge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def huge?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#204 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nobasefix?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nobig_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noblanks?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nocdata?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nocompact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodefault_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodefault_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodefault_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodefault_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodict?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nodtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noent?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noerror?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nohuge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonet?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonoblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonoent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonoerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nononet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonoxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nonsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noold10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nopedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def norecover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nosax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nowarning?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noxinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def noxincnode?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def nsclean?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def old10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def old10?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def pedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def pedantic?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def recover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def recover?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def sax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def sax1?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#189 + def strict; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#194 + def strict?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#202 + def to_i; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def xinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#172 + def xinclude?; end +end + +# Support line numbers up to long int (default is a short int). On +# by default for for XML::Document, XML::DocumentFragment, HTML4::Document, +# HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#149 +Nokogiri::XML::ParseOptions::BIG_LINES = T.let(T.unsafe(nil), Integer) + +# Compact small text nodes. Off by default. +# +# ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to +# modify the tree. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#133 +Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#158 +Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XML::Schema +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#161 +Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) + +# The options mask used by default for parsing XML::Document and XML::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#152 +Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XSLT::Stylesheet +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#155 +Nokogiri::XML::ParseOptions::DEFAULT_XSLT = T.let(T.unsafe(nil), Integer) + +# Default DTD attributes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#88 +Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) + +# Load external subsets. On by default for XSLT::Stylesheet. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#85 +Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) + +# Validate with the DTD. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#91 +Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) + +# Relax any hardcoded limit from the parser. Off by default. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#144 +Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) + +# Do not fixup XInclude xml:base uris. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#139 +Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) + +# Remove blank nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#103 +Nokogiri::XML::ParseOptions::NOBLANKS = T.let(T.unsafe(nil), Integer) + +# Merge CDATA as text nodes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#124 +Nokogiri::XML::ParseOptions::NOCDATA = T.let(T.unsafe(nil), Integer) + +# Do not reuse the context dictionary. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#118 +Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) + +# Substitute entities. Off by default. +# +# ⚠ This option enables entity substitution, contrary to what the name implies. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#80 +Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) + +# Suppress error reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#94 +Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) + +# Forbid network access. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# ⚠ It is UNSAFE to unset this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#115 +Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) + +# Suppress warning reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#97 +Nokogiri::XML::ParseOptions::NOWARNING = T.let(T.unsafe(nil), Integer) + +# Do not generate XInclude START/END nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#127 +Nokogiri::XML::ParseOptions::NOXINCNODE = T.let(T.unsafe(nil), Integer) + +# Remove redundant namespaces declarations. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#121 +Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) + +# Parse using XML-1.0 before update 5. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#136 +Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) + +# Enable pedantic error reporting. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#100 +Nokogiri::XML::ParseOptions::PEDANTIC = T.let(T.unsafe(nil), Integer) + +# Recover from errors. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#73 +Nokogiri::XML::ParseOptions::RECOVER = T.let(T.unsafe(nil), Integer) + +# Use the SAX1 interface internally. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#106 +Nokogiri::XML::ParseOptions::SAX1 = T.let(T.unsafe(nil), Integer) + +# Strict parsing +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#69 +Nokogiri::XML::ParseOptions::STRICT = T.let(T.unsafe(nil), Integer) + +# Implement XInclude substitution. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#109 +Nokogiri::XML::ParseOptions::XINCLUDE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#5 +class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node + # @return [ProcessingInstruction] a new instance of ProcessingInstruction + # + # source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#6 + def initialize(document, name, content); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# The Reader parser allows you to effectively pull parse an \XML document. Once instantiated, +# call Nokogiri::XML::Reader#each to iterate over each node. +# +# Nokogiri::XML::Reader parses an \XML document similar to the way a cursor would move. The +# Reader is given an \XML document, and yields nodes to an each block. +# +# The Reader parser might be good for when you need the speed and low memory usage of a \SAX +# parser, but do not want to write a SAX::Document handler. +# +# Here is an example of usage: +# +# reader = Nokogiri::XML::Reader.new <<~XML +# +# snuggles! +# +# XML +# +# reader.each do |node| +# # node is an instance of Nokogiri::XML::Reader +# puts node.name +# end +# +# ⚠ Nokogiri::XML::Reader#each can only be called once! Once the cursor moves through the entire +# document, you must parse the document again. It may be better to capture all information you +# need during a single iteration. +# +# ⚠ libxml2 does not support error recovery in the Reader parser. The +RECOVER+ ParseOption is +# ignored. If a syntax error is encountered during parsing, an exception will be raised. +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#34 +class Nokogiri::XML::Reader + include ::Enumerable + + # @return [Reader] a new instance of Reader + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#114 + def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute_at(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute_count; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attribute_hash; end + + # Get the attributes and namespaces of the current node as a Hash. + # + # This is the union of Reader#attribute_hash and Reader#namespaces + # + # [Returns] + # (Hash) Attribute names and values, and namespace prefixes and hrefs. + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#126 + def attributes; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def attributes?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def base_uri; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def default?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def depth; end + + # Move the cursor through the document yielding the cursor to the block + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#132 + def each; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def empty_element?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def encoding; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#74 + def errors; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#74 + def errors=(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def inner_xml; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def lang; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def local_name; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def name; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def namespace_uri; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def namespaces; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def node_type; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def outer_xml; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def prefix; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def read; end + + # source://nokogiri//lib/nokogiri/xml/reader.rb#79 + def self_closing?; end + + # The \XML source + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#77 + def source; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def state; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def value; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def value?; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def xml_version; end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def from_io(*_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def from_memory(*_arg0); end + + # :call-seq: + # Reader.new(input) { |options| ... } → Reader + # + # Create a new Reader to parse an \XML document. + # + # [Required Parameters] + # - +input+ (String | IO): The \XML document to parse. + # + # [Optional Parameters] + # - +url:+ (String) The base URL of the document. + # - +options:+ (Integer | ParseOptions) Options to control the parser behavior. + # Defaults to +ParseOptions::STRICT+. + # + # [Yields] + # If present, the block will be passed a Nokogiri::XML::ParseOptions object to modify before + # the fragment is parsed. See Nokogiri::XML::ParseOptions for more information. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#99 + def new(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end + end +end + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#41 +Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) + +# CDATA node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#45 +Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) + +# Comment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#53 +Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) + +# Document node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#55 +Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) + +# Document Fragment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#59 +Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) + +# Document Type node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#57 +Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) + +# Element node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#39 +Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Element end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#67 +Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Entity end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#69 +Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#49 +Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity Reference node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#47 +Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/reader.rb#37 +Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#61 +Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#51 +Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) + +# Significant Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#65 +Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# Text node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#43 +Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) + +# Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#63 +Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# \XML Declaration node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#71 +Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Nokogiri::XML::RelaxNG is used for validating \XML against a RELAX NG schema definition. +# +# 🛡 Do not use this class for untrusted schema documents. RELAX NG input is always +# treated as *trusted*, meaning that the underlying parsing libraries will access network +# resources. This is counter to Nokogiri's "untrusted by default" security policy, but is an +# unfortunate limitation of the underlying libraries. +# +# *Example:* Determine whether an \XML document is valid. +# +# schema = Nokogiri::XML::RelaxNG.new(File.read(RELAX_NG_FILE)) +# doc = Nokogiri::XML::Document.parse(File.read(XML_FILE)) +# schema.valid?(doc) # Boolean +# +# *Example:* Validate an \XML document against a \RelaxNG schema, and capture any errors that are found. +# +# schema = Nokogiri::XML::RelaxNG.new(File.open(RELAX_NG_FILE)) +# doc = Nokogiri::XML::Document.parse(File.open(XML_FILE)) +# errors = schema.validate(doc) # Array +# +# *Example:* Validate an \XML document using a Document containing a RELAX NG schema definition. +# +# schema_doc = Nokogiri::XML::Document.parse(File.read(RELAX_NG_FILE)) +# schema = Nokogiri::XML::RelaxNG.from_document(schema_doc) +# doc = Nokogiri::XML::Document.parse(File.open(XML_FILE)) +# schema.valid?(doc) # Boolean +# +# source://nokogiri//lib/nokogiri/xml/relax_ng.rb#42 +class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def validate_document(_arg0); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def from_document(*_arg0); end + + # :call-seq: + # new(input) → Nokogiri::XML::RelaxNG + # new(input, options:) → Nokogiri::XML::RelaxNG + # + # Parse a RELAX NG schema definition from a String or IO to create a new Nokogiri::XML::RelaxNG. + # + # [Parameters] + # - +input+ (String | IO) RELAX NG schema definition + # - +options:+ (Nokogiri::XML::ParseOptions) + # Defaults to Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA ⚠ Unused + # + # [Returns] Nokogiri::XML::RelaxNG + # + # ⚠ +parse_options+ is currently unused by this method and is present only as a placeholder for + # future functionality. + # + # Also see convenience method Nokogiri::XML::RelaxNG() + # + # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#60 + def new(input, parse_options_ = T.unsafe(nil), options: T.unsafe(nil)); end + + # :call-seq: + # read_memory(input) → Nokogiri::XML::RelaxNG + # read_memory(input, options:) → Nokogiri::XML::RelaxNG + # + # Convenience method for Nokogiri::XML::RelaxNG.new. + # + # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#69 + def read_memory(*_arg0, **_arg1, &_arg2); end + end +end + +# SAX Parsers are event-driven parsers. +# +# Two SAX parsers for XML are available, a parser that reads from a string or IO object as it +# feels necessary, and a parser that you explicitly feed XML in chunks. If you want to let +# Nokogiri deal with reading your XML, use the Nokogiri::XML::SAX::Parser. If you want to have +# fine grain control over the XML input, use the Nokogiri::XML::SAX::PushParser. +# +# If you want to do SAX style parsing of HTML, check out Nokogiri::HTML4::SAX. +# +# The basic way a SAX style parser works is by creating a parser, telling the parser about the +# events we're interested in, then giving the parser some XML to process. The parser will notify +# you when it encounters events you said you would like to know about. +# +# To register for events, subclass Nokogiri::XML::SAX::Document and implement the methods for +# which you would like notification. +# +# For example, if I want to be notified when a document ends, and when an element starts, I +# would write a class like this: +# +# class MyHandler < Nokogiri::XML::SAX::Document +# def end_document +# puts "the document has ended" +# end +# +# def start_element name, attributes = [] +# puts "#{name} started" +# end +# end +# +# Then I would instantiate a SAX parser with this document, and feed the parser some XML +# +# # Create a new parser +# parser = Nokogiri::XML::SAX::Parser.new(MyHandler.new) +# +# # Feed the parser some XML +# parser.parse(File.open(ARGV[0])) +# +# Now my document handler will be called when each node starts, and when then document ends. To +# see what kinds of events are available, take a look at Nokogiri::XML::SAX::Document. +# +# source://nokogiri//lib/nokogiri/xml/sax.rb#46 +module Nokogiri::XML::SAX; end + +# :markup: markdown +# +# The SAX::Document class is used for registering types of events you are interested in +# handling. All of the methods on this class are available as possible events while parsing an +# \XML document. To register for any particular event, subclass this class and implement the +# methods you are interested in knowing about. +# +# To only be notified about start and end element events, write a class like this: +# +# class MyHandler < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "#{name} started!" +# end +# +# def end_element name +# puts "#{name} ended" +# end +# end +# +# You can use this event handler for any SAX-style parser included with Nokogiri. +# +# See also: +# +# - Nokogiri::XML::SAX +# - Nokogiri::HTML4::SAX +# +# ### Entity Handling +# +# ⚠ Entity handling is complicated in a SAX parser! Please read this section carefully if +# you're not getting the behavior you expect. +# +# Entities will be reported to the user via callbacks to #characters, to #reference, or +# possibly to both. The behavior is determined by a combination of _entity type_ and the value +# of ParserContext#replace_entities. (Recall that the default value of +# ParserContext#replace_entities is `false`.) +# +# ⚠ It is UNSAFE to set ParserContext#replace_entities to `true` when parsing untrusted +# documents. +# +# 💡 For more information on entity types, see [Wikipedia's page on +# DTDs](https://en.wikipedia.org/wiki/Document_type_definition#Entity_declarations). +# +# |--------------------------------------|------------------------------------|-------------------------------------| +# +#   +# +# † In the case where the replacement text for the entity is unknown (e.g., an undeclared entity +# or an external entity that could not be resolved because of network issues), then the +# replacement text will not be reported. If ParserContext#replace_entities is `true`, this +# means the #characters callback will not be invoked. If ParserContext#replace_entities is +# `false`, then the #reference callback will be invoked, but with `nil` for the `content` +# argument. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#65 +class Nokogiri::XML::SAX::Document + # Called when cdata blocks are found + # [Parameters] + # - +string+ contains the cdata content + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#245 + def cdata_block(string); end + + # Called when character data is parsed, and for parsed entities when + # ParserContext#replace_entities is +true+. + # + # [Parameters] + # - +string+ contains the character data or entity replacement text + # + # ⚠ Please see Document@Entity+Handling for important information about how entities are handled. + # + # ⚠ This method might be called multiple times for a contiguous string of characters. + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#201 + def characters(string); end + + # Called when comments are encountered + # [Parameters] + # - +string+ contains the comment data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#224 + def comment(string); end + + # Called when document ends parsing. + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#83 + def end_document; end + + # Called at the end of an element. + # + # [Parameters] + # - +name+ (String) the name of the element being closed + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#122 + def end_element(name); end + + # Called at the end of an element. + # + # [Parameters] + # - +name+ (String) is the name of the element + # - +prefix+ (String, nil) is the namespace prefix for the element + # - +uri+ (String, nil) is the associated URI for the element's namespace + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#185 + def end_element_namespace(name, prefix = T.unsafe(nil), uri = T.unsafe(nil)); end + + # Called on document errors + # [Parameters] + # - +string+ contains the error + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#238 + def error(string); end + + # Called when processing instructions are found + # [Parameters] + # - +name+ is the target of the instruction + # - +content+ is the value of the instruction + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#253 + def processing_instruction(name, content); end + + # Called when a parsed entity is referenced and not replaced. + # + # [Parameters] + # - +name+ (String) is the name of the entity + # - +content+ (String, nil) is the replacement text for the entity, if known + # + # ⚠ Please see Document@Entity+Handling for important information about how entities are handled. + # + # ⚠ An internal entity may result in a call to both #characters and #reference. + # + # Since v1.17.0 + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#217 + def reference(name, content); end + + # Called when document starts parsing. + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#78 + def start_document; end + + # Called at the beginning of an element. + # + # [Parameters] + # - +name+ (String) the name of the element + # - +attrs+ (Array>) an assoc list of namespace declarations and attributes, e.g.: + # [ ["xmlns:foo", "http://sample.net"], ["size", "large"] ] + # + # 💡If you're dealing with XML and need to handle namespaces, use the + # #start_element_namespace method instead. + # + # Note that the element namespace and any attribute namespaces are not provided, and so any + # namespaced elements or attributes will be returned as strings including the prefix: + # + # parser.parse(<<~XML) + # + # hello world + # + # XML + # + # assert_pattern do + # parser.document.start_elements => [ + # ["root", [["xmlns:foo", "http://foo.example.com/"], ["xmlns", "http://example.com/"]]], + # ["foo:bar", [["foo:quux", "xxx"]]], + # ] + # end + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#113 + def start_element(name, attrs = T.unsafe(nil)); end + + # Called at the beginning of an element. + # + # [Parameters] + # - +name+ (String) is the name of the element + # - +attrs+ (Array) is an array of structs with the following properties: + # - +localname+ (String) the local name of the attribute + # - +value+ (String) the value of the attribute + # - +prefix+ (String, nil) the namespace prefix of the attribute + # - +uri+ (String, nil) the namespace URI of the attribute + # - +prefix+ (String, nil) is the namespace prefix for the element + # - +uri+ (String, nil) is the associated URI for the element's namespace + # - +ns+ (Array>) is an assoc list of namespace declarations on the element + # + # 💡If you're dealing with HTML or don't care about namespaces, try #start_element instead. + # + # [Example] + # it "start_elements_namespace is called with namespaced attributes" do + # parser.parse(<<~XML) + # + # + # + # XML + # + # assert_pattern do + # parser.document.start_elements_namespace => [ + # [ + # "root", + # [], + # nil, nil, + # [["foo", "http://foo.example.com/"]], # namespace declarations + # ], [ + # "a", + # [Nokogiri::XML::SAX::Parser::Attribute(localname: "bar", prefix: "foo", uri: "http://foo.example.com/", value: "hello")], # prefixed attribute + # "foo", "http://foo.example.com/", # prefix and uri for the "a" element + # [], + # ] + # ] + # end + # end + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#166 + def start_element_namespace(name, attrs = T.unsafe(nil), prefix = T.unsafe(nil), uri = T.unsafe(nil), ns = T.unsafe(nil)); end + + # Called on document warnings + # [Parameters] + # - +string+ contains the warning + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#231 + def warning(string); end + + # Called when an \XML declaration is parsed. + # + # [Parameters] + # - +version+ (String) the version attribute + # - +encoding+ (String, nil) the encoding of the document if present, else +nil+ + # - +standalone+ ("yes", "no", nil) the standalone attribute if present, else +nil+ + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#73 + def xmldecl(version, encoding, standalone); end +end + +# This parser is a SAX style parser that reads its input as it deems necessary. The parser +# takes a Nokogiri::XML::SAX::Document, an optional encoding, then given an XML input, sends +# messages to the Nokogiri::XML::SAX::Document. +# +# Here is an example of using this parser: +# +# # Create a subclass of Nokogiri::XML::SAX::Document and implement +# # the events we care about: +# class MyHandler < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "starting: #{name}" +# end +# +# def end_element name +# puts "ending: #{name}" +# end +# end +# +# parser = Nokogiri::XML::SAX::Parser.new(MyHandler.new) +# +# # Hand an IO object to the parser, which will read the XML from the IO. +# File.open(path_to_xml) do |f| +# parser.parse(f) +# end +# +# For more information about \SAX parsers, see Nokogiri::XML::SAX. +# +# Also see Nokogiri::XML::SAX::Document for the available events. +# +# For \HTML documents, use the subclass Nokogiri::HTML4::SAX::Parser. +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#38 +class Nokogiri::XML::SAX::Parser + include ::Nokogiri::ClassResolver + + # :call-seq: + # new ⇒ SAX::Parser + # new(handler) ⇒ SAX::Parser + # new(handler, encoding) ⇒ SAX::Parser + # + # Create a new Parser. + # + # [Parameters] + # - +handler+ (optional Nokogiri::XML::SAX::Document) The document that will receive + # events. Will create a new Nokogiri::XML::SAX::Document if not given, which is accessible + # through the #document attribute. + # - +encoding+ (optional Encoding, String, nil) An Encoding or encoding name to use when + # parsing the input. (default +nil+ for auto-detection) + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#95 + def initialize(doc = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#75 + def document; end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#75 + def document=(_arg0); end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#78 + def encoding; end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#78 + def encoding=(_arg0); end + + # :call-seq: + # parse(input) { |parser_context| ... } + # + # Parse the input, sending events to the SAX::Document at #document. + # + # [Parameters] + # - +input+ (String, IO) The input to parse. + # + # If +input+ quacks like a readable IO object, this method forwards to Parser.parse_io, + # otherwise it forwards to Parser.parse_memory. + # + # [Yields] + # If a block is given, the underlying ParserContext object will be yielded. This can be used + # to set options on the parser context before parsing begins. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#119 + def parse(input, &block); end + + # :call-seq: + # parse_file(filename) { |parser_context| ... } + # parse_file(filename, encoding) { |parser_context| ... } + # + # Parse a file. + # + # [Parameters] + # - +filename+ (String) The path to the file to be parsed. + # - +encoding+ (optional Encoding, String, nil) An Encoding or encoding name to use when + # parsing the input, or +nil+ for auto-detection. (default #encoding) + # + # [Yields] + # If a block is given, the underlying ParserContext object will be yielded. This can be used + # to set options on the parser context before parsing begins. + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#187 + def parse_file(filename, encoding = T.unsafe(nil)); end + + # :call-seq: + # parse_io(io) { |parser_context| ... } + # parse_io(io, encoding) { |parser_context| ... } + # + # Parse an input stream. + # + # [Parameters] + # - +io+ (IO) The readable IO object from which to read input + # - +encoding+ (optional Encoding, String, nil) An Encoding or encoding name to use when + # parsing the input, or +nil+ for auto-detection. (default #encoding) + # + # [Yields] + # If a block is given, the underlying ParserContext object will be yielded. This can be used + # to set options on the parser context before parsing begins. + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#143 + def parse_io(io, encoding = T.unsafe(nil)); end + + # :call-seq: + # parse_memory(input) { |parser_context| ... } + # parse_memory(input, encoding) { |parser_context| ... } + # + # Parse an input string. + # + # [Parameters] + # - +input+ (String) The input string to be parsed. + # - +encoding+ (optional Encoding, String, nil) An Encoding or encoding name to use when + # parsing the input, or +nil+ for auto-detection. (default #encoding) + # + # [Yields] + # If a block is given, the underlying ParserContext object will be yielded. This can be used + # to set options on the parser context before parsing begins. + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#165 + def parse_memory(input, encoding = T.unsafe(nil)); end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_native; end +end + +# Structure used for marshalling attributes for some callbacks in XML::SAX::Document. +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#43 +class Nokogiri::XML::SAX::Parser::Attribute < ::Struct; end + +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#46 +Nokogiri::XML::SAX::Parser::ENCODINGS = T.let(T.unsafe(nil), Hash) + +# pure ASCII +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#71 +Nokogiri::XML::SAX::Parser::REVERSE_ENCODINGS = T.let(T.unsafe(nil), Hash) + +# Context object to invoke the XML SAX parser on the SAX::Document handler. +# +# 💡 This class is usually not instantiated by the user. Use Nokogiri::XML::SAX::Parser +# instead. +# +# source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#11 +class Nokogiri::XML::SAX::ParserContext + # source://nokogiri//lib/nokogiri/extension.rb#7 + def column; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def line; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def parse_with(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def recovery; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def recovery=(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def replace_entities; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def replace_entities=(_arg0); end + + class << self + # :call-seq: + # file(path) + # file(path, encoding) + # + # Create a parser context for the file at +path+. + # + # [Parameters] + # - +path+ (String) The path to the input file + # - +encoding+ (optional) (Encoding, String) The +Encoding+ to use, or the name of an encoding to + # use (default +nil+, encoding will be autodetected) + # + # [Returns] Nokogiri::XML::SAX::ParserContext + # + # 💡 Calling this method directly is discouraged. Use Nokogiri::XML::SAX::Parser.parse_file which + # is more convenient for most use cases. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#97 + def file(input, encoding = T.unsafe(nil)); end + + # :call-seq: + # io(input) + # io(input, encoding) + # + # Create a parser context for an +input+ IO which will assume +encoding+ + # + # [Parameters] + # - +io+ (IO) The readable IO object from which to read input + # - +encoding+ (optional) (Encoding) The +Encoding+ to use, or the name of an + # encoding to use (default +nil+, encoding will be autodetected) + # + # [Returns] Nokogiri::XML::SAX::ParserContext + # + # 💡 Calling this method directly is discouraged. Use Nokogiri::XML::SAX::Parser parse + # methods which are more convenient for most use cases. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#56 + def io(input, encoding = T.unsafe(nil)); end + + # :call-seq: + # memory(input) + # memory(input, encoding) + # + # Create a parser context for the +input+ String. + # + # [Parameters] + # - +input+ (String) The input string to be parsed. + # - +encoding+ (optional) (Encoding, String) The +Encoding+ to use, or the name of an encoding to + # use (default +nil+, encoding will be autodetected) + # + # [Returns] Nokogiri::XML::SAX::ParserContext + # + # 💡 Calling this method directly is discouraged. Use Nokogiri::XML::SAX::Parser parse methods + # which are more convenient for most use cases. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#77 + def memory(input, encoding = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_file(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_io(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_memory(_arg0, _arg1); end + + # :call-seq: + # new(input) + # new(input, encoding) + # + # Create a parser context for an IO or a String. This is a shorthand method for + # ParserContext.io and ParserContext.memory. + # + # [Parameters] + # - +input+ (IO, String) A String or a readable IO object + # - +encoding+ (optional) (Encoding) The +Encoding+ to use, or the name of an + # encoding to use (default +nil+, encoding will be autodetected) + # + # If +input+ quacks like a readable IO object, this method forwards to ParserContext.io, + # otherwise it forwards to ParserContext.memory. + # + # [Returns] Nokogiri::XML::SAX::ParserContext + # + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#31 + def new(input, encoding = T.unsafe(nil)); end + + private + + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#101 + def resolve_encoding(encoding); end + end +end + +# PushParser can parse a document that is fed to it manually. It +# must be given a SAX::Document object which will be called with +# SAX events as the document is being parsed. +# +# Calling PushParser#<< writes XML to the parser, calling any SAX +# callbacks it can. +# +# PushParser#finish tells the parser that the document is finished +# and calls the end_document SAX method. +# +# Example: +# +# parser = PushParser.new(Class.new(XML::SAX::Document) { +# def start_document +# puts "start document called" +# end +# }.new) +# parser << "
    hello<" +# parser << "/div>" +# parser.finish +# +# source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#27 +class Nokogiri::XML::SAX::PushParser + # Create a new PushParser with +doc+ as the SAX Document, providing + # an optional +file_name+ and +encoding+ + # + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#35 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#50 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document; end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::XML::SAX::Document#end_document to be called. + # + # ⚠ Note that empty documents are treated as an error when using the libxml2-based + # implementation (CRuby), but are fine when using the Xerces-based implementation (JRuby). + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#58 + def finish; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def options; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def options=(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def replace_entities; end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def replace_entities=(_arg0); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def initialize_native(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def native_write(_arg0, _arg1); end +end + +# Nokogiri::XML::Schema is used for validating \XML against an \XSD schema definition. +# +# ⚠ Since v1.11.0, Schema treats inputs as *untrusted* by default, and so external entities are +# not resolved from the network (+http://+ or +ftp://+). When parsing a trusted document, the +# caller may turn off the +NONET+ option via the ParseOptions to (re-)enable external entity +# resolution over a network connection. +# +# 🛡 Before v1.11.0, documents were "trusted" by default during schema parsing which was counter +# to Nokogiri's "untrusted by default" security policy. +# +# *Example:* Determine whether an \XML document is valid. +# +# schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) +# doc = Nokogiri::XML::Document.parse(File.read(XML_FILE)) +# schema.valid?(doc) # Boolean +# +# *Example:* Validate an \XML document against an \XSD schema, and capture any errors that are found. +# +# schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) +# doc = Nokogiri::XML::Document.parse(File.read(XML_FILE)) +# errors = schema.validate(doc) # Array +# +# *Example:* Validate an \XML document using a Document containing an \XSD schema definition. +# +# schema_doc = Nokogiri::XML::Document.parse(File.read(RELAX_NG_FILE)) +# schema = Nokogiri::XML::Schema.from_document(schema_doc) +# doc = Nokogiri::XML::Document.parse(File.read(XML_FILE)) +# schema.valid?(doc) # Boolean +# +# source://nokogiri//lib/nokogiri/xml/schema.rb#45 +class Nokogiri::XML::Schema + # The errors found while parsing the \XSD + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#49 + def errors; end + + # The errors found while parsing the \XSD + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#49 + def errors=(_arg0); end + + # The options used to parse the schema + # + # [Returns] Nokogiri::XML::ParseOptions + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#54 + def parse_options; end + + # The options used to parse the schema + # + # [Returns] Nokogiri::XML::ParseOptions + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#54 + def parse_options=(_arg0); end + + # :call-seq: valid?(input) → Boolean + # + # Validate +input+ and return a Boolean indicating whether the document is valid + # + # [Parameters] + # - +input+ (Nokogiri::XML::Document | String) + # A parsed document, or a string containing a local filename. + # + # [Returns] Boolean + # + # *Example:* Validate an existing XML::Document + # + # schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) + # return unless schema.valid?(document) + # + # *Example:* Validate an \XML document on disk + # + # schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) + # return unless schema.valid?("/path/to/file.xml") + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#135 + def valid?(input); end + + # :call-seq: validate(input) → Array + # + # Validate +input+ and return any errors that are found. + # + # [Parameters] + # - +input+ (Nokogiri::XML::Document | String) + # A parsed document, or a string containing a local filename. + # + # [Returns] Array + # + # *Example:* Validate an existing XML::Document, and capture any errors that are found. + # + # schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) + # errors = schema.validate(document) + # + # *Example:* Validate an \XML document on disk, and capture any errors that are found. + # + # schema = Nokogiri::XML::Schema.new(File.read(XSD_FILE)) + # errors = schema.validate("/path/to/file.xml") + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#104 + def validate(input); end + + private + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def validate_document(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def validate_file(_arg0); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def from_document(*_arg0); end + + # :call-seq: + # new(input) → Nokogiri::XML::Schema + # new(input, parse_options) → Nokogiri::XML::Schema + # + # Parse an \XSD schema definition from a String or IO to create a new Nokogiri::XML::Schema + # + # [Parameters] + # - +input+ (String | IO) \XSD schema definition + # - +parse_options+ (Nokogiri::XML::ParseOptions) + # Defaults to Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA + # + # [Returns] Nokogiri::XML::Schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#69 + def new(input, parse_options_ = T.unsafe(nil), parse_options: T.unsafe(nil)); end + + # :call-seq: + # read_memory(input) → Nokogiri::XML::Schema + # read_memory(input, parse_options) → Nokogiri::XML::Schema + # + # Convenience method for Nokogiri::XML::Schema.new + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#78 + def read_memory(*_arg0, **_arg1, &_arg2); end + end +end + +# The Searchable module declares the interface used for searching your DOM. +# +# It implements the public methods #search, #css, and #xpath, +# as well as allowing specific implementations to specialize some +# of the important behaviors. +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#13 +module Nokogiri::XML::Searchable + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#78 + def %(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define, which will be in the + # `nokogiri` namespace in XPath queries. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#64 + def /(*args); end + + # :call-seq: + # >(selector) → NodeSet + # + # Search this node's immediate children using CSS selector +selector+ + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#201 + def >(selector); end + + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#74 + def at(*args); end + + # call-seq: + # at_css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+, and return only the first + # match. +rules+ must be one or more CSS selectors. + # + # See Searchable#css for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#143 + def at_css(*args); end + + # call-seq: + # at_xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+, and return only the first + # match. +paths+ must be one or more XPath queries. + # + # See Searchable#xpath for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#193 + def at_xpath(*args); end + + # call-seq: + # css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # node.css('title') + # node.css('body h1.bold') + # node.css('div + p.green', 'div#one') + # + # A hash of namespace bindings may be appended. For example: + # + # node.css('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # 💡 Custom CSS pseudo classes may also be defined which are mapped to a custom XPath + # function. To define custom pseudo classes, create a class and implement the custom pseudo + # class you want defined. The first argument to the method will be the matching context + # NodeSet. Any other arguments are ones that you pass in. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.css('title:regex("\w+")', handler) + # + # 💡 Some XPath syntax is supported in CSS queries. For example, to query for an attribute: + # + # node.css('img > @href') # returns all +href+ attributes on an +img+ element + # node.css('img / @href') # same + # + # # ⚠ this returns +class+ attributes from all +div+ elements AND THEIR CHILDREN! + # node.css('div @class') + # + # node.css + # + # 💡 Array-like syntax is supported in CSS queries as an alternative to using +:nth-child()+. + # + # ⚠ NOTE that indices are 1-based like +:nth-child+ and not 0-based like Ruby Arrays. For + # example: + # + # # equivalent to 'li:nth-child(2)' + # node.css('li[2]') # retrieve the second li element in a list + # + # ⚠ NOTE that the CSS query string is case-sensitive with regards to your document type. HTML + # tags will match only lowercase CSS queries, so if you search for "H1" in an HTML document, + # you'll never find anything. However, "H1" might be found in an XML document, where tags + # names are case-sensitive (e.g., "H1" is distinct from "h1"). + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#129 + def css(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define, which will be in the + # `nokogiri` namespace in XPath queries. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[nokogiri:regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#54 + def search(*args); end + + # call-seq: + # xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # node.xpath('.//title') + # + # A hash of namespace bindings may be appended. For example: + # + # node.xpath('.//foo:name', {'foo' => 'http://example.org/'}) + # node.xpath('.//xmlns:name', node.root.namespaces) + # + # A hash of variable bindings may also be appended to the namespace bindings. For example: + # + # node.xpath('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions may also be defined. To define custom functions create a class and + # implement the function you want to define, which will be in the `nokogiri` namespace. + # + # The first argument to the method will be the current matching NodeSet. Any other arguments + # are ones that you pass in. Note that this class may appear anywhere in the argument + # list. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.xpath('.//title[nokogiri:regex(., "\w+")]', handler) + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#179 + def xpath(*args); end + + private + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#228 + def css_internal(node, rules, handler, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#232 + def css_rules_to_xpath(rules, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#210 + def extract_params(params); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#263 + def xpath_impl(node, path, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#248 + def xpath_internal(node, paths, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#236 + def xpath_query_from_css_rule(rule, ns); end +end + +# Regular expression used by Searchable#search to determine if a query +# string is CSS or XPath +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#16 +Nokogiri::XML::Searchable::LOOKS_LIKE_XPATH = T.let(T.unsafe(nil), Regexp) + +# This class provides information about XML SyntaxErrors. These +# exceptions are typically stored on Nokogiri::XML::Document#errors. +# +# source://nokogiri//lib/nokogiri/xml/syntax_error.rb#8 +class Nokogiri::XML::SyntaxError < ::Nokogiri::SyntaxError + # Returns the value of attribute code. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#23 + def code; end + + # Returns the value of attribute column. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#40 + def column; end + + # Returns the value of attribute domain. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#22 + def domain; end + + # return true if this is an error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#56 + def error?; end + + # return true if this error is fatal + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#62 + def fatal?; end + + # Returns the value of attribute file. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#25 + def file; end + + # Returns the value of attribute int1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#39 + def int1; end + + # Returns the value of attribute level. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#24 + def level; end + + # Returns the value of attribute line. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#26 + def line; end + + # return true if this is a non error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#44 + def none?; end + + # The XPath path of the node that caused the error when validating a `Nokogiri::XML::Document`. + # + # This attribute will only be non-nil when the error is emitted by `Schema#validate` on + # Document objects. It will return `nil` for DOM parsing errors and for errors emitted during + # Schema validation of files. + # + # ⚠ `#path` is not supported on JRuby, where it will always return `nil`. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#35 + def path; end + + # Returns the value of attribute str1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#36 + def str1; end + + # Returns the value of attribute str2. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#37 + def str2; end + + # Returns the value of attribute str3. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#38 + def str3; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#66 + def to_s; end + + # return true if this is a warning + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#50 + def warning?; end + + private + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#75 + def level_to_s; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#87 + def location_to_s; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#83 + def nil_or_zero?(attribute); end + + class << self + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#10 + def aggregate(errors); end + end +end + +# source://nokogiri//lib/nokogiri/xml/text.rb#5 +class Nokogiri::XML::Text < ::Nokogiri::XML::CharacterData + # source://nokogiri//lib/nokogiri/xml/text.rb#6 + def content=(string); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(*_arg0); end + end +end + +# Original C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#13 +Nokogiri::XML::XML_C14N_1_0 = T.let(T.unsafe(nil), Integer) + +# C14N 1.1 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#17 +Nokogiri::XML::XML_C14N_1_1 = T.let(T.unsafe(nil), Integer) + +# Exclusive C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#15 +Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/xpath.rb#5 +module Nokogiri::XML::XPath; end + +# The XPath search prefix to search direct descendants of the current element, +./+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#13 +Nokogiri::XML::XPath::CURRENT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search globally, +//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#7 +Nokogiri::XML::XPath::GLOBAL_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search direct descendants of the root element, +/+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#10 +Nokogiri::XML::XPath::ROOT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search anywhere in the current element's subtree, +.//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#16 +Nokogiri::XML::XPath::SUBTREE_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#6 +class Nokogiri::XML::XPath::SyntaxError < ::Nokogiri::XML::SyntaxError + # source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#7 + def to_s; end +end + +# source://nokogiri//lib/nokogiri/xml/xpath_context.rb#5 +class Nokogiri::XML::XPathContext + # source://nokogiri//lib/nokogiri/extension.rb#7 + def evaluate(*_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def node=(_arg0); end + + # Register namespaces in +namespaces+ + # + # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#8 + def register_namespaces(namespaces); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def register_ns(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def register_variable(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#16 + def register_variables(binds); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def new(_arg0); end + end +end + +# See Nokogiri::XSLT::Stylesheet for creating and manipulating +# Stylesheet object. +# +# source://nokogiri//lib/nokogiri/xslt.rb#15 +module Nokogiri::XSLT + class << self + # :call-seq: + # parse(xsl) → Nokogiri::XSLT::Stylesheet + # parse(xsl, modules) → Nokogiri::XSLT::Stylesheet + # + # Parse the stylesheet in +xsl+, registering optional +modules+ as custom class handlers. + # + # [Parameters] + # - +xsl+ (String) XSL content to be parsed into a stylesheet + # - +modules+ (Hash) A hash of URI-to-handler relations for linking a + # namespace to a custom function handler. + # + # ⚠ The XSLT handler classes are registered *globally*. + # + # Also see Nokogiri::XSLT.register + # + # *Example* + # + # xml = Nokogiri.XML(<<~XML) + # + # Foo + # Bar + # + # XML + # + # handler = Class.new do + # def reverse(node) + # node.text.reverse + # end + # end + # + # xsl = <<~XSL + # + # + # + # + # + # + # + # + # + # XSL + # + # xsl = Nokogiri.XSLT(xsl, "http://nokogiri.org/xslt/myfuncs" => handler) + # xsl.transform(xml).to_xml + # # => "\n" + + # # "\n" + + # # " ooF\n" + + # # " raB\n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xslt.rb#70 + def parse(string, modules = T.unsafe(nil)); end + + # :call-seq: + # quote_params(params) → Array + # + # Quote parameters in +params+ for stylesheet safety. + # See Nokogiri::XSLT::Stylesheet.transform for example usage. + # + # [Parameters] + # - +params+ (Hash, Array) XSLT parameters (key->value, or tuples of [key, value]) + # + # [Returns] Array of string parameters, with quotes correctly escaped for use with XSLT::Stylesheet.transform + # + # source://nokogiri//lib/nokogiri/xslt.rb#94 + def quote_params(params); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def register(_arg0, _arg1); end + end +end + +# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation +# is done through Nokogiri.XSLT. Here is an example of transforming +# an XML::Document with a Stylesheet: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# +# xslt.transform(doc) # => Nokogiri::XML::Document +# +# Many XSLT transformations include serialization behavior to emit a non-XML document. For these +# cases, please take care to invoke the #serialize method on the result of the transformation: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# xslt.serialize(xslt.transform(doc)) # => String +# +# or use the #apply_to method, which is a shortcut for `serialize(transform(document))`: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# xslt.apply_to(doc) # => String +# +# See Nokogiri::XSLT::Stylesheet#transform for more information and examples. +# +# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#29 +class Nokogiri::XSLT::Stylesheet + # :call-seq: + # apply_to(document, params = []) -> String + # + # Apply an XSLT stylesheet to an XML::Document and serialize it properly. This method is + # equivalent to calling #serialize on the result of #transform. + # + # [Parameters] + # - +document+ is an instance of XML::Document to transform + # - +params+ is an array of strings used as XSLT parameters, passed into #transform + # + # [Returns] + # A string containing the serialized result of the transformation. + # + # See Nokogiri::XSLT::Stylesheet#transform for more information and examples. + # + # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#44 + def apply_to(document, params = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def serialize(_arg0); end + + # source://nokogiri//lib/nokogiri/extension.rb#7 + def transform(*_arg0); end + + class << self + # source://nokogiri//lib/nokogiri/extension.rb#7 + def parse_stylesheet_doc(_arg0); end + end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://nokogiri//lib/nokogiri.rb#108 + def Nokogiri(*args, &block); end +end diff --git a/sorbet/rbi/gems/packs-specification@0.0.10.rbi b/sorbet/rbi/gems/packs-specification@0.0.11.rbi similarity index 50% rename from sorbet/rbi/gems/packs-specification@0.0.10.rbi rename to sorbet/rbi/gems/packs-specification@0.0.11.rbi index 866c29b..9a52ae2 100644 --- a/sorbet/rbi/gems/packs-specification@0.0.10.rbi +++ b/sorbet/rbi/gems/packs-specification@0.0.11.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `packs-specification` gem. # Please instead update this file by running `bin/tapioca gem packs-specification`. + # We let `packs-specification` define some API methods such as all, find, and for_file, # because this allows a production environment to require `packs-specification` only and get some simple functionality, without # needing to load all of `packs`. @@ -11,42 +12,10 @@ # source://packs-specification//lib/packs/pack.rb#3 module Packs class << self - # source://packs/0.0.43/lib/packs.rb#134 - sig { params(pack_name: ::String, dependency_name: ::String).void } - def add_dependency!(pack_name:, dependency_name:); end - # source://packs-specification//lib/packs-specification.rb#19 sig { returns(T::Array[::Packs::Pack]) } def all; end - # source://packs/0.0.43/lib/packs.rb#249 - sig { void } - def bust_cache!; end - - # source://packs/0.0.43/lib/packs.rb#44 - sig { params(files: T::Array[::String]).returns(T::Boolean) } - def check(files); end - - # source://packs/0.0.43/lib/packs/configuration.rb#50 - sig { returns(::Packs::Configuration) } - def config; end - - # source://packs/0.0.43/lib/packs/configuration.rb#57 - sig { params(blk: T.proc.params(arg0: ::Packs::Configuration).void).void } - def configure(&blk); end - - # source://packs/0.0.43/lib/packs.rb#57 - sig do - params( - pack_name: ::String, - enforce_privacy: T::Boolean, - enforce_layers: T::Boolean, - enforce_dependencies: T.nilable(T::Boolean), - team: T.nilable(::CodeTeams::Team) - ).void - end - def create_pack!(pack_name:, enforce_privacy: T.unsafe(nil), enforce_layers: T.unsafe(nil), enforce_dependencies: T.unsafe(nil), team: T.unsafe(nil)); end - # source://packs-specification//lib/packs-specification.rb#24 sig { params(name: ::String).returns(T.nilable(::Packs::Pack)) } def find(name); end @@ -54,73 +23,6 @@ module Packs # source://packs-specification//lib/packs-specification.rb#29 sig { params(file_path: T.any(::Pathname, ::String)).returns(T.nilable(::Packs::Pack)) } def for_file(file_path); end - - # source://packs/0.0.43/lib/packs.rb#255 - sig { void } - def lint_package_todo_yml_files!; end - - # source://packs/0.0.43/lib/packs.rb#260 - sig { params(packs: T::Array[::Packs::Pack]).void } - def lint_package_yml_files!(packs); end - - # source://packs/0.0.43/lib/packs.rb#221 - sig { params(type: ::String, pack_name: T.nilable(::String), limit: ::Integer).void } - def list_top_violations(type:, pack_name:, limit:); end - - # source://packs/0.0.43/lib/packs.rb#108 - sig do - params( - paths_relative_to_root: T::Array[::String], - per_file_processors: T::Array[::Packs::PerFileProcessorInterface] - ).void - end - def make_public!(paths_relative_to_root: T.unsafe(nil), per_file_processors: T.unsafe(nil)); end - - # source://packs/0.0.43/lib/packs.rb#191 - sig do - params( - pack_name: ::String, - destination: ::String, - per_file_processors: T::Array[::Packs::PerFileProcessorInterface] - ).void - end - def move_to_folder!(pack_name:, destination:, per_file_processors: T.unsafe(nil)); end - - # source://packs/0.0.43/lib/packs.rb#80 - sig do - params( - pack_name: ::String, - paths_relative_to_root: T::Array[::String], - per_file_processors: T::Array[::Packs::PerFileProcessorInterface] - ).void - end - def move_to_pack!(pack_name:, paths_relative_to_root: T.unsafe(nil), per_file_processors: T.unsafe(nil)); end - - # source://packs/0.0.43/lib/packs.rb#161 - sig do - params( - pack_name: ::String, - parent_name: ::String, - per_file_processors: T::Array[::Packs::PerFileProcessorInterface] - ).void - end - def move_to_parent!(pack_name:, parent_name:, per_file_processors: T.unsafe(nil)); end - - # source://packs/0.0.43/lib/packs.rb#240 - sig { params(file: ::String, find: ::Pathname, replace_with: ::Pathname).void } - def replace_in_file(file:, find:, replace_with:); end - - # source://packs/0.0.43/lib/packs.rb#29 - sig { void } - def start_interactive_mode!; end - - # source://packs/0.0.43/lib/packs.rb#34 - sig { returns(T::Boolean) } - def update; end - - # source://packs/0.0.43/lib/packs.rb#39 - sig { returns(T::Boolean) } - def validate; end end end @@ -128,35 +30,57 @@ end Packs::PACKAGE_FILE = T.let(T.unsafe(nil), String) # source://packs-specification//lib/packs/pack.rb#4 -class Packs::Pack < ::T::Struct - const :name, ::String - const :path, ::Pathname - const :relative_path, ::Pathname - const :raw_hash, T::Hash[T.untyped, T.untyped] +class Packs::Pack + # source://packs-specification//lib/packs/pack.rb#17 + sig { params(name: ::String, path: ::Pathname, relative_path: ::Pathname).void } + def initialize(name:, path:, relative_path:); end - # source://packs-specification//lib/packs/pack.rb#39 + # source://packs-specification//lib/packs/pack.rb#69 + sig { returns(::String) } + def inspect; end + + # source://packs-specification//lib/packs/pack.rb#55 sig { returns(T::Boolean) } def is_gem?; end - # source://packs-specification//lib/packs/pack.rb#34 + # source://packs-specification//lib/packs/pack.rb#50 sig { returns(::String) } def last_name; end - # source://packs-specification//lib/packs/pack.rb#44 + # source://packs-specification//lib/packs/pack.rb#60 sig { returns(T::Hash[T.untyped, T.untyped]) } def metadata; end - # source://packs-specification//lib/packs/pack.rb#28 + # source://packs-specification//lib/packs/pack.rb#8 + sig { returns(::String) } + def name; end + + # source://packs-specification//lib/packs/pack.rb#11 + sig { returns(::Pathname) } + def path; end + + # source://packs-specification//lib/packs/pack.rb#39 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def raw_hash; end + + # source://packs-specification//lib/packs/pack.rb#14 + sig { returns(::Pathname) } + def relative_path; end + + # source://packs-specification//lib/packs/pack.rb#44 sig { params(relative: T::Boolean).returns(::Pathname) } def yml(relative: T.unsafe(nil)); end + private + + # source://packs-specification//lib/packs/pack.rb#65 + sig { returns(T::Array[::Symbol]) } + def instance_variables_to_inspect; end + class << self - # source://packs-specification//lib/packs/pack.rb#13 + # source://packs-specification//lib/packs/pack.rb#26 sig { params(package_yml_absolute_path: ::Pathname).returns(::Packs::Pack) } def from(package_yml_absolute_path); end - - # source://sorbet-runtime/0.5.11318/lib/types/struct.rb#13 - def inherited(s); end end end @@ -208,9 +132,6 @@ class Packs::Specification::Configuration < ::T::Struct sig { returns(::Packs::Specification::Configuration) } def fetch; end - # source://sorbet-runtime/0.5.11318/lib/types/struct.rb#13 - def inherited(s); end - # source://packs-specification//lib/packs/specification/configuration.rb#26 sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) } def pack_paths(config_hash); end diff --git a/sorbet/rbi/gems/packwerk@2.2.1-8476bb3cd5452765ad452d36aa45ae724f1d44f5.rbi b/sorbet/rbi/gems/packwerk@2.2.1-8476bb3cd5452765ad452d36aa45ae724f1d44f5.rbi deleted file mode 100644 index 3562b54..0000000 --- a/sorbet/rbi/gems/packwerk@2.2.1-8476bb3cd5452765ad452d36aa45ae724f1d44f5.rbi +++ /dev/null @@ -1,1448 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `packwerk` gem. -# Please instead update this file by running `bin/tapioca gem packwerk`. - -module Packwerk - extend ::ActiveSupport::Autoload -end - -module Packwerk::ApplicationLoadPaths - class << self - sig { returns(T::Hash[::String, ::Module]) } - def extract_application_autoload_paths; end - - sig { params(root: ::String, environment: ::String).returns(T::Hash[::String, ::Module]) } - def extract_relevant_paths(root, environment); end - - sig do - params( - all_paths: T::Hash[::String, ::Module], - bundle_path: ::Pathname, - rails_root: ::Pathname - ).returns(T::Hash[::Pathname, ::Module]) - end - def filter_relevant_paths(all_paths, bundle_path: T.unsafe(nil), rails_root: T.unsafe(nil)); end - - sig do - params( - load_paths: T::Hash[::Pathname, ::Module], - rails_root: ::Pathname - ).returns(T::Hash[::String, ::Module]) - end - def relative_path_strings(load_paths, rails_root: T.unsafe(nil)); end - - private - - sig { params(paths: T::Hash[T.untyped, ::Module]).void } - def assert_load_paths_present(paths); end - - sig { params(root: ::String, environment: ::String).void } - def require_application(root, environment); end - end -end - -class Packwerk::ApplicationValidator - include ::Packwerk::Validator - extend ::ActiveSupport::Autoload - - sig do - override - .params( - package_set: Packwerk::PackageSet, - configuration: ::Packwerk::Configuration - ).returns(::Packwerk::Validator::Result) - end - def call(package_set, configuration); end - - sig do - params( - package_set: Packwerk::PackageSet, - configuration: ::Packwerk::Configuration - ).returns(::Packwerk::Validator::Result) - end - def check_all(package_set, configuration); end - - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } - def check_application_structure(configuration); end - - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } - def check_package_manifest_paths(configuration); end - - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } - def check_package_manifest_syntax(configuration); end - - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } - def check_root_package_exists(configuration); end - - sig { override.returns(T::Array[::String]) } - def permitted_keys; end - - private - - sig { params(list: T.untyped).returns(T.untyped) } - def format_yaml_strings(list); end - - sig { params(configuration: ::Packwerk::Configuration, paths: T::Array[::String]).returns(T::Array[::Pathname]) } - def relative_paths(configuration, paths); end -end - -class Packwerk::AssociationInspector - include ::Packwerk::ConstantNameInspector - - sig do - params( - inflector: T.class_of(ActiveSupport::Inflector), - custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]) - ).void - end - def initialize(inflector:, custom_associations: T.unsafe(nil)); end - - sig { override.params(node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T.nilable(::String)) } - def constant_name_from_node(node, ancestors:); end - - private - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def association?(node); end - - sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(T.any(::String, ::Symbol))) } - def association_name(arguments); end - - sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(::AST::Node)) } - def custom_class_name(arguments); end -end - -Packwerk::AssociationInspector::CustomAssociations = T.type_alias { T.any(T::Array[::Symbol], T::Set[::Symbol]) } -Packwerk::AssociationInspector::RAILS_ASSOCIATIONS = T.let(T.unsafe(nil), Set) - -class Packwerk::Cache - sig { params(enable_cache: T::Boolean, cache_directory: ::Pathname, config_path: T.nilable(::String)).void } - def initialize(enable_cache:, cache_directory:, config_path:); end - - sig { void } - def bust_cache!; end - - sig { params(contents: ::String, contents_key: ::Symbol).void } - def bust_cache_if_contents_have_changed(contents, contents_key); end - - sig { void } - def bust_cache_if_inflections_have_changed!; end - - sig { void } - def bust_cache_if_packwerk_yml_has_changed!; end - - sig { void } - def create_cache_directory!; end - - sig { params(file: ::String).returns(::String) } - def digest_for_file(file); end - - sig { params(str: ::String).returns(::String) } - def digest_for_string(str); end - - sig do - params( - file_path: ::String, - block: T.proc.returns(T::Array[::Packwerk::UnresolvedReference]) - ).returns(T::Array[::Packwerk::UnresolvedReference]) - end - def with_cache(file_path, &block); end -end - -class Packwerk::Cache::CacheContents < ::T::Struct - const :file_contents_digest, ::String - const :unresolved_references, T::Array[::Packwerk::UnresolvedReference] - - sig { returns(::String) } - def serialize; end - - class << self - sig { params(serialized_cache_contents: ::String).returns(::Packwerk::Cache::CacheContents) } - def deserialize(serialized_cache_contents); end - - def inherited(s); end - end -end - -Packwerk::Cache::CacheShape = T.type_alias { T::Hash[::String, ::Packwerk::Cache::CacheContents] } - -module Packwerk::Checker - abstract! - - sig { abstract.params(reference: ::Packwerk::Reference).returns(T::Boolean) } - def invalid_reference?(reference); end - - sig { abstract.params(reference: ::Packwerk::Reference).returns(::String) } - def message(reference); end - - sig { abstract.params(listed_offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } - def strict_mode_violation?(listed_offense); end - - sig { abstract.returns(::String) } - def violation_type; end - - class << self - sig { returns(T::Array[::Packwerk::Checker]) } - def all; end - - sig { params(violation_type: ::String).returns(::Packwerk::Checker) } - def find(violation_type); end - - sig { params(base: ::Class).void } - def included(base); end - - private - - sig { params(name: ::String).returns(::Packwerk::Checker) } - def checker_by_violation_type(name); end - end -end - -class Packwerk::Cli - extend ::ActiveSupport::Autoload - - sig do - params( - configuration: T.nilable(::Packwerk::Configuration), - out: T.any(::IO, ::StringIO), - err_out: T.any(::IO, ::StringIO), - environment: ::String, - style: ::Packwerk::OutputStyle, - offenses_formatter: T.nilable(::Packwerk::OffensesFormatter) - ).void - end - def initialize(configuration: T.unsafe(nil), out: T.unsafe(nil), err_out: T.unsafe(nil), environment: T.unsafe(nil), style: T.unsafe(nil), offenses_formatter: T.unsafe(nil)); end - - sig { params(args: T::Array[::String]).returns(T::Boolean) } - def execute_command(args); end - - sig { params(args: T::Array[::String]).returns(T.noreturn) } - def run(args); end - - private - - sig do - params( - relative_file_paths: T::Array[::String], - ignore_nested_packages: T::Boolean - ).returns(::Packwerk::FilesForProcessing) - end - def fetch_files_to_process(relative_file_paths, ignore_nested_packages); end - - sig { returns(T::Boolean) } - def generate_configs; end - - sig { returns(T::Boolean) } - def init; end - - sig { params(result: ::Packwerk::Validator::Result).void } - def list_validation_errors(result); end - - sig { params(result: ::Packwerk::Cli::Result).returns(T::Boolean) } - def output_result(result); end - - sig { returns(Packwerk::PackageSet) } - def package_set; end - - sig { params(args: T::Array[::String]).returns(::Packwerk::ParseRun) } - def parse_run(args); end - - sig { returns(T::Boolean) } - def usage; end - - sig { params(_paths: T::Array[::String]).returns(T::Boolean) } - def validate(_paths); end - - sig { returns(::Packwerk::ApplicationValidator) } - def validator; end -end - -class Packwerk::Cli::Result < ::T::Struct - const :message, ::String - const :status, T::Boolean - - class << self - def inherited(s); end - end -end - -class Packwerk::Configuration - def initialize(configs = T.unsafe(nil), config_path: T.unsafe(nil)); end - - def cache_directory; end - def cache_enabled?; end - def config_path; end - def custom_associations; end - def exclude; end - def include; end - def load_paths; end - - sig { returns(::Packwerk::OffensesFormatter) } - def offenses_formatter; end - - def package_paths; end - def parallel?; end - def root_path; end - - class << self - def from_path(path = T.unsafe(nil)); end - - private - - def from_packwerk_config(path); end - end -end - -Packwerk::Configuration::DEFAULT_CONFIG_PATH = T.let(T.unsafe(nil), String) -Packwerk::Configuration::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array) -Packwerk::Configuration::DEFAULT_INCLUDE_GLOBS = T.let(T.unsafe(nil), Array) - -class Packwerk::ConstNodeInspector - include ::Packwerk::ConstantNameInspector - - sig { override.params(node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T.nilable(::String)) } - def constant_name_from_node(node, ancestors:); end - - private - - sig { params(node: ::AST::Node, parent: ::AST::Node).returns(T.nilable(T::Boolean)) } - def constant_in_module_or_class_definition?(node, parent:); end - - sig { params(ancestors: T::Array[::AST::Node]).returns(::String) } - def fully_qualify_constant(ancestors); end - - sig { params(parent: T.nilable(::AST::Node)).returns(T::Boolean) } - def root_constant?(parent); end -end - -class Packwerk::ConstantContext < ::Struct - def location; end - def location=(_); end - def name; end - def name=(_); end - def package; end - def package=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class Packwerk::ConstantDiscovery - sig { params(constant_resolver: ::ConstantResolver, packages: Packwerk::PackageSet).void } - def initialize(constant_resolver:, packages:); end - - sig do - params( - const_name: ::String, - current_namespace_path: T.nilable(T::Array[::String]) - ).returns(T.nilable(::Packwerk::ConstantContext)) - end - def context_for(const_name, current_namespace_path: T.unsafe(nil)); end - - sig { params(path: ::String).returns(::Packwerk::Package) } - def package_from_path(path); end -end - -module Packwerk::ConstantNameInspector - interface! - - sig { abstract.params(node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T.nilable(::String)) } - def constant_name_from_node(node, ancestors:); end -end - -class Packwerk::Debug - class << self - sig { params(out: ::String).void } - def out(out); end - end -end - -module Packwerk::ExtensionLoader - class << self - sig { params(require_directive: ::String, config_dir_path: ::String).void } - def load(require_directive, config_dir_path); end - end -end - -class Packwerk::FileProcessor - sig do - params( - node_processor_factory: ::Packwerk::NodeProcessorFactory, - cache: ::Packwerk::Cache, - parser_factory: T.nilable(::Packwerk::Parsers::Factory) - ).void - end - def initialize(node_processor_factory:, cache:, parser_factory: T.unsafe(nil)); end - - sig { params(relative_file: ::String).returns(::Packwerk::FileProcessor::ProcessedFile) } - def call(relative_file); end - - private - - sig { params(relative_file: ::String, parser: ::Packwerk::Parsers::ParserInterface).returns(T.untyped) } - def parse_into_ast(relative_file, parser); end - - sig { params(file_path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) } - def parser_for(file_path); end - - sig { params(node: ::Parser::AST::Node, relative_file: ::String).returns(T::Array[::Packwerk::UnresolvedReference]) } - def references_from_ast(node, relative_file); end -end - -class Packwerk::FileProcessor::ProcessedFile < ::T::Struct - const :offenses, T::Array[::Packwerk::Offense], default: T.unsafe(nil) - const :unresolved_references, T::Array[::Packwerk::UnresolvedReference], default: T.unsafe(nil) - - class << self - def inherited(s); end - end -end - -class Packwerk::FileProcessor::UnknownFileTypeResult < ::Packwerk::Offense - sig { params(file: ::String).void } - def initialize(file:); end -end - -class Packwerk::FilesForProcessing - sig do - params( - relative_file_paths: T::Array[::String], - configuration: ::Packwerk::Configuration, - ignore_nested_packages: T::Boolean - ).void - end - def initialize(relative_file_paths, configuration, ignore_nested_packages); end - - sig { returns(T::Set[::String]) } - def files; end - - sig { returns(T::Boolean) } - def files_specified?; end - - private - - sig { returns(T::Set[::String]) } - def configured_excluded_files; end - - sig { returns(T::Set[::String]) } - def configured_included_files; end - - sig { returns(T::Set[::String]) } - def files_for_processing; end - - sig { params(relative_globs: T::Array[::String]).returns(T::Set[::String]) } - def relative_files_for_globs(relative_globs); end - - sig { returns(T::Set[::String]) } - def specified_files; end - - sig { params(relative_file_path: ::String).returns(T::Set[::String]) } - def specified_included_files(relative_file_path); end - - class << self - sig do - params( - relative_file_paths: T::Array[::String], - configuration: ::Packwerk::Configuration, - ignore_nested_packages: T::Boolean - ).returns(::Packwerk::FilesForProcessing) - end - def fetch(relative_file_paths:, configuration:, ignore_nested_packages: T.unsafe(nil)); end - end -end - -Packwerk::FilesForProcessing::RelativeFileSet = T.type_alias { T::Set[::String] } - -module Packwerk::Formatters - extend ::ActiveSupport::Autoload -end - -class Packwerk::Formatters::DefaultOffensesFormatter - include ::Packwerk::OffensesFormatter - - sig { override.returns(::String) } - def identifier; end - - sig { override.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } - def show_offenses(offenses); end - - sig do - override - .params( - offense_collection: ::Packwerk::OffenseCollection, - fileset: T::Set[::String] - ).returns(::String) - end - def show_stale_violations(offense_collection, fileset); end - - sig { override.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) } - def show_strict_mode_violations(strict_mode_violations); end - - private - - sig { params(offense: ::Packwerk::ReferenceOffense).returns(::String) } - def format_strict_mode_violation(offense); end - - sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } - def offenses_list(offenses); end - - sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } - def offenses_summary(offenses); end - - sig { returns(::Packwerk::OutputStyle) } - def style; end -end - -Packwerk::Formatters::DefaultOffensesFormatter::IDENTIFIER = T.let(T.unsafe(nil), String) - -class Packwerk::Formatters::ProgressFormatter - sig { params(out: T.any(::IO, ::StringIO), style: ::Packwerk::OutputStyle).void } - def initialize(out, style: T.unsafe(nil)); end - - sig { void } - def interrupted; end - - sig { void } - def mark_as_failed; end - - sig { void } - def mark_as_inspected; end - - sig { params(target_files: T::Set[::String], block: T.proc.void).void } - def started_inspection(target_files, &block); end - - sig { params(block: T.proc.void).void } - def started_validation(&block); end - - private - - sig { params(execution_time: ::Float).void } - def finished(execution_time); end - - sig { params(target_files: T::Set[::String]).void } - def start_inspection(target_files); end - - sig { void } - def start_validation; end -end - -module Packwerk::Generators - extend ::ActiveSupport::Autoload -end - -class Packwerk::Generators::ConfigurationFile - sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void } - def initialize(root:, out: T.unsafe(nil)); end - - sig { returns(T::Boolean) } - def generate; end - - private - - sig { returns(::String) } - def render; end - - sig { returns(::String) } - def template; end - - class << self - sig { params(root: ::String, out: T.any(::IO, ::StringIO)).returns(T::Boolean) } - def generate(root:, out:); end - end -end - -Packwerk::Generators::ConfigurationFile::CONFIGURATION_TEMPLATE_FILE_PATH = T.let(T.unsafe(nil), String) - -class Packwerk::Generators::RootPackage - sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void } - def initialize(root:, out: T.unsafe(nil)); end - - sig { returns(T::Boolean) } - def generate; end - - class << self - sig { params(root: ::String, out: T.any(::IO, ::StringIO)).returns(T::Boolean) } - def generate(root:, out:); end - end -end - -class Packwerk::Graph - sig { params(edges: T::Array[T::Array[T.nilable(T.any(::Integer, ::String))]]).void } - def initialize(edges); end - - def acyclic?; end - def cycles; end - - private - - def add_cycle(cycle); end - def neighbours(node); end - def nodes; end - def process; end - def visit(node, visited_nodes: T.unsafe(nil), path: T.unsafe(nil)); end -end - -module Packwerk::Node; end - -class Packwerk::Node::Location < ::Struct - def column; end - def column=(_); end - def line; end - def line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module Packwerk::NodeHelpers - class << self - sig { params(node: ::AST::Node).returns(T::Boolean) } - def class?(node); end - - sig { params(class_or_module_node: ::AST::Node).returns(::String) } - def class_or_module_name(class_or_module_node); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def constant?(node); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def constant_assignment?(node); end - - sig { params(constant_node: ::AST::Node).returns(::String) } - def constant_name(constant_node); end - - sig { params(node: ::AST::Node).returns(T.untyped) } - def each_child(node); end - - sig { params(starting_node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T::Array[::String]) } - def enclosing_namespace_path(starting_node, ancestors:); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def hash?(node); end - - sig { params(string_or_symbol_node: ::AST::Node).returns(T.any(::String, ::Symbol)) } - def literal_value(string_or_symbol_node); end - - sig { params(node: ::Parser::AST::Node).returns(::Packwerk::Node::Location) } - def location(node); end - - sig { params(method_call_node: ::AST::Node).returns(T::Array[::AST::Node]) } - def method_arguments(method_call_node); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def method_call?(node); end - - sig { params(method_call_node: ::AST::Node).returns(::Symbol) } - def method_name(method_call_node); end - - sig { params(node: ::AST::Node).returns(T.nilable(::String)) } - def module_name_from_definition(node); end - - sig { params(node: ::Parser::AST::Node).returns(T.nilable(::Packwerk::Node::Location)) } - def name_location(node); end - - sig { params(class_node: ::AST::Node).returns(T.nilable(::AST::Node)) } - def parent_class(class_node); end - - sig { params(ancestors: T::Array[::AST::Node]).returns(::String) } - def parent_module_name(ancestors:); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def string?(node); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def symbol?(node); end - - sig { params(hash_node: ::AST::Node, key: ::Symbol).returns(T.untyped) } - def value_from_hash(hash_node, key); end - - private - - sig { params(node: T.nilable(::AST::Node)).returns(T::Boolean) } - def dynamic_class_creation?(node); end - - sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) } - def hash_pair_key(hash_pair_node); end - - sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) } - def hash_pair_value(hash_pair_node); end - - sig { params(hash_node: ::AST::Node).returns(T::Array[::AST::Node]) } - def hash_pairs(hash_node); end - - sig { params(block_node: ::AST::Node).returns(::AST::Node) } - def method_call_node(block_node); end - - sig { params(node: ::AST::Node).returns(T::Boolean) } - def module_creation?(node); end - - sig { params(node: ::AST::Node).returns(T.nilable(::String)) } - def name_from_block_definition(node); end - - sig { params(node: ::AST::Node).returns(T.nilable(::String)) } - def name_part_from_definition(node); end - - sig { params(method_call_or_block_node: ::AST::Node).returns(T.nilable(::AST::Node)) } - def receiver(method_call_or_block_node); end - - sig { params(node: ::AST::Node).returns(::Symbol) } - def type_of(node); end - end -end - -class Packwerk::NodeHelpers::TypeError < ::ArgumentError; end - -class Packwerk::NodeProcessor - sig { params(reference_extractor: ::Packwerk::ReferenceExtractor, relative_file: ::String).void } - def initialize(reference_extractor:, relative_file:); end - - sig do - params( - node: ::Parser::AST::Node, - ancestors: T::Array[::Parser::AST::Node] - ).returns(T.nilable(::Packwerk::UnresolvedReference)) - end - def call(node, ancestors); end -end - -class Packwerk::NodeProcessorFactory < ::T::Struct - const :constant_name_inspectors, T::Array[::Packwerk::ConstantNameInspector] - const :context_provider, ::Packwerk::ConstantDiscovery - const :root_path, ::String - - sig { params(relative_file: ::String, node: ::AST::Node).returns(::Packwerk::NodeProcessor) } - def for(relative_file:, node:); end - - private - - sig { params(node: ::AST::Node).returns(::Packwerk::ReferenceExtractor) } - def reference_extractor(node:); end - - class << self - def inherited(s); end - end -end - -class Packwerk::NodeVisitor - sig { params(node_processor: ::Packwerk::NodeProcessor).void } - def initialize(node_processor:); end - - def visit(node, ancestors:, result:); end -end - -class Packwerk::Offense - sig { params(file: ::String, message: ::String, location: T.nilable(::Packwerk::Node::Location)).void } - def initialize(file:, message:, location: T.unsafe(nil)); end - - sig { returns(::String) } - def file; end - - sig { returns(T.nilable(::Packwerk::Node::Location)) } - def location; end - - sig { returns(::String) } - def message; end - - sig { params(style: ::Packwerk::OutputStyle).returns(::String) } - def to_s(style = T.unsafe(nil)); end -end - -class Packwerk::OffenseCollection - sig { params(root_path: ::String, package_todo: T::Hash[::Packwerk::Package, ::Packwerk::PackageTodo]).void } - def initialize(root_path, package_todo = T.unsafe(nil)); end - - sig { params(offense: ::Packwerk::Offense).void } - def add_offense(offense); end - - sig { returns(T::Array[::Packwerk::Offense]) } - def errors; end - - sig { params(offense: ::Packwerk::Offense).returns(T::Boolean) } - def listed?(offense); end - - sig { returns(T::Array[::Packwerk::ReferenceOffense]) } - def new_violations; end - - sig { returns(T::Array[::Packwerk::Offense]) } - def outstanding_offenses; end - - sig { params(package_set: Packwerk::PackageSet).void } - def persist_package_todo_files(package_set); end - - sig { params(for_files: T::Set[::String]).returns(T::Boolean) } - def stale_violations?(for_files); end - - sig { returns(T::Array[::Packwerk::ReferenceOffense]) } - def strict_mode_violations; end - - private - - sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } - def already_listed?(offense); end - - sig { params(package_set: Packwerk::PackageSet).void } - def cleanup_extra_package_todo_files(package_set); end - - sig { void } - def dump_package_todo_files; end - - sig { params(package: ::Packwerk::Package).returns(::String) } - def package_todo_file_for(package); end - - sig { params(package: ::Packwerk::Package).returns(::Packwerk::PackageTodo) } - def package_todo_for(package); end - - sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } - def strict_mode_violation?(offense); end -end - -module Packwerk::OffensesFormatter - abstract! - - sig { abstract.returns(::String) } - def identifier; end - - sig { abstract.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } - def show_offenses(offenses); end - - sig do - abstract - .params( - offense_collection: ::Packwerk::OffenseCollection, - for_files: T::Set[::String] - ).returns(::String) - end - def show_stale_violations(offense_collection, for_files); end - - sig { abstract.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) } - def show_strict_mode_violations(strict_mode_violations); end - - class << self - sig { returns(T::Array[::Packwerk::OffensesFormatter]) } - def all; end - - sig { params(identifier: ::String).returns(::Packwerk::OffensesFormatter) } - def find(identifier); end - - sig { params(base: ::Class).void } - def included(base); end - - private - - sig { params(name: ::String).returns(::Packwerk::OffensesFormatter) } - def formatter_by_identifier(name); end - end -end - -class Packwerk::OffensesFormatter::DuplicateFormatterError < ::StandardError - sig { params(identifier: ::String).void } - def initialize(identifier); end -end - -module Packwerk::OutputStyle - interface! - - sig { abstract.returns(::String) } - def error; end - - sig { abstract.returns(::String) } - def filename; end - - sig { abstract.returns(::String) } - def reset; end -end - -module Packwerk::OutputStyles - extend ::ActiveSupport::Autoload -end - -class Packwerk::OutputStyles::Coloured - include ::Packwerk::OutputStyle - - sig { override.returns(::String) } - def error; end - - sig { override.returns(::String) } - def filename; end - - sig { override.returns(::String) } - def reset; end -end - -class Packwerk::OutputStyles::Plain - include ::Packwerk::OutputStyle - - sig { override.returns(::String) } - def error; end - - sig { override.returns(::String) } - def filename; end - - sig { override.returns(::String) } - def reset; end -end - -class Packwerk::Package - include ::Comparable - - sig { params(name: ::String, config: T.nilable(T.any(::FalseClass, T::Hash[T.untyped, T.untyped]))).void } - def initialize(name:, config:); end - - sig { params(other: T.untyped).returns(T.nilable(::Integer)) } - def <=>(other); end - - sig { returns(T::Hash[T.untyped, T.untyped]) } - def config; end - - sig { returns(T::Array[::String]) } - def dependencies; end - - sig { params(package: ::Packwerk::Package).returns(T::Boolean) } - def dependency?(package); end - - sig { returns(T::Boolean) } - def enforce_dependencies?; end - - sig { params(other: T.untyped).returns(T::Boolean) } - def eql?(other); end - - sig { returns(::Integer) } - def hash; end - - sig { returns(::String) } - def name; end - - sig { params(path: ::String).returns(T::Boolean) } - def package_path?(path); end - - sig { returns(T::Boolean) } - def root?; end - - sig { returns(::String) } - def to_s; end -end - -Packwerk::Package::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String) - -class Packwerk::PackageSet - extend T::Generic - include ::Enumerable - - Elem = type_member { { fixed: Packwerk::Package } } - - sig { params(packages: T::Array[::Packwerk::Package]).void } - def initialize(packages); end - - sig { override.params(blk: T.proc.params(arg0: ::Packwerk::Package).returns(T.untyped)).returns(T.untyped) } - def each(&blk); end - - sig { params(name: ::String).returns(T.nilable(::Packwerk::Package)) } - def fetch(name); end - - sig { params(file_path: T.any(::Pathname, ::String)).returns(::Packwerk::Package) } - def package_from_path(file_path); end - - sig { returns(T::Hash[::String, ::Packwerk::Package]) } - def packages; end - - class << self - sig do - params( - root_path: ::String, - package_pathspec: T.nilable(T.any(::String, T::Array[::String])) - ).returns(Packwerk::PackageSet) - end - def load_all_from(root_path, package_pathspec: T.unsafe(nil)); end - - sig do - params( - root_path: ::String, - package_pathspec: T.any(::String, T::Array[::String]), - exclude_pathspec: T.nilable(T.any(::String, T::Array[::String])) - ).returns(T::Array[::Pathname]) - end - def package_paths(root_path, package_pathspec, exclude_pathspec = T.unsafe(nil)); end - - private - - sig { params(packages: T::Array[::Packwerk::Package]).void } - def create_root_package_if_none_in(packages); end - - sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) } - def exclude_path?(globs, path); end - end -end - -Packwerk::PackageSet::PACKAGE_CONFIG_FILENAME = T.let(T.unsafe(nil), String) - -class Packwerk::PackageTodo - sig { params(package: ::Packwerk::Package, filepath: ::String).void } - def initialize(package, filepath); end - - sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) } - def add_entries(reference, violation_type); end - - sig { void } - def delete_if_exists; end - - sig { void } - def dump; end - - sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) } - def listed?(reference, violation_type:); end - - sig { params(for_files: T::Set[::String]).returns(T::Boolean) } - def stale_violations?(for_files); end - - private - - sig { params(filepath: ::String).returns(T::Hash[::String, T.untyped]) } - def load_yaml(filepath); end - - sig { returns(T::Hash[::String, T.untyped]) } - def prepare_entries_for_dump; end - - sig { returns(T::Hash[::String, T.untyped]) } - def todo_list; end -end - -Packwerk::PackageTodo::EntriesType = T.type_alias { T::Hash[::String, T.untyped] } - -class Packwerk::ParseRun - sig do - params( - relative_file_set: T::Set[::String], - configuration: ::Packwerk::Configuration, - file_set_specified: T::Boolean, - offenses_formatter: T.nilable(::Packwerk::OffensesFormatter), - progress_formatter: ::Packwerk::Formatters::ProgressFormatter - ).void - end - def initialize(relative_file_set:, configuration:, file_set_specified: T.unsafe(nil), offenses_formatter: T.unsafe(nil), progress_formatter: T.unsafe(nil)); end - - sig { returns(::Packwerk::Cli::Result) } - def check; end - - sig { returns(::Packwerk::Cli::Result) } - def update_todo; end - - private - - sig { params(run_context: ::Packwerk::RunContext, show_errors: T::Boolean).returns(::Packwerk::OffenseCollection) } - def find_offenses(run_context, show_errors: T.unsafe(nil)); end - - sig do - params( - block: T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) - ).returns(T::Array[::Packwerk::Offense]) - end - def serial_find_offenses(&block); end - - sig { params(failed: T::Boolean).void } - def update_progress(failed: T.unsafe(nil)); end -end - -Packwerk::ParseRun::ProcessFileProc = T.type_alias { T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) } - -class Packwerk::ParsedConstantDefinitions - def initialize(root_node:); end - - def local_reference?(constant_name, location: T.unsafe(nil), namespace_path: T.unsafe(nil)); end - - private - - def add_definition(constant_name, current_namespace_path, location); end - def collect_local_definitions_from_root(node, current_namespace_path = T.unsafe(nil)); end - - class << self - def reference_qualifications(constant_name, namespace_path:); end - end -end - -module Packwerk::Parsers; end - -class Packwerk::Parsers::Erb - include ::Packwerk::Parsers::ParserInterface - - sig { params(parser_class: T.untyped, ruby_parser: ::Packwerk::Parsers::Ruby).void } - def initialize(parser_class: T.unsafe(nil), ruby_parser: T.unsafe(nil)); end - - sig { override.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.untyped) } - def call(io:, file_path: T.unsafe(nil)); end - - sig { params(buffer: ::Parser::Source::Buffer, file_path: ::String).returns(T.nilable(::AST::Node)) } - def parse_buffer(buffer, file_path:); end - - private - - sig do - params( - node: T.nilable(T.any(::AST::Node, ::String)), - block: T.nilable(T.proc.params(arg0: ::AST::Node).void) - ).returns(T.nilable(T.any(T::Array[::String], T::Enumerator[::AST::Node]))) - end - def code_nodes(node, &block); end - - sig { params(erb_ast: T.all(::AST::Node, ::Object), file_path: ::String).returns(T.nilable(::AST::Node)) } - def to_ruby_ast(erb_ast, file_path); end -end - -class Packwerk::Parsers::Factory - include ::Singleton - extend ::Singleton::SingletonClassMethods - - sig { void } - def initialize; end - - sig { returns(::Class) } - def erb_parser_class; end - - sig { params(klass: T.nilable(::Class)).void } - def erb_parser_class=(klass); end - - sig { params(path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) } - def for_path(path); end -end - -Packwerk::Parsers::Factory::ERB_REGEX = T.let(T.unsafe(nil), Regexp) -Packwerk::Parsers::Factory::RUBY_REGEX = T.let(T.unsafe(nil), Regexp) - -class Packwerk::Parsers::ParseError < ::StandardError - def initialize(result); end - - def result; end -end - -class Packwerk::Parsers::ParseResult < ::Packwerk::Offense; end - -module Packwerk::Parsers::ParserInterface - requires_ancestor { Kernel } - - interface! - - sig { abstract.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.untyped) } - def call(io:, file_path:); end -end - -class Packwerk::Parsers::Ruby - include ::Packwerk::Parsers::ParserInterface - - sig { params(parser_class: T.untyped).void } - def initialize(parser_class: T.unsafe(nil)); end - - sig { override.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.nilable(::Parser::AST::Node)) } - def call(io:, file_path: T.unsafe(nil)); end -end - -class Packwerk::Parsers::Ruby::RaiseExceptionsParser < ::Parser::Ruby27 - sig { params(builder: T.untyped).void } - def initialize(builder); end -end - -class Packwerk::Parsers::Ruby::TolerateInvalidUtf8Builder < ::Parser::Builders::Default - sig { params(token: T.untyped).returns(T.untyped) } - def string_value(token); end -end - -Packwerk::PathSpec = T.type_alias { T.any(::String, T::Array[::String]) } - -class Packwerk::Reference < ::Struct - def constant; end - def constant=(_); end - def package; end - def package=(_); end - def relative_path; end - def relative_path=(_); end - def source_location; end - def source_location=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module Packwerk::ReferenceChecking - extend ::ActiveSupport::Autoload -end - -module Packwerk::ReferenceChecking::Checkers - extend ::ActiveSupport::Autoload -end - -class Packwerk::ReferenceChecking::Checkers::DependencyChecker - include ::Packwerk::Checker - - sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) } - def invalid_reference?(reference); end - - sig { override.params(reference: ::Packwerk::Reference).returns(::String) } - def message(reference); end - - sig { override.params(listed_offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } - def strict_mode_violation?(listed_offense); end - - sig { override.returns(::String) } - def violation_type; end - - private - - sig { params(reference: ::Packwerk::Reference).returns(::String) } - def standard_help_message(reference); end -end - -Packwerk::ReferenceChecking::Checkers::DependencyChecker::VIOLATION_TYPE = T.let(T.unsafe(nil), String) - -class Packwerk::ReferenceChecking::ReferenceChecker - sig { params(checkers: T::Array[::Packwerk::Checker]).void } - def initialize(checkers); end - - sig { params(reference: ::Packwerk::Reference).returns(T::Array[::Packwerk::Offense]) } - def call(reference); end -end - -class Packwerk::ReferenceExtractor - sig do - params( - constant_name_inspectors: T::Array[::Packwerk::ConstantNameInspector], - root_node: ::AST::Node, - root_path: ::String - ).void - end - def initialize(constant_name_inspectors:, root_node:, root_path:); end - - sig do - params( - node: ::Parser::AST::Node, - ancestors: T::Array[::Parser::AST::Node], - relative_file: ::String - ).returns(T.nilable(::Packwerk::UnresolvedReference)) - end - def reference_from_node(node, ancestors:, relative_file:); end - - private - - sig do - params( - constant_name: ::String, - name_location: T.nilable(::Packwerk::Node::Location), - namespace_path: T::Array[::String] - ).returns(T::Boolean) - end - def local_reference?(constant_name, name_location, namespace_path); end - - sig do - params( - constant_name: ::String, - node: ::Parser::AST::Node, - ancestors: T::Array[::Parser::AST::Node], - relative_file: ::String - ).returns(T.nilable(::Packwerk::UnresolvedReference)) - end - def reference_from_constant(constant_name, node:, ancestors:, relative_file:); end - - class << self - sig do - params( - unresolved_references: T::Array[::Packwerk::UnresolvedReference], - context_provider: ::Packwerk::ConstantDiscovery - ).returns(T::Array[::Packwerk::Reference]) - end - def get_fully_qualified_references_from(unresolved_references, context_provider); end - end -end - -class Packwerk::ReferenceOffense < ::Packwerk::Offense - sig do - params( - reference: ::Packwerk::Reference, - violation_type: ::String, - message: ::String, - location: T.nilable(::Packwerk::Node::Location) - ).void - end - def initialize(reference:, violation_type:, message:, location: T.unsafe(nil)); end - - sig { returns(::Packwerk::Reference) } - def reference; end - - sig { returns(::String) } - def violation_type; end -end - -class Packwerk::RunContext - sig do - params( - root_path: ::String, - load_paths: T::Hash[::String, ::Module], - inflector: T.class_of(ActiveSupport::Inflector), - cache_directory: ::Pathname, - config_path: T.nilable(::String), - package_paths: T.nilable(T.any(::String, T::Array[::String])), - custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]), - checkers: T::Array[::Packwerk::Checker], - cache_enabled: T::Boolean - ).void - end - def initialize(root_path:, load_paths:, inflector:, cache_directory:, config_path: T.unsafe(nil), package_paths: T.unsafe(nil), custom_associations: T.unsafe(nil), checkers: T.unsafe(nil), cache_enabled: T.unsafe(nil)); end - - sig { returns(Packwerk::PackageSet) } - def package_set; end - - sig { params(relative_file: ::String).returns(T::Array[::Packwerk::Offense]) } - def process_file(relative_file:); end - - private - - sig { returns(T::Array[::Packwerk::ConstantNameInspector]) } - def constant_name_inspectors; end - - sig { returns(::Packwerk::ConstantDiscovery) } - def context_provider; end - - sig { returns(::Packwerk::FileProcessor) } - def file_processor; end - - sig { returns(::Packwerk::NodeProcessorFactory) } - def node_processor_factory; end - - sig { returns(::ConstantResolver) } - def resolver; end - - class << self - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::RunContext) } - def from_configuration(configuration); end - end -end - -class Packwerk::UnresolvedReference < ::Struct - def constant_name; end - def constant_name=(_); end - def namespace_path; end - def namespace_path=(_); end - def relative_path; end - def relative_path=(_); end - def source_location; end - def source_location=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -Packwerk::VERSION = T.let(T.unsafe(nil), String) - -module Packwerk::Validator - extend ::ActiveSupport::Autoload - - abstract! - - sig do - abstract - .params( - package_set: Packwerk::PackageSet, - configuration: ::Packwerk::Configuration - ).returns(::Packwerk::Validator::Result) - end - def call(package_set, configuration); end - - sig do - params( - results: T::Array[::Packwerk::Validator::Result], - separator: ::String, - before_errors: ::String, - after_errors: ::String - ).returns(::Packwerk::Validator::Result) - end - def merge_results(results, separator: T.unsafe(nil), before_errors: T.unsafe(nil), after_errors: T.unsafe(nil)); end - - sig { params(configuration: ::Packwerk::Configuration).returns(T.any(::String, T::Array[::String])) } - def package_glob(configuration); end - - sig do - params( - configuration: ::Packwerk::Configuration, - glob_pattern: T.nilable(T.any(::String, T::Array[::String])) - ).returns(T::Array[::String]) - end - def package_manifests(configuration, glob_pattern = T.unsafe(nil)); end - - sig { params(configuration: ::Packwerk::Configuration, setting: T.untyped).returns(T.untyped) } - def package_manifests_settings_for(configuration, setting); end - - sig { abstract.returns(T::Array[::String]) } - def permitted_keys; end - - sig { params(configuration: ::Packwerk::Configuration, path: ::String).returns(::Pathname) } - def relative_path(configuration, path); end - - class << self - sig { returns(T::Array[::Packwerk::Validator]) } - def all; end - - sig { params(base: ::Class).void } - def included(base); end - end -end - -class Packwerk::Validator::Result < ::T::Struct - const :error_value, T.nilable(::String) - const :ok, T::Boolean - - sig { returns(T::Boolean) } - def ok?; end - - class << self - def inherited(s); end - end -end - -module Packwerk::Validators; end - -class Packwerk::Validators::DependencyValidator - include ::Packwerk::Validator - - sig do - override - .params( - package_set: Packwerk::PackageSet, - configuration: ::Packwerk::Configuration - ).returns(::Packwerk::Validator::Result) - end - def call(package_set, configuration); end - - sig { override.returns(T::Array[::String]) } - def permitted_keys; end - - private - - sig { params(cycles: T.untyped).returns(T::Array[::String]) } - def build_cycle_strings(cycles); end - - sig { params(package_set: Packwerk::PackageSet).returns(::Packwerk::Validator::Result) } - def check_acyclic_graph(package_set); end - - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } - def check_package_manifest_syntax(configuration); end - - sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } - def check_valid_package_dependencies(configuration); end - - sig { params(configuration: ::Packwerk::Configuration, path: T.untyped).returns(T::Boolean) } - def invalid_package_path?(configuration, path); end -end diff --git a/sorbet/rbi/gems/packwerk@3.2.3.rbi b/sorbet/rbi/gems/packwerk@3.2.3.rbi new file mode 100644 index 0000000..a3397e7 --- /dev/null +++ b/sorbet/rbi/gems/packwerk@3.2.3.rbi @@ -0,0 +1,2481 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `packwerk` gem. +# Please instead update this file by running `bin/tapioca gem packwerk`. + + +# source://packwerk//lib/packwerk.rb#14 +module Packwerk + extend ::ActiveSupport::Autoload +end + +# Checks the structure of the application and its packwerk configuration to make sure we can run a check and deliver +# correct results. +# +# source://packwerk//lib/packwerk/application_validator.rb#11 +class Packwerk::ApplicationValidator + include ::Packwerk::Validator + extend ::ActiveSupport::Autoload + + # source://packwerk//lib/packwerk/application_validator.rb#25 + sig do + override + .params( + package_set: Packwerk::PackageSet, + configuration: ::Packwerk::Configuration + ).returns(::Packwerk::Validator::Result) + end + def call(package_set, configuration); end + + # source://packwerk//lib/packwerk/application_validator.rb#19 + sig do + params( + package_set: Packwerk::PackageSet, + configuration: ::Packwerk::Configuration + ).returns(::Packwerk::Validator::Result) + end + def check_all(package_set, configuration); end + + # source://packwerk//lib/packwerk/application_validator.rb#72 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } + def check_application_structure(configuration); end + + # source://packwerk//lib/packwerk/application_validator.rb#88 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } + def check_package_manifest_paths(configuration); end + + # source://packwerk//lib/packwerk/application_validator.rb#44 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } + def check_package_manifest_syntax(configuration); end + + # source://packwerk//lib/packwerk/application_validator.rb#109 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } + def check_root_package_exists(configuration); end + + # source://packwerk//lib/packwerk/application_validator.rb#37 + sig { override.returns(T::Array[::String]) } + def permitted_keys; end + + private + + # source://packwerk//lib/packwerk/application_validator.rb#128 + sig { params(list: T.untyped).returns(T.untyped) } + def format_yaml_strings(list); end + + # source://packwerk//lib/packwerk/application_validator.rb#133 + sig { params(configuration: ::Packwerk::Configuration, paths: T::Array[::String]).returns(T::Array[::Pathname]) } + def relative_paths(configuration, paths); end +end + +# Extracts the implicit constant reference from an active record association +# +# source://packwerk//lib/packwerk/association_inspector.rb#6 +class Packwerk::AssociationInspector + include ::Packwerk::ConstantNameInspector + + # source://packwerk//lib/packwerk/association_inspector.rb#29 + sig do + params( + inflector: T.class_of(ActiveSupport::Inflector), + custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]), + excluded_files: T::Set[::String] + ).void + end + def initialize(inflector:, custom_associations: T.unsafe(nil), excluded_files: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/association_inspector.rb#40 + sig do + override + .params( + node: ::AST::Node, + ancestors: T::Array[::AST::Node], + relative_file: ::String + ).returns(T.nilable(::String)) + end + def constant_name_from_node(node, ancestors:, relative_file:); end + + private + + # source://packwerk//lib/packwerk/association_inspector.rb#65 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def association?(node); end + + # source://packwerk//lib/packwerk/association_inspector.rb#79 + sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(T.any(::String, ::Symbol))) } + def association_name(arguments); end + + # source://packwerk//lib/packwerk/association_inspector.rb#71 + sig { params(arguments: T::Array[::AST::Node]).returns(T.nilable(::AST::Node)) } + def custom_class_name(arguments); end + + # source://packwerk//lib/packwerk/association_inspector.rb#60 + sig { params(relative_file: ::String).returns(T::Boolean) } + def excluded?(relative_file); end +end + +# source://packwerk//lib/packwerk/association_inspector.rb#10 +Packwerk::AssociationInspector::CustomAssociations = T.type_alias { T.any(T::Array[::Symbol], T::Set[::Symbol]) } + +# source://packwerk//lib/packwerk/association_inspector.rb#12 +Packwerk::AssociationInspector::RAILS_ASSOCIATIONS = T.let(T.unsafe(nil), Set) + +# source://packwerk//lib/packwerk/cache.rb#7 +class Packwerk::Cache + # source://packwerk//lib/packwerk/cache.rb#52 + sig { params(enable_cache: T::Boolean, cache_directory: ::Pathname, config_path: T.nilable(::String)).void } + def initialize(enable_cache:, cache_directory:, config_path:); end + + # source://packwerk//lib/packwerk/cache.rb#67 + sig { void } + def bust_cache!; end + + # source://packwerk//lib/packwerk/cache.rb#133 + sig { params(contents: ::String, contents_key: ::Symbol).void } + def bust_cache_if_contents_have_changed(contents, contents_key); end + + # source://packwerk//lib/packwerk/cache.rb#128 + sig { void } + def bust_cache_if_inflections_have_changed!; end + + # source://packwerk//lib/packwerk/cache.rb#121 + sig { void } + def bust_cache_if_packwerk_yml_has_changed!; end + + # source://packwerk//lib/packwerk/cache.rb#157 + sig { void } + def create_cache_directory!; end + + # source://packwerk//lib/packwerk/cache.rb#109 + sig { params(file: ::String).returns(::String) } + def digest_for_file(file); end + + # source://packwerk//lib/packwerk/cache.rb#114 + sig { params(str: ::String).returns(::String) } + def digest_for_string(str); end + + # source://packwerk//lib/packwerk/cache.rb#77 + sig do + params( + file_path: ::String, + block: T.proc.returns(T::Array[::Packwerk::UnresolvedReference]) + ).returns(T::Array[::Packwerk::UnresolvedReference]) + end + def with_cache(file_path, &block); end +end + +# source://packwerk//lib/packwerk/cache.rb#10 +class Packwerk::Cache::CacheContents < ::T::Struct + const :file_contents_digest, ::String + const :unresolved_references, T::Array[::Packwerk::UnresolvedReference] + + # source://packwerk//lib/packwerk/cache.rb#39 + sig { returns(::String) } + def serialize; end + + class << self + # source://packwerk//lib/packwerk/cache.rb#20 + sig { params(serialized_cache_contents: ::String).returns(::Packwerk::Cache::CacheContents) } + def deserialize(serialized_cache_contents); end + end +end + +# source://packwerk//lib/packwerk/cache.rb#44 +Packwerk::Cache::CacheShape = T.type_alias { T::Hash[::String, ::Packwerk::Cache::CacheContents] } + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/checker.rb#5 +module Packwerk::Checker + abstract! + + # @abstract + # + # source://packwerk//lib/packwerk/checker.rb#58 + sig { abstract.params(reference: ::Packwerk::Reference).returns(T::Boolean) } + def invalid_reference?(reference); end + + # @abstract + # + # source://packwerk//lib/packwerk/checker.rb#61 + sig { abstract.params(reference: ::Packwerk::Reference).returns(::String) } + def message(reference); end + + # @abstract + # + # source://packwerk//lib/packwerk/checker.rb#55 + sig { abstract.params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } + def strict_mode_violation?(offense); end + + # @abstract + # + # source://packwerk//lib/packwerk/checker.rb#52 + sig { abstract.returns(::String) } + def violation_type; end + + class << self + # source://packwerk//lib/packwerk/checker.rb#20 + sig { returns(T::Array[::Packwerk::Checker]) } + def all; end + + # source://packwerk//lib/packwerk/checker.rb#26 + sig { params(violation_type: ::String).returns(::Packwerk::Checker) } + def find(violation_type); end + + # source://packwerk//lib/packwerk/checker.rb#15 + sig { params(base: T::Class[T.anything]).void } + def included(base); end + + private + + # source://packwerk//lib/packwerk/checker.rb#43 + sig { params(name: ::String).returns(::Packwerk::Checker) } + def checker_by_violation_type(name); end + + # source://packwerk//lib/packwerk/checker.rb#38 + sig { returns(T::Array[T::Class[T.anything]]) } + def checkers; end + + # source://packwerk//lib/packwerk/checker.rb#33 + sig { void } + def load_defaults; end + end +end + +# A command-line interface to Packwerk. +# +# source://packwerk//lib/packwerk/cli.rb#6 +class Packwerk::Cli + # source://packwerk//lib/packwerk/cli.rb#19 + sig do + params( + configuration: T.nilable(::Packwerk::Configuration), + out: T.any(::IO, ::StringIO), + err_out: T.any(::IO, ::StringIO), + environment: ::String, + style: ::Packwerk::OutputStyle, + offenses_formatter: T.nilable(::Packwerk::OffensesFormatter) + ).void + end + def initialize(configuration: T.unsafe(nil), out: T.unsafe(nil), err_out: T.unsafe(nil), environment: T.unsafe(nil), style: T.unsafe(nil), offenses_formatter: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/cli.rb#46 + sig { params(args: T::Array[::String]).returns(T::Boolean) } + def execute_command(args); end + + # source://packwerk//lib/packwerk/cli.rb#40 + sig { params(args: T::Array[::String]).returns(T.noreturn) } + def run(args); end +end + +# source://packwerk//lib/packwerk/commands.rb#5 +module Packwerk::Commands + extend ::ActiveSupport::Autoload + + class << self + # source://packwerk//lib/packwerk/commands.rb#35 + sig { returns(T::Array[::Packwerk::Commands::LazyLoadedEntry]) } + def all; end + + # source://packwerk//lib/packwerk/commands.rb#28 + sig { params(name_or_alias: ::String).returns(T.nilable(T.class_of(Packwerk::Commands::BaseCommand))) } + def for(name_or_alias); end + + # source://packwerk//lib/packwerk/commands.rb#23 + sig { params(name: ::String, aliases: T::Array[::String]).void } + def register(name, aliases: T.unsafe(nil)); end + + private + + # source://packwerk//lib/packwerk/commands.rb#42 + sig { returns(T::Array[::Packwerk::Commands::LazyLoadedEntry]) } + def registry; end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/commands/base_command.rb#6 +class Packwerk::Commands::BaseCommand + abstract! + + # source://packwerk//lib/packwerk/commands/base_command.rb#36 + sig do + params( + args: T::Array[::String], + configuration: ::Packwerk::Configuration, + out: T.any(::IO, ::StringIO), + err_out: T.any(::IO, ::StringIO), + progress_formatter: ::Packwerk::Formatters::ProgressFormatter, + offenses_formatter: ::Packwerk::OffensesFormatter + ).void + end + def initialize(args, configuration:, out:, err_out:, progress_formatter:, offenses_formatter:); end + + # @abstract + # + # source://packwerk//lib/packwerk/commands/base_command.rb#46 + sig { abstract.returns(T::Boolean) } + def run; end + + private + + # source://packwerk//lib/packwerk/commands/base_command.rb#51 + sig { returns(T::Array[::String]) } + def args; end + + # source://packwerk//lib/packwerk/commands/base_command.rb#54 + sig { returns(::Packwerk::Configuration) } + def configuration; end + + # source://packwerk//lib/packwerk/commands/base_command.rb#60 + sig { returns(T.any(::IO, ::StringIO)) } + def err_out; end + + # source://packwerk//lib/packwerk/commands/base_command.rb#66 + sig { returns(::Packwerk::OffensesFormatter) } + def offenses_formatter; end + + # source://packwerk//lib/packwerk/commands/base_command.rb#57 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # source://packwerk//lib/packwerk/commands/base_command.rb#63 + sig { returns(::Packwerk::Formatters::ProgressFormatter) } + def progress_formatter; end + + class << self + # source://packwerk//lib/packwerk/commands/base_command.rb#17 + sig { params(description: T.nilable(::String)).returns(::String) } + def description(description = T.unsafe(nil)); end + end +end + +# source://packwerk//lib/packwerk/commands/check_command.rb#6 +class Packwerk::Commands::CheckCommand < ::Packwerk::Commands::BaseCommand + include ::Packwerk::Commands::UsesParseRun + + # source://packwerk//lib/packwerk/commands/check_command.rb#13 + sig { override.returns(T::Boolean) } + def run; end + + private + + # source://packwerk//lib/packwerk/commands/check_command.rb#57 + sig { returns(::Packwerk::OffenseCollection) } + def offense_collection; end + + # source://packwerk//lib/packwerk/commands/check_command.rb#52 + sig { returns(::Packwerk::RunContext) } + def run_context; end +end + +# source://packwerk//lib/packwerk/commands/help_command.rb#6 +class Packwerk::Commands::HelpCommand < ::Packwerk::Commands::BaseCommand + # source://packwerk//lib/packwerk/commands/help_command.rb#12 + sig { override.returns(T::Boolean) } + def run; end + + private + + # source://packwerk//lib/packwerk/commands/help_command.rb#26 + sig { returns(::String) } + def command_help_lines; end +end + +# source://packwerk//lib/packwerk/commands/init_command.rb#6 +class Packwerk::Commands::InitCommand < ::Packwerk::Commands::BaseCommand + # source://packwerk//lib/packwerk/commands/init_command.rb#12 + sig { override.returns(T::Boolean) } + def run; end +end + +# source://packwerk//lib/packwerk/commands/lazy_loaded_entry.rb#6 +class Packwerk::Commands::LazyLoadedEntry + # source://packwerk//lib/packwerk/commands/lazy_loaded_entry.rb#13 + sig { params(name: ::String, aliases: T::Array[::String]).void } + def initialize(name, aliases: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/commands/lazy_loaded_entry.rb#19 + sig { returns(T.class_of(Packwerk::Commands::BaseCommand)) } + def command_class; end + + # source://packwerk//lib/packwerk/commands/lazy_loaded_entry.rb#25 + sig { returns(::String) } + def description; end + + # source://packwerk//lib/packwerk/commands/lazy_loaded_entry.rb#30 + sig { params(name_or_alias: ::String).returns(T::Boolean) } + def matches_command?(name_or_alias); end + + # source://packwerk//lib/packwerk/commands/lazy_loaded_entry.rb#10 + sig { returns(::String) } + def name; end +end + +# source://packwerk//lib/packwerk/commands/update_todo_command.rb#6 +class Packwerk::Commands::UpdateTodoCommand < ::Packwerk::Commands::BaseCommand + include ::Packwerk::Commands::UsesParseRun + + # source://packwerk//lib/packwerk/commands/update_todo_command.rb#13 + sig { override.returns(T::Boolean) } + def run; end +end + +# source://packwerk//lib/packwerk/commands/uses_parse_run.rb#8 +module Packwerk::Commands::UsesParseRun + requires_ancestor { Packwerk::Commands::BaseCommand } + + # source://packwerk//lib/packwerk/commands/uses_parse_run.rb#24 + sig do + params( + args: T::Array[::String], + configuration: ::Packwerk::Configuration, + out: T.any(::IO, ::StringIO), + err_out: T.any(::IO, ::StringIO), + progress_formatter: ::Packwerk::Formatters::ProgressFormatter, + offenses_formatter: ::Packwerk::OffensesFormatter + ).void + end + def initialize(args, configuration:, out:, err_out:, progress_formatter:, offenses_formatter:); end + + private + + # source://packwerk//lib/packwerk/commands/uses_parse_run.rb#34 + sig { returns(::Packwerk::FilesForProcessing) } + def fetch_files_to_process; end + + # source://packwerk//lib/packwerk/commands/uses_parse_run.rb#43 + sig { returns(T.nilable(::Packwerk::OffensesFormatter)) } + def offenses_formatter_from_options; end + + # source://packwerk//lib/packwerk/commands/uses_parse_run.rb#48 + sig { returns(::Packwerk::ParseRun) } + def parse_run; end + + # source://packwerk//lib/packwerk/commands/uses_parse_run.rb#56 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def parsed_options; end +end + +# source://packwerk//lib/packwerk/commands/validate_command.rb#6 +class Packwerk::Commands::ValidateCommand < ::Packwerk::Commands::BaseCommand + # source://packwerk//lib/packwerk/commands/validate_command.rb#12 + sig { override.returns(T::Boolean) } + def run; end + + private + + # source://packwerk//lib/packwerk/commands/validate_command.rb#38 + sig { returns(Packwerk::PackageSet) } + def package_set; end + + # source://packwerk//lib/packwerk/commands/validate_command.rb#33 + sig { returns(::Packwerk::ApplicationValidator) } + def validator; end +end + +# source://packwerk//lib/packwerk/commands/version_command.rb#6 +class Packwerk::Commands::VersionCommand < ::Packwerk::Commands::BaseCommand + # source://packwerk//lib/packwerk/commands/version_command.rb#12 + sig { override.returns(T::Boolean) } + def run; end +end + +# source://packwerk//lib/packwerk/configuration.rb#8 +class Packwerk::Configuration + # source://packwerk//lib/packwerk/configuration.rb#75 + sig { params(configs: T::Hash[::String, T.untyped], config_path: T.nilable(::String)).void } + def initialize(configs = T.unsafe(nil), config_path: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/configuration.rb#58 + sig { returns(T::Array[::String]) } + def associations_exclude; end + + # source://packwerk//lib/packwerk/configuration.rb#64 + sig { returns(::Pathname) } + def cache_directory; end + + # source://packwerk//lib/packwerk/configuration.rb#118 + sig { returns(T::Boolean) } + def cache_enabled?; end + + # source://packwerk//lib/packwerk/configuration.rb#61 + sig { returns(T.nilable(::String)) } + def config_path; end + + # source://packwerk//lib/packwerk/configuration.rb#55 + sig { returns(T::Array[::Symbol]) } + def custom_associations; end + + # source://packwerk//lib/packwerk/configuration.rb#46 + sig { returns(T::Array[::String]) } + def exclude; end + + # source://packwerk//lib/packwerk/configuration.rb#43 + sig { returns(T::Array[::String]) } + def include; end + + # source://packwerk//lib/packwerk/configuration.rb#100 + sig { returns(T::Hash[::String, ::Module]) } + def load_paths; end + + # source://packwerk//lib/packwerk/configuration.rb#113 + sig { returns(::Packwerk::OffensesFormatter) } + def offenses_formatter; end + + # source://packwerk//lib/packwerk/configuration.rb#52 + sig { returns(T.any(::String, T::Array[::String])) } + def package_paths; end + + # source://packwerk//lib/packwerk/configuration.rb#67 + sig { params(parallel: T::Boolean).returns(T::Boolean) } + def parallel=(parallel); end + + # source://packwerk//lib/packwerk/configuration.rb#108 + sig { returns(T::Boolean) } + def parallel?; end + + # source://packwerk//lib/packwerk/configuration.rb#49 + sig { returns(::String) } + def root_path; end + + class << self + # @raise [ArgumentError] + # + # source://packwerk//lib/packwerk/configuration.rb#15 + sig { params(path: ::String).returns(::Packwerk::Configuration) } + def from_path(path = T.unsafe(nil)); end + + private + + # source://packwerk//lib/packwerk/configuration.rb#30 + sig { params(path: ::String).returns(::Packwerk::Configuration) } + def from_packwerk_config(path); end + end +end + +# source://packwerk//lib/packwerk/configuration.rb#38 +Packwerk::Configuration::DEFAULT_CONFIG_PATH = T.let(T.unsafe(nil), String) + +# source://packwerk//lib/packwerk/configuration.rb#40 +Packwerk::Configuration::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array) + +# source://packwerk//lib/packwerk/configuration.rb#39 +Packwerk::Configuration::DEFAULT_INCLUDE_GLOBS = T.let(T.unsafe(nil), Array) + +# Extracts a constant name from an AST node of type :const +# +# source://packwerk//lib/packwerk/const_node_inspector.rb#6 +class Packwerk::ConstNodeInspector + include ::Packwerk::ConstantNameInspector + + # source://packwerk//lib/packwerk/const_node_inspector.rb#15 + sig do + override + .params( + node: ::AST::Node, + ancestors: T::Array[::AST::Node], + relative_file: ::String + ).returns(T.nilable(::String)) + end + def constant_name_from_node(node, ancestors:, relative_file:); end + + private + + # source://packwerk//lib/packwerk/const_node_inspector.rb#43 + sig { params(node: ::AST::Node, parent: ::AST::Node).returns(T.nilable(T::Boolean)) } + def constant_in_module_or_class_definition?(node, parent:); end + + # source://packwerk//lib/packwerk/const_node_inspector.rb#49 + sig { params(ancestors: T::Array[::AST::Node]).returns(::String) } + def fully_qualify_constant(ancestors); end + + # source://packwerk//lib/packwerk/const_node_inspector.rb#38 + sig { params(parent: T.nilable(::AST::Node)).returns(T::Boolean) } + def root_constant?(parent); end +end + +# source://packwerk//lib/packwerk/constant_context.rb#7 +class Packwerk::ConstantContext < ::Struct + # Returns the value of attribute location + # + # @return [Object] the current value of location + # + # source://packwerk//lib/packwerk/constant_context.rb#7 + def location; end + + # Sets the attribute location + # + # @param value [Object] the value to set the attribute location to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/constant_context.rb#7 + def location=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + # + # source://packwerk//lib/packwerk/constant_context.rb#7 + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/constant_context.rb#7 + def name=(_); end + + # Returns the value of attribute package + # + # @return [Object] the current value of package + # + # source://packwerk//lib/packwerk/constant_context.rb#7 + def package; end + + # Sets the attribute package + # + # @param value [Object] the value to set the attribute package to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/constant_context.rb#7 + def package=(_); end + + class << self + # source://packwerk//lib/packwerk/constant_context.rb#7 + def [](*_arg0); end + + # source://packwerk//lib/packwerk/constant_context.rb#7 + def inspect; end + + # source://packwerk//lib/packwerk/constant_context.rb#7 + def keyword_init?; end + + # source://packwerk//lib/packwerk/constant_context.rb#7 + def members; end + + # source://packwerk//lib/packwerk/constant_context.rb#7 + def new(*_arg0); end + end +end + +# Get information about unresolved constants without loading the application code. +# Information gathered: Fully qualified name, path to file containing the definition, package, +# and visibility (public/private to the package). +# +# The implementation makes a few assumptions about the code base: +# - `Something::SomeOtherThing` is defined in a path of either `something/some_other_thing.rb` or `something.rb`, +# relative to the load path. Rails' `zeitwerk` autoloader makes the same assumption. +# - It is OK to not always infer the exact file defining the constant. For example, when a constant is inherited, we +# have no way of inferring the file it is defined in. You could argue though that inheritance means that another +# constant with the same name exists in the inheriting class, and this view is sufficient for all our use cases. +# +# source://packwerk//lib/packwerk/constant_discovery.rb#17 +class Packwerk::ConstantDiscovery + # source://packwerk//lib/packwerk/constant_discovery.rb#25 + sig { params(constant_resolver: ::ConstantResolver, packages: Packwerk::PackageSet).void } + def initialize(constant_resolver:, packages:); end + + # Analyze a constant via its name. + # If the constant is unresolved, we need the current namespace path to correctly infer its full name + # + # source://packwerk//lib/packwerk/constant_discovery.rb#58 + sig do + params( + const_name: ::String, + current_namespace_path: T.nilable(T::Array[::String]) + ).returns(T.nilable(::Packwerk::ConstantContext)) + end + def context_for(const_name, current_namespace_path: T.unsafe(nil)); end + + # Get the package that owns a given file path. + # + # source://packwerk//lib/packwerk/constant_discovery.rb#41 + sig { params(path: ::String).returns(::Packwerk::Package) } + def package_from_path(path); end +end + +# An interface describing an object that can extract a constant name from an AST node. +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/constant_name_inspector.rb#8 +module Packwerk::ConstantNameInspector + interface! + + # @abstract + # + # source://packwerk//lib/packwerk/constant_name_inspector.rb#19 + sig do + abstract + .params( + node: ::AST::Node, + ancestors: T::Array[::AST::Node], + relative_file: ::String + ).returns(T.nilable(::String)) + end + def constant_name_from_node(node, ancestors:, relative_file:); end +end + +# source://packwerk//lib/packwerk/cache.rb#162 +class Packwerk::Debug + class << self + # source://packwerk//lib/packwerk/cache.rb#167 + sig { params(out: ::String).void } + def out(out); end + end +end + +# This class handles loading extensions to packwerk using the `require` directive +# in the `packwerk.yml` configuration. +# +# source://packwerk//lib/packwerk/extension_loader.rb#7 +module Packwerk::ExtensionLoader + class << self + # source://packwerk//lib/packwerk/extension_loader.rb#11 + sig { params(require_directive: ::String, config_dir_path: ::String).void } + def load(require_directive, config_dir_path); end + end +end + +# source://packwerk//lib/packwerk/file_processor.rb#7 +class Packwerk::FileProcessor + # source://packwerk//lib/packwerk/file_processor.rb#26 + sig do + params( + node_processor_factory: ::Packwerk::NodeProcessorFactory, + cache: ::Packwerk::Cache, + parser_factory: T.nilable(::Packwerk::Parsers::Factory) + ).void + end + def initialize(node_processor_factory:, cache:, parser_factory: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/file_processor.rb#40 + sig { params(relative_file: ::String).returns(::Packwerk::FileProcessor::ProcessedFile) } + def call(relative_file); end + + private + + # source://packwerk//lib/packwerk/file_processor.rb#85 + sig { params(relative_file: ::String, parser: ::Packwerk::Parsers::ParserInterface).returns(T.untyped) } + def parse_into_ast(relative_file, parser); end + + # source://packwerk//lib/packwerk/file_processor.rb#92 + sig { params(file_path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) } + def parser_for(file_path); end + + # source://packwerk//lib/packwerk/file_processor.rb#74 + sig { params(node: ::Parser::AST::Node, relative_file: ::String).returns(T::Array[::Packwerk::UnresolvedReference]) } + def references_from_ast(node, relative_file); end +end + +# source://packwerk//lib/packwerk/file_processor.rb#32 +class Packwerk::FileProcessor::ProcessedFile < ::T::Struct + const :unresolved_references, T::Array[::Packwerk::UnresolvedReference], default: T.unsafe(nil) + const :offenses, T::Array[::Packwerk::Offense], default: T.unsafe(nil) +end + +# source://packwerk//lib/packwerk/file_processor.rb#10 +class Packwerk::FileProcessor::UnknownFileTypeResult < ::Packwerk::Offense + # source://packwerk//lib/packwerk/file_processor.rb#14 + sig { params(file: ::String).void } + def initialize(file:); end +end + +# source://packwerk//lib/packwerk/files_for_processing.rb#5 +class Packwerk::FilesForProcessing + # source://packwerk//lib/packwerk/files_for_processing.rb#32 + sig do + params( + relative_file_paths: T::Array[::String], + configuration: ::Packwerk::Configuration, + ignore_nested_packages: T::Boolean + ).void + end + def initialize(relative_file_paths, configuration, ignore_nested_packages); end + + # source://packwerk//lib/packwerk/files_for_processing.rb#41 + sig { returns(T::Set[::String]) } + def files; end + + # source://packwerk//lib/packwerk/files_for_processing.rb#46 + sig { returns(T::Boolean) } + def files_specified?; end + + private + + # source://packwerk//lib/packwerk/files_for_processing.rb#105 + sig { returns(T::Set[::String]) } + def configured_excluded_files; end + + # source://packwerk//lib/packwerk/files_for_processing.rb#100 + sig { returns(T::Set[::String]) } + def configured_included_files; end + + # source://packwerk//lib/packwerk/files_for_processing.rb#53 + sig { returns(T::Set[::String]) } + def files_for_processing; end + + # source://packwerk//lib/packwerk/files_for_processing.rb#110 + sig { params(relative_globs: T::Array[::String]).returns(T::Set[::String]) } + def relative_files_for_globs(relative_globs); end + + # source://packwerk//lib/packwerk/files_for_processing.rb#64 + sig { returns(T::Set[::String]) } + def specified_files; end + + # source://packwerk//lib/packwerk/files_for_processing.rb#77 + sig { params(relative_file_path: ::String).returns(T::Set[::String]) } + def specified_included_files(relative_file_path); end + + class << self + # source://packwerk//lib/packwerk/files_for_processing.rb#20 + sig do + params( + relative_file_paths: T::Array[::String], + configuration: ::Packwerk::Configuration, + ignore_nested_packages: T::Boolean + ).returns(::Packwerk::FilesForProcessing) + end + def fetch(relative_file_paths:, configuration:, ignore_nested_packages: T.unsafe(nil)); end + end +end + +# source://packwerk//lib/packwerk/files_for_processing.rb#8 +Packwerk::FilesForProcessing::RelativeFileSet = T.type_alias { T::Set[::String] } + +# source://packwerk//lib/packwerk.rb#44 +module Packwerk::Formatters + extend ::ActiveSupport::Autoload +end + +# source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#6 +class Packwerk::Formatters::DefaultOffensesFormatter + include ::Packwerk::OffensesFormatter + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#33 + sig { override.returns(::String) } + def identifier; end + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#14 + sig { override.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } + def show_offenses(offenses); end + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#24 + sig do + override + .params( + offense_collection: ::Packwerk::OffenseCollection, + file_set: T::Set[::String] + ).returns(::String) + end + def show_stale_violations(offense_collection, file_set); end + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#38 + sig { override.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) } + def show_strict_mode_violations(strict_mode_violations); end + + private + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#54 + sig { params(offense: ::Packwerk::ReferenceOffense).returns(::String) } + def format_strict_mode_violation(offense); end + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#63 + sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } + def offenses_list(offenses); end + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#71 + sig { params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } + def offenses_summary(offenses); end + + # source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#49 + sig { returns(::Packwerk::OutputStyle) } + def style; end +end + +# source://packwerk//lib/packwerk/formatters/default_offenses_formatter.rb#9 +Packwerk::Formatters::DefaultOffensesFormatter::IDENTIFIER = T.let(T.unsafe(nil), String) + +# source://packwerk//lib/packwerk/formatters/progress_formatter.rb#8 +class Packwerk::Formatters::ProgressFormatter + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#12 + sig { params(out: T.any(::IO, ::StringIO), style: ::Packwerk::OutputStyle).void } + def initialize(out, style: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#34 + sig { params(failed: T::Boolean).void } + def increment_progress(failed = T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#53 + sig { void } + def interrupted; end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#48 + sig { void } + def mark_as_failed; end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#43 + sig { void } + def mark_as_inspected; end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#26 + sig { params(target_files: T::Set[::String], block: T.proc.void).void } + def started_inspection(target_files, &block); end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#18 + sig { params(block: T.proc.void).void } + def started_validation(&block); end + + private + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#62 + sig { params(execution_time: ::Float).void } + def finished(execution_time); end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#74 + sig { params(target_files: T::Set[::String]).void } + def start_inspection(target_files); end + + # source://packwerk//lib/packwerk/formatters/progress_formatter.rb#69 + sig { void } + def start_validation; end +end + +# source://packwerk//lib/packwerk.rb#79 +module Packwerk::Generators + extend ::ActiveSupport::Autoload +end + +# source://packwerk//lib/packwerk/generators/configuration_file.rb#8 +class Packwerk::Generators::ConfigurationFile + # source://packwerk//lib/packwerk/generators/configuration_file.rb#23 + sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void } + def initialize(root:, out: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/generators/configuration_file.rb#29 + sig { returns(T::Boolean) } + def generate; end + + private + + # source://packwerk//lib/packwerk/generators/configuration_file.rb#47 + sig { returns(::String) } + def render; end + + # source://packwerk//lib/packwerk/generators/configuration_file.rb#52 + sig { returns(::String) } + def template; end + + class << self + # source://packwerk//lib/packwerk/generators/configuration_file.rb#17 + sig { params(root: ::String, out: T.any(::IO, ::StringIO)).returns(T::Boolean) } + def generate(root:, out:); end + end +end + +# source://packwerk//lib/packwerk/generators/configuration_file.rb#11 +Packwerk::Generators::ConfigurationFile::CONFIGURATION_TEMPLATE_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://packwerk//lib/packwerk/generators/root_package.rb#6 +class Packwerk::Generators::RootPackage + # source://packwerk//lib/packwerk/generators/root_package.rb#19 + sig { params(root: ::String, out: T.any(::IO, ::StringIO)).void } + def initialize(root:, out: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/generators/root_package.rb#25 + sig { returns(T::Boolean) } + def generate; end + + class << self + # source://packwerk//lib/packwerk/generators/root_package.rb#13 + sig { params(root: ::String, out: T.any(::IO, ::StringIO)).returns(T::Boolean) } + def generate(root:, out:); end + end +end + +# A general implementation of a graph data structure with the ability to check for - and list - cycles. +# +# source://packwerk//lib/packwerk/graph.rb#8 +class Packwerk::Graph + include ::TSort + + # source://packwerk//lib/packwerk/graph.rb#18 + sig do + params( + edges: T::Hash[T.nilable(T.any(::Integer, ::String)), T::Array[T.nilable(T.any(::Integer, ::String))]] + ).void + end + def initialize(edges); end + + # @return [Boolean] + # + # source://packwerk//lib/packwerk/graph.rb#26 + def acyclic?; end + + # source://packwerk//lib/packwerk/graph.rb#22 + def cycles; end + + private + + # source://packwerk//lib/packwerk/graph.rb#37 + def tsort_each_child(node, &block); end + + # source://packwerk//lib/packwerk/graph.rb#30 + def tsort_each_node(&block); end +end + +# source://packwerk//lib/packwerk/graph.rb#34 +Packwerk::Graph::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://packwerk//lib/packwerk/node.rb#5 +module Packwerk::Node; end + +# source://packwerk//lib/packwerk/node.rb#6 +class Packwerk::Node::Location < ::Struct + # Returns the value of attribute column + # + # @return [Object] the current value of column + # + # source://packwerk//lib/packwerk/node.rb#6 + def column; end + + # Sets the attribute column + # + # @param value [Object] the value to set the attribute column to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/node.rb#6 + def column=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + # + # source://packwerk//lib/packwerk/node.rb#6 + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/node.rb#6 + def line=(_); end + + class << self + # source://packwerk//lib/packwerk/node.rb#6 + def [](*_arg0); end + + # source://packwerk//lib/packwerk/node.rb#6 + def inspect; end + + # source://packwerk//lib/packwerk/node.rb#6 + def keyword_init?; end + + # source://packwerk//lib/packwerk/node.rb#6 + def members; end + + # source://packwerk//lib/packwerk/node.rb#6 + def new(*_arg0); end + end +end + +# Convenience methods for working with Parser::AST::Node nodes. +# +# source://packwerk//lib/packwerk/node_helpers.rb#9 +module Packwerk::NodeHelpers + class << self + # source://packwerk//lib/packwerk/node_helpers.rb#122 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def class?(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#16 + sig { params(class_or_module_node: ::AST::Node).returns(::String) } + def class_or_module_name(class_or_module_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#112 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def constant?(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#117 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def constant_assignment?(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#31 + sig { params(constant_node: ::AST::Node).returns(::String) } + def constant_name(constant_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#68 + sig do + params( + node: ::AST::Node, + block: T.nilable(T.proc.params(arg0: ::Parser::AST::Node).void) + ).returns(T::Enumerable[::AST::Node]) + end + def each_child(node, &block); end + + # source://packwerk//lib/packwerk/node_helpers.rb#79 + sig { params(starting_node: ::AST::Node, ancestors: T::Array[::AST::Node]).returns(T::Array[::String]) } + def enclosing_namespace_path(starting_node, ancestors:); end + + # source://packwerk//lib/packwerk/node_helpers.rb#132 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def hash?(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#92 + sig { params(string_or_symbol_node: ::AST::Node).returns(T.any(::String, ::Symbol)) } + def literal_value(string_or_symbol_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#106 + sig { params(node: ::Parser::AST::Node).returns(::Packwerk::Node::Location) } + def location(node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#147 + sig { params(method_call_node: ::AST::Node).returns(T::Array[::AST::Node]) } + def method_arguments(method_call_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#127 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def method_call?(node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#156 + sig { params(method_call_node: ::AST::Node).returns(::Symbol) } + def method_name(method_call_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#165 + sig { params(node: ::AST::Node).returns(T.nilable(::String)) } + def module_name_from_definition(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#190 + sig { params(node: ::AST::Node).returns(T.nilable(::Packwerk::Node::Location)) } + def name_location(node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#200 + sig { params(class_node: ::AST::Node).returns(T.nilable(::AST::Node)) } + def parent_class(class_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#209 + sig { params(ancestors: T::Array[::AST::Node]).returns(::String) } + def parent_module_name(ancestors:); end + + # source://packwerk//lib/packwerk/node_helpers.rb#137 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def string?(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#142 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def symbol?(node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#221 + sig { params(hash_node: ::AST::Node, key: ::Symbol).returns(T.untyped) } + def value_from_hash(hash_node, key); end + + private + + # source://packwerk//lib/packwerk/node_helpers.rb#303 + sig { params(node: T.nilable(::AST::Node)).returns(T::Boolean) } + def dynamic_class_creation?(node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#254 + sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) } + def hash_pair_key(hash_pair_node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#265 + sig { params(hash_pair_node: ::AST::Node).returns(T.untyped) } + def hash_pair_value(hash_pair_node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#276 + sig { params(hash_node: ::AST::Node).returns(T::Array[::AST::Node]) } + def hash_pairs(hash_node); end + + # @raise [TypeError] + # + # source://packwerk//lib/packwerk/node_helpers.rb#285 + sig { params(block_node: ::AST::Node).returns(::AST::Node) } + def method_call_node(block_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#294 + sig { params(node: ::AST::Node).returns(T::Boolean) } + def module_creation?(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#310 + sig { params(node: ::AST::Node).returns(T.nilable(::String)) } + def name_from_block_definition(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#318 + sig { params(node: ::AST::Node).returns(T.nilable(::String)) } + def name_part_from_definition(node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#328 + sig { params(method_call_or_block_node: ::AST::Node).returns(T.nilable(::AST::Node)) } + def receiver(method_call_or_block_node); end + + # source://packwerk//lib/packwerk/node_helpers.rb#249 + sig { params(node: ::AST::Node).returns(::Symbol) } + def type_of(node); end + end +end + +# source://packwerk//lib/packwerk/node_helpers.rb#10 +class Packwerk::NodeHelpers::TypeError < ::ArgumentError; end + +# Processes a single node in an abstract syntax tree (AST) using the provided checkers. +# +# source://packwerk//lib/packwerk/node_processor.rb#6 +class Packwerk::NodeProcessor + # source://packwerk//lib/packwerk/node_processor.rb#15 + sig { params(reference_extractor: ::Packwerk::ReferenceExtractor, relative_file: ::String).void } + def initialize(reference_extractor:, relative_file:); end + + # source://packwerk//lib/packwerk/node_processor.rb#26 + sig do + params( + node: ::Parser::AST::Node, + ancestors: T::Array[::Parser::AST::Node] + ).returns(T.nilable(::Packwerk::UnresolvedReference)) + end + def call(node, ancestors); end +end + +# source://packwerk//lib/packwerk/node_processor_factory.rb#5 +class Packwerk::NodeProcessorFactory < ::T::Struct + const :root_path, ::String + const :context_provider, ::Packwerk::ConstantDiscovery + const :constant_name_inspectors, T::Array[::Packwerk::ConstantNameInspector] + + # source://packwerk//lib/packwerk/node_processor_factory.rb#13 + sig { params(relative_file: ::String, node: ::AST::Node).returns(::Packwerk::NodeProcessor) } + def for(relative_file:, node:); end + + private + + # source://packwerk//lib/packwerk/node_processor_factory.rb#23 + sig { params(node: ::AST::Node).returns(::Packwerk::ReferenceExtractor) } + def reference_extractor(node:); end +end + +# Visits all nodes of an AST, processing them using a given node processor. +# +# source://packwerk//lib/packwerk/node_visitor.rb#6 +class Packwerk::NodeVisitor + # source://packwerk//lib/packwerk/node_visitor.rb#10 + sig { params(node_processor: ::Packwerk::NodeProcessor).void } + def initialize(node_processor:); end + + # source://packwerk//lib/packwerk/node_visitor.rb#21 + sig do + params( + node: ::Parser::AST::Node, + ancestors: T::Array[::Parser::AST::Node], + result: T::Array[::Packwerk::UnresolvedReference] + ).void + end + def visit(node, ancestors:, result:); end +end + +# source://packwerk//lib/packwerk/offense.rb#7 +class Packwerk::Offense + # source://packwerk//lib/packwerk/offense.rb#24 + sig { params(file: ::String, message: ::String, location: T.nilable(::Packwerk::Node::Location)).void } + def initialize(file:, message:, location: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/offense.rb#15 + sig { returns(::String) } + def file; end + + # source://packwerk//lib/packwerk/offense.rb#12 + sig { returns(T.nilable(::Packwerk::Node::Location)) } + def location; end + + # source://packwerk//lib/packwerk/offense.rb#18 + sig { returns(::String) } + def message; end + + # source://packwerk//lib/packwerk/offense.rb#31 + sig { params(style: ::Packwerk::OutputStyle).returns(::String) } + def to_s(style = T.unsafe(nil)); end +end + +# source://packwerk//lib/packwerk/offense_collection.rb#7 +class Packwerk::OffenseCollection + # source://packwerk//lib/packwerk/offense_collection.rb#17 + sig { params(root_path: ::String, package_todos: T::Hash[::Packwerk::Package, ::Packwerk::PackageTodo]).void } + def initialize(root_path, package_todos = T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/offense_collection.rb#52 + sig { params(offense: ::Packwerk::Offense).void } + def add_offense(offense); end + + # source://packwerk//lib/packwerk/offense_collection.rb#45 + sig { params(offenses: T::Array[::Packwerk::Offense]).void } + def add_offenses(offenses); end + + # source://packwerk//lib/packwerk/offense_collection.rb#29 + sig { returns(T::Array[::Packwerk::Offense]) } + def errors; end + + # source://packwerk//lib/packwerk/offense_collection.rb#38 + sig { params(offense: ::Packwerk::Offense).returns(T::Boolean) } + def listed?(offense); end + + # source://packwerk//lib/packwerk/offense_collection.rb#26 + sig { returns(T::Array[::Packwerk::ReferenceOffense]) } + def new_violations; end + + # source://packwerk//lib/packwerk/offense_collection.rb#84 + sig { returns(T::Array[::Packwerk::Offense]) } + def outstanding_offenses; end + + # source://packwerk//lib/packwerk/offense_collection.rb#78 + sig { params(package_set: Packwerk::PackageSet).void } + def persist_package_todo_files(package_set); end + + # source://packwerk//lib/packwerk/offense_collection.rb#71 + sig { params(for_files: T::Set[::String]).returns(T::Boolean) } + def stale_violations?(for_files); end + + # source://packwerk//lib/packwerk/offense_collection.rb#32 + sig { returns(T::Array[::Packwerk::ReferenceOffense]) } + def strict_mode_violations; end + + # source://packwerk//lib/packwerk/offense_collection.rb#89 + sig { returns(T::Array[::Packwerk::ReferenceOffense]) } + def unlisted_strict_mode_violations; end + + private + + # source://packwerk//lib/packwerk/offense_collection.rb#102 + sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } + def add_to_package_todo(offense); end + + # source://packwerk//lib/packwerk/offense_collection.rb#96 + sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } + def already_listed?(offense); end + + # source://packwerk//lib/packwerk/offense_collection.rb#114 + sig { params(package_set: Packwerk::PackageSet).void } + def cleanup_extra_package_todo_files(package_set); end + + # source://packwerk//lib/packwerk/offense_collection.rb#126 + sig { void } + def dump_package_todo_files; end + + # source://packwerk//lib/packwerk/offense_collection.rb#139 + sig { params(package: ::Packwerk::Package).returns(::String) } + def package_todo_file_for(package); end + + # source://packwerk//lib/packwerk/offense_collection.rb#131 + sig { params(package: ::Packwerk::Package).returns(::Packwerk::PackageTodo) } + def package_todo_for(package); end + + # source://packwerk//lib/packwerk/offense_collection.rb#108 + sig { params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } + def strict_mode_violation?(offense); end +end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/offenses_formatter.rb#5 +module Packwerk::OffensesFormatter + abstract! + + # @abstract + # + # source://packwerk//lib/packwerk/offenses_formatter.rb#78 + sig { abstract.returns(::String) } + def identifier; end + + # @abstract + # + # source://packwerk//lib/packwerk/offenses_formatter.rb#70 + sig { abstract.params(offenses: T::Array[T.nilable(::Packwerk::Offense)]).returns(::String) } + def show_offenses(offenses); end + + # @abstract + # + # source://packwerk//lib/packwerk/offenses_formatter.rb#74 + sig do + abstract + .params( + offense_collection: ::Packwerk::OffenseCollection, + for_files: T::Set[::String] + ).returns(::String) + end + def show_stale_violations(offense_collection, for_files); end + + # @abstract + # + # source://packwerk//lib/packwerk/offenses_formatter.rb#82 + sig { abstract.params(strict_mode_violations: T::Array[::Packwerk::ReferenceOffense]).returns(::String) } + def show_strict_mode_violations(strict_mode_violations); end + + class << self + # source://packwerk//lib/packwerk/offenses_formatter.rb#29 + sig { returns(T::Array[::Packwerk::OffensesFormatter]) } + def all; end + + # source://packwerk//lib/packwerk/offenses_formatter.rb#35 + sig { params(identifier: ::String).returns(::Packwerk::OffensesFormatter) } + def find(identifier); end + + # source://packwerk//lib/packwerk/offenses_formatter.rb#24 + sig { params(base: T::Class[T.anything]).void } + def included(base); end + + private + + # source://packwerk//lib/packwerk/offenses_formatter.rb#52 + sig { params(name: ::String).returns(::Packwerk::OffensesFormatter) } + def formatter_by_identifier(name); end + + # source://packwerk//lib/packwerk/offenses_formatter.rb#42 + sig { void } + def load_defaults; end + + # source://packwerk//lib/packwerk/offenses_formatter.rb#47 + sig { returns(T::Array[T::Class[T.anything]]) } + def offenses_formatters; end + end +end + +# source://packwerk//lib/packwerk/offenses_formatter.rb#11 +class Packwerk::OffensesFormatter::DuplicateFormatterError < ::StandardError + # source://packwerk//lib/packwerk/offenses_formatter.rb#15 + sig { params(identifier: ::String).void } + def initialize(identifier); end +end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/output_style.rb#5 +module Packwerk::OutputStyle + interface! + + # @abstract + # + # source://packwerk//lib/packwerk/output_style.rb#18 + sig { abstract.returns(::String) } + def error; end + + # @abstract + # + # source://packwerk//lib/packwerk/output_style.rb#15 + sig { abstract.returns(::String) } + def filename; end + + # @abstract + # + # source://packwerk//lib/packwerk/output_style.rb#12 + sig { abstract.returns(::String) } + def reset; end +end + +# source://packwerk//lib/packwerk.rb#37 +module Packwerk::OutputStyles + extend ::ActiveSupport::Autoload +end + +# See https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit for ANSI escape colour codes +# +# source://packwerk//lib/packwerk/output_styles/coloured.rb#7 +class Packwerk::OutputStyles::Coloured + include ::Packwerk::OutputStyle + + # source://packwerk//lib/packwerk/output_styles/coloured.rb#23 + sig { override.returns(::String) } + def error; end + + # source://packwerk//lib/packwerk/output_styles/coloured.rb#17 + sig { override.returns(::String) } + def filename; end + + # source://packwerk//lib/packwerk/output_styles/coloured.rb#12 + sig { override.returns(::String) } + def reset; end +end + +# source://packwerk//lib/packwerk/output_styles/plain.rb#6 +class Packwerk::OutputStyles::Plain + include ::Packwerk::OutputStyle + + # source://packwerk//lib/packwerk/output_styles/plain.rb#21 + sig { override.returns(::String) } + def error; end + + # source://packwerk//lib/packwerk/output_styles/plain.rb#16 + sig { override.returns(::String) } + def filename; end + + # source://packwerk//lib/packwerk/output_styles/plain.rb#11 + sig { override.returns(::String) } + def reset; end +end + +# The basic unit of modularity for packwerk; a folder that has been declared to define a package. +# The package contains all constants defined in files in this folder and all subfolders that are not packages +# themselves. +# +# source://packwerk//lib/packwerk/package.rb#8 +class Packwerk::Package + include ::Comparable + + # source://packwerk//lib/packwerk/package.rb#24 + sig { params(name: ::String, config: T.nilable(T::Hash[::String, T.untyped])).void } + def initialize(name:, config: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/package.rb#49 + sig { params(other: T.untyped).returns(T.nilable(::Integer)) } + def <=>(other); end + + # source://packwerk//lib/packwerk/package.rb#21 + sig { returns(T::Hash[T.untyped, T.untyped]) } + def config; end + + # source://packwerk//lib/packwerk/package.rb#18 + sig { returns(T::Array[::String]) } + def dependencies; end + + # source://packwerk//lib/packwerk/package.rb#37 + sig { params(package: ::Packwerk::Package).returns(T::Boolean) } + def dependency?(package); end + + # source://packwerk//lib/packwerk/package.rb#32 + sig { returns(T::Boolean) } + def enforce_dependencies?; end + + # source://packwerk//lib/packwerk/package.rb#56 + sig { params(other: T.untyped).returns(T::Boolean) } + def eql?(other); end + + # source://packwerk//lib/packwerk/package.rb#61 + sig { returns(::Integer) } + def hash; end + + # source://packwerk//lib/packwerk/package.rb#15 + sig { returns(::String) } + def name; end + + # source://packwerk//lib/packwerk/package.rb#42 + sig { params(path: ::String).returns(T::Boolean) } + def package_path?(path); end + + # source://packwerk//lib/packwerk/package.rb#71 + sig { returns(T::Boolean) } + def root?; end + + # source://packwerk//lib/packwerk/package.rb#66 + sig { returns(::String) } + def to_s; end +end + +# source://packwerk//lib/packwerk/package.rb#12 +Packwerk::Package::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String) + +# A set of {Packwerk::Package}s as well as methods to parse packages from the filesystem. +# +# source://packwerk//lib/packwerk/package_set.rb#11 +class Packwerk::PackageSet + extend T::Generic + include ::Enumerable + + Elem = type_member { { fixed: Packwerk::Package } } + + # source://packwerk//lib/packwerk/package_set.rb#79 + sig { params(packages: T::Array[::Packwerk::Package]).void } + def initialize(packages); end + + # source://packwerk//lib/packwerk/package_set.rb#88 + sig { override.params(blk: T.proc.params(arg0: ::Packwerk::Package).returns(T.untyped)).returns(T.untyped) } + def each(&blk); end + + # source://packwerk//lib/packwerk/package_set.rb#93 + sig { params(name: ::String).returns(T.nilable(::Packwerk::Package)) } + def fetch(name); end + + # source://packwerk//lib/packwerk/package_set.rb#98 + sig { params(file_path: T.any(::Pathname, ::String)).returns(::Packwerk::Package) } + def package_from_path(file_path); end + + # source://packwerk//lib/packwerk/package_set.rb#76 + sig { returns(T::Hash[::String, ::Packwerk::Package]) } + def packages; end + + class << self + # source://packwerk//lib/packwerk/package_set.rb#24 + sig do + params( + root_path: ::String, + package_pathspec: T.nilable(T.any(::String, T::Array[::String])) + ).returns(Packwerk::PackageSet) + end + def load_all_from(root_path, package_pathspec: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/package_set.rb#44 + sig do + params( + root_path: ::String, + package_pathspec: T.any(::String, T::Array[::String]), + exclude_pathspec: T.nilable(T.any(::String, T::Array[::String])) + ).returns(T::Array[::Pathname]) + end + def package_paths(root_path, package_pathspec, exclude_pathspec = T.unsafe(nil)); end + + private + + # source://packwerk//lib/packwerk/package_set.rb#61 + sig { params(packages: T::Array[::Packwerk::Package]).void } + def create_root_package_if_none_in(packages); end + + # source://packwerk//lib/packwerk/package_set.rb#68 + sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) } + def exclude_path?(globs, path); end + end +end + +# source://packwerk//lib/packwerk/package_set.rb#18 +Packwerk::PackageSet::PACKAGE_CONFIG_FILENAME = T.let(T.unsafe(nil), String) + +# source://packwerk//lib/packwerk/package_todo.rb#7 +class Packwerk::PackageTodo + # source://packwerk//lib/packwerk/package_todo.rb#19 + sig { params(package: ::Packwerk::Package, path: ::String).void } + def initialize(package, path); end + + # source://packwerk//lib/packwerk/package_todo.rb#43 + sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) } + def add_entries(reference, violation_type); end + + # source://packwerk//lib/packwerk/package_todo.rb#97 + sig { void } + def delete_if_exists; end + + # source://packwerk//lib/packwerk/package_todo.rb#75 + sig { void } + def dump; end + + # source://packwerk//lib/packwerk/package_todo.rb#30 + sig { params(reference: ::Packwerk::Reference, violation_type: ::String).returns(T::Boolean) } + def listed?(reference, violation_type:); end + + # source://packwerk//lib/packwerk/package_todo.rb#58 + sig { params(for_files: T::Set[::String]).returns(T::Boolean) } + def stale_violations?(for_files); end + + private + + # source://packwerk//lib/packwerk/package_todo.rb#107 + sig { params(package: ::String).returns(T::Array[::String]) } + def deleted_files_for(package); end + + # source://packwerk//lib/packwerk/package_todo.rb#168 + sig { params(path: ::String).returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } + def load_yaml_file(path); end + + # source://packwerk//lib/packwerk/package_todo.rb#104 + sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } + def new_entries; end + + # source://packwerk//lib/packwerk/package_todo.rb#163 + sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } + def old_entries; end + + # source://packwerk//lib/packwerk/package_todo.rb#133 + sig do + params( + package_violations: T::Hash[::String, T::Hash[::String, T::Array[::String]]], + files: T::Set[::String] + ).returns(T::Hash[::String, T::Hash[::String, T::Array[::String]]]) + end + def package_violations_for(package_violations, files:); end + + # source://packwerk//lib/packwerk/package_todo.rb#150 + sig { returns(T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]]) } + def prepare_entries_for_dump; end + + # source://packwerk//lib/packwerk/package_todo.rb#114 + sig do + params( + package: ::String, + violations: T::Hash[::String, T::Hash[::String, T::Array[::String]]] + ).returns(T::Boolean) + end + def stale_violation_for_package?(package, violations:); end +end + +# source://packwerk//lib/packwerk/package_todo.rb#11 +Packwerk::PackageTodo::ConstantName = T.type_alias { ::String } + +# source://packwerk//lib/packwerk/package_todo.rb#14 +Packwerk::PackageTodo::Entries = T.type_alias { T::Hash[::String, T::Hash[::String, T::Hash[::String, T::Array[::String]]]] } + +# source://packwerk//lib/packwerk/package_todo.rb#13 +Packwerk::PackageTodo::Entry = T.type_alias { T::Hash[::String, T::Hash[::String, T::Array[::String]]] } + +# source://packwerk//lib/packwerk/package_todo.rb#12 +Packwerk::PackageTodo::FilePath = T.type_alias { ::String } + +# source://packwerk//lib/packwerk/package_todo.rb#10 +Packwerk::PackageTodo::PackageName = T.type_alias { ::String } + +# source://packwerk//lib/packwerk/parse_run.rb#7 +class Packwerk::ParseRun + # source://packwerk//lib/packwerk/parse_run.rb#20 + sig { params(relative_file_set: T::Set[::String], parallel: T::Boolean).void } + def initialize(relative_file_set:, parallel:); end + + # source://packwerk//lib/packwerk/parse_run.rb#34 + sig do + params( + run_context: ::Packwerk::RunContext, + on_interrupt: T.nilable(T.proc.void), + block: T.nilable(T.proc.params(offenses: T::Array[::Packwerk::Offense]).void) + ).returns(T::Array[::Packwerk::Offense]) + end + def find_offenses(run_context, on_interrupt: T.unsafe(nil), &block); end + + private + + # source://packwerk//lib/packwerk/parse_run.rb#54 + sig do + params( + run_context: ::Packwerk::RunContext, + block: T.nilable(T.proc.params(offenses: T::Array[::Packwerk::Offense]).void) + ).returns(T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense])) + end + def process_file_proc(run_context, &block); end + + # source://packwerk//lib/packwerk/parse_run.rb#72 + sig do + params( + on_interrupt: T.nilable(T.proc.void), + block: T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) + ).returns(T::Array[::Packwerk::Offense]) + end + def serial_find_offenses(on_interrupt: T.unsafe(nil), &block); end +end + +# source://packwerk//lib/packwerk/parse_run.rb#10 +Packwerk::ParseRun::ProcessFileProc = T.type_alias { T.proc.params(path: ::String).returns(T::Array[::Packwerk::Offense]) } + +# A collection of constant definitions parsed from an Abstract Syntax Tree (AST). +# +# source://packwerk//lib/packwerk/parsed_constant_definitions.rb#8 +class Packwerk::ParsedConstantDefinitions + # source://packwerk//lib/packwerk/parsed_constant_definitions.rb#30 + sig { params(root_node: T.nilable(::AST::Node)).void } + def initialize(root_node:); end + + # source://packwerk//lib/packwerk/parsed_constant_definitions.rb#43 + sig do + params( + constant_name: ::String, + location: T.nilable(::Packwerk::Node::Location), + namespace_path: T::Array[::String] + ).returns(T::Boolean) + end + def local_reference?(constant_name, location: T.unsafe(nil), namespace_path: T.unsafe(nil)); end + + private + + # source://packwerk//lib/packwerk/parsed_constant_definitions.rb#79 + sig do + params( + constant_name: ::String, + current_namespace_path: T::Array[T.nilable(::String)], + location: T.nilable(::Packwerk::Node::Location) + ).void + end + def add_definition(constant_name, current_namespace_path, location); end + + # source://packwerk//lib/packwerk/parsed_constant_definitions.rb#55 + sig { params(node: ::AST::Node, current_namespace_path: T::Array[T.nilable(::String)]).void } + def collect_local_definitions_from_root(node, current_namespace_path = T.unsafe(nil)); end + + class << self + # What fully qualified constants can this constant refer to in this context? + # + # source://packwerk//lib/packwerk/parsed_constant_definitions.rb#16 + sig { params(constant_name: ::String, namespace_path: T::Array[T.nilable(::String)]).returns(T::Array[::String]) } + def reference_qualifications(constant_name, namespace_path:); end + end +end + +# source://packwerk//lib/packwerk/parsers.rb#5 +module Packwerk::Parsers; end + +# source://packwerk//lib/packwerk/parsers/erb.rb#11 +class Packwerk::Parsers::Erb + include ::Packwerk::Parsers::ParserInterface + + # source://packwerk//lib/packwerk/parsers/erb.rb#17 + sig { params(parser_class: T.untyped, ruby_parser: ::Packwerk::Parsers::Ruby).void } + def initialize(parser_class: T.unsafe(nil), ruby_parser: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/parsers/erb.rb#23 + sig { override.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.untyped) } + def call(io:, file_path: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/parsers/erb.rb#30 + sig { params(buffer: ::Parser::Source::Buffer, file_path: ::String).returns(T.nilable(::AST::Node)) } + def parse_buffer(buffer, file_path:); end + + private + + # @yield [node] + # + # source://packwerk//lib/packwerk/parsers/erb.rb#71 + sig do + params( + node: T.nilable(T.any(::AST::Node, ::String)), + block: T.nilable(T.proc.params(arg0: ::AST::Node).void) + ).returns(T.nilable(T.any(T::Array[::String], T::Enumerator[::AST::Node]))) + end + def code_nodes(node, &block); end + + # source://packwerk//lib/packwerk/parsers/erb.rb#49 + sig { params(erb_ast: T.all(::AST::Node, ::Object), file_path: ::String).returns(T.nilable(::AST::Node)) } + def to_ruby_ast(erb_ast, file_path); end +end + +# source://packwerk//lib/packwerk/parsers/factory.rb#8 +class Packwerk::Parsers::Factory + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://packwerk//lib/packwerk/parsers/factory.rb#24 + sig { void } + def initialize; end + + # source://packwerk//lib/packwerk/parsers/factory.rb#41 + sig { returns(T::Class[T.anything]) } + def erb_parser_class; end + + # source://packwerk//lib/packwerk/parsers/factory.rb#46 + sig { params(klass: T.nilable(T::Class[T.anything])).void } + def erb_parser_class=(klass); end + + # source://packwerk//lib/packwerk/parsers/factory.rb#31 + sig { params(path: ::String).returns(T.nilable(::Packwerk::Parsers::ParserInterface)) } + def for_path(path); end + + class << self + private + + # source://packwerk//lib/packwerk/parsers/factory.rb#10 + def allocate; end + + # source://packwerk//lib/packwerk/parsers/factory.rb#10 + def new(*_arg0); end + end +end + +# source://packwerk//lib/packwerk/parsers/factory.rb#20 +Packwerk::Parsers::Factory::ERB_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://packwerk//lib/packwerk/parsers/factory.rb#12 +Packwerk::Parsers::Factory::RUBY_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://packwerk//lib/packwerk/parsers.rb#13 +class Packwerk::Parsers::ParseError < ::StandardError + # source://packwerk//lib/packwerk/parsers.rb#20 + sig { params(result: ::Packwerk::Parsers::ParseResult).void } + def initialize(result); end + + # source://packwerk//lib/packwerk/parsers.rb#17 + sig { returns(::Packwerk::Parsers::ParseResult) } + def result; end +end + +# source://packwerk//lib/packwerk/parsers.rb#11 +class Packwerk::Parsers::ParseResult < ::Packwerk::Offense; end + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/parsers/parser_interface.rb#6 +module Packwerk::Parsers::ParserInterface + requires_ancestor { Kernel } + + interface! + + # @abstract + # + # source://packwerk//lib/packwerk/parsers/parser_interface.rb#15 + sig { abstract.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.untyped) } + def call(io:, file_path:); end +end + +# source://packwerk//lib/packwerk/parsers/ruby.rb#9 +class Packwerk::Parsers::Ruby + include ::Packwerk::Parsers::ParserInterface + + # source://packwerk//lib/packwerk/parsers/ruby.rb#41 + sig { params(parser_class: T.untyped).void } + def initialize(parser_class: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/parsers/ruby.rb#47 + sig { override.params(io: T.any(::IO, ::StringIO), file_path: ::String).returns(T.nilable(::Parser::AST::Node)) } + def call(io:, file_path: T.unsafe(nil)); end +end + +# source://packwerk//lib/packwerk/parsers/ruby.rb#14 +class Packwerk::Parsers::Ruby::RaiseExceptionsParser < ::Prism::Translation::Parser + # source://packwerk//lib/packwerk/parsers/ruby.rb#18 + sig { params(builder: T.untyped).void } + def initialize(builder); end + + private + + # source://packwerk//lib/packwerk/parsers/ruby.rb#26 + sig { params(error: ::Prism::ParseError).returns(T::Boolean) } + def valid_error?(error); end +end + +# source://packwerk//lib/packwerk/parsers/ruby.rb#31 +class Packwerk::Parsers::Ruby::TolerateInvalidUtf8Builder < ::Parser::Builders::Default + # source://packwerk//lib/packwerk/parsers/ruby.rb#35 + sig { params(token: T.untyped).returns(T.untyped) } + def string_value(token); end +end + +# source://packwerk//lib/packwerk/package_set.rb#8 +Packwerk::PathSpec = T.type_alias { T.any(::String, T::Array[::String]) } + +# A reference from a file in one package to a constant that may be defined in a different package. +# +# source://packwerk//lib/packwerk/reference.rb#6 +class Packwerk::Reference < ::Struct + # Returns the value of attribute constant + # + # @return [Object] the current value of constant + # + # source://packwerk//lib/packwerk/reference.rb#6 + def constant; end + + # Sets the attribute constant + # + # @param value [Object] the value to set the attribute constant to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/reference.rb#6 + def constant=(_); end + + # Returns the value of attribute package + # + # @return [Object] the current value of package + # + # source://packwerk//lib/packwerk/reference.rb#6 + def package; end + + # Sets the attribute package + # + # @param value [Object] the value to set the attribute package to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/reference.rb#6 + def package=(_); end + + # Returns the value of attribute relative_path + # + # @return [Object] the current value of relative_path + # + # source://packwerk//lib/packwerk/reference.rb#6 + def relative_path; end + + # Sets the attribute relative_path + # + # @param value [Object] the value to set the attribute relative_path to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/reference.rb#6 + def relative_path=(_); end + + # Returns the value of attribute source_location + # + # @return [Object] the current value of source_location + # + # source://packwerk//lib/packwerk/reference.rb#6 + def source_location; end + + # Sets the attribute source_location + # + # @param value [Object] the value to set the attribute source_location to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/reference.rb#6 + def source_location=(_); end + + class << self + # source://packwerk//lib/packwerk/reference.rb#6 + def [](*_arg0); end + + # source://packwerk//lib/packwerk/reference.rb#6 + def inspect; end + + # source://packwerk//lib/packwerk/reference.rb#6 + def keyword_init?; end + + # source://packwerk//lib/packwerk/reference.rb#6 + def members; end + + # source://packwerk//lib/packwerk/reference.rb#6 + def new(*_arg0); end + end +end + +# source://packwerk//lib/packwerk.rb#88 +module Packwerk::ReferenceChecking + extend ::ActiveSupport::Autoload +end + +# source://packwerk//lib/packwerk.rb#93 +module Packwerk::ReferenceChecking::Checkers + extend ::ActiveSupport::Autoload +end + +# Checks whether a given reference conforms to the configured graph of dependencies. +# +# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#8 +class Packwerk::ReferenceChecking::Checkers::DependencyChecker + include ::Packwerk::Checker + + # source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#24 + sig { override.params(reference: ::Packwerk::Reference).returns(T::Boolean) } + def invalid_reference?(reference); end + + # source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#36 + sig { override.params(reference: ::Packwerk::Reference).returns(::String) } + def message(reference); end + + # source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#50 + sig { override.params(offense: ::Packwerk::ReferenceOffense).returns(T::Boolean) } + def strict_mode_violation?(offense); end + + # source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#15 + sig { override.returns(::String) } + def violation_type; end + + private + + # source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#58 + sig { params(reference: ::Packwerk::Reference).returns(::String) } + def standard_help_message(reference); end +end + +# source://packwerk//lib/packwerk/reference_checking/checkers/dependency_checker.rb#12 +Packwerk::ReferenceChecking::Checkers::DependencyChecker::VIOLATION_TYPE = T.let(T.unsafe(nil), String) + +# source://packwerk//lib/packwerk/reference_checking/reference_checker.rb#6 +class Packwerk::ReferenceChecking::ReferenceChecker + # source://packwerk//lib/packwerk/reference_checking/reference_checker.rb#10 + sig { params(checkers: T::Array[::Packwerk::Checker]).void } + def initialize(checkers); end + + # source://packwerk//lib/packwerk/reference_checking/reference_checker.rb#19 + sig { params(reference: ::Packwerk::Reference).returns(T::Array[::Packwerk::Offense]) } + def call(reference); end +end + +# Extracts a possible constant reference from a given AST node. +# +# source://packwerk//lib/packwerk/reference_extractor.rb#6 +class Packwerk::ReferenceExtractor + # source://packwerk//lib/packwerk/reference_extractor.rb#59 + sig do + params( + constant_name_inspectors: T::Array[::Packwerk::ConstantNameInspector], + root_node: ::AST::Node, + root_path: ::String + ).void + end + def initialize(constant_name_inspectors:, root_node:, root_path:); end + + # source://packwerk//lib/packwerk/reference_extractor.rb#79 + sig do + params( + node: ::Parser::AST::Node, + ancestors: T::Array[::Parser::AST::Node], + relative_file: ::String + ).returns(T.nilable(::Packwerk::UnresolvedReference)) + end + def reference_from_node(node, ancestors:, relative_file:); end + + private + + # source://packwerk//lib/packwerk/reference_extractor.rb#113 + sig do + params( + inspector: ::Packwerk::ConstantNameInspector, + node: ::Parser::AST::Node, + ancestors: T::Array[::Parser::AST::Node], + relative_file: ::String + ).returns(T.nilable(::String)) + end + def inspect_node(inspector, node:, ancestors:, relative_file:); end + + # source://packwerk//lib/packwerk/reference_extractor.rb#158 + sig do + params( + constant_name: ::String, + name_location: T.nilable(::Packwerk::Node::Location), + namespace_path: T::Array[::String] + ).returns(T::Boolean) + end + def local_reference?(constant_name, name_location, namespace_path); end + + # source://packwerk//lib/packwerk/reference_extractor.rb#136 + sig do + params( + constant_name: ::String, + node: ::Parser::AST::Node, + ancestors: T::Array[::Parser::AST::Node], + relative_file: ::String + ).returns(T.nilable(::Packwerk::UnresolvedReference)) + end + def reference_from_constant(constant_name, node:, ancestors:, relative_file:); end + + class << self + # source://packwerk//lib/packwerk/reference_extractor.rb#18 + sig do + params( + unresolved_references: T::Array[::Packwerk::UnresolvedReference], + context_provider: ::Packwerk::ConstantDiscovery + ).returns(T::Array[::Packwerk::Reference]) + end + def get_fully_qualified_references_from(unresolved_references, context_provider); end + end +end + +# An offense related to a {Packwerk::Reference}. +# +# source://packwerk//lib/packwerk/reference_offense.rb#6 +class Packwerk::ReferenceOffense < ::Packwerk::Offense + # source://packwerk//lib/packwerk/reference_offense.rb#25 + sig do + params( + reference: ::Packwerk::Reference, + violation_type: ::String, + message: ::String, + location: T.nilable(::Packwerk::Node::Location) + ).void + end + def initialize(reference:, violation_type:, message:, location: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/reference_offense.rb#11 + sig { returns(::Packwerk::Reference) } + def reference; end + + # source://packwerk//lib/packwerk/reference_offense.rb#14 + sig { returns(::String) } + def violation_type; end +end + +# Holds the context of a Packwerk run across multiple files. +# +# source://packwerk//lib/packwerk/run_context.rb#8 +class Packwerk::RunContext + # source://packwerk//lib/packwerk/run_context.rb#48 + sig do + params( + root_path: ::String, + load_paths: T::Hash[::String, ::Module], + inflector: T.class_of(ActiveSupport::Inflector), + cache_directory: ::Pathname, + config_path: T.nilable(::String), + package_paths: T.nilable(T.any(::String, T::Array[::String])), + custom_associations: T.any(T::Array[::Symbol], T::Set[::Symbol]), + associations_exclude: T::Array[::String], + exclude: T::Array[::String], + checkers: T::Array[::Packwerk::Checker], + cache_enabled: T::Boolean + ).void + end + def initialize(root_path:, load_paths:, inflector:, cache_directory:, config_path: T.unsafe(nil), package_paths: T.unsafe(nil), custom_associations: T.unsafe(nil), associations_exclude: T.unsafe(nil), exclude: T.unsafe(nil), checkers: T.unsafe(nil), cache_enabled: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/run_context.rb#96 + sig { returns(Packwerk::PackageSet) } + def package_set; end + + # source://packwerk//lib/packwerk/run_context.rb#83 + sig { params(relative_file: ::String).returns(T::Array[::Packwerk::Offense]) } + def process_file(relative_file:); end + + private + + # source://packwerk//lib/packwerk/run_context.rb#135 + sig { returns(T::Array[::Packwerk::ConstantNameInspector]) } + def constant_name_inspectors; end + + # source://packwerk//lib/packwerk/run_context.rb#117 + sig { returns(::Packwerk::ConstantDiscovery) } + def context_provider; end + + # source://packwerk//lib/packwerk/run_context.rb#103 + sig { returns(::Packwerk::FileProcessor) } + def file_processor; end + + # source://packwerk//lib/packwerk/run_context.rb#108 + sig { returns(::Packwerk::NodeProcessorFactory) } + def node_processor_factory; end + + # source://packwerk//lib/packwerk/run_context.rb#147 + sig { params(relative_globs: T::Array[::String]).returns(T::Set[::String]) } + def relative_files_for_globs(relative_globs); end + + # source://packwerk//lib/packwerk/run_context.rb#125 + sig { returns(::ConstantResolver) } + def resolver; end + + class << self + # source://packwerk//lib/packwerk/run_context.rb#17 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::RunContext) } + def from_configuration(configuration); end + end +end + +# An unresolved reference from a file in one package to a constant that may be defined in a different package. +# Unresolved means that we know how it's referred to in the file, +# and we have enough context on that reference to figure out the fully qualified reference such that we +# can produce a Reference in a separate pass. However, we have not yet resolved it to its fully qualified version. +# +# source://packwerk//lib/packwerk/unresolved_reference.rb#9 +class Packwerk::UnresolvedReference < ::Struct + # Returns the value of attribute constant_name + # + # @return [Object] the current value of constant_name + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def constant_name; end + + # Sets the attribute constant_name + # + # @param value [Object] the value to set the attribute constant_name to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def constant_name=(_); end + + # Returns the value of attribute namespace_path + # + # @return [Object] the current value of namespace_path + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def namespace_path; end + + # Sets the attribute namespace_path + # + # @param value [Object] the value to set the attribute namespace_path to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def namespace_path=(_); end + + # Returns the value of attribute relative_path + # + # @return [Object] the current value of relative_path + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def relative_path; end + + # Sets the attribute relative_path + # + # @param value [Object] the value to set the attribute relative_path to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def relative_path=(_); end + + # Returns the value of attribute source_location + # + # @return [Object] the current value of source_location + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def source_location; end + + # Sets the attribute source_location + # + # @param value [Object] the value to set the attribute source_location to. + # @return [Object] the newly set value + # + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def source_location=(_); end + + class << self + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def [](*_arg0); end + + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def inspect; end + + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def keyword_init?; end + + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def members; end + + # source://packwerk//lib/packwerk/unresolved_reference.rb#9 + def new(*_arg0); end + end +end + +# source://packwerk//lib/packwerk/version.rb#5 +Packwerk::VERSION = T.let(T.unsafe(nil), String) + +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://packwerk//lib/packwerk/validator.rb#9 +module Packwerk::Validator + extend ::ActiveSupport::Autoload + + abstract! + + # @abstract + # + # source://packwerk//lib/packwerk/validator.rb#50 + sig do + abstract + .params( + package_set: Packwerk::PackageSet, + configuration: ::Packwerk::Configuration + ).returns(::Packwerk::Validator::Result) + end + def call(package_set, configuration); end + + # source://packwerk//lib/packwerk/validator.rb#81 + sig do + params( + results: T::Array[::Packwerk::Validator::Result], + separator: ::String, + before_errors: ::String, + after_errors: ::String + ).returns(::Packwerk::Validator::Result) + end + def merge_results(results, separator: T.unsafe(nil), before_errors: T.unsafe(nil), after_errors: T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/validator.rb#69 + sig { params(configuration: ::Packwerk::Configuration).returns(T.any(::String, T::Array[::String])) } + def package_glob(configuration); end + + # source://packwerk//lib/packwerk/validator.rb#62 + sig do + params( + configuration: ::Packwerk::Configuration, + glob_pattern: T.nilable(T.any(::String, T::Array[::String])) + ).returns(T::Array[::String]) + end + def package_manifests(configuration, glob_pattern = T.unsafe(nil)); end + + # source://packwerk//lib/packwerk/validator.rb#54 + sig { params(configuration: ::Packwerk::Configuration, setting: T.untyped).returns(T.untyped) } + def package_manifests_settings_for(configuration, setting); end + + # @abstract + # + # source://packwerk//lib/packwerk/validator.rb#46 + sig { abstract.returns(T::Array[::String]) } + def permitted_keys; end + + # source://packwerk//lib/packwerk/validator.rb#100 + sig { params(configuration: ::Packwerk::Configuration, path: ::String).returns(::Pathname) } + def relative_path(configuration, path); end + + class << self + # source://packwerk//lib/packwerk/validator.rb#27 + sig { returns(T::Array[::Packwerk::Validator]) } + def all; end + + # source://packwerk//lib/packwerk/validator.rb#22 + sig { params(base: T::Class[T.anything]).void } + def included(base); end + + private + + # source://packwerk//lib/packwerk/validator.rb#35 + sig { void } + def load_defaults; end + + # source://packwerk//lib/packwerk/validator.rb#40 + sig { returns(T::Array[T::Class[T.anything]]) } + def validators; end + end +end + +# source://packwerk//lib/packwerk/validator/result.rb#6 +class Packwerk::Validator::Result < ::T::Struct + const :ok, T::Boolean + const :error_value, T.nilable(::String) + + # source://packwerk//lib/packwerk/validator/result.rb#13 + sig { returns(T::Boolean) } + def ok?; end +end + +# source://packwerk//lib/packwerk.rb#51 +module Packwerk::Validators + extend ::ActiveSupport::Autoload +end + +# source://packwerk//lib/packwerk/validators/dependency_validator.rb#6 +class Packwerk::Validators::DependencyValidator + include ::Packwerk::Validator + + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#13 + sig do + override + .params( + package_set: Packwerk::PackageSet, + configuration: ::Packwerk::Configuration + ).returns(::Packwerk::Validator::Result) + end + def call(package_set, configuration); end + + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#24 + sig { override.returns(T::Array[::String]) } + def permitted_keys; end + + private + + # Convert the cycles: + # + # [[a, b, c], [b, c]] + # + # to the string: + # + # ["a -> b -> c -> a", "b -> c -> b"] + # + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#146 + sig { params(cycles: T.untyped).returns(T::Array[::String]) } + def build_cycle_strings(cycles); end + + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#67 + sig { params(package_set: Packwerk::PackageSet).returns(::Packwerk::Validator::Result) } + def check_acyclic_graph(package_set); end + + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#34 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } + def check_package_manifest_syntax(configuration); end + + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#94 + sig { params(configuration: ::Packwerk::Configuration).returns(::Packwerk::Validator::Result) } + def check_valid_package_dependencies(configuration); end + + # source://packwerk//lib/packwerk/validators/dependency_validator.rb#130 + sig { params(configuration: ::Packwerk::Configuration, path: T.untyped).returns(T::Boolean) } + def invalid_package_path?(configuration, path); end +end diff --git a/sorbet/rbi/gems/parallel@1.27.0.rbi b/sorbet/rbi/gems/parallel@1.27.0.rbi new file mode 100644 index 0000000..854c487 --- /dev/null +++ b/sorbet/rbi/gems/parallel@1.27.0.rbi @@ -0,0 +1,291 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel` gem. +# Please instead update this file by running `bin/tapioca gem parallel`. + + +# source://parallel//lib/parallel/version.rb#2 +module Parallel + class << self + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#243 + def all?(*args, &block); end + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#238 + def any?(*args, &block); end + + # source://parallel//lib/parallel.rb#234 + def each(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#248 + def each_with_index(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#307 + def filter_map(*_arg0, **_arg1, &_arg2); end + + # source://parallel//lib/parallel.rb#303 + def flat_map(*_arg0, **_arg1, &_arg2); end + + # source://parallel//lib/parallel.rb#228 + def in_processes(options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#212 + def in_threads(options = T.unsafe(nil)); end + + # source://parallel//lib/parallel.rb#252 + def map(source, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#299 + def map_with_index(array, options = T.unsafe(nil), &block); end + + # Number of physical processor cores on the current system. + # + # source://parallel//lib/parallel.rb#312 + def physical_processor_count; end + + # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, + # used for process scheduling + # + # source://parallel//lib/parallel.rb#342 + def processor_count; end + + # source://parallel//lib/parallel.rb#346 + def worker_number; end + + # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed + # + # source://parallel//lib/parallel.rb#351 + def worker_number=(worker_num); end + + private + + # source://parallel//lib/parallel.rb#384 + def add_progress_bar!(job_factory, options); end + + # source://parallel//lib/parallel.rb#699 + def available_processor_count; end + + # source://parallel//lib/parallel.rb#647 + def call_with_index(item, index, options, &block); end + + # source://parallel//lib/parallel.rb#579 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # source://parallel//lib/parallel.rb#637 + def extract_count_from_options(options); end + + # source://parallel//lib/parallel.rb#665 + def instrument_finish(item, index, result, options); end + + # yield results in the order of the input items + # needs to use `options` to store state between executions + # needs to use `done` index since a nil result would also be valid + # + # source://parallel//lib/parallel.rb#674 + def instrument_finish_in_order(item, index, result, options); end + + # source://parallel//lib/parallel.rb#694 + def instrument_start(item, index, options); end + + # source://parallel//lib/parallel.rb#357 + def physical_processor_count_windows; end + + # source://parallel//lib/parallel.rb#613 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#567 + def replace_worker(job_factory, workers, index, options, blk); end + + # source://parallel//lib/parallel.rb#378 + def run(command); end + + # source://parallel//lib/parallel.rb#658 + def with_instrumentation(item, index, options); end + + # source://parallel//lib/parallel.rb#409 + def work_direct(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#519 + def work_in_processes(job_factory, options, &blk); end + + # source://parallel//lib/parallel.rb#453 + def work_in_ractors(job_factory, options); end + + # source://parallel//lib/parallel.rb#428 + def work_in_threads(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#587 + def worker(job_factory, options, &block); end + end +end + +# source://parallel//lib/parallel.rb#11 +class Parallel::Break < ::StandardError + # @return [Break] a new instance of Break + # + # source://parallel//lib/parallel.rb#14 + def initialize(value = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://parallel//lib/parallel.rb#12 + def value; end +end + +# source://parallel//lib/parallel.rb#8 +class Parallel::DeadWorker < ::StandardError; end + +# source://parallel//lib/parallel.rb#32 +class Parallel::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://parallel//lib/parallel.rb#35 + def initialize(exception); end + + # Returns the value of attribute exception. + # + # source://parallel//lib/parallel.rb#33 + def exception; end +end + +# source://parallel//lib/parallel.rb#98 +class Parallel::JobFactory + # @return [JobFactory] a new instance of JobFactory + # + # source://parallel//lib/parallel.rb#99 + def initialize(source, mutex); end + + # source://parallel//lib/parallel.rb#107 + def next; end + + # generate item that is sent to workers + # just index is faster + less likely to blow up with unserializable errors + # + # source://parallel//lib/parallel.rb#136 + def pack(item, index); end + + # source://parallel//lib/parallel.rb#126 + def size; end + + # unpack item that is sent to workers + # + # source://parallel//lib/parallel.rb#141 + def unpack(data); end + + private + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#147 + def producer?; end + + # source://parallel//lib/parallel.rb#151 + def queue_wrapper(array); end +end + +# source://parallel//lib/parallel.rb#20 +class Parallel::Kill < ::Parallel::Break; end + +# source://parallel//lib/parallel.rb#6 +Parallel::Stop = T.let(T.unsafe(nil), Object) + +# source://parallel//lib/parallel.rb#23 +class Parallel::UndumpableException < ::StandardError + # @return [UndumpableException] a new instance of UndumpableException + # + # source://parallel//lib/parallel.rb#26 + def initialize(original); end + + # Returns the value of attribute backtrace. + # + # source://parallel//lib/parallel.rb#24 + def backtrace; end +end + +# source://parallel//lib/parallel.rb#156 +class Parallel::UserInterruptHandler + class << self + # source://parallel//lib/parallel.rb#181 + def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # source://parallel//lib/parallel.rb#161 + def kill_on_ctrl_c(pids, options); end + + private + + # source://parallel//lib/parallel.rb#205 + def restore_interrupt(old, signal); end + + # source://parallel//lib/parallel.rb#190 + def trap_interrupt(signal); end + end +end + +# source://parallel//lib/parallel.rb#157 +Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# source://parallel//lib/parallel/version.rb#3 +Parallel::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel/version.rb#3 +Parallel::Version = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel.rb#51 +class Parallel::Worker + # @return [Worker] a new instance of Worker + # + # source://parallel//lib/parallel.rb#55 + def initialize(read, write, pid); end + + # might be passed to started_processes and simultaneously closed by another thread + # when running in isolation mode, so we have to check if it is closed before closing + # + # source://parallel//lib/parallel.rb#68 + def close_pipes; end + + # Returns the value of attribute pid. + # + # source://parallel//lib/parallel.rb#52 + def pid; end + + # Returns the value of attribute read. + # + # source://parallel//lib/parallel.rb#52 + def read; end + + # source://parallel//lib/parallel.rb#61 + def stop; end + + # Returns the value of attribute thread. + # + # source://parallel//lib/parallel.rb#53 + def thread; end + + # Sets the attribute thread + # + # @param value the value to set the attribute thread to. + # + # source://parallel//lib/parallel.rb#53 + def thread=(_arg0); end + + # source://parallel//lib/parallel.rb#73 + def work(data); end + + # Returns the value of attribute write. + # + # source://parallel//lib/parallel.rb#52 + def write; end + + private + + # source://parallel//lib/parallel.rb#91 + def wait; end +end diff --git a/sorbet/rbi/gems/parse_packwerk@0.25.0.rbi b/sorbet/rbi/gems/parse_packwerk@0.27.0.rbi similarity index 87% rename from sorbet/rbi/gems/parse_packwerk@0.25.0.rbi rename to sorbet/rbi/gems/parse_packwerk@0.27.0.rbi index 1518617..118e12c 100644 --- a/sorbet/rbi/gems/parse_packwerk@0.25.0.rbi +++ b/sorbet/rbi/gems/parse_packwerk@0.27.0.rbi @@ -4,34 +4,53 @@ # This is an autogenerated file for types exported from the `parse_packwerk` gem. # Please instead update this file by running `bin/tapioca gem parse_packwerk`. + # source://parse_packwerk//lib/parse_packwerk/constants.rb#3 module ParsePackwerk class << self - # source://parse_packwerk//lib/parse_packwerk.rb#37 + # source://parse_packwerk//lib/parse_packwerk.rb#50 sig { returns(T::Array[::ParsePackwerk::Package]) } def all; end - # source://parse_packwerk//lib/parse_packwerk.rb#136 + # source://parse_packwerk//lib/parse_packwerk.rb#163 sig { void } def bust_cache!; end - # source://parse_packwerk//lib/parse_packwerk.rb#42 + # source://parse_packwerk//lib/parse_packwerk.rb#55 sig { params(name: ::String).returns(T.nilable(::ParsePackwerk::Package)) } def find(name); end - # source://parse_packwerk//lib/parse_packwerk.rb#105 + # source://parse_packwerk//lib/parse_packwerk.rb#132 sig { returns(T::Array[::String]) } def key_sort_order; end - # source://parse_packwerk//lib/parse_packwerk.rb#52 + # source://parse_packwerk//lib/parse_packwerk.rb#65 sig { params(file_path: T.any(::Pathname, ::String)).returns(::ParsePackwerk::Package) } def package_from_path(file_path); end - # source://parse_packwerk//lib/parse_packwerk.rb#63 + # source://parse_packwerk//lib/parse_packwerk.rb#44 + sig { returns(T::Boolean) } + def preserve_key_order; end + + # @return [Boolean] + # + # source://parse_packwerk//lib/parse_packwerk.rb#44 + def preserve_key_order=(_arg0); end + + # source://parse_packwerk//lib/parse_packwerk.rb#115 + sig do + params( + config: T::Hash[T.untyped, T.untyped], + original_key_order: T::Array[::String] + ).returns(T::Hash[T.untyped, T.untyped]) + end + def sort_keys(config, original_key_order); end + + # source://parse_packwerk//lib/parse_packwerk.rb#76 sig { params(package: ::ParsePackwerk::Package).void } def write_package_yml!(package); end - # source://parse_packwerk//lib/parse_packwerk.rb#47 + # source://parse_packwerk//lib/parse_packwerk.rb#60 sig { returns(::ParsePackwerk::Configuration) } def yml; end @@ -40,7 +59,7 @@ module ParsePackwerk # We memoize packages_by_name for fast lookup. # Since Graph is an immutable value object, we can create indexes and general caching mechanisms safely. # - # source://parse_packwerk//lib/parse_packwerk.rb#124 + # source://parse_packwerk//lib/parse_packwerk.rb#151 sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) } def packages_by_name; end end @@ -62,10 +81,7 @@ class ParsePackwerk::Configuration < ::T::Struct sig { returns(::ParsePackwerk::Configuration) } def fetch; end - # source://sorbet-runtime/0.5.11318/lib/types/struct.rb#13 - def inherited(s); end - - # source://parse_packwerk//lib/parse_packwerk/configuration.rb#44 + # source://parse_packwerk//lib/parse_packwerk/configuration.rb#50 sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) } def package_paths(config_hash); end end @@ -154,42 +170,40 @@ class ParsePackwerk::Package < ::T::Struct const :dependencies, T::Array[::String] const :config, T::Hash[T.untyped, T.untyped] const :violations, T::Array[::ParsePackwerk::Violation] + const :original_key_order, T::Array[::String], default: T.unsafe(nil) - # source://parse_packwerk//lib/parse_packwerk/package.rb#46 + # source://parse_packwerk//lib/parse_packwerk/package.rb#51 sig { returns(::Pathname) } def directory; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#56 + # source://parse_packwerk//lib/parse_packwerk/package.rb#61 sig { returns(T.nilable(T.any(::String, T::Boolean))) } def enforces_dependencies?; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#66 + # source://parse_packwerk//lib/parse_packwerk/package.rb#71 sig { returns(T.any(::String, T::Boolean)) } def enforces_layers?; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#61 + # source://parse_packwerk//lib/parse_packwerk/package.rb#66 sig { returns(T.any(::String, T::Boolean)) } def enforces_privacy?; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#51 + # source://parse_packwerk//lib/parse_packwerk/package.rb#56 sig { returns(::Pathname) } def public_directory; end - # source://parse_packwerk//lib/parse_packwerk/package.rb#41 + # source://parse_packwerk//lib/parse_packwerk/package.rb#46 sig { returns(::Pathname) } def yml; end class << self - # source://parse_packwerk//lib/parse_packwerk/package.rb#36 + # source://parse_packwerk//lib/parse_packwerk/package.rb#41 sig { params(package_name: ::String).returns(::Pathname) } def directory(package_name); end - # source://parse_packwerk//lib/parse_packwerk/package.rb#18 + # source://parse_packwerk//lib/parse_packwerk/package.rb#20 sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) } def from(pathname); end - - # source://sorbet-runtime/0.5.11318/lib/types/struct.rb#13 - def inherited(s); end end end @@ -230,9 +244,6 @@ class ParsePackwerk::PackageTodo < ::T::Struct sig { params(pathname: ::Pathname).returns(::ParsePackwerk::PackageTodo) } def from(pathname); end - # source://sorbet-runtime/0.5.11318/lib/types/struct.rb#13 - def inherited(s); end - # source://parse_packwerk//lib/parse_packwerk/package_todo.rb#46 sig { params(dirname: ::Pathname).returns(::Pathname) } def yml(dirname); end @@ -256,9 +267,4 @@ class ParsePackwerk::Violation < ::T::Struct # source://parse_packwerk//lib/parse_packwerk/violation.rb#18 sig { returns(T::Boolean) } def privacy?; end - - class << self - # source://sorbet-runtime/0.5.11318/lib/types/struct.rb#13 - def inherited(s); end - end end diff --git a/sorbet/rbi/gems/parser@3.1.2.0.rbi b/sorbet/rbi/gems/parser@3.1.2.0.rbi deleted file mode 100644 index 246d43a..0000000 --- a/sorbet/rbi/gems/parser@3.1.2.0.rbi +++ /dev/null @@ -1,1741 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parser` gem. -# Please instead update this file by running `bin/tapioca gem parser`. - -module Parser - class << self - private - - def warn_syntax_deviation(feature, version); end - end -end - -module Parser::AST; end - -class Parser::AST::Node < ::AST::Node - def assign_properties(properties); end - def loc; end - def location; end -end - -class Parser::AST::Processor < ::AST::Processor - def on_alias(node); end - def on_and(node); end - def on_and_asgn(node); end - def on_arg(node); end - def on_arg_expr(node); end - def on_args(node); end - def on_argument(node); end - def on_array(node); end - def on_array_pattern(node); end - def on_array_pattern_with_tail(node); end - def on_back_ref(node); end - def on_begin(node); end - def on_block(node); end - def on_block_pass(node); end - def on_blockarg(node); end - def on_blockarg_expr(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_class(node); end - def on_const(node); end - def on_const_pattern(node); end - def on_csend(node); end - def on_cvar(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defined?(node); end - def on_defs(node); end - def on_dstr(node); end - def on_dsym(node); end - def on_eflipflop(node); end - def on_empty_else(node); end - def on_ensure(node); end - def on_erange(node); end - def on_find_pattern(node); end - def on_for(node); end - def on_forward_arg(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def on_hash(node); end - def on_hash_pattern(node); end - def on_if(node); end - def on_if_guard(node); end - def on_iflipflop(node); end - def on_in_match(node); end - def on_in_pattern(node); end - def on_index(node); end - def on_indexasgn(node); end - def on_irange(node); end - def on_ivar(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwargs(node); end - def on_kwbegin(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_kwsplat(node); end - def on_lambda(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_alt(node); end - def on_match_as(node); end - def on_match_current_line(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_match_rest(node); end - def on_match_var(node); end - def on_match_with_lvasgn(node); end - def on_mlhs(node); end - def on_module(node); end - def on_next(node); end - def on_not(node); end - def on_nth_ref(node); end - def on_numblock(node); end - def on_op_asgn(node); end - def on_optarg(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_pin(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_procarg0(node); end - def on_redo(node); end - def on_regexp(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_restarg(node); end - def on_restarg_expr(node); end - def on_retry(node); end - def on_return(node); end - def on_sclass(node); end - def on_send(node); end - def on_shadowarg(node); end - def on_splat(node); end - def on_super(node); end - def on_undef(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_until_post(node); end - def on_var(node); end - def on_vasgn(node); end - def on_when(node); end - def on_while(node); end - def on_while_post(node); end - def on_xstr(node); end - def on_yield(node); end - def process_argument_node(node); end - def process_regular_node(node); end - def process_var_asgn_node(node); end - def process_variable_node(node); end -end - -class Parser::Base < ::Racc::Parser - def initialize(builder = T.unsafe(nil)); end - - def builder; end - def context; end - def current_arg_stack; end - def diagnostics; end - def lexer; end - def max_numparam_stack; end - def parse(source_buffer); end - def parse_with_comments(source_buffer); end - def pattern_hash_keys; end - def pattern_variables; end - def reset; end - def source_buffer; end - def static_env; end - def tokenize(source_buffer, recover = T.unsafe(nil)); end - - private - - def check_kwarg_name(name_t); end - def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end - def next_token; end - def on_error(error_token_id, error_value, value_stack); end - - class << self - def default_parser; end - def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - def parse_file(filename); end - def parse_file_with_comments(filename); end - def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end - - private - - def setup_source_buffer(file, line, string, encoding); end - end -end - -module Parser::Builders; end - -class Parser::Builders::Default - def initialize; end - - def __ENCODING__(__ENCODING__t); end - def __FILE__(__FILE__t); end - def __LINE__(__LINE__t); end - def accessible(node); end - def alias(alias_t, to, from); end - def arg(name_t); end - def arg_expr(expr); end - def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end - def array(begin_t, elements, end_t); end - def array_pattern(lbrack_t, elements, rbrack_t); end - def assign(lhs, eql_t, rhs); end - def assignable(node); end - def associate(begin_t, pairs, end_t); end - def attr_asgn(receiver, dot_t, selector_t); end - def back_ref(token); end - def begin(begin_t, body, end_t); end - def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - def begin_keyword(begin_t, body, end_t); end - def binary_op(receiver, operator_t, arg); end - def block(method_call, begin_t, args, body, end_t); end - def block_pass(amper_t, arg); end - def blockarg(amper_t, name_t); end - def blockarg_expr(amper_t, expr); end - def call_lambda(lambda_t); end - def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - def call_type_for_dot(dot_t); end - def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end - def character(char_t); end - def complex(complex_t); end - def compstmt(statements); end - def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - def condition_mod(if_true, if_false, cond_t, cond); end - def const(name_t); end - def const_fetch(scope, t_colon2, name_t); end - def const_global(t_colon3, name_t); end - def const_op_assignable(node); end - def const_pattern(const, ldelim_t, pattern, rdelim_t); end - def cvar(token); end - def dedent_string(node, dedent_level); end - def def_class(class_t, name, lt_t, superclass, body, end_t); end - def def_endless_method(def_t, name_t, args, assignment_t, body); end - def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - def def_method(def_t, name_t, args, body, end_t); end - def def_module(module_t, name, body, end_t); end - def def_sclass(class_t, lshft_t, expr, body, end_t); end - def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end - def emit_file_line_as_literals; end - def emit_file_line_as_literals=(_arg0); end - def false(false_t); end - def find_pattern(lbrack_t, elements, rbrack_t); end - def float(float_t); end - def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - def forward_arg(dots_t); end - def forward_only_args(begin_t, dots_t, end_t); end - def forwarded_args(dots_t); end - def gvar(token); end - def hash_pattern(lbrace_t, kwargs, rbrace_t); end - def ident(token); end - def if_guard(if_t, if_body); end - def in_match(lhs, in_t, rhs); end - def in_pattern(in_t, pattern, guard, then_t, body); end - def index(receiver, lbrack_t, indexes, rbrack_t); end - def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end - def integer(integer_t); end - def ivar(token); end - def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - def kwarg(name_t); end - def kwnilarg(dstar_t, nil_t); end - def kwoptarg(name_t, value); end - def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end - def kwsplat(dstar_t, arg); end - def logical_op(type, lhs, op_t, rhs); end - def loop(type, keyword_t, cond, do_t, body, end_t); end - def loop_mod(type, body, keyword_t, cond); end - def match_alt(left, pipe_t, right); end - def match_as(value, assoc_t, as); end - def match_hash_var(name_t); end - def match_hash_var_from_str(begin_t, strings, end_t); end - def match_label(label_type, label); end - def match_nil_pattern(dstar_t, nil_t); end - def match_op(receiver, match_t, arg); end - def match_pair(label_type, label, value); end - def match_pattern(lhs, match_t, rhs); end - def match_pattern_p(lhs, match_t, rhs); end - def match_rest(star_t, name_t = T.unsafe(nil)); end - def match_var(name_t); end - def match_with_trailing_comma(match, comma_t); end - def multi_assign(lhs, eql_t, rhs); end - def multi_lhs(begin_t, items, end_t); end - def nil(nil_t); end - def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - def nth_ref(token); end - def numargs(max_numparam); end - def objc_kwarg(kwname_t, assoc_t, name_t); end - def objc_restarg(star_t, name = T.unsafe(nil)); end - def objc_varargs(pair, rest_of_varargs); end - def op_assign(lhs, op_t, rhs); end - def optarg(name_t, eql_t, value); end - def pair(key, assoc_t, value); end - def pair_keyword(key_t, value); end - def pair_label(key_t); end - def pair_list_18(list); end - def pair_quoted(begin_t, parts, end_t, value); end - def parser; end - def parser=(_arg0); end - def pin(pin_t, var); end - def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - def procarg0(arg); end - def range_exclusive(lhs, dot3_t, rhs); end - def range_inclusive(lhs, dot2_t, rhs); end - def rational(rational_t); end - def regexp_compose(begin_t, parts, end_t, options); end - def regexp_options(regopt_t); end - def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - def restarg(star_t, name_t = T.unsafe(nil)); end - def restarg_expr(star_t, expr = T.unsafe(nil)); end - def self(token); end - def shadowarg(name_t); end - def splat(star_t, arg = T.unsafe(nil)); end - def string(string_t); end - def string_compose(begin_t, parts, end_t); end - def string_internal(string_t); end - def symbol(symbol_t); end - def symbol_compose(begin_t, parts, end_t); end - def symbol_internal(symbol_t); end - def symbols_compose(begin_t, parts, end_t); end - def ternary(cond, question_t, if_true, colon_t, if_false); end - def true(true_t); end - def unary_num(unary_t, numeric); end - def unary_op(op_t, receiver); end - def undef_method(undef_t, names); end - def unless_guard(unless_t, unless_body); end - def when(when_t, patterns, then_t, body); end - def word(parts); end - def words_compose(begin_t, parts, end_t); end - def xstring_compose(begin_t, parts, end_t); end - - private - - def arg_name_collides?(this_name, that_name); end - def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - def binary_op_map(left_e, op_t, right_e); end - def block_map(receiver_l, begin_t, end_t); end - def check_assignment_to_numparam(name, loc); end - def check_condition(cond); end - def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - def check_duplicate_args(args, map = T.unsafe(nil)); end - def check_duplicate_pattern_key(name, loc); end - def check_duplicate_pattern_variable(name, loc); end - def check_lvar_name(name, loc); end - def check_reserved_for_numparam(name, loc); end - def collapse_string_parts?(parts); end - def collection_map(begin_t, parts, end_t); end - def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - def constant_map(scope, colon2_t, name_t); end - def definition_map(keyword_t, operator_t, name_t, end_t); end - def delimited_string_map(string_t); end - def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - def expr_map(loc); end - def for_map(keyword_t, in_t, begin_t, end_t); end - def guard_map(keyword_t, guard_body_e); end - def index_map(receiver_e, lbrack_t, rbrack_t); end - def join_exprs(left_expr, right_expr); end - def keyword_map(keyword_t, begin_t, args, end_t); end - def keyword_mod_map(pre_e, keyword_t, post_e); end - def kwarg_map(name_t, value_e = T.unsafe(nil)); end - def kwargs?(node); end - def loc(token); end - def module_definition_map(keyword_t, name_e, operator_t, end_t); end - def n(type, children, source_map); end - def n0(type, source_map); end - def numeric(kind, token); end - def pair_keyword_map(key_t, value_e); end - def pair_quoted_map(begin_t, end_t, value_e); end - def prefix_string_map(symbol); end - def range_map(start_e, op_t, end_e); end - def regexp_map(begin_t, end_t, options_e); end - def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - def rewrite_hash_args_to_kwargs(args); end - def send_binary_op_map(lhs_e, selector_t, rhs_e); end - def send_index_map(receiver_e, lbrack_t, rbrack_t); end - def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - def send_unary_op_map(selector_t, arg_e); end - def static_regexp(parts, options); end - def static_regexp_node(node); end - def static_string(nodes); end - def string_map(begin_t, parts, end_t); end - def string_value(token); end - def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - def token_map(token); end - def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - def unquoted_map(token); end - def validate_definee(definee); end - def validate_no_forward_arg_after_restarg(args); end - def value(token); end - def var_send_map(variable_e); end - def variable_map(name_t); end - - class << self - def emit_arg_inside_procarg0; end - def emit_arg_inside_procarg0=(_arg0); end - def emit_encoding; end - def emit_encoding=(_arg0); end - def emit_forward_arg; end - def emit_forward_arg=(_arg0); end - def emit_index; end - def emit_index=(_arg0); end - def emit_kwargs; end - def emit_kwargs=(_arg0); end - def emit_lambda; end - def emit_lambda=(_arg0); end - def emit_match_pattern; end - def emit_match_pattern=(_arg0); end - def emit_procarg0; end - def emit_procarg0=(_arg0); end - def modernize; end - end -end - -class Parser::ClobberingError < ::RuntimeError; end - -class Parser::Context - def initialize; end - - def in_argdef; end - def in_argdef=(_arg0); end - def in_block; end - def in_block=(_arg0); end - def in_class; end - def in_class=(_arg0); end - def in_def; end - def in_def=(_arg0); end - def in_defined; end - def in_defined=(_arg0); end - def in_dynamic_block?; end - def in_kwarg; end - def in_kwarg=(_arg0); end - def in_lambda; end - def in_lambda=(_arg0); end - def reset; end -end - -Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) - -class Parser::CurrentArgStack - def initialize; end - - def empty?; end - def pop; end - def push(value); end - def reset; end - def set(value); end - def stack; end - def top; end -end - -Parser::CurrentRuby = Parser::Ruby27 - -module Parser::Deprecation - def warn_of_deprecation; end - def warned_of_deprecation=(_arg0); end -end - -class Parser::Diagnostic - def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end - - def arguments; end - def highlights; end - def level; end - def location; end - def message; end - def reason; end - def render; end - - private - - def first_line_only(range); end - def last_line_only(range); end - def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end -end - -class Parser::Diagnostic::Engine - def initialize(consumer = T.unsafe(nil)); end - - def all_errors_are_fatal; end - def all_errors_are_fatal=(_arg0); end - def consumer; end - def consumer=(_arg0); end - def ignore_warnings; end - def ignore_warnings=(_arg0); end - def process(diagnostic); end - - protected - - def ignore?(diagnostic); end - def raise?(diagnostic); end -end - -Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) - -class Parser::Lexer - def initialize(version); end - - def advance; end - def cmdarg; end - def cmdarg=(_arg0); end - def cmdarg_stack; end - def command_start; end - def command_start=(_arg0); end - def comments; end - def comments=(_arg0); end - def cond; end - def cond=(_arg0); end - def cond_stack; end - def context; end - def context=(_arg0); end - def dedent_level; end - def diagnostics; end - def diagnostics=(_arg0); end - def encoding; end - def force_utf32; end - def force_utf32=(_arg0); end - def lambda_stack; end - def paren_nest; end - def pop_cmdarg; end - def pop_cond; end - def push_cmdarg; end - def push_cond; end - def reset(reset_state = T.unsafe(nil)); end - def source_buffer; end - def source_buffer=(source_buffer); end - def state; end - def state=(state); end - def static_env; end - def static_env=(_arg0); end - def tokens; end - def tokens=(_arg0); end - - protected - - def arg_or_cmdarg(cmd_state); end - def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - def emit_do(do_block = T.unsafe(nil)); end - def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - def encode_escape(ord); end - def eof_codepoint?(point); end - def literal; end - def next_state_for_literal(literal); end - def pop_literal; end - def push_literal(*args); end - def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - def stack_pop; end - def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end - def version?(*versions); end - - class << self - def lex_en_expr_arg; end - def lex_en_expr_arg=(_arg0); end - def lex_en_expr_beg; end - def lex_en_expr_beg=(_arg0); end - def lex_en_expr_cmdarg; end - def lex_en_expr_cmdarg=(_arg0); end - def lex_en_expr_dot; end - def lex_en_expr_dot=(_arg0); end - def lex_en_expr_end; end - def lex_en_expr_end=(_arg0); end - def lex_en_expr_endarg; end - def lex_en_expr_endarg=(_arg0); end - def lex_en_expr_endfn; end - def lex_en_expr_endfn=(_arg0); end - def lex_en_expr_fname; end - def lex_en_expr_fname=(_arg0); end - def lex_en_expr_labelarg; end - def lex_en_expr_labelarg=(_arg0); end - def lex_en_expr_mid; end - def lex_en_expr_mid=(_arg0); end - def lex_en_expr_value; end - def lex_en_expr_value=(_arg0); end - def lex_en_expr_variable; end - def lex_en_expr_variable=(_arg0); end - def lex_en_interp_backslash_delimited; end - def lex_en_interp_backslash_delimited=(_arg0); end - def lex_en_interp_backslash_delimited_words; end - def lex_en_interp_backslash_delimited_words=(_arg0); end - def lex_en_interp_string; end - def lex_en_interp_string=(_arg0); end - def lex_en_interp_words; end - def lex_en_interp_words=(_arg0); end - def lex_en_leading_dot; end - def lex_en_leading_dot=(_arg0); end - def lex_en_line_begin; end - def lex_en_line_begin=(_arg0); end - def lex_en_line_comment; end - def lex_en_line_comment=(_arg0); end - def lex_en_plain_backslash_delimited; end - def lex_en_plain_backslash_delimited=(_arg0); end - def lex_en_plain_backslash_delimited_words; end - def lex_en_plain_backslash_delimited_words=(_arg0); end - def lex_en_plain_string; end - def lex_en_plain_string=(_arg0); end - def lex_en_plain_words; end - def lex_en_plain_words=(_arg0); end - def lex_en_regexp_modifiers; end - def lex_en_regexp_modifiers=(_arg0); end - def lex_error; end - def lex_error=(_arg0); end - def lex_start; end - def lex_start=(_arg0); end - - private - - def _lex_eof_trans; end - def _lex_eof_trans=(_arg0); end - def _lex_from_state_actions; end - def _lex_from_state_actions=(_arg0); end - def _lex_index_offsets; end - def _lex_index_offsets=(_arg0); end - def _lex_indicies; end - def _lex_indicies=(_arg0); end - def _lex_key_spans; end - def _lex_key_spans=(_arg0); end - def _lex_to_state_actions; end - def _lex_to_state_actions=(_arg0); end - def _lex_trans_actions; end - def _lex_trans_actions=(_arg0); end - def _lex_trans_keys; end - def _lex_trans_keys=(_arg0); end - def _lex_trans_targs; end - def _lex_trans_targs=(_arg0); end - end -end - -class Parser::Lexer::Dedenter - def initialize(dedent_level); end - - def dedent(string); end - def interrupt; end -end - -Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) -Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) -Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) -Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) -Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) - -class Parser::Lexer::Literal - def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - - def backslash_delimited?; end - def dedent_level; end - def end_interp_brace_and_try_closing; end - def extend_content; end - def extend_space(ts, te); end - def extend_string(string, ts, te); end - def flush_string; end - def heredoc?; end - def heredoc_e; end - def infer_indent_level(line); end - def interpolate?; end - def munge_escape?(character); end - def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - def plain_heredoc?; end - def regexp?; end - def saved_herebody_s; end - def saved_herebody_s=(_arg0); end - def squiggly_heredoc?; end - def start_interp_brace; end - def str_s; end - def supports_line_continuation_via_slash?; end - def type; end - def words?; end - - protected - - def clear_buffer; end - def coerce_encoding(string); end - def delimiter?(delimiter); end - def emit(token, type, s, e); end - def emit_start_tok; end -end - -Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) -Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) -Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) -Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) -Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) - -class Parser::Lexer::StackState - def initialize(name); end - - def active?; end - def clear; end - def empty?; end - def inspect; end - def lexpop; end - def pop; end - def push(bit); end - def to_s; end -end - -Parser::MESSAGES = T.let(T.unsafe(nil), Hash) - -class Parser::MaxNumparamStack - def initialize; end - - def empty?; end - def has_numparams?; end - def has_ordinary_params!; end - def has_ordinary_params?; end - def pop; end - def push(static:); end - def register(numparam); end - def stack; end - def top; end - - private - - def set(value); end -end - -Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) - -module Parser::Messages - class << self - def compile(reason, arguments); end - end -end - -module Parser::Meta; end -Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) - -class Parser::Rewriter < ::Parser::AST::Processor - extend ::Parser::Deprecation - - def initialize(*_arg0); end - - def assignment?(node); end - def insert_after(range, content); end - def insert_before(range, content); end - def remove(range); end - def replace(range, content); end - def rewrite(source_buffer, ast); end - def wrap(range, before, after); end -end - -Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -class Parser::Ruby27 < ::Parser::Base - def _reduce_1(val, _values, result); end - def _reduce_10(val, _values, result); end - def _reduce_100(val, _values, result); end - def _reduce_101(val, _values, result); end - def _reduce_102(val, _values, result); end - def _reduce_103(val, _values, result); end - def _reduce_104(val, _values, result); end - def _reduce_105(val, _values, result); end - def _reduce_106(val, _values, result); end - def _reduce_107(val, _values, result); end - def _reduce_108(val, _values, result); end - def _reduce_109(val, _values, result); end - def _reduce_11(val, _values, result); end - def _reduce_110(val, _values, result); end - def _reduce_111(val, _values, result); end - def _reduce_112(val, _values, result); end - def _reduce_113(val, _values, result); end - def _reduce_114(val, _values, result); end - def _reduce_115(val, _values, result); end - def _reduce_117(val, _values, result); end - def _reduce_118(val, _values, result); end - def _reduce_119(val, _values, result); end - def _reduce_12(val, _values, result); end - def _reduce_125(val, _values, result); end - def _reduce_127(val, _values, result); end - def _reduce_128(val, _values, result); end - def _reduce_129(val, _values, result); end - def _reduce_13(val, _values, result); end - def _reduce_14(val, _values, result); end - def _reduce_15(val, _values, result); end - def _reduce_16(val, _values, result); end - def _reduce_18(val, _values, result); end - def _reduce_19(val, _values, result); end - def _reduce_2(val, _values, result); end - def _reduce_20(val, _values, result); end - def _reduce_201(val, _values, result); end - def _reduce_202(val, _values, result); end - def _reduce_203(val, _values, result); end - def _reduce_204(val, _values, result); end - def _reduce_205(val, _values, result); end - def _reduce_206(val, _values, result); end - def _reduce_207(val, _values, result); end - def _reduce_208(val, _values, result); end - def _reduce_209(val, _values, result); end - def _reduce_21(val, _values, result); end - def _reduce_210(val, _values, result); end - def _reduce_211(val, _values, result); end - def _reduce_212(val, _values, result); end - def _reduce_213(val, _values, result); end - def _reduce_214(val, _values, result); end - def _reduce_215(val, _values, result); end - def _reduce_216(val, _values, result); end - def _reduce_217(val, _values, result); end - def _reduce_218(val, _values, result); end - def _reduce_219(val, _values, result); end - def _reduce_22(val, _values, result); end - def _reduce_220(val, _values, result); end - def _reduce_221(val, _values, result); end - def _reduce_222(val, _values, result); end - def _reduce_223(val, _values, result); end - def _reduce_224(val, _values, result); end - def _reduce_225(val, _values, result); end - def _reduce_226(val, _values, result); end - def _reduce_227(val, _values, result); end - def _reduce_228(val, _values, result); end - def _reduce_23(val, _values, result); end - def _reduce_230(val, _values, result); end - def _reduce_231(val, _values, result); end - def _reduce_232(val, _values, result); end - def _reduce_233(val, _values, result); end - def _reduce_234(val, _values, result); end - def _reduce_235(val, _values, result); end - def _reduce_236(val, _values, result); end - def _reduce_237(val, _values, result); end - def _reduce_238(val, _values, result); end - def _reduce_239(val, _values, result); end - def _reduce_24(val, _values, result); end - def _reduce_240(val, _values, result); end - def _reduce_241(val, _values, result); end - def _reduce_242(val, _values, result); end - def _reduce_248(val, _values, result); end - def _reduce_249(val, _values, result); end - def _reduce_25(val, _values, result); end - def _reduce_253(val, _values, result); end - def _reduce_254(val, _values, result); end - def _reduce_256(val, _values, result); end - def _reduce_257(val, _values, result); end - def _reduce_258(val, _values, result); end - def _reduce_259(val, _values, result); end - def _reduce_26(val, _values, result); end - def _reduce_260(val, _values, result); end - def _reduce_262(val, _values, result); end - def _reduce_265(val, _values, result); end - def _reduce_266(val, _values, result); end - def _reduce_267(val, _values, result); end - def _reduce_268(val, _values, result); end - def _reduce_269(val, _values, result); end - def _reduce_27(val, _values, result); end - def _reduce_270(val, _values, result); end - def _reduce_271(val, _values, result); end - def _reduce_272(val, _values, result); end - def _reduce_273(val, _values, result); end - def _reduce_274(val, _values, result); end - def _reduce_275(val, _values, result); end - def _reduce_276(val, _values, result); end - def _reduce_277(val, _values, result); end - def _reduce_278(val, _values, result); end - def _reduce_279(val, _values, result); end - def _reduce_28(val, _values, result); end - def _reduce_280(val, _values, result); end - def _reduce_281(val, _values, result); end - def _reduce_283(val, _values, result); end - def _reduce_284(val, _values, result); end - def _reduce_285(val, _values, result); end - def _reduce_29(val, _values, result); end - def _reduce_296(val, _values, result); end - def _reduce_297(val, _values, result); end - def _reduce_298(val, _values, result); end - def _reduce_299(val, _values, result); end - def _reduce_3(val, _values, result); end - def _reduce_30(val, _values, result); end - def _reduce_300(val, _values, result); end - def _reduce_301(val, _values, result); end - def _reduce_302(val, _values, result); end - def _reduce_303(val, _values, result); end - def _reduce_304(val, _values, result); end - def _reduce_305(val, _values, result); end - def _reduce_306(val, _values, result); end - def _reduce_307(val, _values, result); end - def _reduce_308(val, _values, result); end - def _reduce_309(val, _values, result); end - def _reduce_310(val, _values, result); end - def _reduce_311(val, _values, result); end - def _reduce_312(val, _values, result); end - def _reduce_313(val, _values, result); end - def _reduce_314(val, _values, result); end - def _reduce_315(val, _values, result); end - def _reduce_317(val, _values, result); end - def _reduce_318(val, _values, result); end - def _reduce_319(val, _values, result); end - def _reduce_32(val, _values, result); end - def _reduce_320(val, _values, result); end - def _reduce_321(val, _values, result); end - def _reduce_322(val, _values, result); end - def _reduce_323(val, _values, result); end - def _reduce_324(val, _values, result); end - def _reduce_325(val, _values, result); end - def _reduce_326(val, _values, result); end - def _reduce_327(val, _values, result); end - def _reduce_328(val, _values, result); end - def _reduce_329(val, _values, result); end - def _reduce_33(val, _values, result); end - def _reduce_330(val, _values, result); end - def _reduce_331(val, _values, result); end - def _reduce_332(val, _values, result); end - def _reduce_333(val, _values, result); end - def _reduce_334(val, _values, result); end - def _reduce_335(val, _values, result); end - def _reduce_336(val, _values, result); end - def _reduce_337(val, _values, result); end - def _reduce_338(val, _values, result); end - def _reduce_339(val, _values, result); end - def _reduce_34(val, _values, result); end - def _reduce_340(val, _values, result); end - def _reduce_341(val, _values, result); end - def _reduce_342(val, _values, result); end - def _reduce_344(val, _values, result); end - def _reduce_345(val, _values, result); end - def _reduce_346(val, _values, result); end - def _reduce_347(val, _values, result); end - def _reduce_35(val, _values, result); end - def _reduce_350(val, _values, result); end - def _reduce_354(val, _values, result); end - def _reduce_356(val, _values, result); end - def _reduce_359(val, _values, result); end - def _reduce_360(val, _values, result); end - def _reduce_361(val, _values, result); end - def _reduce_362(val, _values, result); end - def _reduce_364(val, _values, result); end - def _reduce_365(val, _values, result); end - def _reduce_366(val, _values, result); end - def _reduce_367(val, _values, result); end - def _reduce_368(val, _values, result); end - def _reduce_369(val, _values, result); end - def _reduce_37(val, _values, result); end - def _reduce_370(val, _values, result); end - def _reduce_371(val, _values, result); end - def _reduce_372(val, _values, result); end - def _reduce_373(val, _values, result); end - def _reduce_374(val, _values, result); end - def _reduce_375(val, _values, result); end - def _reduce_376(val, _values, result); end - def _reduce_377(val, _values, result); end - def _reduce_378(val, _values, result); end - def _reduce_379(val, _values, result); end - def _reduce_38(val, _values, result); end - def _reduce_380(val, _values, result); end - def _reduce_381(val, _values, result); end - def _reduce_383(val, _values, result); end - def _reduce_384(val, _values, result); end - def _reduce_385(val, _values, result); end - def _reduce_386(val, _values, result); end - def _reduce_387(val, _values, result); end - def _reduce_388(val, _values, result); end - def _reduce_389(val, _values, result); end - def _reduce_39(val, _values, result); end - def _reduce_390(val, _values, result); end - def _reduce_392(val, _values, result); end - def _reduce_393(val, _values, result); end - def _reduce_394(val, _values, result); end - def _reduce_395(val, _values, result); end - def _reduce_396(val, _values, result); end - def _reduce_397(val, _values, result); end - def _reduce_398(val, _values, result); end - def _reduce_399(val, _values, result); end - def _reduce_4(val, _values, result); end - def _reduce_40(val, _values, result); end - def _reduce_400(val, _values, result); end - def _reduce_402(val, _values, result); end - def _reduce_403(val, _values, result); end - def _reduce_404(val, _values, result); end - def _reduce_405(val, _values, result); end - def _reduce_406(val, _values, result); end - def _reduce_407(val, _values, result); end - def _reduce_408(val, _values, result); end - def _reduce_409(val, _values, result); end - def _reduce_41(val, _values, result); end - def _reduce_410(val, _values, result); end - def _reduce_411(val, _values, result); end - def _reduce_412(val, _values, result); end - def _reduce_413(val, _values, result); end - def _reduce_414(val, _values, result); end - def _reduce_415(val, _values, result); end - def _reduce_416(val, _values, result); end - def _reduce_417(val, _values, result); end - def _reduce_418(val, _values, result); end - def _reduce_419(val, _values, result); end - def _reduce_42(val, _values, result); end - def _reduce_420(val, _values, result); end - def _reduce_421(val, _values, result); end - def _reduce_422(val, _values, result); end - def _reduce_423(val, _values, result); end - def _reduce_424(val, _values, result); end - def _reduce_425(val, _values, result); end - def _reduce_426(val, _values, result); end - def _reduce_427(val, _values, result); end - def _reduce_428(val, _values, result); end - def _reduce_429(val, _values, result); end - def _reduce_43(val, _values, result); end - def _reduce_430(val, _values, result); end - def _reduce_431(val, _values, result); end - def _reduce_432(val, _values, result); end - def _reduce_433(val, _values, result); end - def _reduce_434(val, _values, result); end - def _reduce_435(val, _values, result); end - def _reduce_436(val, _values, result); end - def _reduce_438(val, _values, result); end - def _reduce_439(val, _values, result); end - def _reduce_44(val, _values, result); end - def _reduce_440(val, _values, result); end - def _reduce_441(val, _values, result); end - def _reduce_443(val, _values, result); end - def _reduce_444(val, _values, result); end - def _reduce_445(val, _values, result); end - def _reduce_447(val, _values, result); end - def _reduce_448(val, _values, result); end - def _reduce_449(val, _values, result); end - def _reduce_450(val, _values, result); end - def _reduce_452(val, _values, result); end - def _reduce_454(val, _values, result); end - def _reduce_456(val, _values, result); end - def _reduce_457(val, _values, result); end - def _reduce_459(val, _values, result); end - def _reduce_46(val, _values, result); end - def _reduce_460(val, _values, result); end - def _reduce_461(val, _values, result); end - def _reduce_462(val, _values, result); end - def _reduce_463(val, _values, result); end - def _reduce_464(val, _values, result); end - def _reduce_465(val, _values, result); end - def _reduce_466(val, _values, result); end - def _reduce_467(val, _values, result); end - def _reduce_468(val, _values, result); end - def _reduce_469(val, _values, result); end - def _reduce_470(val, _values, result); end - def _reduce_471(val, _values, result); end - def _reduce_472(val, _values, result); end - def _reduce_473(val, _values, result); end - def _reduce_474(val, _values, result); end - def _reduce_475(val, _values, result); end - def _reduce_476(val, _values, result); end - def _reduce_477(val, _values, result); end - def _reduce_478(val, _values, result); end - def _reduce_479(val, _values, result); end - def _reduce_481(val, _values, result); end - def _reduce_482(val, _values, result); end - def _reduce_483(val, _values, result); end - def _reduce_484(val, _values, result); end - def _reduce_485(val, _values, result); end - def _reduce_486(val, _values, result); end - def _reduce_487(val, _values, result); end - def _reduce_488(val, _values, result); end - def _reduce_49(val, _values, result); end - def _reduce_490(val, _values, result); end - def _reduce_491(val, _values, result); end - def _reduce_492(val, _values, result); end - def _reduce_493(val, _values, result); end - def _reduce_494(val, _values, result); end - def _reduce_495(val, _values, result); end - def _reduce_496(val, _values, result); end - def _reduce_497(val, _values, result); end - def _reduce_498(val, _values, result); end - def _reduce_499(val, _values, result); end - def _reduce_5(val, _values, result); end - def _reduce_50(val, _values, result); end - def _reduce_500(val, _values, result); end - def _reduce_501(val, _values, result); end - def _reduce_502(val, _values, result); end - def _reduce_503(val, _values, result); end - def _reduce_504(val, _values, result); end - def _reduce_506(val, _values, result); end - def _reduce_507(val, _values, result); end - def _reduce_508(val, _values, result); end - def _reduce_509(val, _values, result); end - def _reduce_51(val, _values, result); end - def _reduce_513(val, _values, result); end - def _reduce_514(val, _values, result); end - def _reduce_52(val, _values, result); end - def _reduce_523(val, _values, result); end - def _reduce_524(val, _values, result); end - def _reduce_525(val, _values, result); end - def _reduce_526(val, _values, result); end - def _reduce_527(val, _values, result); end - def _reduce_528(val, _values, result); end - def _reduce_529(val, _values, result); end - def _reduce_53(val, _values, result); end - def _reduce_530(val, _values, result); end - def _reduce_531(val, _values, result); end - def _reduce_532(val, _values, result); end - def _reduce_533(val, _values, result); end - def _reduce_536(val, _values, result); end - def _reduce_538(val, _values, result); end - def _reduce_54(val, _values, result); end - def _reduce_542(val, _values, result); end - def _reduce_543(val, _values, result); end - def _reduce_544(val, _values, result); end - def _reduce_545(val, _values, result); end - def _reduce_546(val, _values, result); end - def _reduce_547(val, _values, result); end - def _reduce_548(val, _values, result); end - def _reduce_549(val, _values, result); end - def _reduce_550(val, _values, result); end - def _reduce_551(val, _values, result); end - def _reduce_552(val, _values, result); end - def _reduce_553(val, _values, result); end - def _reduce_554(val, _values, result); end - def _reduce_555(val, _values, result); end - def _reduce_556(val, _values, result); end - def _reduce_557(val, _values, result); end - def _reduce_558(val, _values, result); end - def _reduce_559(val, _values, result); end - def _reduce_560(val, _values, result); end - def _reduce_561(val, _values, result); end - def _reduce_562(val, _values, result); end - def _reduce_563(val, _values, result); end - def _reduce_564(val, _values, result); end - def _reduce_565(val, _values, result); end - def _reduce_566(val, _values, result); end - def _reduce_567(val, _values, result); end - def _reduce_568(val, _values, result); end - def _reduce_569(val, _values, result); end - def _reduce_57(val, _values, result); end - def _reduce_570(val, _values, result); end - def _reduce_571(val, _values, result); end - def _reduce_572(val, _values, result); end - def _reduce_573(val, _values, result); end - def _reduce_574(val, _values, result); end - def _reduce_575(val, _values, result); end - def _reduce_576(val, _values, result); end - def _reduce_58(val, _values, result); end - def _reduce_580(val, _values, result); end - def _reduce_581(val, _values, result); end - def _reduce_582(val, _values, result); end - def _reduce_583(val, _values, result); end - def _reduce_584(val, _values, result); end - def _reduce_585(val, _values, result); end - def _reduce_586(val, _values, result); end - def _reduce_587(val, _values, result); end - def _reduce_588(val, _values, result); end - def _reduce_589(val, _values, result); end - def _reduce_590(val, _values, result); end - def _reduce_591(val, _values, result); end - def _reduce_592(val, _values, result); end - def _reduce_593(val, _values, result); end - def _reduce_594(val, _values, result); end - def _reduce_595(val, _values, result); end - def _reduce_596(val, _values, result); end - def _reduce_597(val, _values, result); end - def _reduce_598(val, _values, result); end - def _reduce_599(val, _values, result); end - def _reduce_6(val, _values, result); end - def _reduce_600(val, _values, result); end - def _reduce_601(val, _values, result); end - def _reduce_602(val, _values, result); end - def _reduce_603(val, _values, result); end - def _reduce_604(val, _values, result); end - def _reduce_605(val, _values, result); end - def _reduce_606(val, _values, result); end - def _reduce_607(val, _values, result); end - def _reduce_608(val, _values, result); end - def _reduce_609(val, _values, result); end - def _reduce_610(val, _values, result); end - def _reduce_611(val, _values, result); end - def _reduce_612(val, _values, result); end - def _reduce_613(val, _values, result); end - def _reduce_614(val, _values, result); end - def _reduce_615(val, _values, result); end - def _reduce_616(val, _values, result); end - def _reduce_617(val, _values, result); end - def _reduce_618(val, _values, result); end - def _reduce_619(val, _values, result); end - def _reduce_62(val, _values, result); end - def _reduce_620(val, _values, result); end - def _reduce_621(val, _values, result); end - def _reduce_622(val, _values, result); end - def _reduce_623(val, _values, result); end - def _reduce_624(val, _values, result); end - def _reduce_625(val, _values, result); end - def _reduce_626(val, _values, result); end - def _reduce_627(val, _values, result); end - def _reduce_628(val, _values, result); end - def _reduce_629(val, _values, result); end - def _reduce_63(val, _values, result); end - def _reduce_630(val, _values, result); end - def _reduce_631(val, _values, result); end - def _reduce_632(val, _values, result); end - def _reduce_633(val, _values, result); end - def _reduce_634(val, _values, result); end - def _reduce_635(val, _values, result); end - def _reduce_636(val, _values, result); end - def _reduce_637(val, _values, result); end - def _reduce_638(val, _values, result); end - def _reduce_639(val, _values, result); end - def _reduce_64(val, _values, result); end - def _reduce_640(val, _values, result); end - def _reduce_642(val, _values, result); end - def _reduce_643(val, _values, result); end - def _reduce_644(val, _values, result); end - def _reduce_645(val, _values, result); end - def _reduce_646(val, _values, result); end - def _reduce_647(val, _values, result); end - def _reduce_648(val, _values, result); end - def _reduce_649(val, _values, result); end - def _reduce_650(val, _values, result); end - def _reduce_651(val, _values, result); end - def _reduce_652(val, _values, result); end - def _reduce_653(val, _values, result); end - def _reduce_654(val, _values, result); end - def _reduce_655(val, _values, result); end - def _reduce_656(val, _values, result); end - def _reduce_659(val, _values, result); end - def _reduce_66(val, _values, result); end - def _reduce_660(val, _values, result); end - def _reduce_661(val, _values, result); end - def _reduce_662(val, _values, result); end - def _reduce_663(val, _values, result); end - def _reduce_664(val, _values, result); end - def _reduce_665(val, _values, result); end - def _reduce_666(val, _values, result); end - def _reduce_667(val, _values, result); end - def _reduce_67(val, _values, result); end - def _reduce_670(val, _values, result); end - def _reduce_671(val, _values, result); end - def _reduce_674(val, _values, result); end - def _reduce_675(val, _values, result); end - def _reduce_676(val, _values, result); end - def _reduce_678(val, _values, result); end - def _reduce_679(val, _values, result); end - def _reduce_68(val, _values, result); end - def _reduce_681(val, _values, result); end - def _reduce_682(val, _values, result); end - def _reduce_683(val, _values, result); end - def _reduce_684(val, _values, result); end - def _reduce_685(val, _values, result); end - def _reduce_686(val, _values, result); end - def _reduce_69(val, _values, result); end - def _reduce_699(val, _values, result); end - def _reduce_7(val, _values, result); end - def _reduce_70(val, _values, result); end - def _reduce_700(val, _values, result); end - def _reduce_705(val, _values, result); end - def _reduce_706(val, _values, result); end - def _reduce_707(val, _values, result); end - def _reduce_71(val, _values, result); end - def _reduce_711(val, _values, result); end - def _reduce_715(val, _values, result); end - def _reduce_72(val, _values, result); end - def _reduce_73(val, _values, result); end - def _reduce_74(val, _values, result); end - def _reduce_75(val, _values, result); end - def _reduce_76(val, _values, result); end - def _reduce_77(val, _values, result); end - def _reduce_78(val, _values, result); end - def _reduce_79(val, _values, result); end - def _reduce_80(val, _values, result); end - def _reduce_82(val, _values, result); end - def _reduce_83(val, _values, result); end - def _reduce_84(val, _values, result); end - def _reduce_85(val, _values, result); end - def _reduce_86(val, _values, result); end - def _reduce_87(val, _values, result); end - def _reduce_88(val, _values, result); end - def _reduce_89(val, _values, result); end - def _reduce_9(val, _values, result); end - def _reduce_90(val, _values, result); end - def _reduce_92(val, _values, result); end - def _reduce_93(val, _values, result); end - def _reduce_94(val, _values, result); end - def _reduce_95(val, _values, result); end - def _reduce_96(val, _values, result); end - def _reduce_97(val, _values, result); end - def _reduce_98(val, _values, result); end - def _reduce_99(val, _values, result); end - def _reduce_none(val, _values, result); end - def default_encoding; end - def local_pop; end - def local_push; end - def try_declare_numparam(node); end - def version; end -end - -Parser::Ruby27::Racc_arg = T.let(T.unsafe(nil), Array) -Parser::Ruby27::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) -module Parser::Source; end - -class Parser::Source::Buffer - def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - - def column_for_position(position); end - def decompose_position(position); end - def first_line; end - def freeze; end - def inspect; end - def last_line; end - def line_for_position(position); end - def line_range(lineno); end - def name; end - def raw_source=(input); end - def read; end - def slice(range); end - def source; end - def source=(input); end - def source_line(lineno); end - def source_lines; end - def source_range; end - - private - - def bsearch(line_begins, position); end - def line_begins; end - def line_index_for_position(position); end - - class << self - def recognize_encoding(string); end - def reencode_string(input); end - end -end - -Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - -class Parser::Source::Comment - def initialize(range); end - - def ==(other); end - def document?; end - def inline?; end - def inspect; end - def loc; end - def location; end - def text; end - def type; end - - class << self - def associate(ast, comments); end - def associate_by_identity(ast, comments); end - def associate_locations(ast, comments); end - end -end - -class Parser::Source::Comment::Associator - def initialize(ast, comments); end - - def associate; end - def associate_by_identity; end - def associate_locations; end - def skip_directives; end - def skip_directives=(_arg0); end - - private - - def advance_comment; end - def advance_through_directives; end - def associate_and_advance_comment(node); end - def children_in_source_order(node); end - def current_comment_before?(node); end - def current_comment_before_end?(node); end - def current_comment_decorates?(node); end - def do_associate; end - def process_leading_comments(node); end - def process_trailing_comments(node); end - def visit(node); end -end - -Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) -Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) - -class Parser::Source::Map - def initialize(expression); end - - def ==(other); end - def column; end - def expression; end - def first_line; end - def last_column; end - def last_line; end - def line; end - def node; end - def node=(node); end - def to_hash; end - def with_expression(expression_l); end - - protected - - def update_expression(expression_l); end - def with(&block); end - - private - - def initialize_copy(other); end -end - -class Parser::Source::Map::Collection < ::Parser::Source::Map - def initialize(begin_l, end_l, expression_l); end - - def begin; end - def end; end -end - -class Parser::Source::Map::Condition < ::Parser::Source::Map - def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end - - def begin; end - def else; end - def end; end - def keyword; end -end - -class Parser::Source::Map::Constant < ::Parser::Source::Map - def initialize(double_colon, name, expression); end - - def double_colon; end - def name; end - def operator; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Map::Definition < ::Parser::Source::Map - def initialize(keyword_l, operator_l, name_l, end_l); end - - def end; end - def keyword; end - def name; end - def operator; end -end - -class Parser::Source::Map::For < ::Parser::Source::Map - def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end - - def begin; end - def end; end - def in; end - def keyword; end -end - -class Parser::Source::Map::Heredoc < ::Parser::Source::Map - def initialize(begin_l, body_l, end_l); end - - def heredoc_body; end - def heredoc_end; end -end - -class Parser::Source::Map::Index < ::Parser::Source::Map - def initialize(begin_l, end_l, expression_l); end - - def begin; end - def end; end - def operator; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Map::Keyword < ::Parser::Source::Map - def initialize(keyword_l, begin_l, end_l, expression_l); end - - def begin; end - def end; end - def keyword; end -end - -class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map - def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end - - def assignment; end - def end; end - def keyword; end - def name; end - def operator; end -end - -class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map - def initialize(keyword_l, operator_l, argument_l, expression_l); end - - def argument; end - def keyword; end - def operator; end -end - -class Parser::Source::Map::Operator < ::Parser::Source::Map - def initialize(operator, expression); end - - def operator; end -end - -class Parser::Source::Map::RescueBody < ::Parser::Source::Map - def initialize(keyword_l, assoc_l, begin_l, expression_l); end - - def assoc; end - def begin; end - def keyword; end -end - -class Parser::Source::Map::Send < ::Parser::Source::Map - def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end - - def begin; end - def dot; end - def end; end - def operator; end - def selector; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Map::Ternary < ::Parser::Source::Map - def initialize(question_l, colon_l, expression_l); end - - def colon; end - def question; end -end - -class Parser::Source::Map::Variable < ::Parser::Source::Map - def initialize(name_l, expression_l = T.unsafe(nil)); end - - def name; end - def operator; end - def with_operator(operator_l); end - - protected - - def update_operator(operator_l); end -end - -class Parser::Source::Range - include ::Comparable - include ::RuboCop::AST::Ext::Range - - def initialize(source_buffer, begin_pos, end_pos); end - - def <=>(other); end - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - def begin; end - def begin_pos; end - def column; end - def column_range; end - def contained?(other); end - def contains?(other); end - def crossing?(other); end - def disjoint?(other); end - def empty?; end - def end; end - def end_pos; end - def eql?(_arg0); end - def first_line; end - def hash; end - def inspect; end - def intersect(other); end - def is?(*what); end - def join(other); end - def last_column; end - def last_line; end - def length; end - def line; end - def overlaps?(other); end - def resize(new_size); end - def size; end - def source; end - def source_buffer; end - def source_line; end - def to_a; end - def to_range; end - def to_s; end - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -class Parser::Source::Rewriter - extend ::Parser::Deprecation - - def initialize(source_buffer); end - - def diagnostics; end - def insert_after(range, content); end - def insert_after_multi(range, content); end - def insert_before(range, content); end - def insert_before_multi(range, content); end - def process; end - def remove(range); end - def replace(range, content); end - def source_buffer; end - def transaction; end - def wrap(range, before, after); end - - private - - def active_clobber; end - def active_clobber=(value); end - def active_insertions; end - def active_insertions=(value); end - def active_queue; end - def adjacent?(range1, range2); end - def adjacent_insertion_mask(range); end - def adjacent_insertions?(range); end - def adjacent_position_mask(range); end - def adjacent_updates?(range); end - def append(action); end - def can_merge?(action, existing); end - def clobbered_insertion?(insertion); end - def clobbered_position_mask(range); end - def in_transaction?; end - def merge_actions(action, existing); end - def merge_actions!(action, existing); end - def merge_replacements(actions); end - def raise_clobber_error(action, existing); end - def record_insertion(range); end - def record_replace(range); end - def replace_actions(old, updated); end - def replace_compatible_with_insertion?(replace, insertion); end -end - -class Parser::Source::Rewriter::Action - include ::Comparable - - def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end - - def <=>(other); end - def allow_multiple_insertions; end - def allow_multiple_insertions?; end - def order; end - def range; end - def replacement; end - def to_s; end -end - -Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -class Parser::Source::TreeRewriter - extend ::Parser::Deprecation - - def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end - - def as_nested_actions; end - def as_replacements; end - def diagnostics; end - def empty?; end - def import!(foreign_rewriter, offset: T.unsafe(nil)); end - def in_transaction?; end - def insert_after(range, content); end - def insert_after_multi(range, text); end - def insert_before(range, content); end - def insert_before_multi(range, text); end - def inspect; end - def merge(with); end - def merge!(with); end - def process; end - def remove(range); end - def replace(range, content); end - def source_buffer; end - def transaction; end - def wrap(range, insert_before, insert_after); end - - protected - - def action_root; end - - private - - def action_summary; end - def check_policy_validity; end - def check_range_validity(range); end - def combine(range, attributes); end - def enforce_policy(event); end - def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end -end - -Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) - -class Parser::Source::TreeRewriter::Action - def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - - def combine(action); end - def contract; end - def empty?; end - def insert_after; end - def insert_before; end - def insertion?; end - def moved(source_buffer, offset); end - def nested_actions; end - def ordered_replacements; end - def range; end - def replacement; end - - protected - - def analyse_hierarchy(action); end - def bsearch_child_index(from = T.unsafe(nil)); end - def call_enforcer_for_merge(action); end - def check_fusible(action, *fusible); end - def children; end - def combine_children(more_children); end - def do_combine(action); end - def fuse_deletions(action, fusible, other_sibblings); end - def merge(action); end - def place_in_hierarchy(action); end - def swallow(children); end - def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end -end - -Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) - -class Parser::StaticEnvironment - def initialize; end - - def declare(name); end - def declare_anonymous_blockarg; end - def declare_forward_args; end - def declared?(name); end - def declared_anonymous_blockarg?; end - def declared_forward_args?; end - def empty?; end - def extend_dynamic; end - def extend_static; end - def reset; end - def unextend; end -end - -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) -Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) - -class Parser::SyntaxError < ::StandardError - def initialize(diagnostic); end - - def diagnostic; end -end - -class Parser::TreeRewriter < ::Parser::AST::Processor - def assignment?(node); end - def insert_after(range, content); end - def insert_before(range, content); end - def remove(range); end - def replace(range, content); end - def rewrite(source_buffer, ast, **policy); end - def wrap(range, before, after); end -end - -Parser::VERSION = T.let(T.unsafe(nil), String) - -class Parser::VariablesStack - def initialize; end - - def declare(name); end - def declared?(name); end - def empty?; end - def pop; end - def push; end - def reset; end -end diff --git a/sorbet/rbi/gems/parser@3.3.10.2.rbi b/sorbet/rbi/gems/parser@3.3.10.2.rbi new file mode 100644 index 0000000..32bdda3 --- /dev/null +++ b/sorbet/rbi/gems/parser@3.3.10.2.rbi @@ -0,0 +1,5537 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parser` gem. +# Please instead update this file by running `bin/tapioca gem parser`. + + +# @api public +# +# source://parser//lib/parser.rb#19 +module Parser; end + +# @api public +# +# source://parser//lib/parser.rb#24 +module Parser::AST; end + +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# source://parser//lib/parser/ast/node.rb#17 +class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @api public + # @option properties + # @param properties [Hash] + # + # source://parser//lib/parser/ast/node.rb#30 + def assign_properties(properties); end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#20 + def loc; end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def location; end +end + +# @api public +# +# source://parser//lib/parser/ast/processor.rb#9 +class Parser::AST::Processor + include ::AST::Processor::Mixin + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 + def on_alias(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#222 + def on_and(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#67 + def on_and_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#122 + def on_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#148 + def on_arg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#103 + def on_args(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#105 + def on_argument(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#22 + def on_array(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#258 + def on_array_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#259 + def on_array_pattern_with_tail(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#42 + def on_back_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#240 + def on_begin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#195 + def on_block(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#151 + def on_block_pass(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#125 + def on_blockarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#150 + def on_blockarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#213 + def on_break(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#228 + def on_case(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#246 + def on_case_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#89 + def on_casgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#157 + def on_class(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#81 + def on_const(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#261 + def on_const_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#190 + def on_csend(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#41 + def on_cvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#65 + def on_cvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#160 + def on_def(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#219 + def on_defined?(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#169 + def on_defs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#16 + def on_dstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#17 + def on_dsym(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#231 + def on_eflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#288 + def on_empty_else(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#238 + def on_ensure(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#27 + def on_erange(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#262 + def on_find_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#210 + def on_for(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#130 + def on_forward_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#154 + def on_forwarded_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#153 + def on_forwarded_restarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#40 + def on_gvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#64 + def on_gvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#24 + def on_hash(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#260 + def on_hash_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#225 + def on_if(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#251 + def on_if_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#230 + def on_iflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#247 + def on_in_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#250 + def on_in_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#192 + def on_index(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#193 + def on_indexasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#26 + def on_irange(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#39 + def on_ivar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#63 + def on_ivasgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#127 + def on_kwarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#25 + def on_kwargs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#241 + def on_kwbegin(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#128 + def on_kwoptarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#129 + def on_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#21 + def on_kwsplat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#196 + def on_lambda(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#38 + def on_lvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#62 + def on_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#79 + def on_masgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#256 + def on_match_alt(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#257 + def on_match_as(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#233 + def on_match_current_line(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#248 + def on_match_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#249 + def on_match_pattern_p(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#254 + def on_match_rest(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#253 + def on_match_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#234 + def on_match_with_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#78 + def on_mlhs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#156 + def on_module(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#214 + def on_next(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#221 + def on_not(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#43 + def on_nth_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#198 + def on_numblock(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#70 + def on_op_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#123 + def on_optarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#223 + def on_or(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#68 + def on_or_asgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#23 + def on_pair(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#255 + def on_pin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#244 + def on_postexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#243 + def on_preexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#132 + def on_procarg0(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#215 + def on_redo(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#18 + def on_regexp(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#236 + def on_resbody(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#237 + def on_rescue(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#124 + def on_restarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#149 + def on_restarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#216 + def on_retry(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#212 + def on_return(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#158 + def on_sclass(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#181 + def on_send(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#126 + def on_shadowarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#20 + def on_splat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#217 + def on_super(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#178 + def on_undef(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#252 + def on_unless_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#208 + def on_until(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#209 + def on_until_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#29 + def on_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#45 + def on_vasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#227 + def on_when(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#206 + def on_while(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#207 + def on_while_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#19 + def on_xstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#218 + def on_yield(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#118 + def process_argument_node(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#12 + def process_regular_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#58 + def process_var_asgn_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#34 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# source://parser//lib/parser/base.rb#19 +class Parser::Base < ::Racc::Parser + # @api public + # @param builder [Parser::Builders::Default] The AST builder to use. + # @return [Base] a new instance of Base + # + # source://parser//lib/parser/base.rb#129 + def initialize(builder = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#117 + def builder; end + + # @api public + # + # source://parser//lib/parser/base.rb#120 + def context; end + + # @api public + # + # source://parser//lib/parser/base.rb#122 + def current_arg_stack; end + + # @api public + # @return [Parser::Diagnostic::Engine] + # + # source://parser//lib/parser/base.rb#116 + def diagnostics; end + + # @api public + # + # source://parser//lib/parser/base.rb#115 + def lexer; end + + # @api public + # + # source://parser//lib/parser/base.rb#121 + def max_numparam_stack; end + + # Parses a source buffer and returns the AST, or `nil` in case of a non fatal error. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] The source buffer to parse. + # @return [Parser::AST::Node, nil] + # + # source://parser//lib/parser/base.rb#189 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # @api public + # @return [Array] + # @see #parse + # @see Parser::Source::Comment#associate + # + # source://parser//lib/parser/base.rb#207 + def parse_with_comments(source_buffer); end + + # @api public + # + # source://parser//lib/parser/base.rb#124 + def pattern_hash_keys; end + + # @api public + # + # source://parser//lib/parser/base.rb#123 + def pattern_variables; end + + # Resets the state of the parser. + # + # @api public + # + # source://parser//lib/parser/base.rb#170 + def reset; end + + # @api public + # + # source://parser//lib/parser/base.rb#119 + def source_buffer; end + + # @api public + # @return [Parser::StaticEnvironment] + # + # source://parser//lib/parser/base.rb#118 + def static_env; end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. In case of a fatal error, a {SyntaxError} + # is raised, unless `recover` is true. In case of an error + # (non-fatal or recovered), `nil` is returned instead of the AST, and + # comments as well as tokens are only returned up to the location of + # the error. + # + # Currently, token stream format returned by #tokenize is not documented, + # but is considered part of a public API and only changed according + # to Semantic Versioning. + # + # However, note that the exact token composition of various constructs + # might vary. For example, a string `"foo"` is represented equally well + # by `:tSTRING_BEG " :tSTRING_CONTENT foo :tSTRING_END "` and + # `:tSTRING "foo"`; such details must not be relied upon. + # + # @api public + # @param recover [Boolean] If true, recover from syntax errors. False by default. + # @param source_buffer [Parser::Source::Buffer] + # @return [Array] + # + # source://parser//lib/parser/base.rb#236 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + private + + # @api public + # + # source://parser//lib/parser/base.rb#260 + def check_kwarg_name(name_t); end + + # @api public + # + # source://parser//lib/parser/base.rb#269 + def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end + + # @api public + # + # source://parser//lib/parser/base.rb#254 + def next_token; end + + # @api public + # + # source://parser//lib/parser/base.rb#285 + def on_error(error_token_id, error_value, value_stack); end + + class << self + # @api public + # @return [Parser::Base] parser with the default options set. + # + # source://parser//lib/parser/base.rb#87 + def default_parser; end + + # Parses a string of Ruby code and returns the AST. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse('puts "hello"') + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @param string [String] The block of code to parse. + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/base.rb#33 + def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Parses Ruby source code by reading it from a file. If the source + # cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Parser::AST::Node] + # @see #parse + # + # source://parser//lib/parser/base.rb#67 + def parse_file(filename); end + + # Parses Ruby source code by reading it from a file and returns the AST and + # comments. If the source cannot be parsed, {SyntaxError} is raised and a + # diagnostic is printed to `stderr`. + # + # @api public + # @param filename [String] Path to the file to parse. + # @return [Array] + # @see #parse + # + # source://parser//lib/parser/base.rb#80 + def parse_file_with_comments(filename); end + + # Parses a string of Ruby code and returns the AST and comments. If the + # source cannot be parsed, {SyntaxError} is raised and a diagnostic is + # printed to `stderr`. + # + # @api public + # @example + # Parser::Base.parse_with_comments('puts "hello"') + # @param file [String] The name of the file the code originated from. + # @param line [Numeric] The initial line number. + # @param string [String] The block of code to parse. + # @return [Array] + # + # source://parser//lib/parser/base.rb#52 + def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end + + private + + # @api public + # + # source://parser//lib/parser/base.rb#100 + def setup_source_buffer(file, line, string, encoding); end + end +end + +# @api public +# +# source://parser//lib/parser.rb#78 +module Parser::Builders; end + +# source://parser//lib/parser/builders/default.rb#8 +class Parser::Builders::Default + # source://parser//lib/parser/builders/default.rb#243 + def initialize; end + + # source://parser//lib/parser/builders/default.rb#703 + def __ENCODING__(__ENCODING__t); end + + # source://parser//lib/parser/builders/default.rb#348 + def __FILE__(__FILE__t); end + + # source://parser//lib/parser/builders/default.rb#312 + def __LINE__(__LINE__t); end + + # source://parser//lib/parser/builders/default.rb#622 + def accessible(node); end + + # source://parser//lib/parser/builders/default.rb#878 + def alias(alias_t, to, from); end + + # source://parser//lib/parser/builders/default.rb#917 + def arg(name_t); end + + # source://parser//lib/parser/builders/default.rb#1007 + def arg_expr(expr); end + + # source://parser//lib/parser/builders/default.rb#887 + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#440 + def array(begin_t, elements, end_t); end + + # source://parser//lib/parser/builders/default.rb#1598 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#767 + def assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#712 + def assignable(node); end + + # source://parser//lib/parser/builders/default.rb#540 + def associate(begin_t, pairs, end_t); end + + # source://parser//lib/parser/builders/default.rb#1175 + def attr_asgn(receiver, dot_t, selector_t); end + + # source://parser//lib/parser/builders/default.rb#612 + def back_ref(token); end + + # source://parser//lib/parser/builders/default.rb#1443 + def begin(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1385 + def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1461 + def begin_keyword(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1213 + def binary_op(receiver, operator_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1122 + def block(method_call, begin_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1161 + def block_pass(amper_t, arg); end + + # source://parser//lib/parser/builders/default.rb#982 + def blockarg(amper_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1027 + def blockarg_expr(amper_t, expr); end + + # source://parser//lib/parser/builders/default.rb#1113 + def call_lambda(lambda_t); end + + # source://parser//lib/parser/builders/default.rb#1096 + def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1068 + def call_type_for_dot(dot_t); end + + # source://parser//lib/parser/builders/default.rb#1318 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1481 + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#343 + def character(char_t); end + + # source://parser//lib/parser/builders/default.rb#284 + def complex(complex_t); end + + # source://parser//lib/parser/builders/default.rb#1431 + def compstmt(statements); end + + # source://parser//lib/parser/builders/default.rb#1294 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # source://parser//lib/parser/builders/default.rb#1300 + def condition_mod(if_true, if_false, cond_t, cond); end + + # source://parser//lib/parser/builders/default.rb#686 + def const(name_t); end + + # source://parser//lib/parser/builders/default.rb#698 + def const_fetch(scope, t_colon2, name_t); end + + # source://parser//lib/parser/builders/default.rb#691 + def const_global(t_colon3, name_t); end + + # source://parser//lib/parser/builders/default.rb#763 + def const_op_assignable(node); end + + # source://parser//lib/parser/builders/default.rb#1628 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # source://parser//lib/parser/builders/default.rb#607 + def cvar(token); end + + # source://parser//lib/parser/builders/default.rb#388 + def dedent_string(node, dedent_level); end + + # source://parser//lib/parser/builders/default.rb#814 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#845 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#863 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#837 + def def_method(def_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#827 + def def_module(module_t, name, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#821 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#853 + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#237 + def emit_file_line_as_literals; end + + # source://parser//lib/parser/builders/default.rb#237 + def emit_file_line_as_literals=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#265 + def false(false_t); end + + # source://parser//lib/parser/builders/default.rb#1619 + def find_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#276 + def float(float_t); end + + # source://parser//lib/parser/builders/default.rb#1339 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#913 + def forward_arg(dots_t); end + + # source://parser//lib/parser/builders/default.rb#903 + def forward_only_args(begin_t, dots_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1084 + def forwarded_args(dots_t); end + + # source://parser//lib/parser/builders/default.rb#1092 + def forwarded_kwrestarg(dstar_t); end + + # source://parser//lib/parser/builders/default.rb#1088 + def forwarded_restarg(star_t); end + + # source://parser//lib/parser/builders/default.rb#596 + def gvar(token); end + + # source://parser//lib/parser/builders/default.rb#1592 + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#586 + def ident(token); end + + # source://parser//lib/parser/builders/default.rb#1508 + def if_guard(if_t, if_body); end + + # source://parser//lib/parser/builders/default.rb#1487 + def in_match(lhs, in_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1502 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#1184 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1198 + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#272 + def integer(integer_t); end + + # source://parser//lib/parser/builders/default.rb#591 + def ivar(token); end + + # source://parser//lib/parser/builders/default.rb#1347 + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#944 + def kwarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#970 + def kwnilarg(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#951 + def kwoptarg(name_t, value); end + + # source://parser//lib/parser/builders/default.rb#958 + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#535 + def kwsplat(dstar_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1287 + def logical_op(type, lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1325 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1330 + def loop_mod(type, body, keyword_t, cond); end + + # source://parser//lib/parser/builders/default.rb#1642 + def match_alt(left, pipe_t, right); end + + # source://parser//lib/parser/builders/default.rb#1649 + def match_as(value, assoc_t, as); end + + # source://parser//lib/parser/builders/default.rb#1528 + def match_hash_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1542 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # source://parser//lib/parser/builders/default.rb#1680 + def match_label(label_type, label); end + + # source://parser//lib/parser/builders/default.rb#1656 + def match_nil_pattern(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#1235 + def match_op(receiver, match_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1661 + def match_pair(label_type, label, value); end + + # source://parser//lib/parser/builders/default.rb#1492 + def match_pattern(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1497 + def match_pattern_p(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1581 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1516 + def match_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1624 + def match_with_trailing_comma(match, comma_t); end + + # source://parser//lib/parser/builders/default.rb#805 + def multi_assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#800 + def multi_lhs(begin_t, items, end_t); end + + # source://parser//lib/parser/builders/default.rb#255 + def nil(nil_t); end + + # source://parser//lib/parser/builders/default.rb#1263 + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#617 + def nth_ref(token); end + + # source://parser//lib/parser/builders/default.rb#899 + def numargs(max_numparam); end + + # source://parser//lib/parser/builders/default.rb#1038 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1052 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1166 + def objc_varargs(pair, rest_of_varargs); end + + # source://parser//lib/parser/builders/default.rb#774 + def op_assign(lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#924 + def optarg(name_t, eql_t, value); end + + # source://parser//lib/parser/builders/default.rb#488 + def pair(key, assoc_t, value); end + + # source://parser//lib/parser/builders/default.rb#505 + def pair_keyword(key_t, value); end + + # source://parser//lib/parser/builders/default.rb#521 + def pair_label(key_t); end + + # source://parser//lib/parser/builders/default.rb#493 + def pair_list_18(list); end + + # source://parser//lib/parser/builders/default.rb#513 + def pair_quoted(begin_t, parts, end_t, value); end + + # source://parser//lib/parser/builders/default.rb#225 + def parser; end + + # source://parser//lib/parser/builders/default.rb#225 + def parser=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#1637 + def pin(pin_t, var); end + + # source://parser//lib/parser/builders/default.rb#1370 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#1365 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#992 + def procarg0(arg); end + + # source://parser//lib/parser/builders/default.rb#572 + def range_exclusive(lhs, dot3_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#567 + def range_inclusive(lhs, dot2_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#280 + def rational(rational_t); end + + # source://parser//lib/parser/builders/default.rb#426 + def regexp_compose(begin_t, parts, end_t, options); end + + # source://parser//lib/parser/builders/default.rb#417 + def regexp_options(regopt_t); end + + # source://parser//lib/parser/builders/default.rb#1377 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # source://parser//lib/parser/builders/default.rb#933 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1016 + def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#581 + def self(token); end + + # source://parser//lib/parser/builders/default.rb#975 + def shadowarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#445 + def splat(star_t, arg = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#319 + def string(string_t); end + + # source://parser//lib/parser/builders/default.rb#329 + def string_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#324 + def string_internal(string_t); end + + # source://parser//lib/parser/builders/default.rb#355 + def symbol(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#365 + def symbol_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#360 + def symbol_internal(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#469 + def symbols_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#1305 + def ternary(cond, question_t, if_true, colon_t, if_false); end + + # source://parser//lib/parser/builders/default.rb#260 + def true(true_t); end + + # source://parser//lib/parser/builders/default.rb#294 + def unary_num(unary_t, numeric); end + + # source://parser//lib/parser/builders/default.rb#1251 + def unary_op(op_t, receiver); end + + # source://parser//lib/parser/builders/default.rb#873 + def undef_method(undef_t, names); end + + # source://parser//lib/parser/builders/default.rb#1512 + def unless_guard(unless_t, unless_body); end + + # source://parser//lib/parser/builders/default.rb#1312 + def when(when_t, patterns, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#455 + def word(parts); end + + # source://parser//lib/parser/builders/default.rb#464 + def words_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#381 + def xstring_compose(begin_t, parts, end_t); end + + private + + # source://parser//lib/parser/builders/default.rb#1829 + def arg_name_collides?(this_name, that_name); end + + # source://parser//lib/parser/builders/default.rb#2025 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1999 + def binary_op_map(left_e, op_t, right_e); end + + # source://parser//lib/parser/builders/default.rb#2127 + def block_map(receiver_l, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1804 + def check_assignment_to_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1696 + def check_condition(cond); end + + # source://parser//lib/parser/builders/default.rb#1775 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1750 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1862 + def check_duplicate_pattern_key(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1852 + def check_duplicate_pattern_variable(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1844 + def check_lvar_name(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1819 + def check_reserved_for_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#2293 + def collapse_string_parts?(parts); end + + # source://parser//lib/parser/builders/default.rb#1950 + def collection_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2154 + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + + # source://parser//lib/parser/builders/default.rb#1985 + def constant_map(scope, colon2_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#2058 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1891 + def delimited_string_map(string_t); end + + # source://parser//lib/parser/builders/default.rb#2315 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2198 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # source://parser//lib/parser/builders/default.rb#2064 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # source://parser//lib/parser/builders/default.rb#1946 + def expr_map(loc); end + + # source://parser//lib/parser/builders/default.rb#2179 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#2226 + def guard_map(keyword_t, guard_body_e); end + + # source://parser//lib/parser/builders/default.rb#2116 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1882 + def join_exprs(left_expr, right_expr); end + + # source://parser//lib/parser/builders/default.rb#2132 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # source://parser//lib/parser/builders/default.rb#2149 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # source://parser//lib/parser/builders/default.rb#2035 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2346 + def kwargs?(node); end + + # source://parser//lib/parser/builders/default.rb#2310 + def loc(token); end + + # source://parser//lib/parser/builders/default.rb#2048 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1874 + def n(type, children, source_map); end + + # source://parser//lib/parser/builders/default.rb#1878 + def n0(type, source_map); end + + # source://parser//lib/parser/builders/default.rb#288 + def numeric(kind, token); end + + # source://parser//lib/parser/builders/default.rb#1916 + def pair_keyword_map(key_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1931 + def pair_quoted_map(begin_t, end_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1902 + def prefix_string_map(symbol); end + + # source://parser//lib/parser/builders/default.rb#2013 + def range_map(start_e, op_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1980 + def regexp_map(begin_t, end_t, options_e); end + + # source://parser//lib/parser/builders/default.rb#2185 + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + + # source://parser//lib/parser/builders/default.rb#2336 + def rewrite_hash_args_to_kwargs(args); end + + # source://parser//lib/parser/builders/default.rb#2098 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # source://parser//lib/parser/builders/default.rb#2121 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#2072 + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2104 + def send_unary_op_map(selector_t, arg_e); end + + # source://parser//lib/parser/builders/default.rb#2257 + def static_regexp(parts, options); end + + # source://parser//lib/parser/builders/default.rb#2282 + def static_regexp_node(node); end + + # source://parser//lib/parser/builders/default.rb#2240 + def static_string(nodes); end + + # source://parser//lib/parser/builders/default.rb#1966 + def string_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2302 + def string_value(token); end + + # source://parser//lib/parser/builders/default.rb#2174 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1887 + def token_map(token); end + + # source://parser//lib/parser/builders/default.rb#2003 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1911 + def unquoted_map(token); end + + # source://parser//lib/parser/builders/default.rb#2324 + def validate_definee(definee); end + + # source://parser//lib/parser/builders/default.rb#1789 + def validate_no_forward_arg_after_restarg(args); end + + # source://parser//lib/parser/builders/default.rb#2298 + def value(token); end + + # source://parser//lib/parser/builders/default.rb#2092 + def var_send_map(variable_e); end + + # source://parser//lib/parser/builders/default.rb#1995 + def variable_map(name_t); end + + class << self + # source://parser//lib/parser/builders/default.rb#97 + def emit_arg_inside_procarg0; end + + # source://parser//lib/parser/builders/default.rb#97 + def emit_arg_inside_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#58 + def emit_encoding; end + + # source://parser//lib/parser/builders/default.rb#58 + def emit_encoding=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#126 + def emit_forward_arg; end + + # source://parser//lib/parser/builders/default.rb#126 + def emit_forward_arg=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#80 + def emit_index; end + + # source://parser//lib/parser/builders/default.rb#80 + def emit_index=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#174 + def emit_kwargs; end + + # source://parser//lib/parser/builders/default.rb#174 + def emit_kwargs=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#22 + def emit_lambda; end + + # source://parser//lib/parser/builders/default.rb#22 + def emit_lambda=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#203 + def emit_match_pattern; end + + # source://parser//lib/parser/builders/default.rb#203 + def emit_match_pattern=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#40 + def emit_procarg0; end + + # source://parser//lib/parser/builders/default.rb#40 + def emit_procarg0=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#211 + def modernize; end + end +end + +# {Parser::ClobberingError} is raised when {Parser::Source::Rewriter} +# detects a clobbering rewrite action. This class inherits {RuntimeError} +# rather than {StandardError} for backward compatibility. +# +# @api public +# +# source://parser//lib/parser/clobbering_error.rb#11 +class Parser::ClobberingError < ::RuntimeError; end + +# Context of parsing that is represented by a stack of scopes. +# +# Supported states: +# + :class - in the class body (class A; end) +# + :module - in the module body (module M; end) +# + :sclass - in the singleton class body (class << obj; end) +# + :def - in the method body (def m; end) +# + :defs - in the singleton method body (def self.m; end) +# + :def_open_args - in the arglist of the method definition +# keep in mind that it's set **only** after reducing the first argument, +# if you need to handle the first argument check `lex_state == expr_fname` +# + :block - in the block body (tap {}) +# + :lambda - in the lambda body (-> {}) +# +# source://parser//lib/parser/context.rb#18 +class Parser::Context + # @return [Context] a new instance of Context + # + # source://parser//lib/parser/context.rb#30 + def initialize; end + + # source://parser//lib/parser/context.rb#45 + def cant_return; end + + # source://parser//lib/parser/context.rb#45 + def cant_return=(_arg0); end + + # source://parser//lib/parser/context.rb#45 + def in_argdef; end + + # source://parser//lib/parser/context.rb#45 + def in_argdef=(_arg0); end + + # source://parser//lib/parser/context.rb#45 + def in_block; end + + # source://parser//lib/parser/context.rb#45 + def in_block=(_arg0); end + + # source://parser//lib/parser/context.rb#45 + def in_class; end + + # source://parser//lib/parser/context.rb#45 + def in_class=(_arg0); end + + # source://parser//lib/parser/context.rb#45 + def in_def; end + + # source://parser//lib/parser/context.rb#45 + def in_def=(_arg0); end + + # source://parser//lib/parser/context.rb#45 + def in_defined; end + + # source://parser//lib/parser/context.rb#45 + def in_defined=(_arg0); end + + # @return [Boolean] + # + # source://parser//lib/parser/context.rb#47 + def in_dynamic_block?; end + + # source://parser//lib/parser/context.rb#45 + def in_kwarg; end + + # source://parser//lib/parser/context.rb#45 + def in_kwarg=(_arg0); end + + # source://parser//lib/parser/context.rb#45 + def in_lambda; end + + # source://parser//lib/parser/context.rb#45 + def in_lambda=(_arg0); end + + # source://parser//lib/parser/context.rb#34 + def reset; end +end + +# source://parser//lib/parser/context.rb#19 +Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) + +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# source://parser//lib/parser/current_arg_stack.rb#14 +class Parser::CurrentArgStack + # @api private + # @return [CurrentArgStack] a new instance of CurrentArgStack + # + # source://parser//lib/parser/current_arg_stack.rb#17 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/current_arg_stack.rb#22 + def empty?; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#34 + def pop; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#26 + def push(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#38 + def reset; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#30 + def set(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#15 + def stack; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#42 + def top; end +end + +# @api private +# +# source://parser//lib/parser/deprecation.rb#7 +module Parser::Deprecation + # @api private + # + # source://parser//lib/parser/deprecation.rb#9 + def warn_of_deprecation; end + + # @api private + # + # source://parser//lib/parser/deprecation.rb#8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# source://parser//lib/parser/diagnostic.rb#31 +class Parser::Diagnostic + # @api public + # @param arguments [Hash] + # @param highlights [Array] + # @param level [Symbol] + # @param location [Parser::Source::Range] + # @param reason [Symbol] + # @return [Diagnostic] a new instance of Diagnostic + # + # source://parser//lib/parser/diagnostic.rb#49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # @api public + # @return [Symbol] extended arguments that describe the error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def arguments; end + + # Supplementary error-related source ranges. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#40 + def highlights; end + + # @api public + # @return [Symbol] diagnostic level + # @see LEVELS + # + # source://parser//lib/parser/diagnostic.rb#39 + def level; end + + # Main error-related source range. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#40 + def location; end + + # @api public + # @return [String] the rendered message. + # + # source://parser//lib/parser/diagnostic.rb#69 + def message; end + + # @api public + # @return [Symbol] reason for error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @api public + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# source://parser//lib/parser/diagnostic/engine.rb#36 +class Parser::Diagnostic::Engine + # source://parser//lib/parser/diagnostic/engine.rb#45 + def initialize(consumer = T.unsafe(nil)); end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal; end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer; end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings; end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#64 + def process(diagnostic); end + + protected + + # source://parser//lib/parser/diagnostic/engine.rb#86 + def ignore?(diagnostic); end + + # source://parser//lib/parser/diagnostic/engine.rb#97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @api public +# @return [Array] +# +# source://parser//lib/parser/diagnostic.rb#37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# source://parser//lib/parser/lexer-F1.rb#82 +class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8419 + def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start; end + + # Sets the attribute command_start + # + # @param value the value to set the attribute command_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cond_stack; end + + # source://parser//lib/parser/lexer-F1.rb#8281 + def construct_float(chars); end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8414 + def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8367 + def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32; end + + # Sets the attribute force_utf32 + # + # @param value the value to set the attribute force_utf32 to. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8401 + def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8410 + def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8396 + def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8405 + def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8290 + def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 + def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8343 + def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8388 + def state; end + + # source://parser//lib/parser/lexer-F1.rb#8392 + def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env; end + + # Sets the attribute static_env + # + # @param value the value to set the attribute static_env to. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def version; end + + protected + + # source://parser//lib/parser/lexer-F1.rb#14701 + def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14763 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14725 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14731 + def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14675 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14784 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14812 + def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14709 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14721 + def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14691 + def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14774 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14792 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14800 + def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14822 + def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14685 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14740 + def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14759 + def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14671 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14662 + def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14667 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14658 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_expr_arg. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg; end + + # Sets the attribute lex_en_expr_arg + # + # @param value the value to set the attribute lex_en_expr_arg to. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg=(_arg0); end + + # Returns the value of attribute lex_en_expr_beg. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg; end + + # Sets the attribute lex_en_expr_beg + # + # @param value the value to set the attribute lex_en_expr_beg to. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg=(_arg0); end + + # Returns the value of attribute lex_en_expr_cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg; end + + # Sets the attribute lex_en_expr_cmdarg + # + # @param value the value to set the attribute lex_en_expr_cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot; end + + # Sets the attribute lex_en_expr_dot + # + # @param value the value to set the attribute lex_en_expr_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot=(_arg0); end + + # Returns the value of attribute lex_en_expr_end. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end; end + + # Sets the attribute lex_en_expr_end + # + # @param value the value to set the attribute lex_en_expr_end to. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end=(_arg0); end + + # Returns the value of attribute lex_en_expr_endarg. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg; end + + # Sets the attribute lex_en_expr_endarg + # + # @param value the value to set the attribute lex_en_expr_endarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_endfn. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn; end + + # Sets the attribute lex_en_expr_endfn + # + # @param value the value to set the attribute lex_en_expr_endfn to. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn=(_arg0); end + + # Returns the value of attribute lex_en_expr_fname. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname; end + + # Sets the attribute lex_en_expr_fname + # + # @param value the value to set the attribute lex_en_expr_fname to. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname=(_arg0); end + + # Returns the value of attribute lex_en_expr_labelarg. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg; end + + # Sets the attribute lex_en_expr_labelarg + # + # @param value the value to set the attribute lex_en_expr_labelarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_mid. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid; end + + # Sets the attribute lex_en_expr_mid + # + # @param value the value to set the attribute lex_en_expr_mid to. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid=(_arg0); end + + # Returns the value of attribute lex_en_expr_value. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value; end + + # Sets the attribute lex_en_expr_value + # + # @param value the value to set the attribute lex_en_expr_value to. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value=(_arg0); end + + # Returns the value of attribute lex_en_expr_variable. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable; end + + # Sets the attribute lex_en_expr_variable + # + # @param value the value to set the attribute lex_en_expr_variable to. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable=(_arg0); end + + # Returns the value of attribute lex_en_inside_string. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string; end + + # Sets the attribute lex_en_inside_string + # + # @param value the value to set the attribute lex_en_inside_string to. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string=(_arg0); end + + # Returns the value of attribute lex_en_leading_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot; end + + # Sets the attribute lex_en_leading_dot + # + # @param value the value to set the attribute lex_en_leading_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot=(_arg0); end + + # Returns the value of attribute lex_en_line_begin. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin; end + + # Sets the attribute lex_en_line_begin + # + # @param value the value to set the attribute lex_en_line_begin to. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin=(_arg0); end + + # Returns the value of attribute lex_en_line_comment. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment; end + + # Sets the attribute lex_en_line_comment + # + # @param value the value to set the attribute lex_en_line_comment to. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs=(_arg0); end + end +end + +# source://parser//lib/parser/lexer/dedenter.rb#5 +class Parser::Lexer::Dedenter + # source://parser//lib/parser/lexer/dedenter.rb#9 + def initialize(dedent_level); end + + # source://parser//lib/parser/lexer/dedenter.rb#36 + def dedent(string); end + + # source://parser//lib/parser/lexer/dedenter.rb#83 + def interrupt; end +end + +# source://parser//lib/parser/lexer/dedenter.rb#7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer-F1.rb#14869 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14855 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14862 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8371 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#6 +class Parser::Lexer::Literal + # source://parser//lib/parser/lexer/literal.rb#42 + def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#116 + def backslash_delimited?; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def dedent_level; end + + # source://parser//lib/parser/lexer/literal.rb#191 + def end_interp_brace_and_try_closing; end + + # source://parser//lib/parser/lexer/literal.rb#218 + def extend_content; end + + # source://parser//lib/parser/lexer/literal.rb#222 + def extend_space(ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#197 + def extend_string(string, ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#204 + def flush_string; end + + # source://parser//lib/parser/lexer/literal.rb#104 + def heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def heredoc_e; end + + # source://parser//lib/parser/lexer/literal.rb#168 + def infer_indent_level(line); end + + # source://parser//lib/parser/lexer/literal.rb#91 + def interpolate?; end + + # source://parser//lib/parser/lexer/literal.rb#124 + def munge_escape?(character); end + + # source://parser//lib/parser/lexer/literal.rb#134 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#108 + def plain_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#100 + def regexp?; end + + # source://parser//lib/parser/lexer/literal.rb#40 + def saved_herebody_s; end + + # source://parser//lib/parser/lexer/literal.rb#40 + def saved_herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer/literal.rb#112 + def squiggly_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#187 + def start_interp_brace; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def str_s; end + + # source://parser//lib/parser/lexer/literal.rb#232 + def supports_line_continuation_via_slash?; end + + # source://parser//lib/parser/lexer/literal.rb#120 + def type; end + + # source://parser//lib/parser/lexer/literal.rb#95 + def words?; end + + protected + + # source://parser//lib/parser/lexer/literal.rb#263 + def clear_buffer; end + + # source://parser//lib/parser/lexer/literal.rb#259 + def coerce_encoding(string); end + + # source://parser//lib/parser/lexer/literal.rb#238 + def delimiter?(delimiter); end + + # source://parser//lib/parser/lexer/literal.rb#279 + def emit(token, type, s, e); end + + # source://parser//lib/parser/lexer/literal.rb#274 + def emit_start_tok; end +end + +# source://parser//lib/parser/lexer/literal.rb#7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#11 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# source://parser//lib/parser/lexer-F1.rb#14829 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14849 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/stack_state.rb#5 +class Parser::Lexer::StackState + # source://parser//lib/parser/lexer/stack_state.rb#6 + def initialize(name); end + + # source://parser//lib/parser/lexer/stack_state.rb#34 + def active?; end + + # source://parser//lib/parser/lexer/stack_state.rb#11 + def clear; end + + # source://parser//lib/parser/lexer/stack_state.rb#38 + def empty?; end + + # source://parser//lib/parser/lexer/stack_state.rb#46 + def inspect; end + + # source://parser//lib/parser/lexer/stack_state.rb#29 + def lexpop; end + + # source://parser//lib/parser/lexer/stack_state.rb#22 + def pop; end + + # source://parser//lib/parser/lexer/stack_state.rb#15 + def push(bit); end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 +class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 + def initialize(lexer, version); end + + # source://parser//lib/parser/lexer-strings.rb#3339 + def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 + def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 + def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 + def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 + def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 + def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 + def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 + def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 + def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 + def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts=(_arg0); end + + protected + + # source://parser//lib/parser/lexer-strings.rb#5406 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5417 + def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 + def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5396 + def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5373 + def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 + def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 + def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5384 + def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 + def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 + def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 + def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5364 + def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 + def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 + def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 + def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 + def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 + def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5356 + def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5388 + def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5392 + def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 + def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 + def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited; end + + # Sets the attribute lex_en_interp_backslash_delimited + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words; end + + # Sets the attribute lex_en_interp_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string; end + + # Sets the attribute lex_en_interp_string + # + # @param value the value to set the attribute lex_en_interp_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words; end + + # Sets the attribute lex_en_interp_words + # + # @param value the value to set the attribute lex_en_interp_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited; end + + # Sets the attribute lex_en_plain_backslash_delimited + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words; end + + # Sets the attribute lex_en_plain_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string; end + + # Sets the attribute lex_en_plain_string + # + # @param value the value to set the attribute lex_en_plain_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words; end + + # Sets the attribute lex_en_plain_words + # + # @param value the value to set the attribute lex_en_plain_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers; end + + # Sets the attribute lex_en_regexp_modifiers + # + # @param value the value to set the attribute lex_en_regexp_modifiers to. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs=(_arg0); end + end +end + +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5423 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @api public +# @see Diagnostic +# +# source://parser//lib/parser/messages.rb#11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#8 +class Parser::MaxNumparamStack + # @api private + # @return [MaxNumparamStack] a new instance of MaxNumparamStack + # + # source://parser//lib/parser/max_numparam_stack.rb#13 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#17 + def empty?; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#29 + def has_numparams?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#21 + def has_ordinary_params!; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#25 + def has_ordinary_params?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#45 + def pop; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#41 + def push(static:); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#33 + def register(numparam); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#9 + def stack; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#37 + def top; end + + private + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#51 + def set(value); end +end + +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://parser//lib/parser/messages.rb#112 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # source://parser//lib/parser/messages.rb#119 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# source://parser//lib/parser/meta.rb#5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# Includes node types that are only emitted by the prism parser translator. +# +# source://parser//lib/parser/meta.rb#17 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# These are node types required by `Prism::Translation::Parser`, +# which has advanced syntax support ahead of the Parser gem. +# +# source://parser//lib/parser/meta.rb#9 +Parser::Meta::PRISM_TRANSLATION_PARSER_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# source://parser//lib/parser/rewriter.rb#14 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # @api public + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/rewriter.rb#98 + def initialize(*_arg0); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/rewriter.rb#38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#67 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param ast [Parser::AST::Node] + # @param source_buffer [Parser::Source::Buffer] + # @return [String] + # + # source://parser//lib/parser/rewriter.rb#23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#57 + def wrap(range, before, after); end +end + +# @api public +# +# source://parser//lib/parser/rewriter.rb#91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser.rb#30 +module Parser::Source; end + +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 +class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer + # + # source://parser//lib/parser/source/buffer.rb#110 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#247 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#222 + def decompose_position(position); end + + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line + # + # source://parser//lib/parser/source/buffer.rb#26 + def first_line; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#317 + def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#323 + def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#312 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line + # + # source://parser//lib/parser/source/buffer.rb#236 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] + # + # source://parser//lib/parser/source/buffer.rb#289 + def line_range(lineno); end + + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. + # + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#185 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#136 + def read; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#199 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code + # + # source://parser//lib/parser/source/buffer.rb#150 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#167 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#278 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#257 + def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#303 + def source_range; end + + private + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#353 + def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#330 + def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#344 + def line_index_for_position(position); end + + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#52 + def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#95 + def reencode_string(input); end + end +end + +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://parser//lib/parser/source/comment.rb#67 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @api public + # @param other [Object] + # @return [Boolean] + # + # source://parser//lib/parser/source/comment.rb#120 + def ==(other); end + + # @api public + # @return [Boolean] true if this is a block comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#109 + def document?; end + + # @api public + # @return [Boolean] true if this is an inline comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#101 + def inline?; end + + # @api public + # @return [String] a human-readable representation of this comment + # + # source://parser//lib/parser/source/comment.rb#128 + def inspect; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#21 + def loc; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def location; end + + # @api public + # @return [String] + # + # source://parser//lib/parser/source/comment.rb#18 + def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @api public + # @return [Symbol] + # + # source://parser//lib/parser/source/comment.rb#89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @api public + # @deprecated Use {associate_locations}. + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # + # source://parser//lib/parser/source/comment.rb#32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # source://parser//lib/parser/source/comment.rb#59 + def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # source://parser//lib/parser/source/comment.rb#46 + def associate_locations(ast, comments); end + end +end + +# source://parser//lib/parser/source/comment/associator.rb#45 +class Parser::Source::Comment::Associator + # source://parser//lib/parser/source/comment/associator.rb#51 + def initialize(ast, comments); end + + # source://parser//lib/parser/source/comment/associator.rb#92 + def associate; end + + # source://parser//lib/parser/source/comment/associator.rb#115 + def associate_by_identity; end + + # source://parser//lib/parser/source/comment/associator.rb#104 + def associate_locations; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives=(_arg0); end + + private + + # source://parser//lib/parser/source/comment/associator.rb#182 + def advance_comment; end + + # source://parser//lib/parser/source/comment/associator.rb#214 + def advance_through_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#206 + def associate_and_advance_comment(node); end + + # source://parser//lib/parser/source/comment/associator.rb#123 + def children_in_source_order(node); end + + # source://parser//lib/parser/source/comment/associator.rb#187 + def current_comment_before?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#194 + def current_comment_before_end?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#201 + def current_comment_decorates?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#135 + def do_associate; end + + # source://parser//lib/parser/source/comment/associator.rb#166 + def process_leading_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#173 + def process_trailing_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#148 + def visit(node); end +end + +# source://parser//lib/parser/source/comment/associator.rb#212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# source://parser//lib/parser/source/comment/associator.rb#122 +Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) + +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @api public +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# source://parser//lib/parser/source/map.rb#70 +class Parser::Source::Map + # @api public + # @param expression [Range] + # @return [Map] a new instance of Map + # + # source://parser//lib/parser/source/map.rb#76 + def initialize(expression); end + + # Compares source maps. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/map.rb#140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#109 + def column; end + + # @api public + # @return [Range] + # + # source://parser//lib/parser/source/map.rb#72 + def expression; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#103 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#117 + def last_line; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def line; end + + # The node that is described by this map. Nodes and maps have 1:1 correspondence. + # + # @api public + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/source/map.rb#71 + def node; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#89 + def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @api public + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # @return [Hash] + # + # source://parser//lib/parser/source/map.rb#166 + def to_hash; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#132 + def with_expression(expression_l); end + + protected + + # @api public + # + # source://parser//lib/parser/source/map.rb#180 + def update_expression(expression_l); end + + # @api public + # + # source://parser//lib/parser/source/map.rb#176 + def with(&block); end + + private + + # @api private + # + # source://parser//lib/parser/source/map.rb#82 + def initialize_copy(other); end +end + +# source://parser//lib/parser/source/map/collection.rb#6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # source://parser//lib/parser/source/map/collection.rb#10 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/collection.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/collection.rb#8 + def end; end +end + +# source://parser//lib/parser/source/map/condition.rb#6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/condition.rb#12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/condition.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/condition.rb#9 + def else; end + + # source://parser//lib/parser/source/map/condition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/condition.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/constant.rb#6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # source://parser//lib/parser/source/map/constant.rb#11 + def initialize(double_colon, name, expression); end + + # source://parser//lib/parser/source/map/constant.rb#7 + def double_colon; end + + # source://parser//lib/parser/source/map/constant.rb#8 + def name; end + + # source://parser//lib/parser/source/map/constant.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/constant.rb#20 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/constant.rb#26 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/definition.rb#6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/definition.rb#12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # source://parser//lib/parser/source/map/definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/for.rb#6 +class Parser::Source::Map::For < ::Parser::Source::Map + # source://parser//lib/parser/source/map/for.rb#10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/for.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/for.rb#8 + def end; end + + # source://parser//lib/parser/source/map/for.rb#7 + def in; end + + # source://parser//lib/parser/source/map/for.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/heredoc.rb#6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # source://parser//lib/parser/source/map/heredoc.rb#10 + def initialize(begin_l, body_l, end_l); end + + # source://parser//lib/parser/source/map/heredoc.rb#7 + def heredoc_body; end + + # source://parser//lib/parser/source/map/heredoc.rb#8 + def heredoc_end; end +end + +# source://parser//lib/parser/source/map/index.rb#6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # source://parser//lib/parser/source/map/index.rb#11 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/index.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/index.rb#8 + def end; end + + # source://parser//lib/parser/source/map/index.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/index.rb#21 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/index.rb#27 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/keyword.rb#6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # source://parser//lib/parser/source/map/keyword.rb#11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/keyword.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/keyword.rb#9 + def end; end + + # source://parser//lib/parser/source/map/keyword.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/method_definition.rb#6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/method_definition.rb#13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # source://parser//lib/parser/source/map/method_definition.rb#11 + def assignment; end + + # source://parser//lib/parser/source/map/method_definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/method_definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/method_definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/method_definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/objc_kwarg.rb#6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # source://parser//lib/parser/source/map/objc_kwarg.rb#11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#9 + def argument; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/operator.rb#6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # source://parser//lib/parser/source/map/operator.rb#9 + def initialize(operator, expression); end + + # source://parser//lib/parser/source/map/operator.rb#7 + def operator; end +end + +# source://parser//lib/parser/source/map/rescue_body.rb#6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # source://parser//lib/parser/source/map/rescue_body.rb#11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # source://parser//lib/parser/source/map/rescue_body.rb#8 + def assoc; end + + # source://parser//lib/parser/source/map/rescue_body.rb#9 + def begin; end + + # source://parser//lib/parser/source/map/rescue_body.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/send.rb#6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # source://parser//lib/parser/source/map/send.rb#13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/send.rb#10 + def begin; end + + # source://parser//lib/parser/source/map/send.rb#7 + def dot; end + + # source://parser//lib/parser/source/map/send.rb#11 + def end; end + + # source://parser//lib/parser/source/map/send.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/send.rb#8 + def selector; end + + # source://parser//lib/parser/source/map/send.rb#24 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/send.rb#30 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/ternary.rb#6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # source://parser//lib/parser/source/map/ternary.rb#10 + def initialize(question_l, colon_l, expression_l); end + + # source://parser//lib/parser/source/map/ternary.rb#8 + def colon; end + + # source://parser//lib/parser/source/map/ternary.rb#7 + def question; end +end + +# source://parser//lib/parser/source/map/variable.rb#6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # source://parser//lib/parser/source/map/variable.rb#10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # source://parser//lib/parser/source/map/variable.rb#7 + def name; end + + # source://parser//lib/parser/source/map/variable.rb#8 + def operator; end + + # source://parser//lib/parser/source/map/variable.rb#19 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/variable.rb#25 + def update_operator(operator_l); end +end + +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @api public +# +# source://parser//lib/parser/source/range.rb#26 +class Parser::Source::Range + include ::Comparable + + # @api public + # @param begin_pos [Integer] + # @param end_pos [Integer] + # @param source_buffer [Buffer] + # @return [Range] a new instance of Range + # + # source://parser//lib/parser/source/range.rb#37 + def initialize(source_buffer, begin_pos, end_pos); end + + # Compare ranges, first by begin_pos, then by end_pos. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#301 + def <=>(other); end + + # by the given amount(s) + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # + # source://parser//lib/parser/source/range.rb#193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @api public + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # source://parser//lib/parser/source/range.rb#55 + def begin; end + + # @api public + # @return [Integer] index of the first character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def begin_pos; end + + # @api public + # @return [Integer] zero-based column number of the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#92 + def column; end + + # @api public + # @raise RangeError + # @return [::Range] a range of columns spanned by this range. + # + # source://parser//lib/parser/source/range.rb#114 + def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#274 + def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#262 + def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#286 + def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#294 + def empty?; end + + # @api public + # @return [Range] a zero-length range located just after the end + # of this range. + # + # source://parser//lib/parser/source/range.rb#63 + def end; end + + # @api public + # @return [Integer] index of the character after the last character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def end_pos; end + + # @api public + # + # source://parser//lib/parser/source/range.rb#308 + def eql?(_arg0); end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#87 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#313 + def hash; end + + # @api public + # @return [String] a human-readable representation of this range. + # + # source://parser//lib/parser/source/range.rb#320 + def inspect; end + + # @api public + # @param other [Range] + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # source://parser//lib/parser/source/range.rb#220 + def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#141 + def is?(*what); end + + # @api public + # @param other [Range] + # @return [Range] smallest possible range spanning both this range and `other`. + # + # source://parser//lib/parser/source/range.rb#209 + def join(other); end + + # @api public + # @return [Integer] zero-based column number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#106 + def last_column; end + + # @api public + # @return [Integer] line number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#99 + def last_line; end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#74 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @api public + # @param other [Range] + # @return [Boolean] `true` if this range and `other` overlap + # + # source://parser//lib/parser/source/range.rb#250 + def overlaps?(other); end + + # @api public + # @param new_size [Integer] + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # source://parser//lib/parser/source/range.rb#201 + def resize(new_size); end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def size; end + + # @api public + # @return [String] all source code covered by this range. + # + # source://parser//lib/parser/source/range.rb#132 + def source; end + + # @api public + # @return [Parser::Source::Buffer] + # + # source://parser//lib/parser/source/range.rb#29 + def source_buffer; end + + # @api public + # @return [String] a line of source code containing the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#125 + def source_line; end + + # @api public + # @return [Array] a set of character indexes contained in this range. + # + # source://parser//lib/parser/source/range.rb#148 + def to_a; end + + # @api public + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # source://parser//lib/parser/source/range.rb#155 + def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/range.rb#173 + def to_s; end + + # to the given value(s). + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # + # source://parser//lib/parser/source/range.rb#184 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @api public +# @deprecated Use {TreeRewriter} +# +# source://parser//lib/parser/source/rewriter.rb#31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @api public + # @deprecated Use {TreeRewriter} + # @param source_buffer [Source::Buffer] + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/source/rewriter.rb#39 + def initialize(source_buffer); end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/rewriter.rb#33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#131 + def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#80 + def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#117 + def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @deprecated Use {TreeRewriter#process} + # @return [String] + # + # source://parser//lib/parser/source/rewriter.rb#178 + def process; end + + # Removes the source range. + # + # @api public + # @deprecated Use {TreeRewriter#remove} + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @deprecated Use {TreeRewriter#replace} + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#167 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/rewriter.rb#32 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @api public + # @deprecated Use {TreeRewriter#transaction} + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # + # source://parser//lib/parser/source/rewriter.rb#216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#wrap} + # @param after [String] + # @param before [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#94 + def wrap(range, before, after); end + + private + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#476 + def active_clobber; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#484 + def active_clobber=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#480 + def active_insertions; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#492 + def active_insertions=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#472 + def active_queue; end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#500 + def adjacent?(range1, range2); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#351 + def adjacent_insertion_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#366 + def adjacent_insertions?(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#347 + def adjacent_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#377 + def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#280 + def append(action); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#389 + def can_merge?(action, existing); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#355 + def clobbered_insertion?(insertion); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#343 + def clobbered_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#468 + def in_transaction?; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#410 + def merge_actions(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#419 + def merge_actions!(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#425 + def merge_replacements(actions); end + + # @api public + # @raise [ClobberingError] + # + # source://parser//lib/parser/source/rewriter.rb#450 + def raise_clobber_error(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#335 + def record_insertion(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#339 + def record_replace(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#445 + def replace_actions(old, updated); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# source://parser//lib/parser/source/rewriter/action.rb#9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # source://parser//lib/parser/source/rewriter/action.rb#15 + def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + + # source://parser//lib/parser/source/rewriter/action.rb#24 + def <=>(other); end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions; end + + # source://parser//lib/parser/source/rewriter/action.rb#13 + def allow_multiple_insertions?; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def order; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def range; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def replacement; end + + # source://parser//lib/parser/source/rewriter/action.rb#30 + def to_s; end +end + +# @api public +# +# source://parser//lib/parser/source/rewriter.rb#504 +Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @api public + # @param source_buffer [Source::Buffer] + # @return [TreeRewriter] a new instance of TreeRewriter + # + # source://parser//lib/parser/source/tree_rewriter.rb#98 + def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @api public + # @return [Array<(Symbol, Range, String{, String})>] + # + # source://parser//lib/parser/source/tree_rewriter.rb#299 + def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @api public + # @return [Array] an ordered list of pairs of range & replacement + # + # source://parser//lib/parser/source/tree_rewriter.rb#281 + def as_replacements; end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/tree_rewriter.rb#93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#125 + def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @api public + # @param offset [Integer] + # @param rewriter [TreeRewriter] from different source_buffer + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @api public + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @api public + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#342 + def insert_before_multi(range, text); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#334 + def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] merge of receiver and argument + # + # source://parser//lib/parser/source/tree_rewriter.rb#155 + def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#139 + def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/tree_rewriter.rb#252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @api public + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param content [String] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#193 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/tree_rewriter.rb#92 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @api public + # @raise [RuntimeError] when no block is passed + # + # source://parser//lib/parser/source/tree_rewriter.rb#310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @api public + # @param insert_after [String, nil] + # @param insert_before [String, nil] + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#206 + def wrap(range, insert_before, insert_after); end + + protected + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#365 + def action_root; end + + private + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#369 + def action_summary; end + + # @api public + # @raise [ArgumentError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#392 + def check_policy_validity; end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#404 + def check_range_validity(range); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#397 + def combine(range, attributes); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#411 + def enforce_policy(event); end + + # @api public + # @raise [Parser::ClobberingError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/source/tree_rewriter/action.rb#14 +class Parser::Source::TreeRewriter::Action + # source://parser//lib/parser/source/tree_rewriter/action.rb#17 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#29 + def combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#68 + def contract; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#34 + def empty?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def insert_after; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def insert_before; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#58 + def insertion?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#81 + def moved(source_buffer, offset); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#50 + def nested_actions; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#41 + def ordered_replacements; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def range; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def replacement; end + + protected + + # source://parser//lib/parser/source/tree_rewriter/action.rb#159 + def analyse_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#146 + def bsearch_child_index(from = T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#225 + def call_enforcer_for_merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#205 + def check_fusible(action, *fusible); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#95 + def children; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#130 + def combine_children(more_children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#103 + def do_combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#136 + def fuse_deletions(action, fusible, other_sibblings); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#216 + def merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#111 + def place_in_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#233 + def swallow(children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#97 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/static_environment.rb#5 +class Parser::StaticEnvironment + # @return [StaticEnvironment] a new instance of StaticEnvironment + # + # source://parser//lib/parser/static_environment.rb#17 + def initialize; end + + # source://parser//lib/parser/static_environment.rb#55 + def declare(name); end + + # Anonymous blockarg + # + # source://parser//lib/parser/static_environment.rb#77 + def declare_anonymous_blockarg; end + + # Anonymous kwresarg + # + # source://parser//lib/parser/static_environment.rb#113 + def declare_anonymous_kwrestarg; end + + # Anonymous restarg + # + # source://parser//lib/parser/static_environment.rb#95 + def declare_anonymous_restarg; end + + # Forward args + # + # source://parser//lib/parser/static_environment.rb#67 + def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#61 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#81 + def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#117 + def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#99 + def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#103 + def declared_anonymous_restarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#71 + def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#129 + def empty?; end + + # source://parser//lib/parser/static_environment.rb#33 + def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#26 + def extend_static; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#89 + def parent_has_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#125 + def parent_has_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#107 + def parent_has_anonymous_restarg?; end + + # source://parser//lib/parser/static_environment.rb#21 + def reset; end + + # source://parser//lib/parser/static_environment.rb#49 + def unextend; end +end + +# source://parser//lib/parser/static_environment.rb#15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#9 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#6 +Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) + +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# source://parser//lib/parser/syntax_error.rb#13 +class Parser::SyntaxError < ::StandardError + # @api public + # @return [SyntaxError] a new instance of SyntaxError + # + # source://parser//lib/parser/syntax_error.rb#16 + def initialize(diagnostic); end + + # @api public + # @return [Parser::Diagnostic] + # + # source://parser//lib/parser/syntax_error.rb#14 + def diagnostic; end +end + +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# source://parser//lib/parser/tree_rewriter.rb#51 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/tree_rewriter.rb#79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#108 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#128 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param ast [Parser::AST::Node] + # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @param source_buffer [Parser::Source::Buffer] + # @return [String] + # + # source://parser//lib/parser/tree_rewriter.rb#62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @api public + # @param content [String] + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#98 + def wrap(range, before, after); end +end + +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + +# source://parser//lib/parser/version.rb#4 +Parser::VERSION = T.let(T.unsafe(nil), String) + +# source://parser//lib/parser/variables_stack.rb#5 +class Parser::VariablesStack + # @return [VariablesStack] a new instance of VariablesStack + # + # source://parser//lib/parser/variables_stack.rb#6 + def initialize; end + + # source://parser//lib/parser/variables_stack.rb#27 + def declare(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#31 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#11 + def empty?; end + + # source://parser//lib/parser/variables_stack.rb#19 + def pop; end + + # source://parser//lib/parser/variables_stack.rb#15 + def push; end + + # source://parser//lib/parser/variables_stack.rb#23 + def reset; end +end diff --git a/sorbet/rbi/gems/pastel@0.8.0.rbi b/sorbet/rbi/gems/pastel@0.8.0.rbi new file mode 100644 index 0000000..8844fca --- /dev/null +++ b/sorbet/rbi/gems/pastel@0.8.0.rbi @@ -0,0 +1,733 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pastel` gem. +# Please instead update this file by running `bin/tapioca gem pastel`. + + +# source://pastel//lib/pastel/alias_importer.rb#3 +module Pastel + private + + # Create Pastel chainable API + # + # @api public + # @example + # pastel = Pastel.new enabled: true + # @param :eachline [Boolean] whether or not to wrap eachline with separate coloring + # @param :enabled [Boolean] whether or not to disable coloring + # @return [Delegator] + # + # source://pastel//lib/pastel.rb#31 + def new(enabled: T.unsafe(nil), eachline: T.unsafe(nil)); end + + class << self + # Create Pastel chainable API + # + # @api public + # @example + # pastel = Pastel.new enabled: true + # @param :eachline [Boolean] whether or not to wrap eachline with separate coloring + # @param :enabled [Boolean] whether or not to disable coloring + # @return [Delegator] + # + # source://pastel//lib/pastel.rb#41 + def new(enabled: T.unsafe(nil), eachline: T.unsafe(nil)); end + end +end + +# Mixin that provides ANSI codes +# +# source://pastel//lib/pastel/ansi.rb#5 +module Pastel::ANSI + private + + # source://pastel//lib/pastel/ansi.rb#62 + def background?(code); end + + # source://pastel//lib/pastel/ansi.rb#58 + def foreground?(code); end + + # source://pastel//lib/pastel/ansi.rb#66 + def style?(code); end + + class << self + # @return [Boolean] + # + # source://pastel//lib/pastel/ansi.rb#62 + def background?(code); end + + # @return [Boolean] + # + # source://pastel//lib/pastel/ansi.rb#58 + def foreground?(code); end + + # @return [Boolean] + # + # source://pastel//lib/pastel/ansi.rb#66 + def style?(code); end + end +end + +# source://pastel//lib/pastel/ansi.rb#6 +Pastel::ANSI::ATTRIBUTES = T.let(T.unsafe(nil), Hash) + +# A class responsible for importing color aliases +# +# source://pastel//lib/pastel/alias_importer.rb#5 +class Pastel::AliasImporter + # Create alias importer + # + # @api public + # @example + # importer = Pastel::AliasImporter.new(Pastel::Color.new, {}) + # @return [AliasImporter] a new instance of AliasImporter + # + # source://pastel//lib/pastel/alias_importer.rb#12 + def initialize(color, env, output = T.unsafe(nil)); end + + # Import aliases from the environment + # + # @api public + # @example + # importer = Pastel::AliasImporter.new(Pastel::Color.new, {}) + # importer.import + # @return [nil] + # + # source://pastel//lib/pastel/alias_importer.rb#27 + def import; end + + protected + + # Returns the value of attribute color. + # + # source://pastel//lib/pastel/alias_importer.rb#44 + def color; end + + # Returns the value of attribute env. + # + # source://pastel//lib/pastel/alias_importer.rb#44 + def env; end + + # Returns the value of attribute output. + # + # source://pastel//lib/pastel/alias_importer.rb#44 + def output; end +end + +# A class responsible for coloring strings. +# +# source://pastel//lib/pastel/color.rb#7 +class Pastel::Color + include ::Pastel::ANSI + + # Initialize a Terminal Color + # + # @api public + # @return [Color] a new instance of Color + # + # source://pastel//lib/pastel/color.rb#24 + def initialize(enabled: T.unsafe(nil), eachline: T.unsafe(nil)); end + + # Compare colors for equivalence of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/color.rb#235 + def ==(other); end + + # Define a new colors alias + # + # @api public + # @param alias_name [String] the colors alias to define + # @param color [Array[Symbol,String]] the colors the alias will correspond to + # @return [Array[String]] the standard color values of the alias + # + # source://pastel//lib/pastel/color.rb#206 + def alias_color(alias_name, *colors); end + + # Apply escape codes to the string + # + # @api private + # @param ansi_colors [Strin] the ansi colors to apply + # @param string [String] the string to apply escapes to + # @return [String] return the string surrounded by escape codes + # + # source://pastel//lib/pastel/color.rb#78 + def apply_codes(string, ansi_colors); end + + # Reset sequence + # + # @api public + # + # source://pastel//lib/pastel/color.rb#85 + def clear; end + + # Return raw color code without embeding it into a string. + # + # @api public + # @return [Array[String]] ANSI escape codes + # + # source://pastel//lib/pastel/color.rb#148 + def code(*colors); end + + # Check if string has color escape codes + # + # @api public + # @param string [String] the string to check for color strings + # @return [Boolean] true when string contains color codes, false otherwise + # + # source://pastel//lib/pastel/color.rb#117 + def colored?(string); end + + # Apply ANSI color to the given string. + # + # Wraps eachline with clear escape. + # + # @api public + # @example + # color.decorate "text", :yellow, :on_green, :underline + # @param colors [Array[Symbol]] the color names + # @param string [String] text to add ANSI strings + # @return [String] the colored string + # + # source://pastel//lib/pastel/color.rb#54 + def decorate(string, *colors); end + + # Disable coloring of this terminal session + # + # @api public + # + # source://pastel//lib/pastel/color.rb#33 + def disable!; end + + # Returns the value of attribute eachline. + # + # source://pastel//lib/pastel/color.rb#19 + def eachline; end + + # Returns the value of attribute enabled. + # + # source://pastel//lib/pastel/color.rb#16 + def enabled; end + + # Returns the value of attribute enabled. + # + # source://pastel//lib/pastel/color.rb#17 + def enabled?; end + + # Compare colors for equality of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/color.rb#225 + def eql?(other); end + + # Hash for this instance and its attributes + # + # @api public + # @return [Numeric] + # + # source://pastel//lib/pastel/color.rb#254 + def hash; end + + # Inspect this instance attributes + # + # @api public + # @return [String] + # + # source://pastel//lib/pastel/color.rb#245 + def inspect; end + + # Find the escape code for a given set of color attributes + # + # @api private + # @example + # color.lookup(:red, :on_green) # => "\e[31;42m" + # @param colors [Array[Symbol]] the list of color name(s) to lookup + # @raise [InvalidAttributeNameError] exception raised for any invalid color name + # @return [String] the ANSI code(s) + # + # source://pastel//lib/pastel/color.rb#136 + def lookup(*colors); end + + # Strip ANSI color codes from a string. + # + # Only ANSI color codes are removed, not movement codes or + # other escapes sequences are stripped. + # + # @api public + # @example + # strip("foo\e[1mbar\e[0m") # => "foobar" + # @param strings [Array[String]] a string or array of strings to sanitize + # @return [String] + # + # source://pastel//lib/pastel/color.rb#103 + def strip(*strings); end + + # List all available style names + # + # @api public + # @return [Array[Symbol]] + # + # source://pastel//lib/pastel/color.rb#175 + def style_names; end + + # Expose all ANSI color names and their codes + # + # @api public + # @return [Hash[Symbol]] + # + # source://pastel//lib/pastel/color.rb#166 + def styles; end + + # Check if provided colors are known colors + # + # @api public + # @example + # valid?(:red) # => true + # @param the [Array[Symbol,String]] list of colors to check + # @return [Boolean] true if all colors are valid, false otherwise + # + # source://pastel//lib/pastel/color.rb#191 + def valid?(*colors); end + + private + + # Check if value contains anything to style + # + # @api private + # @return [Boolean] + # + # source://pastel//lib/pastel/color.rb#265 + def blank?(value); end + + # @api private + # @raise [InvalidAttributeNameError] + # + # source://pastel//lib/pastel/color.rb#270 + def validate(*colors); end +end + +# All color aliases +# +# source://pastel//lib/pastel/color.rb#11 +Pastel::Color::ALIASES = T.let(T.unsafe(nil), Hash) + +# Match all color escape sequences +# +# source://pastel//lib/pastel/color.rb#14 +Pastel::Color::ANSI_COLOR_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Responsible for parsing color symbols out of text with color escapes +# +# Used internally by {Color}. +# +# @api private +# +# source://pastel//lib/pastel/color_parser.rb#13 +class Pastel::ColorParser + include ::Pastel::ANSI + + class << self + # Decide attribute name for ansi + # + # @api private + # @param ansi [Integer] the ansi escape code + # @return [Symbol] + # + # source://pastel//lib/pastel/color_parser.rb#104 + def attribute_name(ansi); end + + # Convert ANSI code to color name + # + # @api private + # @return [String] + # + # source://pastel//lib/pastel/color_parser.rb#119 + def color_name(ansi_code); end + + # Parse color escape sequences into a list of hashes + # corresponding to the color attributes being set by these + # sequences + # + # @api public + # @example + # parse("\e[32mfoo\e[0m") + # # => [{foreground: :green, text: "foo"} + # @param text [String] the text to parse for presence of color ansi codes + # @return [Array[Hash[Symbol,String]]] + # + # source://pastel//lib/pastel/color_parser.rb#33 + def parse(text); end + + # Remove from current stack all ansi codes + # + # @api private + # @param ansi_stack [Array[Integer]] the stack with all the ansi codes + # @yield [Symbol, Symbol] attr, name + # + # source://pastel//lib/pastel/color_parser.rb#90 + def unpack_ansi(ansi_stack); end + end +end + +# @api private +# +# source://pastel//lib/pastel/color_parser.rb#17 +Pastel::ColorParser::CSI = T.let(T.unsafe(nil), String) + +# @api private +# +# source://pastel//lib/pastel/color_parser.rb#16 +Pastel::ColorParser::ESC = T.let(T.unsafe(nil), String) + +# Contains logic for resolving styles applied to component +# +# Used internally by {Delegator}. +# +# @api private +# +# source://pastel//lib/pastel/color_resolver.rb#11 +class Pastel::ColorResolver + # Initialize ColorResolver + # + # @api private + # @param color [Color] + # @return [ColorResolver] a new instance of ColorResolver + # + # source://pastel//lib/pastel/color_resolver.rb#21 + def initialize(color); end + + # The color instance + # + # @api public + # + # source://pastel//lib/pastel/color_resolver.rb#14 + def color; end + + # Resolve uncolored string + # + # @api private + # + # source://pastel//lib/pastel/color_resolver.rb#28 + def resolve(base, unprocessed_string); end +end + +# Collects a list of decorators for styling a string +# +# @api private +# +# source://pastel//lib/pastel/decorator_chain.rb#7 +class Pastel::DecoratorChain + include ::Enumerable + + # Create a decorator chain + # + # @api public + # @return [DecoratorChain] a new instance of DecoratorChain + # + # source://pastel//lib/pastel/decorator_chain.rb#22 + def initialize(decorators = T.unsafe(nil)); end + + # Compare colors for equivalence of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/decorator_chain.rb#60 + def ==(other); end + + # Add decorator + # + # @api public + # @param decorator [String] + # + # source://pastel//lib/pastel/decorator_chain.rb#31 + def add(decorator); end + + # Iterate over list of decorators + # + # @api public + # + # source://pastel//lib/pastel/decorator_chain.rb#42 + def each(&block); end + + # Compare colors for equality of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/decorator_chain.rb#51 + def eql?(other); end + + # Hash for this instance and its attributes + # + # @api public + # @return [Numeric] + # + # source://pastel//lib/pastel/decorator_chain.rb#78 + def hash; end + + # Inspect this instance attributes + # + # @api public + # @return [String] + # + # source://pastel//lib/pastel/decorator_chain.rb#69 + def inspect; end + + protected + + # @api private + # + # source://pastel//lib/pastel/decorator_chain.rb#84 + def decorators; end + + class << self + # Create an empty decorator chain + # + # @api public + # @return [DecoratorChain] + # + # source://pastel//lib/pastel/decorator_chain.rb#15 + def empty; end + end +end + +# Wrapes the {DecoratorChain} to allow for easy resolution +# of string coloring. +# +# @api private +# +# source://pastel//lib/pastel/delegator.rb#13 +class Pastel::Delegator + extend ::Forwardable + + # Create Delegator + # + # Used internally by {Pastel} + # + # @api private + # @param chain [DecoratorChain] + # @param resolver [ColorResolver] + # @return [Delegator] a new instance of Delegator + # + # source://pastel//lib/pastel/delegator.rb#38 + def initialize(resolver, chain); end + + # Compare delegated objects for equivalence of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/delegator.rb#57 + def ==(other); end + + # source://pastel//lib/pastel/delegator.rb#16 + def alias_color(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#16 + def colored?(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#16 + def decorate(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#16 + def enabled?(*args, **_arg1, &block); end + + # Compare delegated objects for equality of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/delegator.rb#48 + def eql?(other); end + + # Hash for this instance and its attributes + # + # @api public + # @return [Numeric] + # + # source://pastel//lib/pastel/delegator.rb#76 + def hash; end + + # Object string representation + # + # @api + # @return [String] + # + # source://pastel//lib/pastel/delegator.rb#66 + def inspect; end + + # source://pastel//lib/pastel/delegator.rb#16 + def lookup(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#19 + def parse(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#16 + def strip(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#16 + def styles(*args, **_arg1, &block); end + + # Object string representation + # + # @api + # @return [String] + # + # source://pastel//lib/pastel/delegator.rb#69 + def to_s; end + + # @api private + # + # source://pastel//lib/pastel/delegator.rb#20 + def undecorate(*args, **_arg1, &block); end + + # source://pastel//lib/pastel/delegator.rb#16 + def valid?(*args, **_arg1, &block); end + + protected + + # @api private + # + # source://pastel//lib/pastel/delegator.rb#82 + def chain; end + + # Evaluate color block + # + # @api private + # + # source://pastel//lib/pastel/delegator.rb#112 + def evaluate_block(&block); end + + # Handles color method calls + # + # @api private + # + # source://pastel//lib/pastel/delegator.rb#89 + def method_missing(method_name, *args, &block); end + + # @api private + # + # source://pastel//lib/pastel/delegator.rb#84 + def resolver; end + + private + + # Check if color is valid + # + # @api private + # @return [Boolean] + # + # source://pastel//lib/pastel/delegator.rb#104 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end + + class << self + # Wrap resolver and chain + # + # @api public + # + # source://pastel//lib/pastel/delegator.rb#25 + def wrap(resolver, chain = T.unsafe(nil)); end + end +end + +# A class representing detached color +# +# source://pastel//lib/pastel/detached.rb#5 +class Pastel::Detached + # Initialize a detached object + # + # @api private + # @param color [Pastel::Color] the color instance + # @param styles [Array[Symbol]] the styles to be applied + # @return [Detached] a new instance of Detached + # + # source://pastel//lib/pastel/detached.rb#14 + def initialize(color, *styles); end + + # Compare detached objects for equivalence of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/detached.rb#57 + def ==(other); end + + # Decorate the values corresponding to styles + # + # @api public + # @example + # Detached(Color.new, :red, :bold).call("hello") + # # => "\e[31mhello\e[0m" + # @param value [String] the stirng to decorate with styles + # @return [String] + # + # source://pastel//lib/pastel/detached.rb#36 + def [](*args); end + + # Decorate the values corresponding to styles + # + # @api public + # @example + # Detached(Color.new, :red, :bold).call("hello") + # # => "\e[31mhello\e[0m" + # @param value [String] the stirng to decorate with styles + # @return [String] + # + # source://pastel//lib/pastel/detached.rb#32 + def call(*args); end + + # Compare detached objects for equality of attributes + # + # @api public + # @return [Boolean] + # + # source://pastel//lib/pastel/detached.rb#48 + def eql?(other); end + + # Hash for this instance and its attributes + # + # @api public + # @return [Numeric] + # + # source://pastel//lib/pastel/detached.rb#75 + def hash; end + + # Inspect this instance attributes + # + # @api public + # @return [String] + # + # source://pastel//lib/pastel/detached.rb#66 + def inspect; end + + # @api public + # + # source://pastel//lib/pastel/detached.rb#39 + def to_proc; end + + protected + + # @api private + # + # source://pastel//lib/pastel/detached.rb#82 + def styles; end +end + +# Raised when the color alias is not supported +# +# source://pastel//lib/pastel.rb#16 +class Pastel::InvalidAliasNameError < ::ArgumentError; end + +# Raised when the style attribute is not supported +# +# source://pastel//lib/pastel.rb#13 +class Pastel::InvalidAttributeNameError < ::ArgumentError; end + +# source://pastel//lib/pastel/version.rb#4 +Pastel::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/prism@1.9.0.rbi b/sorbet/rbi/gems/prism@1.9.0.rbi new file mode 100644 index 0000000..961de89 --- /dev/null +++ b/sorbet/rbi/gems/prism@1.9.0.rbi @@ -0,0 +1,43373 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + + +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/dsl.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/visitor.rbi.erb +# if you are looking to modify the template +# =end + +# We keep these shims in here because our client libraries might not have parser +# in their bundle. +module Parser; end + +class Parser::Base; end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# source://prism//lib/prism.rb#9 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> LexCompat::Result + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#65 + sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::load(source, serialized, freeze) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#73 + sig { params(source: String, serialized: String, freeze: T.nilable(T::Boolean)).returns(Prism::ParseResult) } + def load(source, serialized, freeze = T.unsafe(nil)); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_failure?(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap + # when it is available. + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_file_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_file_failure?(*_arg0); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # @return [Boolean] + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_stream API by using the serialization API. + def parse_stream(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # @return [Boolean] + def parse_success?(*_arg0); end + + # Mirror the Prism.profile API by using the serialization API. + def profile(*_arg0); end + + # Mirror the Prism.profile_file API by using the serialization API. + def profile_file(*_arg0); end + + # Create a new scope with the given locals and forwarding options that is + # suitable for passing into one of the Prism.* methods that accepts the + # `scopes` option. + # + # source://prism//lib/prism/parse_result.rb#904 + sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).returns(Prism::Scope) } + def scope(locals: T.unsafe(nil), forwarding: T.unsafe(nil)); end + end +end + +# Specialized version of Prism::Source for source code that includes ASCII +# characters only. This class is used to apply performance optimizations that +# cannot be applied to sources that include multibyte characters. +# +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# eagerly converted to UTF-8, this class will be used as well. This is because +# at that point we will treat everything as single-byte characters. +# +# source://prism//lib/prism/parse_result.rb#250 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#257 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#252 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Returns a cache that is the identity function in order to maintain the + # same interface. We can do this because code units are always equivalent to + # byte offsets for ASCII-only sources. + # + # source://prism//lib/prism/parse_result.rb#274 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentially the same as `Prism::Source#column`. + # + # source://prism//lib/prism/parse_result.rb#281 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#267 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#334 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # Initialize a new AliasGlobalVariableNode node. + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#336 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#437 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#347 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#352 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#370 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#365 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#375 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#380 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#383 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [new_name] + # + # source://prism//lib/prism/node.rb#357 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#421 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#416 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#403 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the global variable that can be used after aliasing. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#391 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } + def new_name; end + + # Represents the old name of the global variable that can be used before aliasing. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#397 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end + def old_name; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#411 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#426 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#431 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#449 +class Prism::AliasMethodNode < ::Prism::Node + # Initialize a new AliasMethodNode node. + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#451 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#564 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#462 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#467 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#485 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#480 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#490 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#495 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#498 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [new_name] + # + # source://prism//lib/prism/node.rb#472 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#548 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#543 + sig { returns(String) } + def keyword; end + + # Represents the location of the `alias` keyword. + # + # alias foo bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#530 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#512 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } + def new_name; end + + # Represents the old name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#524 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end + def old_name; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#538 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#553 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#558 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#576 +class Prism::AlternationPatternNode < ::Prism::Node + # Initialize a new AlternationPatternNode node. + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#578 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#679 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#589 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#594 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#607 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#622 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [left] + # + # source://prism//lib/prism/node.rb#599 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#663 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. + # + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#633 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#658 + sig { returns(String) } + def operator; end + + # Represents the alternation operator location. + # + # foo => bar | baz + # ^ + # + # source://prism//lib/prism/node.rb#645 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#639 + sig { returns(Prism::Node) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#653 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#668 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#673 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#691 +class Prism::AndNode < ::Prism::Node + # Initialize a new AndNode node. + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#693 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#800 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#704 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#709 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#727 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#722 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode + # + # source://prism//lib/prism/node.rb#732 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#737 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#740 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [left] + # + # source://prism//lib/prism/node.rb#714 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#784 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # source://prism//lib/prism/node.rb#751 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#779 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#766 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#760 + sig { returns(Prism::Node) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#774 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#789 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#794 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#812 +class Prism::ArgumentsNode < ::Prism::Node + # Initialize a new ArgumentsNode node. + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#814 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, arguments); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#910 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#823 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The list of arguments, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo(bar, baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#891 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#828 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#845 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#840 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_forwarding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#863 + sig { returns(T::Boolean) } + def contains_forwarding?; end + + # def contains_keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#873 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#868 + sig { returns(T::Boolean) } + def contains_keywords?; end + + # def contains_multiple_splats?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#883 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#878 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#850 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } + # + # source://prism//lib/prism/node.rb#858 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#833 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#894 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#899 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#904 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#19780 +module Prism::ArgumentsNodeFlags; end + +# if the arguments contain forwarding +# +# source://prism//lib/prism/node.rb#19782 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords +# +# source://prism//lib/prism/node.rb#19785 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a keyword splat +# +# source://prism//lib/prism/node.rb#19788 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# if the arguments contain multiple splats +# +# source://prism//lib/prism/node.rb#19794 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# source://prism//lib/prism/node.rb#19791 +Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#922 +class Prism::ArrayNode < ::Prism::Node + # Initialize a new ArrayNode node. + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#924 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1057 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#935 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#940 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1036 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#1012 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#957 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#952 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#975 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode + # + # source://prism//lib/prism/node.rb#962 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#967 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#970 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#945 + def each_child_node; end + + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. + # + # source://prism//lib/prism/node.rb#980 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1041 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1031 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#988 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1026 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1002 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1046 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1051 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#19798 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#19800 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *bar +# ^^^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1083 +class Prism::ArrayPatternNode < ::Prism::Node + # Initialize a new ArrayPatternNode node. + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#1085 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1247 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1099 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1104 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1226 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the closing location of the array pattern. + # + # foo in [1, 2] + # ^ + # + # source://prism//lib/prism/node.rb#1202 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1129 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1119 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the optional constant preceding the Array + # + # foo in Bar[] + # ^^^ + # + # foo in Bar[1, 2, 3] + # ^^^ + # + # foo in Bar::Baz[1, 2, 3] + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1156 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#1134 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1139 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#1142 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [constant] + # + # source://prism//lib/prism/node.rb#1109 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1231 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1221 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the opening location of the array pattern. + # + # foo in [1, 2] + # ^ + # + # source://prism//lib/prism/node.rb#1180 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the elements after the rest element of the array pattern. + # + # foo in *bar, baz + # ^^^ + # + # source://prism//lib/prism/node.rb#1174 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # Represents the required elements of the array pattern. + # + # foo in [1, 2] + # ^ ^ + # + # source://prism//lib/prism/node.rb#1162 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # Represents the rest element of the array pattern. + # + # foo in *bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#1168 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1216 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1194 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1236 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1241 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#1264 +class Prism::AssocNode < ::Prism::Node + # Initialize a new AssocNode node. + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#1266 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, key, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1382 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1277 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1282 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1300 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1295 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode + # + # source://prism//lib/prism/node.rb#1305 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1310 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } + # + # source://prism//lib/prism/node.rb#1313 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [key] + # + # source://prism//lib/prism/node.rb#1287 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1366 + sig { override.returns(String) } + def inspect; end + + # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1327 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1361 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1342 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1356 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1371 + sig { override.returns(Symbol) } + def type; end + + # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # source://prism//lib/prism/node.rb#1336 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1376 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1394 +class Prism::AssocSplatNode < ::Prism::Node + # Initialize a new AssocSplatNode node. + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#1396 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1491 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1406 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1411 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1430 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1423 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#1435 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1440 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#1443 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#1416 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1475 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1470 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1457 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1465 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1480 + sig { override.returns(Symbol) } + def type; end + + # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. + # + # { **foo } + # ^^^ + # + # source://prism//lib/prism/node.rb#1451 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1485 + def type; end + end +end + +# The FFI backend is used on other Ruby implementations. +# +# source://prism//lib/prism.rb#90 +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://prism//lib/prism/node.rb#1502 +class Prism::BackReferenceReadNode < ::Prism::Node + # Initialize a new BackReferenceReadNode node. + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1504 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1575 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1513 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1518 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1534 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1529 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1539 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1544 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#1547 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#1523 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1559 + sig { override.returns(String) } + def inspect; end + + # The name of the back-reference variable, including the leading `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # source://prism//lib/prism/node.rb#1556 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1564 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1569 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#17 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#20 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#26 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#32 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1587 +class Prism::BeginNode < ::Prism::Node + # Initialize a new BeginNode node. + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1589 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1745 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1603 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1719 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # Represents the location of the `begin` keyword. + # + # begin x end + # ^^^^^ + # + # source://prism//lib/prism/node.rb#1654 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1608 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1633 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1623 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode + # + # source://prism//lib/prism/node.rb#1638 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#1646 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#1613 + def each_child_node; end + + # Represents the else clause within the begin block. + # + # begin x; rescue y; else z; end + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#1688 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1724 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # begin x end + # ^^^ + # + # source://prism//lib/prism/node.rb#1700 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # Represents the ensure clause within the begin block. + # + # begin x; ensure y; end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1694 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1729 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#80 + def newline_flag!(lines); end + + # Represents the rescue clause within the begin block. + # + # begin x; rescue y; end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1682 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # Save the begin_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1668 + def save_begin_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1714 + def save_end_keyword_loc(repository); end + + # Represents the statements within the begin block. + # + # begin x end + # ^ + # + # source://prism//lib/prism/node.rb#1676 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1734 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1739 + def type; end + end +end + +# Represents a block argument using `&`. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1760 +class Prism::BlockArgumentNode < ::Prism::Node + # Initialize a new BlockArgumentNode node. + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, expression, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1772 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1777 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1796 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1789 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1801 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#1809 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [expression] + # + # source://prism//lib/prism/node.rb#1782 + def each_child_node; end + + # The expression that is being passed as a block argument. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo(&args) + # ^^^^^ + # + # source://prism//lib/prism/node.rb#1817 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1841 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1836 + sig { returns(String) } + def operator; end + + # Represents the location of the `&` operator. + # + # foo(&args) + # ^ + # + # source://prism//lib/prism/node.rb#1823 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#1831 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1851 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1868 +class Prism::BlockLocalVariableNode < ::Prism::Node + # Initialize a new BlockLocalVariableNode node. + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1870 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1945 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1879 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1884 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1900 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1895 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1905 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#1913 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#1889 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1929 + sig { override.returns(String) } + def inspect; end + + # The name of the block local variable. + # + # a { |; b| } # name `:b` + # ^ + # + # source://prism//lib/prism/node.rb#1926 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1918 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1934 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1939 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1956 +class Prism::BlockNode < ::Prism::Node + # Initialize a new BlockNode node. + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1958 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2095 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1971 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The body of the block. + # + # [1, 2, 3].each { |i| puts x } + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#2034 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#1976 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#2074 + sig { returns(String) } + def closing; end + + # Represents the location of the closing `}` or `end`. + # + # [1, 2, 3].each { |i| puts x } + # ^ + # + # source://prism//lib/prism/node.rb#2056 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1997 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1989 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode + # + # source://prism//lib/prism/node.rb#2002 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2007 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#2010 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [parameters] + # + # source://prism//lib/prism/node.rb#1981 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2079 + sig { override.returns(String) } + def inspect; end + + # The local variables declared in the block. + # + # [1, 2, 3].each { |i| puts x } # locals: [:i] + # ^ + # + # source://prism//lib/prism/node.rb#2018 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#2069 + sig { returns(String) } + def opening; end + + # Represents the location of the opening `{` or `do`. + # + # [1, 2, 3].each { |i| puts x } + # ^ + # + # source://prism//lib/prism/node.rb#2040 + sig { returns(Prism::Location) } + def opening_loc; end + + # The parameters of the block. + # + # [1, 2, 3].each { |i| puts x } + # ^^^ + # [1, 2, 3].each { puts _1 } + # ^^^^^^^^^^^ + # [1, 2, 3].each { puts it } + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#2028 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2064 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2048 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2084 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2089 + def type; end + end +end + +# Represents a block parameter of a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#2111 +class Prism::BlockParameterNode < ::Prism::Node + # Initialize a new BlockParameterNode node. + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#2113 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2235 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2124 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2129 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2145 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2140 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#2150 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2155 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#2158 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#2134 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2219 + sig { override.returns(String) } + def inspect; end + + # The name of the block parameter. + # + # def a(&b) # name `:b` + # ^ + # end + # + # source://prism//lib/prism/node.rb#2172 + sig { returns(T.nilable(Symbol)) } + def name; end + + # Represents the location of the block parameter name. + # + # def a(&b) + # ^ + # + # source://prism//lib/prism/node.rb#2178 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2214 + sig { returns(String) } + def operator; end + + # Represents the location of the `&` operator. + # + # def a(&b) + # ^ + # end + # + # source://prism//lib/prism/node.rb#2201 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2163 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2192 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2209 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2224 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2229 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#2252 +class Prism::BlockParametersNode < ::Prism::Node + # Initialize a new BlockParametersNode node. + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#2254 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2408 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2266 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2271 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2387 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the closing location of the block parameters. + # + # -> (a, b = 1; local) { } + # ^ + # + # foo do |a, b = 1; local| + # ^ + # end + # + # source://prism//lib/prism/node.rb#2363 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2292 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2284 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#2297 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2302 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#2305 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [parameters] + # + # source://prism//lib/prism/node.rb#2276 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2392 + sig { override.returns(String) } + def inspect; end + + # Represents the local variables of the block. + # + # -> (a, b = 1; local) { } + # ^^^^^ + # + # foo do |a, b = 1; local| + # ^^^^^ + # end + # + # source://prism//lib/prism/node.rb#2327 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2382 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the opening location of the block parameters. + # + # -> (a, b = 1; local) { } + # ^ + # + # foo do |a, b = 1; local| + # ^ + # end + # + # source://prism//lib/prism/node.rb#2337 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the parameters of the block. + # + # -> (a, b = 1; local) { } + # ^^^^^^^^ + # + # foo do |a, b = 1; local| + # ^^^^^^^^ + # end + # + # source://prism//lib/prism/node.rb#2317 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2377 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2351 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2397 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2402 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2422 +class Prism::BreakNode < ::Prism::Node + # Initialize a new BreakNode node. + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#2424 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2519 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2434 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2479 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2439 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2458 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2451 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode + # + # source://prism//lib/prism/node.rb#2463 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2468 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#2471 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [arguments] + # + # source://prism//lib/prism/node.rb#2444 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2503 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2498 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2485 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2493 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2508 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2513 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2530 +class Prism::CallAndWriteNode < ::Prism::Node + # Initialize a new CallAndWriteNode node. + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2532 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2726 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2547 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2601 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2695 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar &&= value + # ^ + # + # source://prism//lib/prism/node.rb#2620 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2552 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2573 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2565 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2578 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2583 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#2586 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#2557 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2606 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2710 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2700 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar &&= value + # ^^^ + # + # source://prism//lib/prism/node.rb#2642 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2705 + sig { returns(String) } + def operator; end + + # Represents the location of the operator. + # + # foo.bar &&= value + # ^^^ + # + # source://prism//lib/prism/node.rb#2676 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the name of the method being called. + # + # foo.bar &&= value # read_name `:bar` + # ^^^ + # + # source://prism//lib/prism/node.rb#2664 + sig { returns(Symbol) } + def read_name; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar &&= value + # ^^^ + # + # source://prism//lib/prism/node.rb#2614 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2591 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2634 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2656 + def save_message_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2684 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2715 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. + # + # foo.bar &&= value + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2692 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2596 + sig { returns(T::Boolean) } + def variable_call?; end + + # Represents the name of the method being written to. + # + # foo.bar &&= value # write_name `:bar=` + # ^^^ + # + # source://prism//lib/prism/node.rb#2670 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2720 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2758 +class Prism::CallNode < ::Prism::Node + # Initialize a new CallNode node. + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2760 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, equal_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3029 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2777 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Represents the arguments to the method call. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/node.rb#2932 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2833 + sig { returns(T::Boolean) } + def attribute_write?; end + + # Represents the block that is being passed to the method. + # + # foo { |a| a } + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#2985 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2988 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar + # ^ + # + # foo&.bar + # ^^ + # + # source://prism//lib/prism/node.rb#2861 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2782 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#3003 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the location of the right parenthesis. + # + # foo(bar) + # ^ + # + # source://prism//lib/prism/node.rb#2938 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2805 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2796 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?equal_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode + # + # source://prism//lib/prism/node.rb#2810 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#2815 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, equal_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # source://prism//lib/prism/node.rb#2818 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#2787 + def each_child_node; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#3008 + sig { returns(T.nilable(String)) } + def equal; end + + # Represents the location of the equal sign, in the case that this is an attribute write. + # + # foo.bar = value + # ^ + # + # foo[bar] = value + # ^ + # + # source://prism//lib/prism/node.rb#2963 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # When a call node has the attribute_write flag set, it means that the call + # is using the attribute write syntax. This is either a method call to []= + # or a method call to a method that ends with =. Either way, the = sign is + # present in the source. + # + # Prism returns the message_loc _without_ the = sign attached, because there + # can be any amount of space between the message and the = sign. However, + # sometimes you want the location of the full message including the inner + # space and the = sign. This method provides that. + # + # source://prism//lib/prism/node_ext.rb#334 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2838 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3013 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2993 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2889 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Represents the name of the method being called. + # + # foo.bar # name `:foo` + # ^^^ + # + # source://prism//lib/prism/node.rb#2883 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2998 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the location of the left parenthesis. + # foo(bar) + # ^ + # + # source://prism//lib/prism/node.rb#2910 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2852 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2823 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2875 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2952 + def save_closing_loc(repository); end + + # Save the equal_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2977 + def save_equal_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2903 + def save_message_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#2924 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3018 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2828 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3023 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#19804 +module Prism::CallNodeFlags; end + +# a call that is an attribute write, so the value being written should be returned +# +# source://prism//lib/prism/node.rb#19812 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#19815 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# source://prism//lib/prism/node.rb#19806 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://prism//lib/prism/node.rb#19809 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3048 +class Prism::CallOperatorWriteNode < ::Prism::Node + # Initialize a new CallOperatorWriteNode node. + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3050 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3246 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3066 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3120 + sig { returns(T::Boolean) } + def attribute_write?; end + + # Represents the binary operator being used. + # + # foo.bar += value # binary_operator `:+` + # ^ + # + # source://prism//lib/prism/node.rb#3195 + sig { returns(Symbol) } + def binary_operator; end + + # Represents the location of the binary operator. + # + # foo.bar += value + # ^^ + # + # source://prism//lib/prism/node.rb#3201 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3220 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar += value + # ^ + # + # source://prism//lib/prism/node.rb#3139 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3071 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3092 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3084 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3097 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3102 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#3105 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#3076 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3125 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3230 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#3225 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar += value + # ^^^ + # + # source://prism//lib/prism/node.rb#3161 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#342 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#349 + def operator_loc; end + + # Represents the name of the method being called. + # + # foo.bar += value # read_name `:bar` + # ^^^ + # + # source://prism//lib/prism/node.rb#3183 + sig { returns(Symbol) } + def read_name; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar += value + # ^^^ + # + # source://prism//lib/prism/node.rb#3133 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3110 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3209 + def save_binary_operator_loc(repository); end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3153 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3175 + def save_message_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3235 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. + # + # foo.bar += value + # ^^^^^ + # + # source://prism//lib/prism/node.rb#3217 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3115 + sig { returns(T::Boolean) } + def variable_call?; end + + # Represents the name of the method being written to. + # + # foo.bar += value # write_name `:bar=` + # ^^^ + # + # source://prism//lib/prism/node.rb#3189 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3240 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3264 +class Prism::CallOrWriteNode < ::Prism::Node + # Initialize a new CallOrWriteNode node. + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#3266 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3460 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3281 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3335 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3429 + sig { returns(T.nilable(String)) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar ||= value + # ^ + # + # source://prism//lib/prism/node.rb#3354 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3286 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3307 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3299 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#3312 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3317 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#3320 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#3291 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3340 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3444 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#3434 + sig { returns(T.nilable(String)) } + def message; end + + # Represents the location of the message. + # + # foo.bar ||= value + # ^^^ + # + # source://prism//lib/prism/node.rb#3376 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3439 + sig { returns(String) } + def operator; end + + # Represents the location of the operator. + # + # foo.bar ||= value + # ^^^ + # + # source://prism//lib/prism/node.rb#3410 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the name of the method being called. + # + # foo.bar ||= value # read_name `:bar` + # ^^^ + # + # source://prism//lib/prism/node.rb#3398 + sig { returns(Symbol) } + def read_name; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar ||= value + # ^^^ + # + # source://prism//lib/prism/node.rb#3348 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3325 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3368 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3390 + def save_message_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3418 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3449 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. + # + # foo.bar ||= value + # ^^^^^ + # + # source://prism//lib/prism/node.rb#3426 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3330 + sig { returns(T::Boolean) } + def variable_call?; end + + # Represents the name of the method being written to. + # + # foo.bar ||= value # write_name `:bar=` + # ^^^ + # + # source://prism//lib/prism/node.rb#3404 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3454 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#3485 +class Prism::CallTargetNode < ::Prism::Node + # Initialize a new CallTargetNode node. + # + # @return [CallTargetNode] a new instance of CallTargetNode + # + # source://prism//lib/prism/node.rb#3487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3629 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3549 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # source://prism//lib/prism/node.rb#3603 + sig { returns(String) } + def call_operator; end + + # Represents the location of the call operator. + # + # foo.bar = 1 + # ^ + # + # source://prism//lib/prism/node.rb#3568 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3521 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3516 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode + # + # source://prism//lib/prism/node.rb#3526 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } + # + # source://prism//lib/prism/node.rb#3534 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#3509 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3554 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3613 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String + # + # source://prism//lib/prism/node.rb#3608 + sig { returns(String) } + def message; end + + # Represents the location of the message. + # + # foo.bar = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#3590 + sig { returns(Prism::Location) } + def message_loc; end + + # Represents the name of the method being called. + # + # foo.bar = 1 # name `:foo` + # ^^^ + # + # source://prism//lib/prism/node.rb#3584 + sig { returns(Symbol) } + def name; end + + # The object that the method is being called on. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#3562 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3539 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3576 + def save_call_operator_loc(repository); end + + # Save the message_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3598 + def save_message_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3618 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3544 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3623 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3643 +class Prism::CapturePatternNode < ::Prism::Node + # Initialize a new CapturePatternNode node. + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#3645 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, target, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3746 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3656 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3661 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3679 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3674 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#3684 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#3692 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#3666 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3730 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3725 + sig { returns(String) } + def operator; end + + # Represents the location of the `=>` operator. + # + # foo => bar + # ^^ + # + # source://prism//lib/prism/node.rb#3712 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3720 + def save_operator_loc(repository); end + + # Represents the target of the capture. + # + # foo => bar + # ^^^ + # + # source://prism//lib/prism/node.rb#3706 + sig { returns(Prism::LocalVariableTargetNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3735 + sig { override.returns(Symbol) } + def type; end + + # Represents the value to capture. + # + # foo => bar + # ^^^ + # + # source://prism//lib/prism/node.rb#3700 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3740 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3760 +class Prism::CaseMatchNode < ::Prism::Node + # Initialize a new CaseMatchNode node. + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#3762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3897 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3775 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3871 + sig { returns(String) } + def case_keyword; end + + # Represents the location of the `case` keyword. + # + # case true; in false; end + # ^^^^ + # + # source://prism//lib/prism/node.rb#3842 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3803 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3794 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the conditions of the case match. + # + # case true; in false; end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#3830 + sig { returns(T::Array[Prism::InNode]) } + def conditions; end + + # Returns the else clause of the case match node. This method is deprecated + # in favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#470 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#3808 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3813 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#3816 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [predicate] + # + # source://prism//lib/prism/node.rb#3785 + def each_child_node; end + + # Represents the else clause of the case match. + # + # case true; in false; else; end + # ^^^^ + # + # source://prism//lib/prism/node.rb#3836 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3876 + sig { returns(String) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # case true; in false; end + # ^^^ + # + # source://prism//lib/prism/node.rb#3858 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3881 + sig { override.returns(String) } + def inspect; end + + # Represents the predicate of the case match. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # case true; in false; end + # ^^^^ + # + # source://prism//lib/prism/node.rb#3824 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Save the case_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3850 + def save_case_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#3866 + def save_end_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3886 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3891 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3914 +class Prism::CaseNode < ::Prism::Node + # Initialize a new CaseNode node. + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#3916 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3929 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#4025 + sig { returns(String) } + def case_keyword; end + + # Represents the location of the `case` keyword. + # + # case true; when false; end + # ^^^^ + # + # source://prism//lib/prism/node.rb#3996 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3934 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3957 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3948 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the conditions of the case statement. + # + # case true; when false; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#3984 + sig { returns(T::Array[Prism::WhenNode]) } + def conditions; end + + # Returns the else clause of the case node. This method is deprecated in + # favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#479 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode + # + # source://prism//lib/prism/node.rb#3962 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#3967 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#3970 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [predicate] + # + # source://prism//lib/prism/node.rb#3939 + def each_child_node; end + + # Represents the else clause of the case statement. + # + # case true; when false; else; end + # ^^^^ + # + # source://prism//lib/prism/node.rb#3990 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#4030 + sig { returns(String) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # case true; when false; end + # ^^^ + # + # source://prism//lib/prism/node.rb#4012 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4035 + sig { override.returns(String) } + def inspect; end + + # Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # case true; when false; end + # ^^^^ + # + # source://prism//lib/prism/node.rb#3978 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Save the case_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4004 + def save_case_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4020 + def save_end_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4040 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4045 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4066 +class Prism::ClassNode < ::Prism::Node + # Initialize a new ClassNode node. + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#4068 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4239 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Represents the body of the class. + # + # class Foo + # foo + # ^^^ + # + # source://prism//lib/prism/node.rb#4184 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4089 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#4208 + sig { returns(String) } + def class_keyword; end + + # Represents the location of the `class` keyword. + # + # class Foo end + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4136 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4112 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4103 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode + # + # source://prism//lib/prism/node.rb#4149 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode + # + # source://prism//lib/prism/node.rb#4117 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4122 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#4125 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [constant_path] + # + # source://prism//lib/prism/node.rb#4094 + def each_child_node; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#4218 + sig { returns(String) } + def end_keyword; end + + # Represents the location of the `end` keyword. + # + # class Foo end + # ^^^ + # + # source://prism//lib/prism/node.rb#4190 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#4213 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # Represents the location of the `<` operator. + # + # class Foo < Bar + # ^ + # + # source://prism//lib/prism/node.rb#4155 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4223 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#4130 + sig { returns(T::Array[Symbol]) } + def locals; end + + # The name of the class. + # + # class Foo end # name `:Foo` + # + # source://prism//lib/prism/node.rb#4205 + sig { returns(Symbol) } + def name; end + + # Save the class_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4144 + def save_class_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4198 + def save_end_keyword_loc(repository); end + + # Save the inheritance_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4169 + def save_inheritance_operator_loc(repository); end + + # Represents the superclass of the class. + # + # class Foo < Bar + # ^^^ + # + # source://prism//lib/prism/node.rb#4177 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4228 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4233 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4257 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # Initialize a new ClassVariableAndWriteNode node. + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#4259 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4376 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4271 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4276 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4293 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4288 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#4298 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4303 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4306 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#165 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#4281 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4360 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@target &&= value # name `:@@target` + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#4314 + sig { returns(Symbol) } + def name; end + + # Represents the location of the variable name. + # + # @@target &&= value + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#4320 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4355 + sig { returns(String) } + def operator; end + + # Represents the location of the `&&=` operator. + # + # @@target &&= value + # ^^^ + # + # source://prism//lib/prism/node.rb#4336 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4328 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4344 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4365 + sig { override.returns(Symbol) } + def type; end + + # Represents the value being assigned. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@target &&= value + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4352 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4370 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4389 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # Initialize a new ClassVariableOperatorWriteNode node. + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4391 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4495 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4404 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4476 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4460 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4426 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4421 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4431 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#4439 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#177 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#4414 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4479 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4444 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4447 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#358 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#365 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4468 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4455 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4484 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4473 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4489 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4509 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # Initialize a new ClassVariableOrWriteNode node. + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4511 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4616 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4523 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4528 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4545 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4540 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4550 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4555 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4558 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#171 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#4533 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4600 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4563 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4566 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4595 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4579 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4574 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4587 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4605 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4592 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4610 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#4629 +class Prism::ClassVariableReadNode < ::Prism::Node + # Initialize a new ClassVariableReadNode node. + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4631 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4702 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4640 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4645 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4661 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4656 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4666 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4671 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#4674 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#4650 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4686 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # source://prism//lib/prism/node.rb#4683 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4691 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4696 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#4712 +class Prism::ClassVariableTargetNode < ::Prism::Node + # Initialize a new ClassVariableTargetNode node. + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4714 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4781 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4723 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4744 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4739 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4749 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4754 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#4757 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#4733 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4765 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4762 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4770 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4775 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4791 +class Prism::ClassVariableWriteNode < ::Prism::Node + # Initialize a new ClassVariableWriteNode node. + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4793 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4914 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4827 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4822 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4832 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4837 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#4840 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#4815 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4898 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` + # + # source://prism//lib/prism/node.rb#4849 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4855 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4893 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#4880 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4863 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4888 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4903 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#4874 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4908 + def type; end + end +end + +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# introduce some kind of LRU cache to limit the number of entries, but this +# has not yet been implemented. +# +# source://prism//lib/prism/parse_result.rb#186 +class Prism::CodeUnitsCache + # Initialize a new cache with the given source and encoding. + # + # @return [CodeUnitsCache] a new instance of CodeUnitsCache + # + # source://prism//lib/prism/parse_result.rb#212 + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + # Retrieve the code units offset from the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#226 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# source://prism//lib/prism/parse_result.rb#198 +class Prism::CodeUnitsCache::LengthCounter + # @return [LengthCounter] a new instance of LengthCounter + # + # source://prism//lib/prism/parse_result.rb#199 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#204 + def count(byte_offset, byte_length); end +end + +# source://prism//lib/prism/parse_result.rb#187 +class Prism::CodeUnitsCache::UTF16Counter + # @return [UTF16Counter] a new instance of UTF16Counter + # + # source://prism//lib/prism/parse_result.rb#188 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#193 + def count(byte_offset, byte_length); end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# source://prism//lib/prism/parse_result.rb#521 +class Prism::Comment + abstract! + + # Create a new comment object with the given location. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#526 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#531 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # source://prism//lib/prism/parse_result.rb#523 + sig { returns(Prism::Location) } + def location; end + + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#536 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#30 +class Prism::Compiler < ::Prism::Visitor + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#32 + sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } + def visit(node); end + + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#47 + def visit_alias_global_variable_node(node); end + + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#52 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#37 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } + def visit_all(nodes); end + + # Compile a AlternationPatternNode node + # + # source://prism//lib/prism/compiler.rb#57 + def visit_alternation_pattern_node(node); end + + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#62 + def visit_and_node(node); end + + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#67 + def visit_arguments_node(node); end + + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#72 + def visit_array_node(node); end + + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#77 + def visit_array_pattern_node(node); end + + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#82 + def visit_assoc_node(node); end + + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#87 + def visit_assoc_splat_node(node); end + + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#92 + def visit_back_reference_read_node(node); end + + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#97 + def visit_begin_node(node); end + + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#102 + def visit_block_argument_node(node); end + + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#107 + def visit_block_local_variable_node(node); end + + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#112 + def visit_block_node(node); end + + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#117 + def visit_block_parameter_node(node); end + + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#122 + def visit_block_parameters_node(node); end + + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#127 + def visit_break_node(node); end + + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#132 + def visit_call_and_write_node(node); end + + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#137 + def visit_call_node(node); end + + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#142 + def visit_call_operator_write_node(node); end + + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#147 + def visit_call_or_write_node(node); end + + # Compile a CallTargetNode node + # + # source://prism//lib/prism/compiler.rb#152 + def visit_call_target_node(node); end + + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#157 + def visit_capture_pattern_node(node); end + + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#162 + def visit_case_match_node(node); end + + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#167 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#42 + sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } + def visit_child_nodes(node); end + + # Compile a ClassNode node + # + # source://prism//lib/prism/compiler.rb#172 + def visit_class_node(node); end + + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#177 + def visit_class_variable_and_write_node(node); end + + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#182 + def visit_class_variable_operator_write_node(node); end + + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#187 + def visit_class_variable_or_write_node(node); end + + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#192 + def visit_class_variable_read_node(node); end + + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#197 + def visit_class_variable_target_node(node); end + + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#202 + def visit_class_variable_write_node(node); end + + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#207 + def visit_constant_and_write_node(node); end + + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#212 + def visit_constant_operator_write_node(node); end + + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#217 + def visit_constant_or_write_node(node); end + + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#222 + def visit_constant_path_and_write_node(node); end + + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#227 + def visit_constant_path_node(node); end + + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#232 + def visit_constant_path_operator_write_node(node); end + + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#237 + def visit_constant_path_or_write_node(node); end + + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#242 + def visit_constant_path_target_node(node); end + + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#247 + def visit_constant_path_write_node(node); end + + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#252 + def visit_constant_read_node(node); end + + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#257 + def visit_constant_target_node(node); end + + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#262 + def visit_constant_write_node(node); end + + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#267 + def visit_def_node(node); end + + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#272 + def visit_defined_node(node); end + + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#277 + def visit_else_node(node); end + + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#282 + def visit_embedded_statements_node(node); end + + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#287 + def visit_embedded_variable_node(node); end + + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#292 + def visit_ensure_node(node); end + + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#297 + def visit_false_node(node); end + + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#302 + def visit_find_pattern_node(node); end + + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#307 + def visit_flip_flop_node(node); end + + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#312 + def visit_float_node(node); end + + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#317 + def visit_for_node(node); end + + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#322 + def visit_forwarding_arguments_node(node); end + + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#327 + def visit_forwarding_parameter_node(node); end + + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#332 + def visit_forwarding_super_node(node); end + + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#337 + def visit_global_variable_and_write_node(node); end + + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#342 + def visit_global_variable_operator_write_node(node); end + + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#347 + def visit_global_variable_or_write_node(node); end + + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#352 + def visit_global_variable_read_node(node); end + + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#357 + def visit_global_variable_target_node(node); end + + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#362 + def visit_global_variable_write_node(node); end + + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#367 + def visit_hash_node(node); end + + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#372 + def visit_hash_pattern_node(node); end + + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#377 + def visit_if_node(node); end + + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#382 + def visit_imaginary_node(node); end + + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#387 + def visit_implicit_node(node); end + + # Compile a ImplicitRestNode node + # + # source://prism//lib/prism/compiler.rb#392 + def visit_implicit_rest_node(node); end + + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#397 + def visit_in_node(node); end + + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#402 + def visit_index_and_write_node(node); end + + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#407 + def visit_index_operator_write_node(node); end + + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#412 + def visit_index_or_write_node(node); end + + # Compile a IndexTargetNode node + # + # source://prism//lib/prism/compiler.rb#417 + def visit_index_target_node(node); end + + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#422 + def visit_instance_variable_and_write_node(node); end + + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#427 + def visit_instance_variable_operator_write_node(node); end + + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#432 + def visit_instance_variable_or_write_node(node); end + + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#437 + def visit_instance_variable_read_node(node); end + + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#442 + def visit_instance_variable_target_node(node); end + + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#447 + def visit_instance_variable_write_node(node); end + + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#452 + def visit_integer_node(node); end + + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#457 + def visit_interpolated_match_last_line_node(node); end + + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#462 + def visit_interpolated_regular_expression_node(node); end + + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#467 + def visit_interpolated_string_node(node); end + + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#472 + def visit_interpolated_symbol_node(node); end + + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#477 + def visit_interpolated_x_string_node(node); end + + # Compile a ItLocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#482 + def visit_it_local_variable_read_node(node); end + + # Compile a ItParametersNode node + # + # source://prism//lib/prism/compiler.rb#487 + def visit_it_parameters_node(node); end + + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#492 + def visit_keyword_hash_node(node); end + + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#497 + def visit_keyword_rest_parameter_node(node); end + + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#502 + def visit_lambda_node(node); end + + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#507 + def visit_local_variable_and_write_node(node); end + + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#512 + def visit_local_variable_operator_write_node(node); end + + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#517 + def visit_local_variable_or_write_node(node); end + + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#522 + def visit_local_variable_read_node(node); end + + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#527 + def visit_local_variable_target_node(node); end + + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#532 + def visit_local_variable_write_node(node); end + + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#537 + def visit_match_last_line_node(node); end + + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#542 + def visit_match_predicate_node(node); end + + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#547 + def visit_match_required_node(node); end + + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#552 + def visit_match_write_node(node); end + + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#557 + def visit_missing_node(node); end + + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#562 + def visit_module_node(node); end + + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#567 + def visit_multi_target_node(node); end + + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#572 + def visit_multi_write_node(node); end + + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#577 + def visit_next_node(node); end + + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#582 + def visit_nil_node(node); end + + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#587 + def visit_no_keywords_parameter_node(node); end + + # Compile a NumberedParametersNode node + # + # source://prism//lib/prism/compiler.rb#592 + def visit_numbered_parameters_node(node); end + + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#597 + def visit_numbered_reference_read_node(node); end + + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#602 + def visit_optional_keyword_parameter_node(node); end + + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#607 + def visit_optional_parameter_node(node); end + + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#612 + def visit_or_node(node); end + + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#617 + def visit_parameters_node(node); end + + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#622 + def visit_parentheses_node(node); end + + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#627 + def visit_pinned_expression_node(node); end + + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#632 + def visit_pinned_variable_node(node); end + + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#637 + def visit_post_execution_node(node); end + + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#642 + def visit_pre_execution_node(node); end + + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#647 + def visit_program_node(node); end + + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#652 + def visit_range_node(node); end + + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#657 + def visit_rational_node(node); end + + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#662 + def visit_redo_node(node); end + + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#667 + def visit_regular_expression_node(node); end + + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#672 + def visit_required_keyword_parameter_node(node); end + + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#677 + def visit_required_parameter_node(node); end + + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#682 + def visit_rescue_modifier_node(node); end + + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#687 + def visit_rescue_node(node); end + + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#692 + def visit_rest_parameter_node(node); end + + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#697 + def visit_retry_node(node); end + + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#702 + def visit_return_node(node); end + + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#707 + def visit_self_node(node); end + + # Compile a ShareableConstantNode node + # + # source://prism//lib/prism/compiler.rb#712 + def visit_shareable_constant_node(node); end + + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#717 + def visit_singleton_class_node(node); end + + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#722 + def visit_source_encoding_node(node); end + + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#727 + def visit_source_file_node(node); end + + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#732 + def visit_source_line_node(node); end + + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#737 + def visit_splat_node(node); end + + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#742 + def visit_statements_node(node); end + + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#747 + def visit_string_node(node); end + + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#752 + def visit_super_node(node); end + + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#757 + def visit_symbol_node(node); end + + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#762 + def visit_true_node(node); end + + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#767 + def visit_undef_node(node); end + + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#772 + def visit_unless_node(node); end + + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#777 + def visit_until_node(node); end + + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#782 + def visit_when_node(node); end + + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#787 + def visit_while_node(node); end + + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#792 + def visit_x_string_node(node); end + + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#797 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4927 +class Prism::ConstantAndWriteNode < ::Prism::Node + # Initialize a new ConstantAndWriteNode node. + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4929 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5034 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4941 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4946 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4963 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4958 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4968 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#4973 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4976 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#183 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#4951 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5018 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4981 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4984 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5013 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4997 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#4992 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5005 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5023 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5010 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5028 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5047 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantOperatorWriteNode node. + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5049 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5153 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5062 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#5134 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#5118 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5067 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5084 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5079 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5089 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5094 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#5097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#195 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#5072 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5137 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5102 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5105 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#374 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#381 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5126 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5113 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5142 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5131 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5147 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5167 +class Prism::ConstantOrWriteNode < ::Prism::Node + # Initialize a new ConstantOrWriteNode node. + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#5169 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5274 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5181 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5186 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5203 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5198 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#5208 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5213 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#5216 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#189 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#5191 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5258 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5221 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5224 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5253 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5237 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5232 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5245 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5263 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5250 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5268 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5287 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # Initialize a new ConstantPathAndWriteNode node. + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#5289 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5381 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5300 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5305 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5323 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5318 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#5328 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5333 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#5336 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [target] + # + # source://prism//lib/prism/node.rb#5310 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5365 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5360 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5344 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5352 + def save_operator_loc(repository); end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5341 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5370 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5357 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5375 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5393 +class Prism::ConstantPathNode < ::Prism::Node + # Initialize a new ConstantPathNode node. + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#5395 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5523 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5407 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#205 + def child; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5431 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5424 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#5436 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5441 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } + # + # source://prism//lib/prism/node.rb#5444 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5502 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # source://prism//lib/prism/node.rb#5470 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [parent] + # + # source://prism//lib/prism/node.rb#5417 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#198 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#176 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5507 + sig { override.returns(String) } + def inspect; end + + # The name of the constant being accessed. This could be `nil` in the event of a syntax error. + # + # source://prism//lib/prism/node.rb#5461 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ + # + # source://prism//lib/prism/node.rb#5489 + sig { returns(Prism::Location) } + def name_loc; end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # source://prism//lib/prism/node.rb#5458 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Save the delimiter_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5478 + def save_delimiter_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5497 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5512 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5517 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#167 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# An error class raised when missing nodes are found while computing a +# constant path's full name. For example: +# Foo:: -> raises because the constant path is missing the last part +# +# source://prism//lib/prism/node_ext.rb#172 +class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5536 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantPathOperatorWriteNode node. + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5538 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5629 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5550 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#5610 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#5594 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5555 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5573 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5568 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5578 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5583 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#5586 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [target] + # + # source://prism//lib/prism/node.rb#5560 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5613 + sig { override.returns(String) } + def inspect; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#390 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#397 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5602 + def save_binary_operator_loc(repository); end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5591 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5618 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5607 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5623 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5642 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # Initialize a new ConstantPathOrWriteNode node. + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5644 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5736 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5655 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5660 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5678 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5673 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5683 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5688 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#5691 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [target] + # + # source://prism//lib/prism/node.rb#5665 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5720 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5715 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5699 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5707 + def save_operator_loc(repository); end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5696 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5725 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5712 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5730 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5748 +class Prism::ConstantPathTargetNode < ::Prism::Node + # Initialize a new ConstantPathTargetNode node. + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5750 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5762 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#246 + def child; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5767 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5786 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5779 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5791 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } + # + # source://prism//lib/prism/node.rb#5799 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5836 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#5810 + sig { returns(Prism::Location) } + def delimiter_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [parent] + # + # source://prism//lib/prism/node.rb#5772 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#239 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#219 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5841 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#5807 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5823 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader parent: Prism::node? + # + # source://prism//lib/prism/node.rb#5804 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Save the delimiter_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5818 + def save_delimiter_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5831 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5851 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5876 +class Prism::ConstantPathWriteNode < ::Prism::Node + # Initialize a new ConstantPathWriteNode node. + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5878 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5982 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5889 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5894 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5912 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5907 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5917 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#5922 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#5925 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [target] + # + # source://prism//lib/prism/node.rb#5899 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5966 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5961 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#5942 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#5950 + def save_operator_loc(repository); end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#5936 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5971 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO::BAR = :abc + # ^^^^ + # + # source://prism//lib/prism/node.rb#5958 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5976 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#5994 +class Prism::ConstantReadNode < ::Prism::Node + # Initialize a new ConstantReadNode node. + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#5996 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6067 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6005 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6010 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6026 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6021 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#6031 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6036 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#6039 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#6015 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#142 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#137 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6051 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # source://prism//lib/prism/node.rb#6048 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6056 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6061 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#6077 +class Prism::ConstantTargetNode < ::Prism::Node + # Initialize a new ConstantTargetNode node. + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#6079 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6146 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6109 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6104 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#6114 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6119 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#6122 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#6098 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#265 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#260 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6130 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6127 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6135 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6140 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#6156 +class Prism::ConstantWriteNode < ::Prism::Node + # Initialize a new ConstantWriteNode node. + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#6158 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6279 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6170 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6175 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6192 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6187 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#6197 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6202 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#6205 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#6180 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#155 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#150 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6263 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#6214 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#6220 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6258 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # source://prism//lib/prism/node.rb#6245 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6228 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6253 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6268 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ + # + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#6239 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6273 + def type; end + end +end + +# Raised when requested to parse as the currently running Ruby version but Prism has no support for it. +# +# source://prism//lib/prism.rb#39 +class Prism::CurrentVersionError < ::ArgumentError + # Initialize a new exception for the given ruby version string. + # + # @return [CurrentVersionError] a new instance of CurrentVersionError + # + # source://prism//lib/prism.rb#41 + def initialize(version); end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.for("[1]") +# +# Prism::ArrayNode.new( +# source, +# 0, +# Prism::Location.new(source, 0, 3), +# 0, +# [ +# Prism::IntegerNode.new( +# source, +# 0, +# Prism::Location.new(source, 1, 1), +# Prism::IntegerBaseFlags::DECIMAL, +# 1 +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1) +# ) +# +# you could instead write: +# +# class Builder +# include Prism::DSL +# +# attr_reader :default_source +# +# def initialize +# @default_source = source("[1]") +# end +# +# def build +# array_node( +# location: location(start_offset: 0, length: 3), +# elements: [ +# integer_node( +# location: location(start_offset: 1, length: 1), +# flags: integer_base_flag(:decimal), +# value: 1 +# ) +# ], +# opening_loc: location(start_offset: 0, length: 1), +# closing_loc: location(start_offset: 2, length: 1) +# ) +# end +# end +# +# This is mostly helpful in the context of generating trees programmatically. +# +# source://prism//lib/prism/dsl.rb#64 +module Prism::DSL + extend ::Prism::DSL + + # Create a new AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dsl.rb#80 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def alias_global_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new AliasMethodNode node. + # + # source://prism//lib/prism/dsl.rb#85 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def alias_method_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new AlternationPatternNode node. + # + # source://prism//lib/prism/dsl.rb#90 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def alternation_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new AndNode node. + # + # source://prism//lib/prism/dsl.rb#95 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def and_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new ArgumentsNode node. + # + # source://prism//lib/prism/dsl.rb#100 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Retrieve the value of one of the ArgumentsNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#835 + sig { params(name: Symbol).returns(Integer) } + def arguments_node_flag(name); end + + # Create a new ArrayNode node. + # + # source://prism//lib/prism/dsl.rb#105 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def array_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the ArrayNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#847 + sig { params(name: Symbol).returns(Integer) } + def array_node_flag(name); end + + # Create a new ArrayPatternNode node. + # + # source://prism//lib/prism/dsl.rb#110 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def array_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new AssocNode node. + # + # source://prism//lib/prism/dsl.rb#115 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def assoc_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new AssocSplatNode node. + # + # source://prism//lib/prism/dsl.rb#120 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def assoc_splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node. + # + # source://prism//lib/prism/dsl.rb#125 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def back_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new BeginNode node. + # + # source://prism//lib/prism/dsl.rb#130 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def begin_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new BlockArgumentNode node. + # + # source://prism//lib/prism/dsl.rb#135 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def block_argument_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node. + # + # source://prism//lib/prism/dsl.rb#140 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def block_local_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new BlockNode node. + # + # source://prism//lib/prism/dsl.rb#145 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def block_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new BlockParameterNode node. + # + # source://prism//lib/prism/dsl.rb#150 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def block_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BlockParametersNode node. + # + # source://prism//lib/prism/dsl.rb#155 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def block_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new BreakNode node. + # + # source://prism//lib/prism/dsl.rb#160 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def break_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new CallAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#165 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def call_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallNode node. + # + # source://prism//lib/prism/dsl.rb#170 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Retrieve the value of one of the CallNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#855 + sig { params(name: Symbol).returns(Integer) } + def call_node_flag(name); end + + # Create a new CallOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#175 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def call_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#180 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def call_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallTargetNode node. + # + # source://prism//lib/prism/dsl.rb#185 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def call_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + + # Create a new CapturePatternNode node. + # + # source://prism//lib/prism/dsl.rb#190 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def capture_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new CaseMatchNode node. + # + # source://prism//lib/prism/dsl.rb#195 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def case_match_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new CaseNode node. + # + # source://prism//lib/prism/dsl.rb#200 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def case_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ClassNode node. + # + # source://prism//lib/prism/dsl.rb#205 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#210 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def class_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#215 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def class_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#220 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def class_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def class_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#230 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def class_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#235 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def class_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#240 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def constant_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#245 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def constant_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#250 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def constant_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#255 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def constant_path_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantPathNode node. + # + # source://prism//lib/prism/dsl.rb#260 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def constant_path_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#265 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def constant_path_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#270 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def constant_path_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node. + # + # source://prism//lib/prism/dsl.rb#275 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def constant_path_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node. + # + # source://prism//lib/prism/dsl.rb#280 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def constant_path_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantReadNode node. + # + # source://prism//lib/prism/dsl.rb#285 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def constant_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ConstantTargetNode node. + # + # source://prism//lib/prism/dsl.rb#290 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def constant_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ConstantWriteNode node. + # + # source://prism//lib/prism/dsl.rb#295 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def constant_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new DefNode node. + # + # source://prism//lib/prism/dsl.rb#300 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def def_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new DefinedNode node. + # + # source://prism//lib/prism/dsl.rb#305 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def defined_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new ElseNode node. + # + # source://prism//lib/prism/dsl.rb#310 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def else_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dsl.rb#315 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def embedded_statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node. + # + # source://prism//lib/prism/dsl.rb#320 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + + # Retrieve the value of one of the EncodingFlags flags. + # + # source://prism//lib/prism/dsl.rb#866 + sig { params(name: Symbol).returns(Integer) } + def encoding_flag(name); end + + # Create a new EnsureNode node. + # + # source://prism//lib/prism/dsl.rb#325 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def ensure_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new FalseNode node. + # + # source://prism//lib/prism/dsl.rb#330 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::FalseNode) + end + def false_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new FindPatternNode node. + # + # source://prism//lib/prism/dsl.rb#335 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def find_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new FlipFlopNode node. + # + # source://prism//lib/prism/dsl.rb#340 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def flip_flop_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new FloatNode node. + # + # source://prism//lib/prism/dsl.rb#345 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Float + ).returns(Prism::FloatNode) + end + def float_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ForNode node. + # + # source://prism//lib/prism/dsl.rb#350 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def for_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dsl.rb#355 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingArgumentsNode) + end + def forwarding_arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node. + # + # source://prism//lib/prism/dsl.rb#360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingParameterNode) + end + def forwarding_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node. + # + # source://prism//lib/prism/dsl.rb#365 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def forwarding_super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#370 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def global_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#375 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def global_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#380 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def global_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#385 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def global_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#390 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def global_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#395 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def global_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new HashNode node. + # + # source://prism//lib/prism/dsl.rb#400 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new HashPatternNode node. + # + # source://prism//lib/prism/dsl.rb#405 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def hash_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new IfNode node. + # + # source://prism//lib/prism/dsl.rb#410 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def if_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ImaginaryNode node. + # + # source://prism//lib/prism/dsl.rb#415 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def imaginary_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + + # Create a new ImplicitNode node. + # + # source://prism//lib/prism/dsl.rb#420 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ImplicitRestNode node. + # + # source://prism//lib/prism/dsl.rb#425 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ImplicitRestNode) + end + def implicit_rest_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new InNode node. + # + # source://prism//lib/prism/dsl.rb#430 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def in_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#435 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def index_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#440 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def index_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#445 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def index_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new IndexTargetNode node. + # + # source://prism//lib/prism/dsl.rb#450 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#455 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def instance_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#460 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def instance_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#465 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def instance_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#470 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def instance_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#475 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def instance_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#480 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def instance_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the IntegerBaseFlags flags. + # + # source://prism//lib/prism/dsl.rb#875 + sig { params(name: Symbol).returns(Integer) } + def integer_base_flag(name); end + + # Create a new IntegerNode node. + # + # source://prism//lib/prism/dsl.rb#485 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def integer_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dsl.rb#490 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def interpolated_match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dsl.rb#495 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def interpolated_regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node. + # + # source://prism//lib/prism/dsl.rb#500 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def interpolated_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the InterpolatedStringNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#886 + sig { params(name: Symbol).returns(Integer) } + def interpolated_string_node_flag(name); end + + # Create a new InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dsl.rb#505 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def interpolated_symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node. + # + # source://prism//lib/prism/dsl.rb#510 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def interpolated_x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new ItLocalVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#515 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItLocalVariableReadNode) + end + def it_local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ItParametersNode node. + # + # source://prism//lib/prism/dsl.rb#520 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItParametersNode) + end + def it_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new KeywordHashNode node. + # + # source://prism//lib/prism/dsl.rb#525 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def keyword_hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + + # Retrieve the value of one of the KeywordHashNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#895 + sig { params(name: Symbol).returns(Integer) } + def keyword_hash_node_flag(name); end + + # Create a new KeywordRestParameterNode node. + # + # source://prism//lib/prism/dsl.rb#530 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def keyword_rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new LambdaNode node. + # + # source://prism//lib/prism/dsl.rb#535 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#540 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def local_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#545 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def local_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#550 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def local_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#555 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#560 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def local_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#565 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new Location object. + # + # source://prism//lib/prism/dsl.rb#75 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + # Retrieve the value of one of the LoopFlags flags. + # + # source://prism//lib/prism/dsl.rb#903 + sig { params(name: Symbol).returns(Integer) } + def loop_flag(name); end + + # Create a new MatchLastLineNode node. + # + # source://prism//lib/prism/dsl.rb#570 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new MatchPredicateNode node. + # + # source://prism//lib/prism/dsl.rb#575 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def match_predicate_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new MatchRequiredNode node. + # + # source://prism//lib/prism/dsl.rb#580 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def match_required_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new MatchWriteNode node. + # + # source://prism//lib/prism/dsl.rb#585 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def match_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + + # Create a new MissingNode node. + # + # source://prism//lib/prism/dsl.rb#590 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::MissingNode) + end + def missing_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ModuleNode node. + # + # source://prism//lib/prism/dsl.rb#595 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def module_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new MultiTargetNode node. + # + # source://prism//lib/prism/dsl.rb#600 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def multi_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # Create a new MultiWriteNode node. + # + # source://prism//lib/prism/dsl.rb#605 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def multi_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new NextNode node. + # + # source://prism//lib/prism/dsl.rb#610 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def next_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new NilNode node. + # + # source://prism//lib/prism/dsl.rb#615 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::NilNode) + end + def nil_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dsl.rb#620 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def no_keywords_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new NumberedParametersNode node. + # + # source://prism//lib/prism/dsl.rb#625 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def numbered_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dsl.rb#630 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def numbered_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + + # Create a new OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dsl.rb#635 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def optional_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new OptionalParameterNode node. + # + # source://prism//lib/prism/dsl.rb#640 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def optional_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new OrNode node. + # + # source://prism//lib/prism/dsl.rb#645 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def or_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the ParameterFlags flags. + # + # source://prism//lib/prism/dsl.rb#911 + sig { params(name: Symbol).returns(Integer) } + def parameter_flag(name); end + + # Create a new ParametersNode node. + # + # source://prism//lib/prism/dsl.rb#650 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # Create a new ParenthesesNode node. + # + # source://prism//lib/prism/dsl.rb#655 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def parentheses_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the ParenthesesNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#919 + sig { params(name: Symbol).returns(Integer) } + def parentheses_node_flag(name); end + + # Create a new PinnedExpressionNode node. + # + # source://prism//lib/prism/dsl.rb#660 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def pinned_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # Create a new PinnedVariableNode node. + # + # source://prism//lib/prism/dsl.rb#665 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def pinned_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new PostExecutionNode node. + # + # source://prism//lib/prism/dsl.rb#670 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def post_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new PreExecutionNode node. + # + # source://prism//lib/prism/dsl.rb#675 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def pre_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new ProgramNode node. + # + # source://prism//lib/prism/dsl.rb#680 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def program_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Retrieve the value of one of the RangeFlags flags. + # + # source://prism//lib/prism/dsl.rb#927 + sig { params(name: Symbol).returns(Integer) } + def range_flag(name); end + + # Create a new RangeNode node. + # + # source://prism//lib/prism/dsl.rb#685 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def range_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new RationalNode node. + # + # source://prism//lib/prism/dsl.rb#690 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def rational_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + + # Create a new RedoNode node. + # + # source://prism//lib/prism/dsl.rb#695 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RedoNode) + end + def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Retrieve the value of one of the RegularExpressionFlags flags. + # + # source://prism//lib/prism/dsl.rb#935 + sig { params(name: Symbol).returns(Integer) } + def regular_expression_flag(name); end + + # Create a new RegularExpressionNode node. + # + # source://prism//lib/prism/dsl.rb#700 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dsl.rb#705 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def required_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # Create a new RequiredParameterNode node. + # + # source://prism//lib/prism/dsl.rb#710 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def required_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new RescueModifierNode node. + # + # source://prism//lib/prism/dsl.rb#715 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def rescue_modifier_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + + # Create a new RescueNode node. + # + # source://prism//lib/prism/dsl.rb#720 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def rescue_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + + # Create a new RestParameterNode node. + # + # source://prism//lib/prism/dsl.rb#725 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new RetryNode node. + # + # source://prism//lib/prism/dsl.rb#730 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RetryNode) + end + def retry_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ReturnNode node. + # + # source://prism//lib/prism/dsl.rb#735 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def return_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Create a new SelfNode node. + # + # source://prism//lib/prism/dsl.rb#740 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SelfNode) + end + def self_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ShareableConstantNode node. + # + # source://prism//lib/prism/dsl.rb#745 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def shareable_constant_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end + + # Retrieve the value of one of the ShareableConstantNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#953 + sig { params(name: Symbol).returns(Integer) } + def shareable_constant_node_flag(name); end + + # Create a new SingletonClassNode node. + # + # source://prism//lib/prism/dsl.rb#750 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def singleton_class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new Source object. + # + # source://prism//lib/prism/dsl.rb#70 + sig { params(string: String).returns(Prism::Source) } + def source(string); end + + # Create a new SourceEncodingNode node. + # + # source://prism//lib/prism/dsl.rb#755 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceEncodingNode) + end + def source_encoding_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new SourceFileNode node. + # + # source://prism//lib/prism/dsl.rb#760 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def source_file_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + + # Create a new SourceLineNode node. + # + # source://prism//lib/prism/dsl.rb#765 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceLineNode) + end + def source_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new SplatNode node. + # + # source://prism//lib/prism/dsl.rb#770 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end + + # Create a new StatementsNode node. + # + # source://prism//lib/prism/dsl.rb#775 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end + + # Retrieve the value of one of the StringFlags flags. + # + # source://prism//lib/prism/dsl.rb#963 + sig { params(name: Symbol).returns(Integer) } + def string_flag(name); end + + # Create a new StringNode node. + # + # source://prism//lib/prism/dsl.rb#780 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new SuperNode node. + # + # source://prism//lib/prism/dsl.rb#785 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Retrieve the value of one of the SymbolFlags flags. + # + # source://prism//lib/prism/dsl.rb#974 + sig { params(name: Symbol).returns(Integer) } + def symbol_flag(name); end + + # Create a new SymbolNode node. + # + # source://prism//lib/prism/dsl.rb#790 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new TrueNode node. + # + # source://prism//lib/prism/dsl.rb#795 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::TrueNode) + end + def true_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new UndefNode node. + # + # source://prism//lib/prism/dsl.rb#800 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def undef_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new UnlessNode node. + # + # source://prism//lib/prism/dsl.rb#805 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def unless_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new UntilNode node. + # + # source://prism//lib/prism/dsl.rb#810 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def until_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Create a new WhenNode node. + # + # source://prism//lib/prism/dsl.rb#815 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def when_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Create a new WhileNode node. + # + # source://prism//lib/prism/dsl.rb#820 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Create a new XStringNode node. + # + # source://prism//lib/prism/dsl.rb#825 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new YieldNode node. + # + # source://prism//lib/prism/dsl.rb#830 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def yield_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + private + + # The default location object that gets attached to nodes if no location is + # specified, which uses the given source. + # + # source://prism//lib/prism/dsl.rb#993 + sig { returns(Prism::Location) } + def default_location; end + + # The default node that gets attached to nodes if no node is specified for a + # required node field. + # + # source://prism//lib/prism/dsl.rb#999 + sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } + def default_node(source, location); end + + # The default source object that gets attached to nodes and locations if no + # source is specified. + # + # source://prism//lib/prism/dsl.rb#987 + sig { returns(Prism::Source) } + def default_source; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6293 +class Prism::DefNode < ::Prism::Node + # Initialize a new DefNode node. + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#6295 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6543 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6315 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#6383 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6320 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6343 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6334 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode + # + # source://prism//lib/prism/node.rb#6348 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6353 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#6356 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6497 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6389 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#6325 + def each_child_node; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6522 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6478 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#6517 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#6459 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6527 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#6386 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6507 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6421 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6361 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6364 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#6502 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#6402 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#6380 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#6377 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6512 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6440 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the def_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6397 + def save_def_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6492 + def save_end_keyword_loc(repository); end + + # Save the equal_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6473 + def save_equal_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6435 + def save_lparen_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6372 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6416 + def save_operator_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6454 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6532 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6537 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6565 +class Prism::DefinedNode < ::Prism::Node + # Initialize a new DefinedNode node. + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#6567 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6704 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6579 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6584 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6601 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6596 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode + # + # source://prism//lib/prism/node.rb#6606 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#6614 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#6589 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6688 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#6683 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6660 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6673 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6619 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6678 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6641 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6668 + def save_keyword_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6633 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6655 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6693 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6638 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6698 + def type; end + end +end + +# source://prism//lib/prism/desugar_compiler.rb#5 +class Prism::DesugarAndWriteNode + include ::Prism::DSL + + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#10 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#8 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#19 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#8 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#8 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#8 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#8 + def write_class; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://prism//lib/prism/desugar_compiler.rb#256 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#262 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#280 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#271 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#289 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#307 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#298 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#316 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#334 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#325 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#343 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#361 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#352 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#370 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#388 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#379 + def visit_local_variable_or_write_node(node); end +end + +# source://prism//lib/prism/desugar_compiler.rb#87 +class Prism::DesugarOperatorWriteNode + include ::Prism::DSL + + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#92 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#90 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#101 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#90 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#90 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#90 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#90 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#36 +class Prism::DesugarOrWriteDefinedNode + include ::Prism::DSL + + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode + # + # source://prism//lib/prism/desugar_compiler.rb#41 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#50 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#131 +class Prism::DesugarOrWriteNode + include ::Prism::DSL + + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#136 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#134 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#145 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#134 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#134 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#134 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#134 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# listener = OctalListener.new +# dispatcher = Prism::Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#45 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#50 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#77 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#82 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://prism//lib/prism/dispatcher.rb#47 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # source://prism//lib/prism/dispatcher.rb#57 + def register(listener, *events); end + + # Register all public methods of a listener that match the pattern + # `on__(enter|leave)`. + # + # def register_public_methods: (Listener) -> void + # + # source://prism//lib/prism/dispatcher.rb#65 + def register_public_methods(listener); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#88 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#96 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#104 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#112 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#120 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#128 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#136 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#144 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#152 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#160 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#168 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#176 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#184 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#192 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#200 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#208 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#216 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#224 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#232 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#240 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#248 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#256 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#264 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#272 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#280 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#288 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#296 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#304 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#312 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#320 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#328 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#336 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#344 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#352 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#360 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#368 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#376 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#384 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#392 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#400 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#408 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#416 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#424 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#432 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#440 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#448 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#456 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#464 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#472 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#480 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#488 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#496 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#504 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#512 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#520 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#528 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#536 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#544 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#552 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#560 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#568 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#576 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#584 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#592 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#600 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#608 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#616 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#624 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#632 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#640 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#648 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#656 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#664 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#672 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#680 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#688 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#696 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#704 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#712 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#720 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#728 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#736 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#744 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#752 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#760 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#768 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#776 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#784 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#792 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#800 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#808 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#816 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#824 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#832 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#840 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#848 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#856 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#864 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#872 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#880 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#888 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#896 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#904 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#912 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#920 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#928 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#936 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#944 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#952 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#960 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#968 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#976 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#984 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#992 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1000 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1008 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1016 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1024 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1032 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1040 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1048 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1056 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1064 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1072 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1080 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1088 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1096 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1104 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1112 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1120 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1128 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1136 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1144 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1152 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1160 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1168 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1176 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1184 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1192 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1200 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1208 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1216 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1224 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1232 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1240 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1248 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1256 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1264 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1272 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1280 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1288 + def visit_yield_node(node); end + + private + + # Register a listener for the given events. + # + # source://prism//lib/prism/dispatcher.rb#70 + def register_events(listener, events); end +end + +# source://prism//lib/prism/dispatcher.rb#1294 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1297 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1295 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1302 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1308 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1314 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1320 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1326 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1332 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1338 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1344 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1350 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1356 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1362 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1368 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1374 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1380 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1386 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1392 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1398 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1404 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1410 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1416 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1422 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1428 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1434 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1440 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1446 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1452 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1458 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1464 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1470 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1476 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1482 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1488 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1494 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1500 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1506 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1512 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1518 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1524 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1530 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1536 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1542 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1548 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1554 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1560 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1566 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1572 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1578 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1584 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1590 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1596 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1602 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1608 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1614 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1620 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1626 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1632 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1638 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1644 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1650 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1656 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1662 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1668 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1674 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1680 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1686 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1692 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1698 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1704 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1710 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1716 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1722 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1728 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1734 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1740 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1746 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1752 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1758 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1764 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1770 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1776 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1782 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1788 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1794 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1800 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1806 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1812 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1818 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1824 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1830 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1836 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1842 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1848 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1854 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1860 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1866 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1872 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1878 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1884 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1890 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1896 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1902 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1908 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1914 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1920 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1926 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1932 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1938 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1944 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1950 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1956 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1962 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1968 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1974 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1980 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1986 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1992 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1998 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2004 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2010 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2016 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2022 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2028 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2034 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2040 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2046 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2052 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2058 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2064 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2070 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2076 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2082 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2088 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2094 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2100 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2106 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2112 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2118 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2124 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2130 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2136 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2142 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2148 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2154 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2160 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2166 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2172 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2178 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2184 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2190 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2196 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2202 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# source://prism//lib/prism/dot_visitor.rb#18 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#110 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#107 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#115 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#120 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#145 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#170 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#195 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#220 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#250 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#290 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#352 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#379 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#402 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#419 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#467 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#490 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#510 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#545 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#573 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#616 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#639 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#685 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#748 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#797 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#843 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#873 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#898 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#943 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#988 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1035 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1062 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1092 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1119 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1136 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1153 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1180 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1207 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1237 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1264 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1289 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1318 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1346 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1371 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1400 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1425 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1442 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1459 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1486 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1555 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1586 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1614 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1640 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1661 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1687 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1701 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1752 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1784 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1801 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1843 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1857 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1871 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1891 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1918 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1948 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1975 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1992 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2009 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2036 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2069 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2118 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2163 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2181 + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2199 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2213 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2245 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2298 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2354 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2407 + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2446 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2473 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2503 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2530 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2547 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2564 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2591 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2611 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2647 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2683 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2723 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2760 + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2793 + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2807 + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2821 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2851 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2879 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2917 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2947 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2980 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3010 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3030 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3050 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3080 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3109 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3134 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3159 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3190 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3204 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3240 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3296 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3359 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3382 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3396 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3416 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3433 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3450 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3477 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3507 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3532 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3616 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3645 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3672 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3693 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3722 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3751 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3772 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3804 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3827 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3841 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3870 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3893 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3913 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3938 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3996 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4024 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4038 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4061 + def visit_self_node(node); end + + # Visit a ShareableConstantNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4075 + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4096 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4132 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4146 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4166 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4180 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4203 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4230 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4263 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4302 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4337 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4351 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4381 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4424 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4464 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4505 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4545 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4574 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4620 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has array_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4632 + def array_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4640 + def call_node_flags_inspect(node); end + + # Inspect a node that has encoding_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4651 + def encoding_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4660 + def integer_base_flags_inspect(node); end + + # Inspect a node that has interpolated_string_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4671 + def interpolated_string_node_flags_inspect(node); end + + # Inspect a node that has keyword_hash_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4680 + def keyword_hash_node_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4614 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4688 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4609 + def node_id(node); end + + # Inspect a node that has parameter_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4696 + def parameter_flags_inspect(node); end + + # Inspect a node that has parentheses_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4704 + def parentheses_node_flags_inspect(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4712 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4720 + def regular_expression_flags_inspect(node); end + + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4738 + def shareable_constant_node_flags_inspect(node); end + + # Inspect a node that has string_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4748 + def string_flags_inspect(node); end + + # Inspect a node that has symbol_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4759 + def symbol_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#63 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#66 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#80 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#64 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#72 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#64 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#84 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#76 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#64 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#19 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#22 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#20 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#20 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#28 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#20 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#37 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#40 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#45 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#38 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#38 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#49 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6717 +class Prism::ElseNode < ::Prism::Node + # Initialize a new ElseNode node. + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#6719 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6833 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6730 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6735 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6754 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6747 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode + # + # source://prism//lib/prism/node.rb#6759 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6764 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#6767 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#6740 + def each_child_node; end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6807 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6772 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6812 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6788 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6817 + sig { override.returns(String) } + def inspect; end + + # Save the else_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6780 + def save_else_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6802 + def save_end_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6785 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6822 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6827 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#558 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#565 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#560 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#6845 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # Initialize a new EmbeddedStatementsNode node. + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6847 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6955 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6858 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6863 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#6934 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#6916 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6882 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6875 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6887 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6892 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#6895 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#6868 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6939 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#6929 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#6900 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6924 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#6908 + def save_opening_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6913 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6944 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6949 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6967 +class Prism::EmbeddedVariableNode < ::Prism::Node + # Initialize a new EmbeddedVariableNode node. + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6969 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).void + end + def initialize(source, node_id, location, flags, operator_loc, variable); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7056 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6979 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#6984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7001 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6996 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#7006 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7011 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } + # + # source://prism//lib/prism/node.rb#7014 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [variable] + # + # source://prism//lib/prism/node.rb#6989 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7040 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7035 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7019 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7027 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7045 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#7032 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7050 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#19819 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19824 +Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19821 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#7071 +class Prism::EnsureNode < ::Prism::Node + # Initialize a new EnsureNode node. + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#7073 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7181 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7089 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7108 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7101 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode + # + # source://prism//lib/prism/node.rb#7113 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#7121 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#7094 + def each_child_node; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7160 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7142 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7155 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7126 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7165 + sig { override.returns(String) } + def inspect; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7150 + def save_end_keyword_loc(repository); end + + # Save the ensure_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7134 + def save_ensure_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7139 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7170 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7175 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#7193 +class Prism::FalseNode < ::Prism::Node + # Initialize a new FalseNode node. + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#7195 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7258 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7203 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7208 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7224 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7219 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode + # + # source://prism//lib/prism/node.rb#7229 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7234 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#7237 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#7213 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7242 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7247 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7252 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# foo => *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7276 +class Prism::FindPatternNode < ::Prism::Node + # Initialize a new FindPatternNode node. + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#7278 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7449 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7292 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#7428 + sig { returns(T.nilable(String)) } + def closing; end + + # The location of the closing brace. + # + # foo in [*bar, baz, *qux] + # ^ + # + # foo in Foo(*bar, baz, *qux) + # ^ + # + # source://prism//lib/prism/node.rb#7404 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7322 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7312 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the optional constant preceding the pattern + # + # foo in Foo(*bar, baz, *qux) + # ^^^ + # + # source://prism//lib/prism/node.rb#7343 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#7327 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7332 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#7335 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [constant] + # + # source://prism//lib/prism/node.rb#7302 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7433 + sig { override.returns(String) } + def inspect; end + + # Represents the first wildcard node in the pattern. + # + # foo in *bar, baz, *qux + # ^^^^ + # + # foo in Foo(*bar, baz, *qux) + # ^^^^ + # + # source://prism//lib/prism/node.rb#7352 + sig { returns(Prism::SplatNode) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#7423 + sig { returns(T.nilable(String)) } + def opening; end + + # The location of the opening brace. + # + # foo in [*bar, baz, *qux] + # ^ + # + # foo in Foo(*bar, baz, *qux) + # ^ + # + # source://prism//lib/prism/node.rb#7379 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the nodes in between the wildcards. + # + # foo in *bar, baz, *qux + # ^^^ + # + # foo in Foo(*bar, baz, 1, *qux) + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#7361 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # Represents the second wildcard node in the pattern. + # + # foo in *bar, baz, *qux + # ^^^^ + # + # foo in Foo(*bar, baz, *qux) + # ^^^^ + # + # source://prism//lib/prism/node.rb#7370 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } + def right; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7418 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7393 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7438 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7443 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7465 +class Prism::FlipFlopNode < ::Prism::Node + # Initialize a new FlipFlopNode node. + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#7467 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7567 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7478 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7483 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7504 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7496 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#7509 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7514 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#7517 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [left] + # + # source://prism//lib/prism/node.rb#7488 + def each_child_node; end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#7522 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7551 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node? + # + # source://prism//lib/prism/node.rb#7527 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7546 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7533 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # source://prism//lib/prism/node.rb#7530 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7541 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7556 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7561 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#7580 +class Prism::FloatNode < ::Prism::Node + # Initialize a new FloatNode node. + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#7582 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7649 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7591 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7596 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7607 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode + # + # source://prism//lib/prism/node.rb#7617 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7622 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } + # + # source://prism//lib/prism/node.rb#7625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#7601 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7633 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7638 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # source://prism//lib/prism/node.rb#7630 + sig { returns(Float) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7643 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7659 +class Prism::ForNode < ::Prism::Node + # Initialize a new ForNode node. + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#7661 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7848 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7676 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7681 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # The collection to iterate over. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#7731 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7704 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7695 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode + # + # source://prism//lib/prism/node.rb#7709 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#7717 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7822 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # The location of the `do` keyword, if present. + # + # for i in a do end + # ^^ + # + # source://prism//lib/prism/node.rb#7777 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [index] + # + # source://prism//lib/prism/node.rb#7686 + def each_child_node; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7827 + sig { returns(String) } + def end_keyword; end + + # The location of the `end` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#7799 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7812 + sig { returns(String) } + def for_keyword; end + + # The location of the `for` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#7745 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7817 + sig { returns(String) } + def in_keyword; end + + # The location of the `in` keyword. + # + # for i in a end + # ^^ + # + # source://prism//lib/prism/node.rb#7761 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # The index expression for `for` loops. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#7725 + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end + def index; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7832 + sig { override.returns(String) } + def inspect; end + + # Save the do_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7791 + def save_do_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7807 + def save_end_keyword_loc(repository); end + + # Save the for_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7753 + def save_for_keyword_loc(repository); end + + # Save the in_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#7769 + def save_in_keyword_loc(repository); end + + # Represents the body of statements to execute for each iteration of the loop. + # + # for i in a + # foo(i) + # ^^^^^^ + # end + # + # source://prism//lib/prism/node.rb#7739 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7837 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7842 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7866 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # Initialize a new ForwardingArgumentsNode node. + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7868 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7931 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7876 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7881 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7897 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7892 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7902 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7907 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#7910 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#7886 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7915 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7920 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7925 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7941 +class Prism::ForwardingParameterNode < ::Prism::Node + # Initialize a new ForwardingParameterNode node. + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7943 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8006 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7951 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7956 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7972 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7967 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7977 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#7982 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#7985 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#7961 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7990 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7995 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8000 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments, but which might have a block. +# +# super +# ^^^^^ +# +# super { 123 } +# ^^^^^^^^^^^^^ +# +# If it has any other arguments, it would be a `SuperNode` instead. +# +# source://prism//lib/prism/node.rb#8020 +class Prism::ForwardingSuperNode < ::Prism::Node + # Initialize a new ForwardingSuperNode node. + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#8022 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + def initialize(source, node_id, location, flags, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8092 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8031 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # All other arguments are forwarded as normal, except the original block is replaced with the new block. + # + # source://prism//lib/prism/node.rb#8073 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8036 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8055 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8048 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#8060 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8065 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } + # + # source://prism//lib/prism/node.rb#8068 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [block] + # + # source://prism//lib/prism/node.rb#8041 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8076 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8081 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8086 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8102 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # Initialize a new GlobalVariableAndWriteNode node. + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8104 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8209 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8116 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8121 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8138 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8133 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8143 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8148 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8151 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#201 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#8126 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8193 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8156 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8159 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8188 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8172 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8167 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8180 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8198 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8185 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8203 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8222 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOperatorWriteNode node. + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8224 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8328 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8237 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#8309 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#8293 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8242 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8254 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8269 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#8272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#213 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#8247 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8312 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8277 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8280 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#406 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#413 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8301 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8288 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8317 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8306 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8322 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8342 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOrWriteNode node. + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8344 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8449 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8356 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8361 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8378 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8373 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8383 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8388 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8391 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#207 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#8366 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8433 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8396 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8399 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8428 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8412 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8407 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8420 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8438 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8425 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8443 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#8462 +class Prism::GlobalVariableReadNode < ::Prism::Node + # Initialize a new GlobalVariableReadNode node. + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#8464 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8535 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8473 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8478 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8494 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8489 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#8499 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#8507 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#8483 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8519 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8516 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8524 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8529 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#8545 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # Initialize a new GlobalVariableTargetNode node. + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8547 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8614 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8556 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8561 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8577 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8572 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8582 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8587 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#8590 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#8566 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8598 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8595 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8603 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8608 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8624 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # Initialize a new GlobalVariableWriteNode node. + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8626 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8747 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8638 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8660 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8655 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8665 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8670 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#8673 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#8648 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8731 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8682 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#8688 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8726 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#8713 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8696 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8721 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8736 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#8707 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8741 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8760 +class Prism::HashNode < ::Prism::Node + # Initialize a new HashNode node. + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#8762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8880 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8773 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8778 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8859 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8841 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8795 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8790 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode + # + # source://prism//lib/prism/node.rb#8800 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8805 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#8808 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#8783 + def each_child_node; end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#8835 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8864 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8854 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8816 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8849 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#8824 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8869 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8874 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# foo => Bar[a: 1, b: 2] +# ^^^^^^^^^^^^^^^ +# +# foo in { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8902 +class Prism::HashPatternNode < ::Prism::Node + # Initialize a new HashPatternNode node. + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#8904 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9066 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8917 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8922 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9045 + sig { returns(T.nilable(String)) } + def closing; end + + # The location of the closing brace. + # + # foo => { a: 1 } + # ^ + # + # foo => Bar[a: 1] + # ^ + # + # source://prism//lib/prism/node.rb#9021 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8945 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8936 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents the optional constant preceding the Hash. + # + # foo => Bar[a: 1, b: 2] + # ^^^ + # + # foo => Bar::Baz[a: 1, b: 2] + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#8969 + sig { returns(T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantPathNode | ConstantReadNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#8950 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantPathNode, Prism::ConstantReadNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#8955 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantPathNode | ConstantReadNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#8958 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [constant] + # + # source://prism//lib/prism/node.rb#8927 + def each_child_node; end + + # Represents the explicit named hash keys and values. + # + # foo => { a: 1, b:, ** } + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#8975 + sig { returns(T::Array[Prism::AssocNode]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9050 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9040 + sig { returns(T.nilable(String)) } + def opening; end + + # The location of the opening brace. + # + # foo => { a: 1 } + # ^ + # + # foo => Bar[a: 1] + # ^ + # + # source://prism//lib/prism/node.rb#8996 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Represents the rest of the Hash keys and values. This can be named, unnamed, or explicitly forbidden via `**nil`, this last one results in a `NoKeywordsParameterNode`. + # + # foo => { a: 1, b:, **c } + # ^^^ + # + # foo => { a: 1, b:, ** } + # ^^ + # + # foo => { a: 1, b:, **nil } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#8987 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } + def rest; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9035 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9010 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9055 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9060 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#55 +module Prism::HeredocQuery + # Returns true if this node was represented as a heredoc in the source code. + # + # @return [Boolean] + # + # source://prism//lib/prism/node_ext.rb#57 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9087 +class Prism::IfNode < ::Prism::Node + # Initialize a new IfNode node. + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#9089 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9292 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9103 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9108 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9131 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9122 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the subsequent if/elsif/else clause of the if node. This method is + # deprecated in favor of #subsequent. + # + # source://prism//lib/prism/node_ext.rb#488 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode + # + # source://prism//lib/prism/node.rb#9136 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#9144 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [predicate] + # + # source://prism//lib/prism/node.rb#9113 + def each_child_node; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#9271 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # source://prism//lib/prism/node.rb#9242 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#9261 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#9154 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9276 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#92 + def newline_flag!(lines); end + + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ + # + # source://prism//lib/prism/node.rb#9184 + sig { returns(Prism::Node) } + def predicate; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9256 + def save_end_keyword_loc(repository); end + + # Save the if_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9168 + def save_if_keyword_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9207 + def save_then_keyword_loc(repository); end + + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. + # + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # source://prism//lib/prism/node.rb#9219 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#9234 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#9266 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#9193 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9281 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9286 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#9307 +class Prism::ImaginaryNode < ::Prism::Node + # Initialize a new ImaginaryNode node. + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#9309 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).void + end + def initialize(source, node_id, location, flags, numeric); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9377 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9318 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9323 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9340 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9335 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#9345 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9350 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } + # + # source://prism//lib/prism/node.rb#9353 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [numeric] + # + # source://prism//lib/prism/node.rb#9328 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9361 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # source://prism//lib/prism/node.rb#9358 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } + def numeric; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9366 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#110 + sig { returns(Complex) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9371 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#9393 +class Prism::ImplicitNode < ::Prism::Node + # Initialize a new ImplicitNode node. + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#9395 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9463 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9404 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9409 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9426 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9421 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#9431 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } + # + # source://prism//lib/prism/node.rb#9439 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#9414 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9447 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9452 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#9444 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9457 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# source://prism//lib/prism/node.rb#9482 +class Prism::ImplicitRestNode < ::Prism::Node + # Initialize a new ImplicitRestNode node. + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # source://prism//lib/prism/node.rb#9484 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9547 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9492 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9497 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9513 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9508 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode + # + # source://prism//lib/prism/node.rb#9518 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9523 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#9526 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#9502 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9531 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9536 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9541 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9556 +class Prism::InNode < ::Prism::Node + # Initialize a new InNode node. + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#9558 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9678 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9570 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9575 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9596 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9588 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode + # + # source://prism//lib/prism/node.rb#9601 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9606 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } + # + # source://prism//lib/prism/node.rb#9609 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [pattern] + # + # source://prism//lib/prism/node.rb#9580 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#9652 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#9620 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9662 + sig { override.returns(String) } + def inspect; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#9614 + sig { returns(Prism::Node) } + def pattern; end + + # Save the in_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9628 + def save_in_loc(repository); end + + # Save the then_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9647 + def save_then_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#9617 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#9657 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#9633 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9667 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9672 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9691 +class Prism::IndexAndWriteNode < ::Prism::Node + # Initialize a new IndexAndWriteNode node. + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9693 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9883 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9812 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9767 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#9828 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9847 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9780 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9857 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9815 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9739 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9729 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9744 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9749 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#9752 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#9719 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9772 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9867 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9852 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9799 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9862 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9831 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9777 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9757 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9794 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9823 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9807 + def save_opening_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#9839 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9872 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9844 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9762 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9877 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9901 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # Initialize a new IndexOperatorWriteNode node. + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9903 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10092 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9920 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#10023 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9978 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10042 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10045 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#10039 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#10061 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9991 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9925 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10071 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10026 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9950 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9940 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9955 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#9960 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#9963 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#9930 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9983 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10076 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10066 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10010 + sig { returns(Prism::Location) } + def opening_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#422 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#429 + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9988 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9968 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10053 + def save_binary_operator_loc(repository); end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10005 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10034 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10018 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10081 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10058 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9973 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10086 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10111 +class Prism::IndexOrWriteNode < ::Prism::Node + # Initialize a new IndexOrWriteNode node. + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#10113 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10303 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10129 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#10232 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10187 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#10248 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#10267 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#10200 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10134 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10277 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10235 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10159 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10149 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#10164 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10169 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#10172 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#10139 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10192 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10287 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10272 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10219 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10282 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10251 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#10197 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10177 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the call_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10214 + def save_call_operator_loc(repository); end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10243 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10227 + def save_opening_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10259 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10292 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10264 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10182 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10297 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10329 +class Prism::IndexTargetNode < ::Prism::Node + # Initialize a new IndexTargetNode node. + # + # @return [IndexTargetNode] a new instance of IndexTargetNode + # + # source://prism//lib/prism/node.rb#10331 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).void + end + def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10471 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10344 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#10426 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10400 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#10442 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10349 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10450 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10429 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10372 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10363 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode + # + # source://prism//lib/prism/node.rb#10377 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10382 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } + # + # source://prism//lib/prism/node.rb#10385 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [receiver] + # + # source://prism//lib/prism/node.rb#10354 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10405 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10455 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10445 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10413 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#10410 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10390 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10437 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10421 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10460 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10395 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10465 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# source://prism//lib/prism/parse_result.rb#543 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#551 + sig { returns(String) } + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#546 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# This visitor is responsible for composing the strings that get returned by +# the various #inspect methods defined on each of the nodes. +# +# source://prism//lib/prism/inspect_visitor.rb#15 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. + # + # @return [InspectVisitor] a new instance of InspectVisitor + # + # source://prism//lib/prism/inspect_visitor.rb#38 + sig { params(indent: String).void } + def initialize(indent = T.unsafe(nil)); end + + # The list of commands that we need to execute in order to compose the + # final string. + # + # source://prism//lib/prism/inspect_visitor.rb#35 + def commands; end + + # Compose the final string. + # + # source://prism//lib/prism/inspect_visitor.rb#51 + sig { returns(String) } + def compose; end + + # The current prefix string. + # + # source://prism//lib/prism/inspect_visitor.rb#31 + def indent; end + + # Inspect a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#80 + def visit_alias_global_variable_node(node); end + + # Inspect a AliasMethodNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#92 + def visit_alias_method_node(node); end + + # Inspect a AlternationPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#104 + def visit_alternation_pattern_node(node); end + + # Inspect a AndNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#116 + def visit_and_node(node); end + + # Inspect a ArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#128 + def visit_arguments_node(node); end + + # Inspect a ArrayNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#144 + def visit_array_node(node); end + + # Inspect a ArrayPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#162 + def visit_array_pattern_node(node); end + + # Inspect a AssocNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#201 + def visit_assoc_node(node); end + + # Inspect a AssocSplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#213 + def visit_assoc_splat_node(node); end + + # Inspect a BackReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#227 + def visit_back_reference_read_node(node); end + + # Inspect a BeginNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#235 + def visit_begin_node(node); end + + # Inspect a BlockArgumentNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#268 + def visit_block_argument_node(node); end + + # Inspect a BlockLocalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#282 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#290 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#312 + def visit_block_parameter_node(node); end + + # Inspect a BlockParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#326 + def visit_block_parameters_node(node); end + + # Inspect a BreakNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#350 + def visit_break_node(node); end + + # Inspect a CallAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#364 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#384 + def visit_call_node(node); end + + # Inspect a CallOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#415 + def visit_call_operator_write_node(node); end + + # Inspect a CallOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#436 + def visit_call_or_write_node(node); end + + # Inspect a CallTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#456 + def visit_call_target_node(node); end + + # Inspect a CapturePatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#468 + def visit_capture_pattern_node(node); end + + # Inspect a CaseMatchNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#480 + def visit_case_match_node(node); end + + # Inspect a CaseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#510 + def visit_case_node(node); end + + # Inspect a ClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#540 + def visit_class_node(node); end + + # Inspect a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#566 + def visit_class_variable_and_write_node(node); end + + # Inspect a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#578 + def visit_class_variable_operator_write_node(node); end + + # Inspect a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#591 + def visit_class_variable_or_write_node(node); end + + # Inspect a ClassVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#603 + def visit_class_variable_read_node(node); end + + # Inspect a ClassVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#611 + def visit_class_variable_target_node(node); end + + # Inspect a ClassVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#619 + def visit_class_variable_write_node(node); end + + # Inspect a ConstantAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#631 + def visit_constant_and_write_node(node); end + + # Inspect a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#643 + def visit_constant_operator_write_node(node); end + + # Inspect a ConstantOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#656 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#668 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#680 + def visit_constant_path_node(node); end + + # Inspect a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#700 + def visit_constant_path_operator_write_node(node); end + + # Inspect a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#713 + def visit_constant_path_or_write_node(node); end + + # Inspect a ConstantPathTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#725 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#745 + def visit_constant_path_write_node(node); end + + # Inspect a ConstantReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#757 + def visit_constant_read_node(node); end + + # Inspect a ConstantTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#765 + def visit_constant_target_node(node); end + + # Inspect a ConstantWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#773 + def visit_constant_write_node(node); end + + # Inspect a DefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#785 + def visit_def_node(node); end + + # Inspect a DefinedNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#819 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#831 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#846 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#861 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#871 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#886 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#893 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#921 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#941 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#949 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#970 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#977 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#984 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#997 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1009 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1022 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1034 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1042 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1050 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1062 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1080 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1110 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1134 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1143 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1152 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1159 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1176 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1207 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1239 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1270 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1293 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1305 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1318 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1330 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1338 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1346 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1358 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1366 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1384 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1402 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1420 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1438 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1456 + def visit_it_local_variable_read_node(node); end + + # Inspect a ItParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1463 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1470 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1486 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1500 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1523 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1536 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1550 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1563 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1572 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1581 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1594 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1605 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1617 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1629 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1647 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1654 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1673 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1706 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1742 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1756 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1763 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1772 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1780 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1788 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1799 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1811 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1823 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1884 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1899 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1911 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1921 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1937 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1953 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1963 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1983 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1992 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1999 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2010 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2019 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2027 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2039 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2076 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2090 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2097 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2111 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2118 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2127 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2146 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2153 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2161 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2168 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2182 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2198 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2209 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2231 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2242 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2249 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2266 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2290 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2308 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2332 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2350 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2361 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # source://prism//lib/prism/inspect_visitor.rb#2385 + def inspect_location(location); end + + # Compose a header for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#2379 + def inspect_node(name, node); end + + class << self + # Compose an inspect string for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#44 + sig { params(node: Prism::Node).returns(String) } + def compose(node); end + end +end + +# Most of the time, we can simply pass down the indent to the next node. +# However, when we are inside a list we want some extra special formatting +# when we hit an element in that list. In this case, we have a special +# command that replaces the subsequent indent with the given value. +# +# source://prism//lib/prism/inspect_visitor.rb#20 +class Prism::InspectVisitor::Replace + # @return [Replace] a new instance of Replace + # + # source://prism//lib/prism/inspect_visitor.rb#23 + def initialize(value); end + + # source://prism//lib/prism/inspect_visitor.rb#21 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10486 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # Initialize a new InstanceVariableAndWriteNode node. + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10488 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10593 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10500 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10505 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10522 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10517 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10527 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10532 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#10535 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#219 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#10510 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10577 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10540 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10543 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10572 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10556 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10551 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10564 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10582 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10569 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10587 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10606 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOperatorWriteNode node. + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10608 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10712 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10621 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10693 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10677 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10626 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10643 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10638 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10648 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10653 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#10656 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#231 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#10631 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10696 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10661 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10664 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#438 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#445 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10685 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10672 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10701 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10690 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10706 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10726 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOrWriteNode node. + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10728 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10833 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10740 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10745 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10762 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10757 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10767 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10772 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#10775 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#225 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#10750 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10817 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10780 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10783 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10812 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10796 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10791 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#10804 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10822 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10809 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10827 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#10846 +class Prism::InstanceVariableReadNode < ::Prism::Node + # Initialize a new InstanceVariableReadNode node. + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10848 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10919 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10857 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10862 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10878 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10873 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10883 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10888 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#10891 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#10867 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10903 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # source://prism//lib/prism/node.rb#10900 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10908 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10913 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#10929 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # Initialize a new InstanceVariableTargetNode node. + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10931 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10998 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10940 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10945 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10961 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10956 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10966 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#10971 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#10974 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#10950 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10982 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10979 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10987 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10992 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11008 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # Initialize a new InstanceVariableWriteNode node. + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#11010 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11131 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11022 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11027 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11044 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11039 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#11049 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11054 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#11057 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#11032 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11115 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x = :y # name `:@x` + # + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#11066 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#11072 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11110 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#11097 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11080 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11105 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11120 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @foo = :bar + # ^^^^ + # + # @_x = 1234 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11091 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11125 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#19828 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#19830 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#19833 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#19839 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#19836 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#11144 +class Prism::IntegerNode < ::Prism::Node + # Initialize a new IntegerNode node. + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#11146 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).void + end + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11233 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11155 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11194 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11160 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11176 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11171 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode + # + # source://prism//lib/prism/node.rb#11181 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11199 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11186 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } + # + # source://prism//lib/prism/node.rb#11189 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#11165 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11209 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11217 + sig { override.returns(String) } + def inspect; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11204 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11222 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # source://prism//lib/prism/node.rb#11214 + sig { returns(Integer) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11227 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11244 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new InterpolatedMatchLastLineNode node. + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#11246 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11407 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11257 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11322 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11262 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11386 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11368 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11279 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11274 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#11284 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11289 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#11292 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#11267 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11317 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11302 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11342 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11347 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11337 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11297 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11391 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11307 + sig { returns(T::Boolean) } + def multi_line?; end + + # source://prism//lib/prism/parse_result/newlines.rb#122 + def newline_flag!(lines); end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11312 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11381 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11352 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11365 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11376 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11360 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11396 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11332 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11327 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11401 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11421 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new InterpolatedRegularExpressionNode node. + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#11423 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11584 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11434 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11499 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11439 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11563 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11545 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11451 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#11461 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11466 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#11469 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#11444 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11494 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11479 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11519 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11524 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11514 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11474 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11568 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11484 + sig { returns(T::Boolean) } + def multi_line?; end + + # source://prism//lib/prism/parse_result/newlines.rb#129 + def newline_flag!(lines); end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11489 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11558 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11529 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11542 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11553 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11537 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11573 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11509 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11504 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11578 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11598 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new InterpolatedStringNode node. + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11600 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11728 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11611 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11616 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11707 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11683 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11633 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11628 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], ?closing_loc: Location?) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11638 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode], closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#11646 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#11621 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11651 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11712 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11656 + sig { returns(T::Boolean) } + def mutable?; end + + # source://prism//lib/prism/parse_result/newlines.rb#136 + def newline_flag!(lines); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11702 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11661 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode | XStringNode | InterpolatedXStringNode | SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#11680 + sig do + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode, Prism::XStringNode, Prism::InterpolatedXStringNode, Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) + end + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11697 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11675 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11717 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11722 + def type; end + end +end + +# Flags for interpolated string nodes that indicated mutability if they are also marked as literals. +# +# source://prism//lib/prism/node.rb#19843 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#19845 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19848 +Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11742 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # Initialize a new InterpolatedSymbolNode node. + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11744 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11862 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11755 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11760 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11841 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11817 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11777 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11772 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11782 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11787 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#11790 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#11765 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11846 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#143 + def newline_flag!(lines); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11836 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11795 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11814 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11831 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11809 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11851 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11856 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11875 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new InterpolatedXStringNode node. + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11877 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11983 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11888 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11893 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11962 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11944 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11910 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11905 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11915 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#11920 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#11923 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#11898 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11967 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#150 + def newline_flag!(lines); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11957 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11928 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11941 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11952 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#11936 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11972 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11977 + def type; end + end +end + +# Represents reading from the implicit `it` local variable. +# +# -> { it } +# ^^ +# +# source://prism//lib/prism/node.rb#11996 +class Prism::ItLocalVariableReadNode < ::Prism::Node + # Initialize a new ItLocalVariableReadNode node. + # + # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#11998 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12061 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12006 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12011 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12027 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12022 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12032 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12037 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12040 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#12016 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12045 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12050 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12055 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12070 +class Prism::ItParametersNode < ::Prism::Node + # Initialize a new ItParametersNode node. + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # source://prism//lib/prism/node.rb#12072 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12135 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12080 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12101 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12096 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode + # + # source://prism//lib/prism/node.rb#12106 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12111 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12114 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#12090 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12119 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12124 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12129 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#12144 +class Prism::KeywordHashNode < ::Prism::Node + # Initialize a new KeywordHashNode node. + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#12146 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).void + end + def initialize(source, node_id, location, flags, elements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12219 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12155 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12160 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12177 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12172 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#12182 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12187 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } + # + # source://prism//lib/prism/node.rb#12190 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#12165 + def each_child_node; end + + # attr_reader elements: Array[AssocNode | AssocSplatNode] + # + # source://prism//lib/prism/node.rb#12200 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12203 + sig { override.returns(String) } + def inspect; end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12195 + sig { returns(T::Boolean) } + def symbol_keys?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12208 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12213 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#19852 +module Prism::KeywordHashNodeFlags; end + +# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments +# +# source://prism//lib/prism/node.rb#19854 +Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#12232 +class Prism::KeywordRestParameterNode < ::Prism::Node + # Initialize a new KeywordRestParameterNode node. + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#12234 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12345 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12245 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12266 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12261 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#12271 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12276 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#12279 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#12255 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12329 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#12289 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#12292 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12324 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12311 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12284 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12306 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12319 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12334 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12339 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12358 +class Prism::LambdaNode < ::Prism::Node + # Initialize a new LambdaNode node. + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#12360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).void + end + def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12497 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12374 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#12463 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12379 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12476 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12447 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12400 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12392 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode + # + # source://prism//lib/prism/node.rb#12405 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12410 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } + # + # source://prism//lib/prism/node.rb#12413 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [parameters] + # + # source://prism//lib/prism/node.rb#12384 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12481 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#12418 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12471 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12434 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12466 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12421 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil + # + # source://prism//lib/prism/node.rb#12460 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12455 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12442 + def save_opening_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12429 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12486 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12491 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#10 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#586 + def initialize(code, **options); end + + # source://prism//lib/prism/lex_compat.rb#828 + def add_on_sp_tokens(tokens, source, data_loc, bom, eof_token); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#584 + def options; end + + # source://prism//lib/prism/lex_compat.rb#591 + def result; end +end + +# In previous versions of Ruby, Ripper wouldn't flush the bom before the +# first token, so we had to have a hack in place to account for that. +# +# source://prism//lib/prism/lex_compat.rb#581 +Prism::LexCompat::BOM_FLUSHED = T.let(T.unsafe(nil), FalseClass) + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#253 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#565 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#277 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#280 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#285 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#278 + def split; end + + # source://prism//lib/prism/lex_compat.rb#289 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#278 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#336 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#341 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#352 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#339 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#339 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#339 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#389 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#339 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#337 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#258 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#261 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#265 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#269 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#259 + def tokens; end +end + +# Tokens where state should be ignored +# used for :on_sp, :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#244 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#245 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#31 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# A result class specialized for holding tokens produced by the lexer. +# +# source://prism//lib/prism/lex_compat.rb#12 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/lex_compat.rb#17 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/lex_compat.rb#23 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # source://prism//lib/prism/lex_compat.rb#14 + def value; end +end + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#202 +class Prism::LexCompat::Token < ::BasicObject + # Create a new token object with the given ripper-compatible array. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/lex_compat.rb#204 + def initialize(array); end + + # We want to pretend that this is just an Array. + # + # source://prism//lib/prism/lex_compat.rb#229 + def ==(other); end + + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#214 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#209 + def location; end + + # source://prism//lib/prism/lex_compat.rb#237 + def method_missing(name, *_arg1, **_arg2, &_arg3); end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#224 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#219 + def value; end + + private + + # @return [Boolean] + # + # source://prism//lib/prism/lex_compat.rb#233 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#778 +class Prism::LexResult < ::Prism::Result + # Create a new lex result object with the given values. + # + # @return [LexResult] a new instance of LexResult + # + # source://prism//lib/prism/parse_result.rb#783 + sig do + params( + value: T::Array[T.untyped], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for LexResult. + # + # source://prism//lib/prism/parse_result.rb#789 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The list of tokens that were parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#780 + sig { returns(T::Array[T.untyped]) } + def value; end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12513 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # Initialize a new LocalVariableAndWriteNode node. + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#12515 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12624 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12528 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12533 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12550 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12545 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#12555 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12560 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#12563 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12600 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#237 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#12538 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12608 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12597 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12568 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12603 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12581 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12576 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12589 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12613 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12594 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12618 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12638 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new LocalVariableOperatorWriteNode node. + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12640 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12748 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12654 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#12726 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#12707 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12659 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12676 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12671 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12681 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12686 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#12689 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12729 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#249 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#12664 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12732 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12723 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12694 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#454 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#461 + def operator_loc; end + + # Save the binary_operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12715 + def save_binary_operator_loc(repository); end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12702 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12737 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12720 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12742 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12763 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # Initialize a new LocalVariableOrWriteNode node. + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12765 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12874 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12778 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12800 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12795 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12805 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#12813 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12850 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#243 + def desugar; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#12788 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12858 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12847 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12818 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12853 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12831 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12826 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#12839 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12863 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12844 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12868 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#12888 +class Prism::LocalVariableReadNode < ::Prism::Node + # Initialize a new LocalVariableReadNode node. + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12890 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12975 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12900 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12905 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12921 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12916 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12926 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#12931 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#12934 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#12956 + sig { returns(Integer) } + def depth; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#12910 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12959 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # source://prism//lib/prism/node.rb#12947 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12964 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12969 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# foo => baz +# ^^^ +# +# source://prism//lib/prism/node.rb#12989 +class Prism::LocalVariableTargetNode < ::Prism::Node + # Initialize a new LocalVariableTargetNode node. + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12991 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13062 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13001 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13006 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13022 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13017 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#13027 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13032 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#13035 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#13043 + sig { returns(Integer) } + def depth; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#13011 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13046 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13040 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13051 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13056 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#13073 +class Prism::LocalVariableWriteNode < ::Prism::Node + # Initialize a new LocalVariableWriteNode node. + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#13075 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13210 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13110 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13105 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#13115 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13120 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#13123 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 + # + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#13141 + sig { returns(Integer) } + def depth; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#13098 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13194 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # foo = :bar # name `:foo` + # + # abc = 123 # name `:abc` + # + # source://prism//lib/prism/node.rb#13132 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#13147 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13189 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#13176 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13155 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13184 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13199 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # source://prism//lib/prism/node.rb#13170 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13204 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#287 +class Prism::Location + # Create a new location object with the given source, start byte offset, and + # byte length. + # + # @return [Location] a new instance of Location + # + # source://prism//lib/prism/parse_result.rb#302 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # Returns true if the given other location is equal to this location. + # + # source://prism//lib/prism/parse_result.rb#490 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Join this location with the first occurrence of the string in the source + # that occurs after this location on the same line, and return the new + # location. This will raise an error if the string does not exist. + # + # source://prism//lib/prism/parse_result.rb#509 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + + # The end column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#475 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # The end offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#411 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#451 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # The start offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#389 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + + # Returns a new location that is the result of chopping off the last byte. + # + # source://prism//lib/prism/parse_result.rb#348 + sig { returns(Prism::Location) } + def chop; end + + # Returns all comments that are associated with this location (both leading + # and trailing comments). + # + # source://prism//lib/prism/parse_result.rb#338 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # source://prism//lib/prism/parse_result.rb#343 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + # Implement the hash pattern matching interface for Location. + # + # source://prism//lib/prism/parse_result.rb#480 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#463 + sig { returns(Integer) } + def end_character_column; end + + # The character offset from the beginning of the source where this location + # ends. + # + # source://prism//lib/prism/parse_result.rb#400 + sig { returns(Integer) } + def end_character_offset; end + + # The column number in code units of the given encoding where this location + # ends from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#469 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#405 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://prism//lib/prism/parse_result.rb#457 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#427 + sig { returns(Integer) } + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://prism//lib/prism/parse_result.rb#394 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#353 + sig { returns(String) } + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://prism//lib/prism/parse_result.rb#499 + sig { params(other: Prism::Location).returns(Prism::Location) } + def join(other); end + + # Attach a comment to the leading comments of this location. + # + # source://prism//lib/prism/parse_result.rb#321 + sig { params(comment: Prism::Comment).void } + def leading_comment(comment); end + + # These are the comments that are associated with this location that exist + # before the start of this location. + # + # source://prism//lib/prism/parse_result.rb#316 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#298 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#485 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#363 + sig { returns(String) } + def slice; end + + # The source code that this location represents starting from the beginning + # of the line that this location starts on to the end of the line that this + # location ends on. + # + # source://prism//lib/prism/parse_result.rb#370 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # source://prism//lib/prism/parse_result.rb#358 + sig { returns(T::Array[String]) } + def source_lines; end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#439 + sig { returns(Integer) } + def start_character_column; end + + # The character offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#378 + sig { returns(Integer) } + def start_character_offset; end + + # The column number in code units of the given encoding where this location + # starts from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#445 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#383 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#433 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#416 + sig { returns(Integer) } + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://prism//lib/prism/parse_result.rb#421 + sig { returns(String) } + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#295 + sig { returns(Integer) } + def start_offset; end + + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#332 + sig { params(comment: Prism::Comment).void } + def trailing_comment(comment); end + + # These are the comments that are associated with this location that exist + # after the end of this location. + # + # source://prism//lib/prism/parse_result.rb#327 + sig { returns(T::Array[Prism::Comment]) } + def trailing_comments; end + + protected + + # A Source object that is used to determine more information from the given + # offset and length. + # + # source://prism//lib/prism/parse_result.rb#290 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#19858 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://prism//lib/prism/node.rb#19860 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# This represents a magic comment that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#571 +class Prism::MagicComment + # Create a new magic comment object with the given key and value locations. + # + # @return [MagicComment] a new instance of MagicComment + # + # source://prism//lib/prism/parse_result.rb#579 + sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#595 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#600 + sig { returns(String) } + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#585 + sig { returns(String) } + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#573 + sig { returns(Prism::Location) } + def key_loc; end + + # Returns the value of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#590 + sig { returns(String) } + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#576 + sig { returns(Prism::Location) } + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13224 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new MatchLastLineNode node. + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#13226 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13405 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13238 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13302 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13243 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13384 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13358 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13254 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#13379 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#13345 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#13264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13269 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # source://prism//lib/prism/node.rb#13272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#13248 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13297 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13282 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13322 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13327 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13317 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13277 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13389 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13287 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13292 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13374 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13332 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13366 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13353 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13340 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13394 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#13371 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13312 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13307 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13399 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13419 +class Prism::MatchPredicateNode < ::Prism::Node + # Initialize a new MatchPredicateNode node. + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#13421 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13513 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13432 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13437 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13455 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13450 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#13460 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13465 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#13468 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#13442 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13497 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13492 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13479 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#13476 + sig { returns(Prism::Node) } + def pattern; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13487 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13502 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13473 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13507 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13525 +class Prism::MatchRequiredNode < ::Prism::Node + # Initialize a new MatchRequiredNode node. + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#13527 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13667 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13538 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13543 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13561 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13556 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#13566 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13571 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#13574 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#13548 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13651 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13646 + sig { returns(String) } + def operator; end + + # The location of the operator. + # + # foo => bar + # ^^ + # + # source://prism//lib/prism/node.rb#13633 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right-hand side of the operator. The type of the node depends on the expression. + # + # Anything that looks like a local variable name (including `_`) will result in a `LocalVariableTargetNode`. + # + # foo => a # This is equivalent to writing `a = foo` + # ^ + # + # Using an explicit `Array` or combining expressions with `,` will result in a `ArrayPatternNode`. This can be preceded by a constant. + # + # foo => [a] + # ^^^ + # + # foo => a, b + # ^^^^ + # + # foo => Bar[a, b] + # ^^^^^^^^^ + # + # If the array pattern contains at least two wildcard matches, a `FindPatternNode` is created instead. + # + # foo => *, 1, *a + # ^^^^^ + # + # Using an explicit `Hash` or a constant with square brackets and hash keys in the square brackets will result in a `HashPatternNode`. + # + # foo => { a: 1, b: } + # + # foo => Bar[a: 1, b:] + # + # foo => Bar[**] + # + # To use any variable that needs run time evaluation, pinning is required. This results in a `PinnedVariableNode` + # + # foo => ^a + # ^^ + # + # Similar, any expression can be used with pinning. This results in a `PinnedExpressionNode`. + # + # foo => ^(a + 1) + # + # Anything else will result in the regular node for that expression, for example a `ConstantReadNode`. + # + # foo => CONST + # + # source://prism//lib/prism/node.rb#13627 + sig { returns(Prism::Node) } + def pattern; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13641 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13656 + sig { override.returns(Symbol) } + def type; end + + # Represents the left-hand side of the operator. + # + # foo => bar + # ^^^ + # + # source://prism//lib/prism/node.rb#13582 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13661 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13679 +class Prism::MatchWriteNode < ::Prism::Node + # Initialize a new MatchWriteNode node. + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#13681 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).void + end + def initialize(source, node_id, location, flags, call, targets); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13754 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13691 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#13732 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13714 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13709 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#13719 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13724 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } + # + # source://prism//lib/prism/node.rb#13727 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [call] + # + # source://prism//lib/prism/node.rb#13701 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13738 + sig { override.returns(String) } + def inspect; end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # source://prism//lib/prism/node.rb#13735 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } + def targets; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13743 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13748 + def type; end + end +end + +# Represents a node that is missing from the source and results in a syntax error. +# +# source://prism//lib/prism/node.rb#13763 +class Prism::MissingNode < ::Prism::Node + # Initialize a new MissingNode node. + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#13765 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13828 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13773 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13778 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13794 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13789 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode + # + # source://prism//lib/prism/node.rb#13799 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13804 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#13807 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#13783 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13812 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13817 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13822 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13837 +class Prism::ModuleNode < ::Prism::Node + # Initialize a new ModuleNode node. + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#13839 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13961 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13853 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#13916 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13858 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13879 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13871 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode + # + # source://prism//lib/prism/node.rb#13913 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode + # + # source://prism//lib/prism/node.rb#13884 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#13889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#13892 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [constant_path] + # + # source://prism//lib/prism/node.rb#13863 + def each_child_node; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13940 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13919 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13945 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13897 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13935 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13900 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13932 + sig { returns(Symbol) } + def name; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13927 + def save_end_keyword_loc(repository); end + + # Save the module_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#13908 + def save_module_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13950 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13955 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# This can be a part of `MultiWriteNode` as above, or the target of a `for` loop +# +# for a, b in [[1, 2], [3, 4]] +# ^^^^ +# +# source://prism//lib/prism/node.rb#13982 +class Prism::MultiTargetNode < ::Prism::Node + # Initialize a new MultiTargetNode node. + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#13984 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14146 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13997 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14025 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14016 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#14030 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14035 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } + # + # source://prism//lib/prism/node.rb#14038 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [rest] + # + # source://prism//lib/prism/node.rb#14007 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14130 + sig { override.returns(String) } + def inspect; end + + # Represents the targets expressions before a splat node. + # + # a, (b, c, *) = 1, 2, 3, 4, 5 + # ^^^^ + # + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, (b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#14051 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#14120 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#14079 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # Represents a splat node in the target expression. + # + # a, (b, *c) = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, (b, *) = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, (b,) = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#14067 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + def rest; end + + # Represents the targets expressions after a splat node. + # + # a, (*, b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#14073 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#14125 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#14101 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14093 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14115 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14135 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14140 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14162 +class Prism::MultiWriteNode < ::Prism::Node + # Initialize a new MultiWriteNode node. + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#14164 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14357 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14179 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14184 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14209 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14199 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#14214 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14219 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#14222 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [rest] + # + # source://prism//lib/prism/node.rb#14189 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14341 + sig { override.returns(String) } + def inspect; end + + # Represents the targets expressions before a splat node. + # + # a, b, * = 1, 2, 3, 4, 5 + # ^^^^ + # + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, b, c = 1, 2, 3, 4, 5 + # ^^^^^^^ + # + # source://prism//lib/prism/node.rb#14235 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#14326 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#14263 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14336 + sig { returns(String) } + def operator; end + + # The location of the operator. + # + # a, b, c = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#14307 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents a splat node in the target expression. + # + # a, b, *c = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, b, * = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, b, = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#14251 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + def rest; end + + # Represents the targets expressions after a splat node. + # + # a, *, b, c = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#14257 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#14331 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#14285 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14277 + def save_lparen_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14315 + def save_operator_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14299 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14346 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # a, b, c = 1, 2, 3 + # ^^^^^^^ + # + # source://prism//lib/prism/node.rb#14323 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14351 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#16 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#18 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#23 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#28 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#33 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#38 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#43 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#48 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#53 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#58 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#63 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#68 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#73 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#78 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#83 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#88 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#93 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#98 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#103 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#108 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#113 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#118 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#123 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#128 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#133 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#138 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#143 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#148 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#153 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#158 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#163 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#168 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#173 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#178 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#183 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#188 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#193 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#198 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#203 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#208 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#213 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#218 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#223 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#228 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#233 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#238 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#243 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#248 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#253 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#258 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#263 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#268 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#273 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#278 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#283 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#288 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#293 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#298 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#303 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#308 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#313 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#318 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#323 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#328 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#333 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#338 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#343 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#348 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#353 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#358 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # source://prism//lib/prism/mutation_compiler.rb#363 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#368 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#373 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#378 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#383 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#388 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#393 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#398 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#403 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#408 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#413 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#418 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#423 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#428 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#433 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#438 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#443 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#448 + def visit_interpolated_x_string_node(node); end + + # Copy a ItLocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#453 + def visit_it_local_variable_read_node(node); end + + # Copy a ItParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#458 + def visit_it_parameters_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#463 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#468 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#473 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#478 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#483 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#488 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#493 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#498 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#503 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#508 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#513 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#518 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#523 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#528 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#533 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#538 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#543 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#548 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#553 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#558 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#563 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#568 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#573 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#578 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#583 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#588 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#593 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#598 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#603 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#608 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#613 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#618 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#623 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#628 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#633 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#638 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#643 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#648 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#653 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#658 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#663 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#668 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#673 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#678 + def visit_self_node(node); end + + # Copy a ShareableConstantNode node + # + # source://prism//lib/prism/mutation_compiler.rb#683 + def visit_shareable_constant_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#688 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#693 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#698 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#703 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#708 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#713 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#718 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#723 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#728 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#733 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#738 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#743 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#748 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#753 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#758 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#763 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#768 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#14375 +class Prism::NextNode < ::Prism::Node + # Initialize a new NextNode node. + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#14377 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14466 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14387 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#14429 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14392 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14411 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14404 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode + # + # source://prism//lib/prism/node.rb#14416 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14421 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#14424 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [arguments] + # + # source://prism//lib/prism/node.rb#14397 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14450 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14445 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14432 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14440 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14455 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14460 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#14477 +class Prism::NilNode < ::Prism::Node + # Initialize a new NilNode node. + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#14479 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14542 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14487 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14492 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14508 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14503 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode + # + # source://prism//lib/prism/node.rb#14513 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14518 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14521 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#14497 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14526 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14531 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14536 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14552 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # Initialize a new NoKeywordsParameterNode node. + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#14554 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14655 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14564 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14569 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14585 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14580 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#14590 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14595 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#14598 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#14574 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14639 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14634 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14616 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14629 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14603 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14624 + def save_keyword_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14611 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14644 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14649 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#15 +class Prism::Node + abstract! + + # Accepts a visitor and calls back into the specialized visit function. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#269 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Returns the first node that matches the given block when visited in a + # breadth-first search. This is useful for finding a node that matches a + # particular condition. + # + # node.breadth_first_search { |node| node.node_id == node_id } + # + # source://prism//lib/prism/node.rb#219 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } + def breadth_first_search(&block); end + + # Returns all of the nodes that match the given block when visited in a + # breadth-first search. This is useful for finding all nodes that match a + # particular condition. + # + # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } + # + # source://prism//lib/prism/node.rb#237 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T::Array[Prism::Node]) } + def breadth_first_search_all(&block); end + + # Delegates to the cached_end_code_units_column of the associated location + # object. + # + # source://prism//lib/prism/node.rb#118 + def cached_end_code_units_column(cache); end + + # Delegates to the cached_end_code_units_offset of the associated location + # object. + # + # source://prism//lib/prism/node.rb#86 + def cached_end_code_units_offset(cache); end + + # Delegates to the cached_start_code_units_column of the associated location + # object. + # + # source://prism//lib/prism/node.rb#112 + def cached_start_code_units_column(cache); end + + # Delegates to the cached_start_code_units_offset of the associated location + # object. + # + # source://prism//lib/prism/node.rb#80 + def cached_start_code_units_offset(cache); end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#275 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # Returns an array of child nodes and locations that could potentially have + # comments attached to them. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#296 + sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # Delegates to the comments of the associated location object. + # + # source://prism//lib/prism/node.rb#133 + def comments; end + + # Returns an array of child nodes, excluding any `nil`s in the place of + # optional nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#290 + sig { abstract.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#279 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # source://prism//lib/prism/node_ext.rb#10 + def deprecated(*replacements); end + + # With a block given, yields each child node. Without a block, returns + # an enumerator that contains each child node. Excludes any `nil`s in + # the place of optional nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#284 + def each_child_node; end + + # Delegates to the end_character_column of the associated location object. + # + # source://prism//lib/prism/node.rb#106 + def end_character_column; end + + # Delegates to the end_character_offset of the associated location object. + # + # source://prism//lib/prism/node.rb#74 + def end_character_offset; end + + # Delegates to the end_column of the associated location object. + # + # source://prism//lib/prism/node.rb#96 + def end_column; end + + # Delegates to the end_line of the associated location object. + # + # source://prism//lib/prism/node.rb#50 + def end_line; end + + # The end offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#63 + sig { returns(Integer) } + def end_offset; end + + sig { abstract.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the first node that matches the given block when visited in a + # breadth-first search. This is useful for finding a node that matches a + # particular condition. + # + # node.breadth_first_search { |node| node.node_id == node_id } + # + # source://prism//lib/prism/node.rb#229 + def find(&block); end + + # Returns all of the nodes that match the given block when visited in a + # breadth-first search. This is useful for finding all nodes that match a + # particular condition. + # + # node.breadth_first_search_all { |node| node.is_a?(Prism::CallNode) } + # + # source://prism//lib/prism/node.rb#248 + def find_all(&block); end + + # Returns a string representation of the node. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#301 + sig { abstract.returns(String) } + def inspect; end + + # Delegates to the leading_comments of the associated location object. + # + # source://prism//lib/prism/node.rb#123 + def leading_comments; end + + # A Location instance that represents the location of this node in the + # source. + # + # source://prism//lib/prism/node.rb#33 + sig { returns(Prism::Location) } + def location; end + + # Returns true if the node has the newline flag set. + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#164 + sig { returns(T::Boolean) } + def newline?; end + + # source://prism//lib/prism/parse_result/newlines.rb#70 + def newline_flag!(lines); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/newlines.rb#66 + def newline_flag?; end + + # A unique identifier for this node. This is used in a very specific + # use case where you want to keep around a reference to a node without + # having to keep around the syntax tree in memory. This unique identifier + # will be consistent across multiple parses of the same source code. + # + # source://prism//lib/prism/node.rb#24 + sig { returns(Integer) } + def node_id; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://prism//lib/prism/node.rb#175 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # Save this node using a saved source so that it can be retrieved later. + # + # source://prism//lib/prism/node.rb#27 + def save(repository); end + + # Save the location using a saved source so that it can be retrieved later. + # + # source://prism//lib/prism/node.rb#40 + def save_location(repository); end + + # Returns all of the lines of the source code associated with this node. + # An alias for source_lines, used to mimic the API from + # RubyVM::AbstractSyntaxTree to make it easier to migrate. + # + # source://prism//lib/prism/node.rb#144 + sig { returns(T::Array[String]) } + def script_lines; end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#147 + sig { returns(String) } + def slice; end + + # Slice the location of the node from the source, starting at the beginning + # of the line that the location starts on, ending at the end of the line + # that the location ends on. + # + # source://prism//lib/prism/node.rb#154 + sig { returns(String) } + def slice_lines; end + + # Returns all of the lines of the source code associated with this node. + # + # source://prism//lib/prism/node.rb#138 + sig { returns(T::Array[String]) } + def source_lines; end + + # Delegates to the start_character_column of the associated location object. + # + # source://prism//lib/prism/node.rb#101 + def start_character_column; end + + # Delegates to the start_character_offset of the associated location object. + # + # source://prism//lib/prism/node.rb#69 + def start_character_offset; end + + # Delegates to the start_column of the associated location object. + # + # source://prism//lib/prism/node.rb#91 + def start_column; end + + # Delegates to the start_line of the associated location object. + # + # source://prism//lib/prism/node.rb#45 + def start_line; end + + # The start offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#56 + sig { returns(Integer) } + def start_offset; end + + # Returns true if the node has the static literal flag set. + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#169 + sig { returns(T::Boolean) } + def static_literal?; end + + # Convert this node into a graphviz dot graph string. + # + # source://prism//lib/prism/node.rb#183 + sig { returns(String) } + def to_dot; end + + # Delegates to the trailing_comments of the associated location object. + # + # source://prism//lib/prism/node.rb#128 + def trailing_comments; end + + # Returns a list of nodes that are descendants of this node that contain the + # given line and column. This is useful for locating a node that is selected + # based on the line and column of the source code. + # + # Important to note is that the column given to this method should be in + # bytes, as opposed to characters or code units. + # + # source://prism//lib/prism/node.rb#194 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#317 + sig { abstract.returns(Symbol) } + def type; end + + protected + + # An bitset of flags for this node. There are certain flags that are common + # for all nodes, and then some nodes have specific flags. + # + # source://prism//lib/prism/node.rb#160 + sig { returns(Integer) } + def flags; end + + private + + # A pointer to the source that this node was created from. + # + # source://prism//lib/prism/node.rb#17 + sig { returns(Prism::Source) } + def source; end + + class << self + # Returns a list of the fields that exist for this node class. Fields + # describe the structure of the node. This kind of reflection is useful for + # things like recursively visiting each node _and_ field in the tree. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#253 + def fields; end + + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#325 + def type; end + end +end + +# The flags that are common to all nodes. +# +# source://prism//lib/prism/node.rb#19957 +module Prism::NodeFlags; end + +# A flag to indicate that the node is a candidate to emit a :line event +# through tracepoint when compiled. +# +# source://prism//lib/prism/node.rb#19960 +Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) + +# A flag to indicate that the value that the node represents is a value that +# can be determined at parse-time. +# +# source://prism//lib/prism/node.rb#19964 +Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. +# +# -> { _1 + _2 } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14666 +class Prism::NumberedParametersNode < ::Prism::Node + # Initialize a new NumberedParametersNode node. + # + # @return [NumberedParametersNode] a new instance of NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14668 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + def initialize(source, node_id, location, flags, maximum); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14735 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14677 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14682 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14698 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14693 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14703 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } + # + # source://prism//lib/prism/node.rb#14711 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#14687 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14719 + sig { override.returns(String) } + def inspect; end + + # attr_reader maximum: Integer + # + # source://prism//lib/prism/node.rb#14716 + sig { returns(Integer) } + def maximum; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14724 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14729 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#14745 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # Initialize a new NumberedReferenceReadNode node. + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14747 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + def initialize(source, node_id, location, flags, number); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14820 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14756 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14761 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14777 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14772 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14782 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14787 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } + # + # source://prism//lib/prism/node.rb#14790 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#14766 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14804 + sig { override.returns(String) } + def inspect; end + + # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `0` + # + # source://prism//lib/prism/node.rb#14801 + sig { returns(Integer) } + def number; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14809 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14814 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#14831 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # Initialize a new OptionalKeywordParameterNode node. + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14833 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14924 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14866 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14861 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14871 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14876 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#14879 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#14854 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14908 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14889 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14892 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14884 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#14900 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14913 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#14905 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14918 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14938 +class Prism::OptionalParameterNode < ::Prism::Node + # Initialize a new OptionalParameterNode node. + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14940 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15050 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14952 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14957 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14974 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14969 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14979 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#14984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#14987 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [value] + # + # source://prism//lib/prism/node.rb#14962 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15034 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14997 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#15000 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15029 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15013 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14992 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15008 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15021 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15039 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#15026 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15044 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15064 +class Prism::OrNode < ::Prism::Node + # Initialize a new OrNode node. + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#15066 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15173 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15077 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15082 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15100 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15095 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode + # + # source://prism//lib/prism/node.rb#15105 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15110 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#15113 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [left] + # + # source://prism//lib/prism/node.rb#15087 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15157 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # source://prism//lib/prism/node.rb#15124 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15152 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#15139 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#15133 + sig { returns(Prism::Node) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15147 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15162 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15167 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#8 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#62 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#91 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#133 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#79 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#88 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#85 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#76 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#82 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#70 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#73 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#67 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#64 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#104 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#113 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#120 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#200 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#208 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#214 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#202 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#205 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#58 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# source://prism//lib/prism/node.rb#19864 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# source://prism//lib/prism/node.rb#19866 +Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#15186 +class Prism::ParametersNode < ::Prism::Node + # Initialize a new ParametersNode node. + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#15188 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).void + end + def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15294 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15203 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#15275 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15208 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15226 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode + # + # source://prism//lib/prism/node.rb#15244 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15249 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } + # + # source://prism//lib/prism/node.rb#15252 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [rest] + # + # source://prism//lib/prism/node.rb#15213 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15278 + sig { override.returns(String) } + def inspect; end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#15272 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end + def keyword_rest; end + + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # source://prism//lib/prism/node.rb#15269 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # source://prism//lib/prism/node.rb#15260 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] + # + # source://prism//lib/prism/node.rb#15266 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end + def posts; end + + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#15257 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # source://prism//lib/prism/node.rb#15263 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#272 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } + def signature; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15283 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15288 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15314 +class Prism::ParenthesesNode < ::Prism::Node + # Initialize a new ParenthesesNode node. + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#15316 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15429 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15327 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#15374 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15332 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15408 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15390 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15351 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15344 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#15356 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15361 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#15364 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [body] + # + # source://prism//lib/prism/node.rb#15337 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15413 + sig { override.returns(String) } + def inspect; end + + # def multiple_statements?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15369 + sig { returns(T::Boolean) } + def multiple_statements?; end + + # source://prism//lib/prism/parse_result/newlines.rb#86 + def newline_flag!(lines); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15403 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15377 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15398 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15385 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15418 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15423 + def type; end + end +end + +# Flags for parentheses nodes. +# +# source://prism//lib/prism/node.rb#19870 +module Prism::ParenthesesNodeFlags; end + +# parentheses that contain multiple potentially void statements +# +# source://prism//lib/prism/node.rb#19872 +Prism::ParenthesesNodeFlags::MULTIPLE_STATEMENTS = T.let(T.unsafe(nil), Integer) + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#606 +class Prism::ParseError + # Create a new error object with the given message and location. + # + # @return [ParseError] a new instance of ParseError + # + # source://prism//lib/prism/parse_result.rb#621 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#629 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#634 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # source://prism//lib/prism/parse_result.rb#618 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this error in the source. + # + # source://prism//lib/prism/parse_result.rb#615 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#612 + sig { returns(String) } + def message; end + + # The type of error. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#609 + sig { returns(Symbol) } + def type; end +end + +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#795 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. + # + # @return [ParseLexResult] a new instance of ParseLexResult + # + # source://prism//lib/prism/parse_result.rb#801 + sig do + params( + value: [Prism::ProgramNode, T::Array[T.untyped]], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for ParseLexResult. + # + # source://prism//lib/prism/parse_result.rb#807 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A tuple of the syntax tree and the list of tokens that were parsed from + # the source code. + # + # source://prism//lib/prism/parse_result.rb#798 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end + +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#736 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#749 + sig do + params( + value: Prism::ProgramNode, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result.rb#760 + def attach_comments!; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of the syntax tree with the errors + # displayed inline. + # + # source://prism//lib/prism/parse_result.rb#772 + def errors_format; end + + # Walk the tree and mark nodes that are on a new line, loosely emulating + # the behavior of CRuby's `:line` tracepoint event. + # + # source://prism//lib/prism/parse_result.rb#766 + def mark_newlines!; end + + # The syntax tree that was parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#746 + sig { returns(Prism::ProgramNode) } + def value; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#20 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#87 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#93 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#83 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#120 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#54 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#57 + def initialize(location); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#69 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#65 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#73 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#55 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#61 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#77 + def trailing_comment(comment); end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#23 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#26 + def initialize(node); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#38 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#34 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#43 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#24 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#30 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#47 + def trailing_comment(comment); end +end + +# An object to represent the set of errors on a parse result. This object +# can be used to format the errors in a human-readable way. +# +# source://prism//lib/prism/parse_result/errors.rb#10 +class Prism::ParseResult::Errors + # Initialize a new set of errors from the given parse result. + # + # @return [Errors] a new instance of Errors + # + # source://prism//lib/prism/parse_result/errors.rb#15 + def initialize(parse_result); end + + # Formats the errors in a human-readable way and return them as a string. + # + # source://prism//lib/prism/parse_result/errors.rb#20 + def format; end + + # The parse result that contains the errors. + # + # source://prism//lib/prism/parse_result/errors.rb#12 + def parse_result; end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# This file is autoloaded only when `mark_newlines!` is called, so the +# re-opening of the various nodes in this file will only be performed in +# that case. We do that to avoid storing the extra `@newline` instance +# variable on every node if we don't need it. +# +# source://prism//lib/prism/parse_result/newlines.rb#26 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#28 + def initialize(lines); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#34 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#48 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#45 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#56 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#53 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#640 +class Prism::ParseWarning + # Create a new warning object with the given message and location. + # + # @return [ParseWarning] a new instance of ParseWarning + # + # source://prism//lib/prism/parse_result.rb#655 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#663 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#668 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # source://prism//lib/prism/parse_result.rb#652 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this warning in the source. + # + # source://prism//lib/prism/parse_result.rb#649 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#646 + sig { returns(String) } + def message; end + + # The type of warning. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#643 + sig { returns(Symbol) } + def type; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#38 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#64 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#71 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#60 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#87 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#103 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#109 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#144 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#119 + def compile_array_pattern_node(node); end + + # Compile a name associated with a constant. + # + # source://prism//lib/prism/pattern.rb#169 + def compile_constant_name(node, name); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#149 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#164 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#114 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#185 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#215 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#244 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#220 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#228 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#236 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#41 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#44 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#15442 +class Prism::PinnedExpressionNode < ::Prism::Node + # Initialize a new PinnedExpressionNode node. + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#15444 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15581 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15456 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15461 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15478 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15473 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#15483 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15488 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } + # + # source://prism//lib/prism/node.rb#15491 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [expression] + # + # source://prism//lib/prism/node.rb#15466 + def each_child_node; end + + # The expression used in the pinned expression + # + # foo in ^(bar) + # ^^^ + # + # source://prism//lib/prism/node.rb#15499 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15565 + sig { override.returns(String) } + def inspect; end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#15555 + sig { returns(String) } + def lparen; end + + # The location of the opening parenthesis. + # + # foo in ^(bar) + # ^ + # + # source://prism//lib/prism/node.rb#15521 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15550 + sig { returns(String) } + def operator; end + + # The location of the `^` operator + # + # foo in ^(bar) + # ^ + # + # source://prism//lib/prism/node.rb#15505 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#15560 + sig { returns(String) } + def rparen; end + + # The location of the closing parenthesis. + # + # foo in ^(bar) + # ^ + # + # source://prism//lib/prism/node.rb#15537 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15529 + def save_lparen_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15513 + def save_operator_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15545 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15570 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15575 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#15594 +class Prism::PinnedVariableNode < ::Prism::Node + # Initialize a new PinnedVariableNode node. + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#15596 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, variable, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15689 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15606 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15628 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15623 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#15633 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15638 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#15641 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [variable] + # + # source://prism//lib/prism/node.rb#15616 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15673 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15668 + sig { returns(String) } + def operator; end + + # The location of the `^` operator + # + # foo in ^bar + # ^ + # + # source://prism//lib/prism/node.rb#15655 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15663 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15678 + sig { override.returns(Symbol) } + def type; end + + # The variable used in the pinned expression + # + # foo in ^bar + # ^^^ + # + # source://prism//lib/prism/node.rb#15649 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15683 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15700 +class Prism::PostExecutionNode < ::Prism::Node + # Initialize a new PostExecutionNode node. + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#15702 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15829 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15714 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15719 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15808 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15785 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15738 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15731 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#15743 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15748 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#15751 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#15724 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15813 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15798 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15759 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15803 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15772 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15793 + def save_closing_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15767 + def save_keyword_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15780 + def save_opening_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15756 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15818 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15823 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15842 +class Prism::PreExecutionNode < ::Prism::Node + # Initialize a new PreExecutionNode node. + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#15844 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15971 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15856 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15950 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15927 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15880 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15873 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#15885 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15890 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#15893 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#15866 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15955 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15940 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15901 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15945 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15914 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15935 + def save_closing_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15909 + def save_keyword_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#15922 + def save_opening_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15898 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15960 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15965 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#15981 +class Prism::ProgramNode < ::Prism::Node + # Initialize a new ProgramNode node. + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#15983 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).void + end + def initialize(source, node_id, location, flags, locals, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16055 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15993 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#15998 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16015 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16010 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode + # + # source://prism//lib/prism/node.rb#16020 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } + # + # source://prism//lib/prism/node.rb#16028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#16003 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16039 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#16033 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#16036 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16044 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16049 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#19876 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#19878 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16070 +class Prism::RangeNode < ::Prism::Node + # Initialize a new RangeNode node. + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#16072 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16185 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16083 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16109 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16101 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode + # + # source://prism//lib/prism/node.rb#16114 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16119 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#16122 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [left] + # + # source://prism//lib/prism/node.rb#16093 + def each_child_node; end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16127 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16169 + sig { override.returns(String) } + def inspect; end + + # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # source://prism//lib/prism/node.rb#16138 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#16164 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#16151 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # source://prism//lib/prism/node.rb#16148 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16159 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16174 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16179 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#16198 +class Prism::RationalNode < ::Prism::Node + # Initialize a new RationalNode node. + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#16200 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).void + end + def initialize(source, node_id, location, flags, numerator, denominator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16210 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16249 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16215 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16231 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16226 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode + # + # source://prism//lib/prism/node.rb#16236 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16254 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16241 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } + # + # source://prism//lib/prism/node.rb#16244 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The denominator of the rational number. + # + # 1.5r # denominator 2 + # + # source://prism//lib/prism/node.rb#16276 + sig { returns(Integer) } + def denominator; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#16220 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16264 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16279 + sig { override.returns(String) } + def inspect; end + + # The numerator of the rational number. + # + # 1.5r # numerator 3 + # + # source://prism//lib/prism/node.rb#16271 + sig { returns(Integer) } + def numerator; end + + # Returns the value of the node as an IntegerNode or a FloatNode. This + # method is deprecated in favor of #value or #numerator/#denominator. + # + # source://prism//lib/prism/node_ext.rb#123 + def numeric; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16259 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16284 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#117 + sig { returns(Rational) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16289 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#16307 +class Prism::RedoNode < ::Prism::Node + # Initialize a new RedoNode node. + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#16309 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16372 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16317 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16338 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16333 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode + # + # source://prism//lib/prism/node.rb#16343 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16348 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#16351 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#16327 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16356 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16361 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16366 + def type; end + end +end + +# The Reflection module provides the ability to reflect on the structure of +# the syntax tree itself, as opposed to looking at a single syntax tree. This +# is useful in metaprogramming contexts. +# +# source://prism//lib/prism/reflection.rb#16 +module Prism::Reflection + class << self + # Returns the fields for the given node. + # + # source://prism//lib/prism/reflection.rb#107 + sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } + def fields_for(node); end + end +end + +# A constant field represents a constant value on a node. Effectively, it +# represents an identifier found within the source. It resolves to a symbol +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#48 +class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end + +# A constant list field represents a list of constant values on a node. It +# resolves to an array of symbols in Ruby. +# +# source://prism//lib/prism/reflection.rb#58 +class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end + +# A field represents a single piece of data on a node. It is the base class +# for all other field types. +# +# source://prism//lib/prism/reflection.rb#19 +class Prism::Reflection::Field + # Initializes the field with the given name. + # + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/reflection.rb#24 + sig { params(name: Symbol).void } + def initialize(name); end + + # The name of the field. + # + # source://prism//lib/prism/reflection.rb#21 + sig { returns(Symbol) } + def name; end +end + +# A flags field represents a bitset of flags on a node. It resolves to an +# integer in Ruby. Note that the flags cannot be accessed directly on the +# node because the integer is kept private. Instead, the various flags in +# the bitset should be accessed through their query methods. +# +# source://prism//lib/prism/reflection.rb#95 +class Prism::Reflection::FlagsField < ::Prism::Reflection::Field + # Initializes the flags field with the given name and flags. + # + # @return [FlagsField] a new instance of FlagsField + # + # source://prism//lib/prism/reflection.rb#100 + sig { params(name: Symbol, flags: T::Array[Symbol]).void } + def initialize(name, flags); end + + # The names of the flags in the bitset. + # + # source://prism//lib/prism/reflection.rb#97 + sig { returns(T::Array[Symbol]) } + def flags; end +end + +# A float field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# source://prism//lib/prism/reflection.rb#88 +class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end + +# An integer field represents an integer value. It is used to represent the +# value of an integer literal, the depth of local variables, and the number +# of a numbered reference. It resolves to an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#82 +class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end + +# A location field represents the location of some part of the node in the +# source code. For example, the location of a keyword or an operator. It +# resolves to a Prism::Location in Ruby. +# +# source://prism//lib/prism/reflection.rb#70 +class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end + +# A node field represents a single child node in the syntax tree. It +# resolves to a Prism::Node in Ruby. +# +# source://prism//lib/prism/reflection.rb#31 +class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end + +# A node list field represents a list of child nodes in the syntax tree. It +# resolves to an array of Prism::Node instances in Ruby. +# +# source://prism//lib/prism/reflection.rb#42 +class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end + +# An optional constant field represents a constant value on a node that may +# or may not be present. It resolves to either a symbol or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#53 +class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end + +# An optional location field represents the location of some part of the +# node in the source code that may or may not be present. It resolves to +# either a Prism::Location or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#76 +class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end + +# An optional node field represents a single child node in the syntax tree +# that may or may not be present. It resolves to either a Prism::Node or nil +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#37 +class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end + +# A string field represents a string value on a node. It almost always +# represents the unescaped value of a string-like literal. It resolves to a +# string in Ruby. +# +# source://prism//lib/prism/reflection.rb#64 +class Prism::Reflection::StringField < ::Prism::Reflection::Field; end + +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#19882 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#19899 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#19896 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://prism//lib/prism/node.rb#19887 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19911 +Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#19914 +Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19908 +Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://prism//lib/prism/node.rb#19884 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://prism//lib/prism/node.rb#19890 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://prism//lib/prism/node.rb#19893 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#19905 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#19902 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#16381 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new RegularExpressionNode node. + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#16383 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16562 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16395 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16459 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16400 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16541 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#16515 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16416 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16411 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16536 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#16502 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#16421 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16426 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # source://prism//lib/prism/node.rb#16429 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#16405 + def each_child_node; end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16454 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16439 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16479 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16484 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16474 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16434 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16546 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16444 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16449 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16531 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#16489 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16523 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16510 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16497 + def save_opening_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16551 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#16528 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16469 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16464 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16556 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#23 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#26 + def options; end +end + +# Prism parses deterministically for the same input. This provides a nice +# property that is exposed through the #node_id API on nodes. Effectively this +# means that for the same input, these values will remain consistent every +# time the source is parsed. This means we can reparse the source same with a +# #node_id value and find the exact same node again. +# +# The Relocation module provides an API around this property. It allows you to +# "save" nodes and locations using a minimal amount of memory (just the +# node_id and a field identifier) and then reify them later. +# +# source://prism//lib/prism/relocation.rb#14 +module Prism::Relocation + class << self + # Create a new repository for the given filepath. + # + # source://prism//lib/prism/relocation.rb#496 + def filepath(value); end + + # Create a new repository for the given string. + # + # source://prism//lib/prism/relocation.rb#501 + def string(value); end + end +end + +# A field representing the start and end character columns. +# +# source://prism//lib/prism/relocation.rb#270 +class Prism::Relocation::CharacterColumnsField + # Fetches the start and end character column of a value. + # + # source://prism//lib/prism/relocation.rb#272 + def fields(value); end +end + +# A field representing the start and end character offsets. +# +# source://prism//lib/prism/relocation.rb#218 +class Prism::Relocation::CharacterOffsetsField + # Fetches the start and end character offset of a value. + # + # source://prism//lib/prism/relocation.rb#220 + def fields(value); end +end + +# A field representing the start and end code unit columns for a specific +# encoding. +# +# source://prism//lib/prism/relocation.rb#282 +class Prism::Relocation::CodeUnitColumnsField + # Initialize a new field with the associated repository and encoding. + # + # @return [CodeUnitColumnsField] a new instance of CodeUnitColumnsField + # + # source://prism//lib/prism/relocation.rb#291 + def initialize(repository, encoding); end + + # The associated encoding for the code units. + # + # source://prism//lib/prism/relocation.rb#288 + def encoding; end + + # Fetches the start and end code units column of a value for a particular + # encoding. + # + # source://prism//lib/prism/relocation.rb#299 + def fields(value); end + + # The repository object that is used for lazily creating a code units + # cache. + # + # source://prism//lib/prism/relocation.rb#285 + def repository; end + + private + + # Lazily create a code units cache for the associated encoding. + # + # source://prism//lib/prism/relocation.rb#309 + def cache; end +end + +# A field representing the start and end code unit offsets. +# +# source://prism//lib/prism/relocation.rb#229 +class Prism::Relocation::CodeUnitOffsetsField + # Initialize a new field with the associated repository and encoding. + # + # @return [CodeUnitOffsetsField] a new instance of CodeUnitOffsetsField + # + # source://prism//lib/prism/relocation.rb#238 + def initialize(repository, encoding); end + + # The associated encoding for the code units. + # + # source://prism//lib/prism/relocation.rb#235 + def encoding; end + + # Fetches the start and end code units offset of a value for a particular + # encoding. + # + # source://prism//lib/prism/relocation.rb#246 + def fields(value); end + + # A pointer to the repository object that is used for lazily creating a + # code units cache. + # + # source://prism//lib/prism/relocation.rb#232 + def repository; end + + private + + # Lazily create a code units cache for the associated encoding. + # + # source://prism//lib/prism/relocation.rb#256 + def cache; end +end + +# A field representing the start and end byte columns. +# +# source://prism//lib/prism/relocation.rb#262 +class Prism::Relocation::ColumnsField + # Fetches the start and end byte column of a value. + # + # source://prism//lib/prism/relocation.rb#264 + def fields(value); end +end + +# An abstract field used as the parent class of the two comments fields. +# +# source://prism//lib/prism/relocation.rb#315 +class Prism::Relocation::CommentsField + private + + # Create comment objects from the given values. + # + # source://prism//lib/prism/relocation.rb#330 + def comments(values); end +end + +# An object that represents a slice of a comment. +# +# source://prism//lib/prism/relocation.rb#317 +class Prism::Relocation::CommentsField::Comment + # Initialize a new comment with the given slice. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/relocation.rb#322 + def initialize(slice); end + + # The slice of the comment. + # + # source://prism//lib/prism/relocation.rb#319 + def slice; end +end + +# An entry in a repository that will lazily reify its values when they are +# first accessed. +# +# source://prism//lib/prism/relocation.rb#17 +class Prism::Relocation::Entry + # Initialize a new entry with the given repository. + # + # @return [Entry] a new instance of Entry + # + # source://prism//lib/prism/relocation.rb#25 + def initialize(repository); end + + # Fetch the leading and trailing comments of the value. + # + # source://prism//lib/prism/relocation.rb#120 + def comments; end + + # Fetch the end character column of the value. + # + # source://prism//lib/prism/relocation.rb#93 + def end_character_column; end + + # Fetch the end character offset of the value. + # + # source://prism//lib/prism/relocation.rb#61 + def end_character_offset; end + + # Fetch the end code units column of the value, for the encoding that was + # configured on the repository. + # + # source://prism//lib/prism/relocation.rb#105 + def end_code_units_column; end + + # Fetch the end code units offset of the value, for the encoding that was + # configured on the repository. + # + # source://prism//lib/prism/relocation.rb#73 + def end_code_units_offset; end + + # Fetch the end byte column of the value. + # + # source://prism//lib/prism/relocation.rb#83 + def end_column; end + + # Fetch the end line of the value. + # + # source://prism//lib/prism/relocation.rb#41 + def end_line; end + + # Fetch the end byte offset of the value. + # + # source://prism//lib/prism/relocation.rb#51 + def end_offset; end + + # Fetch the filepath of the value. + # + # source://prism//lib/prism/relocation.rb#31 + def filepath; end + + # Fetch the leading comments of the value. + # + # source://prism//lib/prism/relocation.rb#110 + def leading_comments; end + + # Reify the values on this entry with the given values. This is an + # internal-only API that is called from the repository when it is time to + # reify the values. + # + # source://prism//lib/prism/relocation.rb#127 + def reify!(values); end + + # Fetch the start character column of the value. + # + # source://prism//lib/prism/relocation.rb#88 + def start_character_column; end + + # Fetch the start character offset of the value. + # + # source://prism//lib/prism/relocation.rb#56 + def start_character_offset; end + + # Fetch the start code units column of the value, for the encoding that + # was configured on the repository. + # + # source://prism//lib/prism/relocation.rb#99 + def start_code_units_column; end + + # Fetch the start code units offset of the value, for the encoding that + # was configured on the repository. + # + # source://prism//lib/prism/relocation.rb#67 + def start_code_units_offset; end + + # Fetch the start byte column of the value. + # + # source://prism//lib/prism/relocation.rb#78 + def start_column; end + + # Fetch the start line of the value. + # + # source://prism//lib/prism/relocation.rb#36 + def start_line; end + + # Fetch the start byte offset of the value. + # + # source://prism//lib/prism/relocation.rb#46 + def start_offset; end + + # Fetch the trailing comments of the value. + # + # source://prism//lib/prism/relocation.rb#115 + def trailing_comments; end + + private + + # Fetch a value from the entry, raising an error if it is missing. + # + # source://prism//lib/prism/relocation.rb#135 + def fetch_value(name); end + + # Return the values from the repository, reifying them if necessary. + # + # source://prism//lib/prism/relocation.rb#143 + def values; end +end + +# Raised if a value that could potentially be on an entry is missing +# because it was either not configured on the repository or it has not yet +# been fetched. +# +# source://prism//lib/prism/relocation.rb#21 +class Prism::Relocation::Entry::MissingValueError < ::StandardError; end + +# A field that represents the file path. +# +# source://prism//lib/prism/relocation.rb#186 +class Prism::Relocation::FilepathField + # Initialize a new field with the given file path. + # + # @return [FilepathField] a new instance of FilepathField + # + # source://prism//lib/prism/relocation.rb#191 + def initialize(value); end + + # Fetch the file path. + # + # source://prism//lib/prism/relocation.rb#196 + def fields(_value); end + + # The file path that this field represents. + # + # source://prism//lib/prism/relocation.rb#188 + def value; end +end + +# A field representing the leading comments. +# +# source://prism//lib/prism/relocation.rb#336 +class Prism::Relocation::LeadingCommentsField < ::Prism::Relocation::CommentsField + # Fetches the leading comments of a value. + # + # source://prism//lib/prism/relocation.rb#338 + def fields(value); end +end + +# A field representing the start and end lines. +# +# source://prism//lib/prism/relocation.rb#202 +class Prism::Relocation::LinesField + # Fetches the start and end line of a value. + # + # source://prism//lib/prism/relocation.rb#204 + def fields(value); end +end + +# A field representing the start and end byte offsets. +# +# source://prism//lib/prism/relocation.rb#210 +class Prism::Relocation::OffsetsField + # Fetches the start and end byte offset of a value. + # + # source://prism//lib/prism/relocation.rb#212 + def fields(value); end +end + +# A repository is a configured collection of fields and a set of entries +# that knows how to reparse a source and reify the values. +# +# source://prism//lib/prism/relocation.rb#353 +class Prism::Relocation::Repository + # Initialize a new repository with the given source. + # + # @return [Repository] a new instance of Repository + # + # source://prism//lib/prism/relocation.rb#370 + def initialize(source); end + + # Configure the character columns field for this repository and return + # self. + # + # source://prism//lib/prism/relocation.rb#416 + def character_columns; end + + # Configure the character offsets field for this repository and return + # self. + # + # source://prism//lib/prism/relocation.rb#399 + def character_offsets; end + + # Configure the code unit columns field for this repository for a specific + # encoding and return self. + # + # source://prism//lib/prism/relocation.rb#422 + def code_unit_columns(encoding); end + + # Configure the code unit offsets field for this repository for a specific + # encoding and return self. + # + # source://prism//lib/prism/relocation.rb#405 + def code_unit_offsets(encoding); end + + # Create a code units cache for the given encoding from the source. + # + # source://prism//lib/prism/relocation.rb#377 + def code_units_cache(encoding); end + + # Configure the columns field for this repository and return self. + # + # source://prism//lib/prism/relocation.rb#410 + def columns; end + + # Configure both the leading and trailing comment fields for this + # repository and return self. + # + # source://prism//lib/prism/relocation.rb#440 + def comments; end + + # This method is called from nodes and locations when they want to enter + # themselves into the repository. It it internal-only and meant to be + # called from the #save* APIs. + # + # source://prism//lib/prism/relocation.rb#447 + def enter(node_id, field_name); end + + # The entries that have been saved on this repository. + # + # source://prism//lib/prism/relocation.rb#367 + def entries; end + + # The fields that have been configured on this repository. + # + # source://prism//lib/prism/relocation.rb#364 + def fields; end + + # Configure the filepath field for this repository and return self. + # + # @raise [ConfigurationError] + # + # source://prism//lib/prism/relocation.rb#382 + def filepath; end + + # Configure the leading comments field for this repository and return + # self. + # + # source://prism//lib/prism/relocation.rb#428 + def leading_comments; end + + # Configure the lines field for this repository and return self. + # + # source://prism//lib/prism/relocation.rb#388 + def lines; end + + # Configure the offsets field for this repository and return self. + # + # source://prism//lib/prism/relocation.rb#393 + def offsets; end + + # This method is called from the entries in the repository when they need + # to reify their values. It is internal-only and meant to be called from + # the various value APIs. + # + # source://prism//lib/prism/relocation.rb#456 + def reify!; end + + # The source associated with this repository. This will be either a + # SourceFilepath (the most common use case) or a SourceString. + # + # source://prism//lib/prism/relocation.rb#361 + def source; end + + # Configure the trailing comments field for this repository and return + # self. + # + # source://prism//lib/prism/relocation.rb#434 + def trailing_comments; end + + private + + # Append the given field to the repository and return the repository so + # that these calls can be chained. + # + # @raise [ConfigurationError] + # + # source://prism//lib/prism/relocation.rb#488 + def field(name, value); end +end + +# Raised when multiple fields of the same type are configured on the same +# repository. +# +# source://prism//lib/prism/relocation.rb#356 +class Prism::Relocation::Repository::ConfigurationError < ::StandardError; end + +# Represents the source of a repository that will be reparsed. +# +# source://prism//lib/prism/relocation.rb#149 +class Prism::Relocation::Source + # Initialize the source with the given value. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/relocation.rb#154 + def initialize(value); end + + # Create a code units cache for the given encoding. + # + # source://prism//lib/prism/relocation.rb#164 + def code_units_cache(encoding); end + + # Reparse the value and return the parse result. + # + # @raise [NotImplementedError] + # + # source://prism//lib/prism/relocation.rb#159 + def result; end + + # The value that will need to be reparsed. + # + # source://prism//lib/prism/relocation.rb#151 + def value; end +end + +# A source that is represented by a file path. +# +# source://prism//lib/prism/relocation.rb#170 +class Prism::Relocation::SourceFilepath < ::Prism::Relocation::Source + # Reparse the file and return the parse result. + # + # source://prism//lib/prism/relocation.rb#172 + def result; end +end + +# A source that is represented by a string. +# +# source://prism//lib/prism/relocation.rb#178 +class Prism::Relocation::SourceString < ::Prism::Relocation::Source + # Reparse the string and return the parse result. + # + # source://prism//lib/prism/relocation.rb#180 + def result; end +end + +# A field representing the trailing comments. +# +# source://prism//lib/prism/relocation.rb#344 +class Prism::Relocation::TrailingCommentsField < ::Prism::Relocation::CommentsField + # Fetches the trailing comments of a value. + # + # source://prism//lib/prism/relocation.rb#346 + def fields(value); end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#16577 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # Initialize a new RequiredKeywordParameterNode node. + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#16579 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16665 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16589 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16594 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16610 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16605 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#16615 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16620 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } + # + # source://prism//lib/prism/node.rb#16623 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#16599 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16649 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16633 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#16636 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16628 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16644 + def save_name_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16654 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16659 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#16678 +class Prism::RequiredParameterNode < ::Prism::Node + # Initialize a new RequiredParameterNode node. + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16680 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16752 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16689 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16710 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16705 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16715 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16720 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#16723 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#16699 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16736 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16733 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16728 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16741 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16746 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16763 +class Prism::RescueModifierNode < ::Prism::Node + # Initialize a new RescueModifierNode node. + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#16765 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16776 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16781 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16799 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16794 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#16804 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16809 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } + # + # source://prism//lib/prism/node.rb#16812 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [expression] + # + # source://prism//lib/prism/node.rb#16786 + def each_child_node; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#16817 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16841 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16836 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16820 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#116 + def newline_flag!(lines); end + + # attr_reader rescue_expression: Prism::node + # + # source://prism//lib/prism/node.rb#16833 + sig { returns(Prism::Node) } + def rescue_expression; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16828 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16851 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. +# +# source://prism//lib/prism/node.rb#16874 +class Prism::RescueNode < ::Prism::Node + # Initialize a new RescueNode node. + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#16876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, then_keyword_loc, statements, subsequent); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17033 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16891 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16896 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16921 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16911 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the subsequent rescue clause of the rescue node. This method is + # deprecated in favor of #subsequent. + # + # source://prism//lib/prism/node_ext.rb#497 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode + # + # source://prism//lib/prism/node.rb#16926 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#16931 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: RescueNode? } + # + # source://prism//lib/prism/node.rb#16934 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [reference] + # + # source://prism//lib/prism/node.rb#16901 + def each_child_node; end + + # attr_reader exceptions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#16952 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17017 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17002 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16939 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#17007 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#16955 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil + # + # source://prism//lib/prism/node.rb#16974 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end + def reference; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16947 + def save_keyword_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16969 + def save_operator_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#16991 + def save_then_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16996 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # attr_reader subsequent: RescueNode? + # + # source://prism//lib/prism/node.rb#16999 + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#17012 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#16977 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17022 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17027 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#17051 +class Prism::RestParameterNode < ::Prism::Node + # Initialize a new RestParameterNode node. + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#17053 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17164 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17064 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17085 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17080 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#17090 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17095 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#17098 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#17074 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17148 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#17108 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#17111 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17143 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17130 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17103 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Save the name_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17125 + def save_name_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17138 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17153 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17158 + def type; end + end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the requested structure, any comments that were encounters, and any errors +# that were encountered. +# +# source://prism//lib/prism/parse_result.rb#676 +class Prism::Result + # Create a new result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/parse_result.rb#698 + sig do + params( + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + + # Create a code units cache for the given encoding. + # + # source://prism//lib/prism/parse_result.rb#730 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#678 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. + # + # source://prism//lib/prism/parse_result.rb#686 + sig { returns(T.nilable(Prism::Location)) } + def data_loc; end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/parse_result.rb#708 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns the encoding of the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#713 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#689 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#725 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#681 + sig { returns(T::Array[Prism::MagicComment]) } + def magic_comments; end + + # A Source instance that represents the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#695 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#719 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#692 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#17177 +class Prism::RetryNode < ::Prism::Node + # Initialize a new RetryNode node. + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#17179 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17242 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17187 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17208 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17203 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode + # + # source://prism//lib/prism/node.rb#17213 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17218 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#17221 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#17197 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17226 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17231 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17236 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17251 +class Prism::ReturnNode < ::Prism::Node + # Initialize a new ReturnNode node. + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#17253 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, arguments); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17342 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17263 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#17318 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17268 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17287 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17280 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode + # + # source://prism//lib/prism/node.rb#17292 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17297 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } + # + # source://prism//lib/prism/node.rb#17300 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [arguments] + # + # source://prism//lib/prism/node.rb#17273 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17326 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17321 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17305 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17313 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17331 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17336 + def type; end + end +end + +# This object is passed to the various Prism.* methods that accept the +# `scopes` option as an element of the list. It defines both the local +# variables visible at that scope as well as the forwarding parameters +# available at that scope. +# +# source://prism//lib/prism/parse_result.rb#884 +class Prism::Scope + # Create a new scope object with the given locals and forwarding. + # + # @return [Scope] a new instance of Scope + # + # source://prism//lib/prism/parse_result.rb#895 + sig { params(locals: T::Array[Symbol], forwarding: T::Array[Symbol]).void } + def initialize(locals, forwarding); end + + # The list of local variables that are forwarded to the next scope. This + # should by defined as an array of symbols containing the specific values of + # :*, :**, :&, or :"...". + # + # source://prism//lib/prism/parse_result.rb#892 + sig { returns(T::Array[Symbol]) } + def forwarding; end + + # The list of local variables that are defined in this scope. This should be + # defined as an array of symbols. + # + # source://prism//lib/prism/parse_result.rb#887 + sig { returns(T::Array[Symbol]) } + def locals; end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#17353 +class Prism::SelfNode < ::Prism::Node + # Initialize a new SelfNode node. + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#17355 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17418 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17363 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17368 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17384 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17379 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode + # + # source://prism//lib/prism/node.rb#17389 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17394 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#17397 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#17373 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17402 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17407 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17412 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#17 +module Prism::Serialize + class << self + # Deserialize the dumped output from a request to lex or lex_file. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # source://prism//lib/prism/serialize.rb#87 + def load_lex(input, serialized, freeze); end + + # Deserialize the dumped output from a request to parse or parse_file. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # source://prism//lib/prism/serialize.rb#34 + def load_parse(input, serialized, freeze); end + + # Deserialize the dumped output from a request to parse_comments or + # parse_file_comments. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # source://prism//lib/prism/serialize.rb#131 + def load_parse_comments(input, serialized, freeze); end + + # Deserialize the dumped output from a request to parse_lex or + # parse_lex_file. + # + # The formatting of the source of this method is purposeful to illustrate + # the structure of the serialized data. + # + # source://prism//lib/prism/serialize.rb#153 + def load_parse_lex(input, serialized, freeze); end + end +end + +# source://prism//lib/prism/serialize.rb#202 +class Prism::Serialize::ConstantPool + # @return [ConstantPool] a new instance of ConstantPool + # + # source://prism//lib/prism/serialize.rb#205 + def initialize(input, serialized, base, size); end + + # source://prism//lib/prism/serialize.rb#213 + def get(index, encoding); end + + # Returns the value of attribute size. + # + # source://prism//lib/prism/serialize.rb#203 + def size; end +end + +# StringIO is synchronized and that adds a high overhead on TruffleRuby. +# +# source://prism//lib/prism/serialize.rb#256 +Prism::Serialize::FastStringIO = StringIO + +# source://prism//lib/prism/serialize.rb#259 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#262 + def initialize(source, serialized); end + + # @return [Boolean] + # + # source://prism//lib/prism/serialize.rb#270 + def eof?; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#260 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#260 + def io; end + + # source://prism//lib/prism/serialize.rb#304 + def load_comments(freeze); end + + # source://prism//lib/prism/serialize.rb#831 + def load_constant(constant_pool, encoding); end + + # source://prism//lib/prism/serialize.rb#275 + def load_constant_pool(constant_pool); end + + # source://prism//lib/prism/serialize.rb#782 + def load_double; end + + # source://prism//lib/prism/serialize.rb#797 + def load_embedded_string(encoding); end + + # source://prism//lib/prism/serialize.rb#292 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#667 + def load_error_level; end + + # source://prism//lib/prism/serialize.rb#682 + def load_errors(encoding, freeze); end + + # source://prism//lib/prism/serialize.rb#286 + def load_header; end + + # source://prism//lib/prism/serialize.rb#771 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#298 + def load_line_offsets(freeze); end + + # source://prism//lib/prism/serialize.rb#818 + def load_location(freeze); end + + # source://prism//lib/prism/serialize.rb#812 + def load_location_object(freeze); end + + # source://prism//lib/prism/serialize.rb#321 + def load_magic_comments(freeze); end + + # source://prism//lib/prism/serialize.rb#842 + def load_node(constant_pool, encoding, freeze); end + + # source://prism//lib/prism/serialize.rb#836 + def load_optional_constant(constant_pool, encoding); end + + # source://prism//lib/prism/serialize.rb#823 + def load_optional_location(freeze); end + + # source://prism//lib/prism/serialize.rb#827 + def load_optional_location_object(freeze); end + + # source://prism//lib/prism/serialize.rb#790 + def load_optional_node(constant_pool, encoding, freeze); end + + # source://prism//lib/prism/serialize.rb#801 + def load_string(encoding); end + + # source://prism//lib/prism/serialize.rb#733 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#786 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#766 + def load_varsint; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://prism//lib/prism/serialize.rb#752 + def load_varuint; end + + # source://prism//lib/prism/serialize.rb#701 + def load_warning_level; end + + # source://prism//lib/prism/serialize.rb#714 + def load_warnings(encoding, freeze); end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#260 + def source; end +end + +# source://prism//lib/prism/serialize.rb#338 +Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#20 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#24 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#28 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#2227 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. +# +# C = { a: 1 } +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17428 +class Prism::ShareableConstantNode < ::Prism::Node + # Initialize a new ShareableConstantNode node. + # + # @return [ShareableConstantNode] a new instance of ShareableConstantNode + # + # source://prism//lib/prism/node.rb#17430 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).void + end + def initialize(source, node_id, location, flags, write); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17513 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17439 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17444 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17461 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17456 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode + # + # source://prism//lib/prism/node.rb#17466 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17471 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } + # + # source://prism//lib/prism/node.rb#17474 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [write] + # + # source://prism//lib/prism/node.rb#17449 + def each_child_node; end + + # def experimental_copy?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17489 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17484 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17497 + sig { override.returns(String) } + def inspect; end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17479 + sig { returns(T::Boolean) } + def literal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17502 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#17494 + sig do + returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) + end + def write; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17507 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#19918 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#19926 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value experimental everything +# +# source://prism//lib/prism/node.rb#19923 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value literal +# +# source://prism//lib/prism/node.rb#19920 +Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17524 +class Prism::SingletonClassNode < ::Prism::Node + # Initialize a new SingletonClassNode node. + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#17526 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17663 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#17616 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17632 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17587 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17566 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17558 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#17571 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17576 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#17579 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [expression] + # + # source://prism//lib/prism/node.rb#17550 + def each_child_node; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17642 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17619 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#17613 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17647 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#17584 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17637 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17600 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the class_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17595 + def save_class_keyword_loc(repository); end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17627 + def save_end_keyword_loc(repository); end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17608 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17652 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17657 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#8 +class Prism::Source + # Create a new source object with the given source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#46 + sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } + def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + + # Converts the line number and column in bytes to a byte offset. + # + # source://prism//lib/prism/parse_result.rb#80 + def byte_offset(line, column); end + + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#117 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#112 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Generate a cache that targets a specific encoding for calculating code + # unit offsets. + # + # source://prism//lib/prism/parse_result.rb#145 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # source://prism//lib/prism/parse_result.rb#151 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # boundary. Second, it's possible that the source code will contain a + # character that has no equivalent in the given encoding. + # + # source://prism//lib/prism/parse_result.rb#133 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end + + # Return the column number for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#107 + sig { params(byte_offset: Integer).returns(Integer) } + def column(byte_offset); end + + # Freeze this object and the objects it contains. + # + # source://prism//lib/prism/parse_result.rb#156 + def deep_freeze; end + + # Returns the encoding of the source code, which is set by parameters to the + # parser or by the encoding magic comment. + # + # source://prism//lib/prism/parse_result.rb#64 + sig { returns(Encoding) } + def encoding; end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#90 + sig { params(byte_offset: Integer).returns(Integer) } + def line(byte_offset); end + + # Returns the byte offset of the end of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#102 + def line_end(byte_offset); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#96 + sig { params(byte_offset: Integer).returns(Integer) } + def line_start(byte_offset); end + + # Returns the lines of the source code as an array of strings. + # + # source://prism//lib/prism/parse_result.rb#69 + sig { returns(T::Array[String]) } + def lines; end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#43 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Replace the value of offsets with the given value. + # + # source://prism//lib/prism/parse_result.rb#58 + sig { params(offsets: T::Array[Integer]).void } + def replace_offsets(offsets); end + + # Replace the value of start_line with the given value. + # + # source://prism//lib/prism/parse_result.rb#53 + sig { params(start_line: Integer).void } + def replace_start_line(start_line); end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # source://prism//lib/prism/parse_result.rb#75 + sig { params(byte_offset: Integer, length: Integer).returns(String) } + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#37 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#40 + sig { returns(Integer) } + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#166 + def find_line(byte_offset); end + + class << self + # Create a new source object with the given source code. This method should + # be used instead of `new` and it will return either a `Source` or a + # specialized and more performant `ASCIISource` if no multibyte characters + # are present in the source code. + # + # source://prism//lib/prism/parse_result.rb#13 + def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17679 +class Prism::SourceEncodingNode < ::Prism::Node + # Initialize a new SourceEncodingNode node. + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17681 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17744 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17689 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17710 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17705 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17715 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17720 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#17723 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#17699 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17728 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17733 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17738 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17753 +class Prism::SourceFileNode < ::Prism::Node + # Initialize a new SourceFileNode node. + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#17755 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).void + end + def initialize(source, node_id, location, flags, filepath); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17842 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17764 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17769 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17785 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17780 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#17790 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17795 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } + # + # source://prism//lib/prism/node.rb#17798 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#17774 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. + # + # source://prism//lib/prism/node.rb#17823 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17808 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17803 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17813 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17826 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17818 + sig { returns(T::Boolean) } + def mutable?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17831 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17836 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17853 +class Prism::SourceLineNode < ::Prism::Node + # Initialize a new SourceLineNode node. + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#17855 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17918 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17863 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17868 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17884 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17879 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#17889 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17894 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#17897 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#17873 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17902 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#17907 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#17912 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#17927 +class Prism::SplatNode < ::Prism::Node + # Initialize a new SplatNode node. + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#17929 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).void + end + def initialize(source, node_id, location, flags, operator_loc, expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18018 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17939 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17944 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17963 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17956 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode + # + # source://prism//lib/prism/node.rb#17968 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#17973 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } + # + # source://prism//lib/prism/node.rb#17976 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [expression] + # + # source://prism//lib/prism/node.rb#17949 + def each_child_node; end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#17994 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18002 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17997 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17981 + sig { returns(Prism::Location) } + def operator_loc; end + + # Save the operator_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#17989 + def save_operator_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18007 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18012 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18029 +class Prism::StatementsNode < ::Prism::Node + # Initialize a new StatementsNode node. + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#18031 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, body); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18099 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18040 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#18080 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18045 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18062 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18057 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode + # + # source://prism//lib/prism/node.rb#18067 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18072 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } + # + # source://prism//lib/prism/node.rb#18075 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#18050 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18083 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18088 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18093 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#19930 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19935 +Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19932 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19938 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19941 +Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#18116 +class Prism::StringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new StringNode node. + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#18118 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18274 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18130 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18135 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18253 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18221 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18151 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18146 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#18248 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#18208 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + # + # source://prism//lib/prism/node.rb#18156 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } + # + # source://prism//lib/prism/node.rb#18164 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#18140 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18174 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18169 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18179 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18258 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18184 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#18243 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#18189 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18235 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18216 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18203 + def save_opening_loc(repository); end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#75 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18263 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18240 + sig { returns(String) } + def unescaped; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18268 + def type; end + end +end + +# Query methods that allow categorizing strings based on their context for +# where they could be valid in a Ruby syntax tree. +# +# source://prism//lib/prism/string_query.rb#7 +class Prism::StringQuery + # Initialize a new query with the given string. + # + # @return [StringQuery] a new instance of StringQuery + # + # source://prism//lib/prism/string_query.rb#12 + def initialize(string); end + + # Whether or not this string is a valid constant name. + # + # @return [Boolean] + # + # source://prism//lib/prism/string_query.rb#22 + def constant?; end + + # Whether or not this string is a valid local variable name. + # + # @return [Boolean] + # + # source://prism//lib/prism/string_query.rb#17 + def local?; end + + # Whether or not this string is a valid method name. + # + # @return [Boolean] + # + # source://prism//lib/prism/string_query.rb#27 + def method_name?; end + + # The string that this query is wrapping. + # + # source://prism//lib/prism/string_query.rb#9 + def string; end + + class << self + # Mirrors the C extension's StringQuery::constant? method. + # + # @return [Boolean] + def constant?(_arg0); end + + # Mirrors the C extension's StringQuery::local? method. + # + # @return [Boolean] + def local?(_arg0); end + + # Mirrors the C extension's StringQuery::method_name? method. + # + # @return [Boolean] + def method_name?(_arg0); end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# If no arguments are provided (except for a block), it would be a `ForwardingSuperNode` instead. +# +# source://prism//lib/prism/node.rb#18293 +class Prism::SuperNode < ::Prism::Node + # Initialize a new SuperNode node. + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#18295 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18440 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18308 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Can be only `nil` when there are empty parentheses, like `super()`. + # + # source://prism//lib/prism/node.rb#18384 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: BlockNode | BlockArgumentNode | nil + # + # source://prism//lib/prism/node.rb#18406 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18313 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18334 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18326 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode + # + # source://prism//lib/prism/node.rb#18339 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18344 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # source://prism//lib/prism/node.rb#18347 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [arguments] + # + # source://prism//lib/prism/node.rb#18318 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18424 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18409 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18352 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#18414 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#18365 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#18419 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#18387 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18360 + def save_keyword_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18379 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18401 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18429 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18434 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#19945 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19950 +Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#19953 +Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19947 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#18457 +class Prism::SymbolNode < ::Prism::Node + # Initialize a new SymbolNode node. + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#18459 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18616 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18471 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18476 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18595 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18563 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18492 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18487 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode + # + # source://prism//lib/prism/node.rb#18497 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18502 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } + # + # source://prism//lib/prism/node.rb#18505 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#18481 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18515 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18520 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18510 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18600 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#18585 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#18525 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18577 + def save_closing_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18539 + def save_opening_loc(repository); end + + # Save the value_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18558 + def save_value_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18605 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18582 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#18590 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#18544 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18610 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#813 +class Prism::Token + # Create a new token object with the given type, value, and location. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/parse_result.rb#825 + sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } + def initialize(source, type, value, location); end + + # Returns true if the given other token is equal to this token. + # + # source://prism//lib/prism/parse_result.rb#860 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Implement the hash pattern matching interface for Token. + # + # source://prism//lib/prism/parse_result.rb#833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Freeze this object and the objects it contains. + # + # source://prism//lib/prism/parse_result.rb#873 + def deep_freeze; end + + # Returns a string representation of this token. + # + # source://prism//lib/prism/parse_result.rb#867 + def inspect; end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#838 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#845 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The type of token that this token is. + # + # source://prism//lib/prism/parse_result.rb#819 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#822 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # source://prism//lib/prism/parse_result.rb#815 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#7 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# Note that this version of the parser always parses using the latest +# version of Ruby syntax supported by Prism. If you want specific version +# support, use one of the version-specific subclasses, such as +# `Prism::Translation::Parser34`. If you want to parse using the same +# version of Ruby syntax as the currently running version of Ruby, use +# `Prism::Translation::ParserCurrent`. +# +# source://prism//lib/prism/translation/parser.rb#29 +class Prism::Translation::Parser < ::Parser::Base + # The `builder` argument is used to create the parser using our custom builder class by default. + # + # By using the `:parser` keyword argument, you can translate in a way that is compatible with + # the Parser gem using any parser. + # + # For example, in RuboCop for Ruby LSP, the following approach can be used to improve performance + # by reusing a pre-parsed `Prism::ParseLexResult`: + # + # class PrismPreparsed + # def initialize(prism_result) + # @prism_result = prism_result + # end + # + # def parse_lex(source, **options) + # @prism_result + # end + # end + # + # prism_preparsed = PrismPreparsed.new(prism_result) + # + # Prism::Translation::Ruby34.new(builder, parser: prism_preparsed) + # + # In an object passed to the `:parser` keyword argument, the `parse` and `parse_lex` methods + # should be implemented as needed. + # + # @return [Parser] a new instance of Parser + # + # source://prism//lib/prism/translation/parser.rb#74 + def initialize(builder = T.unsafe(nil), parser: T.unsafe(nil)); end + + # The default encoding for Ruby files is UTF-8. + # + # source://prism//lib/prism/translation/parser.rb#91 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # source://prism//lib/prism/translation/parser.rb#99 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # source://prism//lib/prism/translation/parser.rb#112 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # source://prism//lib/prism/translation/parser.rb#129 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # source://prism//lib/prism/translation/parser.rb#155 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#86 + sig { overridable.returns(Integer) } + def version; end + + # source://prism//lib/prism/translation/parser.rb#95 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # source://prism//lib/prism/translation/parser.rb#313 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # source://prism//lib/prism/translation/parser.rb#318 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#296 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # source://prism//lib/prism/translation/parser.rb#330 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # source://prism//lib/prism/translation/parser.rb#325 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # source://prism//lib/prism/translation/parser.rb#353 + def convert_for_prism(version); end + + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#174 + def error_diagnostic(error, offset_cache); end + + # Options for how prism should parse/lex the source. + # + # source://prism//lib/prism/translation/parser.rb#339 + def prism_options; end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # source://prism//lib/prism/translation/parser.rb#274 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#163 + def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#169 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#247 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser_versions.rb#7 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser_versions.rb#8 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser_versions.rb#14 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser_versions.rb#15 + sig { override.returns(Integer) } + def version; end +end + +# source://prism//lib/prism/translation/parser_versions.rb#27 +Prism::Translation::Parser35 = Prism::Translation::Parser40 + +# This class is the entry-point for Ruby 4.0 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser_versions.rb#21 +class Prism::Translation::Parser40 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser_versions.rb#22 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 4.1 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser_versions.rb#30 +class Prism::Translation::Parser41 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser_versions.rb#31 + def version; end +end + +# A builder that knows how to convert more modern Ruby syntax +# into whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/builder.rb#9 +class Prism::Translation::Parser::Builder < ::Parser::Builders::Default + # The following three lines have been added to support the `it` block parameter syntax in the source code below. + # + # if args.type == :itarg + # block_type = :itblock + # args = :it + # + # https://github.com/whitequark/parser/blob/v3.3.7.1/lib/parser/builders/default.rb#L1122-L1155 + # + # source://prism//lib/prism/translation/parser/builder.rb#22 + def block(method_call, begin_t, args, body, end_t); end + + # It represents the `it` block argument, which is not yet implemented in the Parser gem. + # + # source://prism//lib/prism/translation/parser/builder.rb#11 + def itarg; end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/compiler.rb#9 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#40 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#19 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#30 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#33 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#36 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#27 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#15 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#23 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#59 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#53 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#65 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#71 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#128 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#77 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#105 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#134 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#182 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#194 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#200 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#245 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#251 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#256 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#262 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/parser/compiler.rb#267 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#276 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#381 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#288 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#362 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#400 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#419 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#431 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#450 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#437 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#463 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#502 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#492 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#512 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#476 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#522 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#482 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#553 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#543 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#563 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#619 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#579 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#609 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#629 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#639 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#599 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#528 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#573 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#537 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#648 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#695 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#731 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#737 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#747 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#753 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#759 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#765 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1541 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#777 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#783 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#801 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#807 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#816 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#854 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#844 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#864 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#828 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#874 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#834 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#880 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#890 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#908 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#950 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#956 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#962 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#968 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1016 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#998 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1034 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1052 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1089 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1079 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1099 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1063 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1109 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1069 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1115 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1132 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1121 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1136 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1150 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1160 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1174 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1180 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1196 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1205 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1214 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1266 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1256 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1276 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1240 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1286 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1246 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1577 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1296 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1306 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1316 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1327 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1333 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1344 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1354 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1377 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1389 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1395 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1405 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1411 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1417 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1423 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1429 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1435 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1474 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1484 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1492 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1497 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1507 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1517 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1523 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1545 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1551 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1557 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1581 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1587 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1593 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1611 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1620 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1626 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1635 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1647 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1652 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1658 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1670 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1676 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1682 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1694 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1707 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1713 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1738 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1761 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1788 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1794 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1803 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1833 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1859 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1877 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1903 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1929 + def visit_yield_node(node); end + + private + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1943 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1950 + def find_forwarding(node); end + + # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1963 + def multi_target_elements(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1975 + def numeric_negate(message_loc, receiver); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1989 + def procarg0?(parameters); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2006 + def srange(location); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2011 + def srange_offsets(start_offset, end_offset); end + + # Constructs a new source range by finding a semicolon between the given + # start offset and end offset. If the semicolon is not found, it returns + # nil. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2021 + def srange_semicolon(start_offset, end_offset); end + + # When the content of a string node is split across multiple lines, the + # parser gem creates individual string nodes for each line the content is part of. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2138 + def string_nodes_from_interpolation(node, opening); end + + # Create parser string nodes from a single prism node. The parser gem + # "glues" strings together when a line continuation is encountered. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2150 + def string_nodes_from_line_continuations(unescaped, escaped, start_offset, opening); end + + # Transform a location into a token that the parser gem expects. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2029 + def token(location); end + + # Visit a block node on a call. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2034 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2069 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2115 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2127 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#11 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#2003 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# source://prism//lib/prism/translation/parser.rb#30 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# source://prism//lib/prism/translation/parser/lexer.rb#13 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#231 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#224 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # source://prism//lib/prism/translation/parser/lexer.rb#227 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # source://prism//lib/prism/translation/parser/lexer.rb#220 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # source://prism//lib/prism/translation/parser/lexer.rb#241 + def to_a; end + + private + + # Wonky heredoc tab/spaces rules. + # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L10548-L10558 + # + # source://prism//lib/prism/translation/parser/lexer.rb#593 + def calculate_heredoc_whitespace(heredoc_token_index); end + + # Escape a byte value, given the control and meta flags. + # + # source://prism//lib/prism/translation/parser/lexer.rb#735 + def escape_build(value, control, meta); end + + # Read an escape out of the string scanner, given the control and meta + # flags, and push the unescaped value into the result. + # + # source://prism//lib/prism/translation/parser/lexer.rb#743 + def escape_read(result, scanner, control, meta); end + + # Determine if characters preceeded by a backslash should be escaped or not + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/lexer.rb#804 + def interpolation?(quote); end + + # Parse a complex from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#564 + def parse_complex(value); end + + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#557 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#550 + def parse_integer(value); end + + # Parse a rational from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#579 + def parse_rational(value); end + + # Determine if the string is part of a %-style array. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/lexer.rb#814 + def percent_array?(quote); end + + # For %-arrays whitespace, the parser gem only considers whitespace before the newline. + # + # source://prism//lib/prism/translation/parser/lexer.rb#792 + def percent_array_leading_whitespace(string); end + + # In a percent array, certain whitespace can be preceeded with a backslash, + # causing the following characters to be part of the previous element. + # + # source://prism//lib/prism/translation/parser/lexer.rb#784 + def percent_array_unescape(string); end + + # Creates a new parser range, taking prisms byte offsets into account + # + # source://prism//lib/prism/translation/parser/lexer.rb#545 + def range(start_offset, end_offset); end + + # Regexp allow interpolation but are handled differently during unescaping + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/lexer.rb#809 + def regexp?(quote); end + + # Certain strings are merged into a single string token. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/lexer.rb#718 + def simplify_string?(value, quote); end + + # Wonky heredoc tab/spaces rules. + # https://github.com/ruby/prism/blob/v1.3.0/src/prism.c#L16528-L16545 + # + # source://prism//lib/prism/translation/parser/lexer.rb#640 + def trim_heredoc_whitespace(string, heredoc); end + + # Apply Ruby string escaping rules + # + # source://prism//lib/prism/translation/parser/lexer.rb#675 + def unescape_string(string, quote); end +end + +# Types of tokens that are allowed to continue a method call with comments in-between. +# For these, the parser gem doesn't emit a newline token after the last comment. +# +# source://prism//lib/prism/translation/parser/lexer.rb#211 +Prism::Translation::Parser::Lexer::COMMENT_CONTINUATION_TYPES = T.let(T.unsafe(nil), Set) + +# When one of these delimiters is encountered, then the other +# one is allowed to be escaped as well. +# +# source://prism//lib/prism/translation/parser/lexer.rb#666 +Prism::Translation::Parser::Lexer::DELIMITER_SYMETRY = T.let(T.unsafe(nil), Hash) + +# Escape sequences that have special and should appear unescaped in the resulting string. +# +# source://prism//lib/prism/translation/parser/lexer.rb#657 +Prism::Translation::Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash) + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#193 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#194 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# Heredocs are complex and require us to keep track of a bit of info to refer to later +# +# source://prism//lib/prism/translation/parser/lexer.rb#215 +class Prism::Translation::Parser::Lexer::HeredocData < ::Struct + # Returns the value of attribute common_whitespace + # + # @return [Object] the current value of common_whitespace + # + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def common_whitespace; end + + # Sets the attribute common_whitespace + # + # @param value [Object] the value to set the attribute common_whitespace to. + # @return [Object] the newly set value + # + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def common_whitespace=(_); end + + # Returns the value of attribute identifier + # + # @return [Object] the current value of identifier + # + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def identifier; end + + # Sets the attribute identifier + # + # @param value [Object] the value to set the attribute identifier to. + # @return [Object] the newly set value + # + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def identifier=(_); end + + class << self + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def [](*_arg0); end + + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def inspect; end + + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def keyword_init?; end + + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def members; end + + # source://prism//lib/prism/translation/parser/lexer.rb#215 + def new(*_arg0); end + end +end + +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned +# instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 +# +# source://prism//lib/prism/translation/parser/lexer.rb#200 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Set) + +# The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. +# The following token types are listed as those classified as `tLPAREN`. +# +# source://prism//lib/prism/translation/parser/lexer.rb#204 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Set) + +# https://github.com/whitequark/parser/blob/v3.3.6.0/lib/parser/lexer-strings.rl#L14 +# +# source://prism//lib/prism/translation/parser/lexer.rb#671 +Prism::Translation::Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Array) + +# source://prism//lib/prism/translation/parser/lexer.rb#237 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# source://prism//lib/prism/translation/parser/lexer.rb#19 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# These tokens are always skipped +# +# source://prism//lib/prism/translation/parser/lexer.rb#15 +Prism::Translation::Parser::Lexer::TYPES_ALWAYS_SKIP = T.let(T.unsafe(nil), Set) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#36 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [PrismDiagnostic] a new instance of PrismDiagnostic + # + # source://prism//lib/prism/translation/parser.rb#41 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#38 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#47 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://prism//lib/prism/translation/parser_current.rb#23 +Prism::Translation::ParserCurrent = Prism::Translation::Parser40 + +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# source://prism//lib/prism/translation/ripper.rb#42 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#482 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#479 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#495 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#473 + def filename; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#476 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#500 + sig { returns(T.untyped) } + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#470 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#599 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#589 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#623 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#643 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#834 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#653 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#813 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#841 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#854 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#863 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#870 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#934 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#940 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#946 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ripper.rb#996 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1020 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1251 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1040 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1229 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1295 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1320 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1343 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1330 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1356 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1409 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1395 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1423 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1374 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1437 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1384 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1479 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1465 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1493 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1580 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1514 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1566 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1594 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1608 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1444 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1507 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1454 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1617 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1664 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1686 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1702 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1723 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1734 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1752 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1759 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1784 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1798 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1804 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1821 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1828 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1838 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1887 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1873 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1901 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1852 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1915 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1862 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1922 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1937 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2015 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2021 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2026 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2033 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2068 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2051 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2085 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2102 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2144 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2130 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2158 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2112 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2172 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2119 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2185 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2204 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2223 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2251 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2264 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2294 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2301 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2306 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2318 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ripper.rb#2332 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2424 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2410 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2438 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2392 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2452 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2399 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2459 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2474 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2483 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2492 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#2498 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2504 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2521 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2575 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2595 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2609 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2616 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2625 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2630 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2637 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2647 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2657 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2667 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2694 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2708 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2717 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2723 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2738 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ripper.rb#2752 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2763 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2777 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2783 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2790 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2812 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2819 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2826 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2836 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2894 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2906 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2916 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2930 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ripper.rb#2936 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2942 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2952 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2959 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2966 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2979 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ripper.rb#2984 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3001 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3133 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3154 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3178 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3185 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3197 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3225 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3249 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3270 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3294 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3317 + def visit_yield_node(node); end + + private + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3457 + def _dispatch_0; end + + # source://prism//lib/prism/translation/ripper.rb#3458 + def _dispatch_1(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3459 + def _dispatch_2(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3460 + def _dispatch_3(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3461 + def _dispatch_4(arg, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3462 + def _dispatch_5(arg, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3463 + def _dispatch_7(arg, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # source://prism//lib/prism/translation/ripper.rb#3447 + def bounds(location); end + + # Returns true if the given node is a command node. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#1220 + def command?(node); end + + # This method is called when the parser found syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#3485 + def compile_error(msg); end + + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. + # + # source://prism//lib/prism/translation/ripper.rb#3500 + def dedent_string(string, width); end + + # Extract the arguments and block Ripper-style, which means if the block + # is like `&b` then it's moved to arguments. + # + # source://prism//lib/prism/translation/ripper.rb#1184 + def get_arguments_and_block(arguments_node, block_node); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_BEGIN(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_CHAR(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_END(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on___end__(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_alias(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_alias_error(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_aref(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_aref_field(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_arg_ambiguous(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_arg_paren(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_add_block(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_add_star(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_array(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_aryptn(arg, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assign(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assign_error(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assoc_new(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assoc_splat(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_assoclist_from_args(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_backref(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_backtick(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_bare_assoc_hash(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_begin(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_binary(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_block_var(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_blockarg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_bodystmt(arg, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_brace_block(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_break(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_call(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_case(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_class(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_class_name_error(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_comma(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_command(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_command_call(arg, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_comment(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_const(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_const_path_field(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_const_path_ref(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_const_ref(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_cvar(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_def(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_defined(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_defs(arg, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_do_block(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_dot2(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_dot3(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_dyna_symbol(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_else(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_elsif(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embdoc(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embdoc_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embdoc_end(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embexpr_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embexpr_end(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_embvar(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_ensure(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_fcall(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_field(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_float(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_fndptn(arg, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_for(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_gvar(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_hash(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_heredoc_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_heredoc_dedent(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_heredoc_end(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_hshptn(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ident(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_if(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_if_mod(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_ifop(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ignored_nl(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ignored_sp(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_imaginary(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_in(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_int(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_ivar(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_kw(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_kwrest_param(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_label(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_label_end(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_lambda(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_lbrace(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_lbracket(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_lparen(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_magic_comment(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_massign(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_method_add_arg(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_method_add_block(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_add_post(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_add_star(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mlhs_paren(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_module(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_add_star(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_mrhs_new_from_args(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_next(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_nl(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_nokw_param(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_op(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_opassign(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_operator_ambiguous(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_param_error(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_params(arg, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_paren(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_parse_error(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_period(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_program(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_qsymbols_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_qsymbols_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_qwords_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_qwords_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rational(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rbrace(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rbracket(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_regexp_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_regexp_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_regexp_end(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_regexp_literal(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_rescue(arg, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_rescue_mod(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_rest_param(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_return(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_rparen(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_sclass(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_semicolon(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_sp(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_stmts_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_concat(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_dvar(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_embexpr(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_string_literal(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_super(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_symbeg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbol(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbol_literal(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbols_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_symbols_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tlambda(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tlambeg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_top_const_field(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_top_const_ref(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tstring_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tstring_content(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_tstring_end(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_unary(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_undef(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_unless(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_unless_mod(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_until(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_until_mod(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_var_alias(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_var_field(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_var_ref(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_vcall(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_when(arg, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_while(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_while_mod(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_word_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_words_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_words_beg(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#3493 + def on_words_sep(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_xstring_add(arg, _); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_xstring_literal(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_yield(arg); end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#3471 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/translation/ripper.rb#3343 + def result; end + + # Returns true if there is a comma between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3352 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. + # + # source://prism//lib/prism/translation/ripper.rb#608 + def visit_alias_global_variable_node_value(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # source://prism//lib/prism/translation/ripper.rb#794 + def visit_arguments(elements); end + + # Visit the clauses of a begin node to form an on_bodystmt call. + # + # source://prism//lib/prism/translation/ripper.rb#878 + def visit_begin_node_clauses(location, node, allow_newline); end + + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. + # + # source://prism//lib/prism/translation/ripper.rb#913 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end + + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # source://prism//lib/prism/translation/ripper.rb#1198 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # source://prism//lib/prism/translation/ripper.rb#1546 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. + # + # source://prism//lib/prism/translation/ripper.rb#2681 + def visit_destructured_parameter_node(node); end + + # Visit a string that is expressed using a <<~ heredoc. + # + # source://prism//lib/prism/translation/ripper.rb#3052 + def visit_heredoc_node(parts, base); end + + # Ripper gives back the escaped string content but strips out the common + # leading whitespace. Prism gives back the unescaped string content and + # a location for the escaped string content. Unfortunately these don't + # work well together, so here we need to re-derive the common leading + # whitespace. + # + # source://prism//lib/prism/translation/ripper.rb#3027 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # source://prism//lib/prism/translation/ripper.rb#3098 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # source://prism//lib/prism/translation/ripper.rb#3115 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # source://prism//lib/prism/translation/ripper.rb#2534 + def visit_multi_target_node_targets(lefts, rest, rights, skippable); end + + # Visit a node that represents a number. We need to explicitly handle the + # unary - operator. + # + # source://prism//lib/prism/translation/ripper.rb#3391 + def visit_number_node(node); end + + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. + # + # source://prism//lib/prism/translation/ripper.rb#633 + def visit_pattern_node(node); end + + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. + # + # source://prism//lib/prism/translation/ripper.rb#2993 + def visit_statements_node_body(body); end + + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2283 + def visit_string_content(part); end + + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # source://prism//lib/prism/translation/ripper.rb#3364 + def visit_token(token, allow_keywords = T.unsafe(nil)); end + + # Dispatch a words_sep event that contains the space between the elements + # of list literals. + # + # source://prism//lib/prism/translation/ripper.rb#783 + def visit_words_sep(opening_loc, previous, current); end + + # Visit a node that represents a write value. This is used to handle the + # special case of an implicit array that is generated without brackets. + # + # source://prism//lib/prism/translation/ripper.rb#3409 + def visit_write_value(node); end + + # Returns true if there is a semicolon between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3357 + def void_stmt?(left, right, allow_newline); end + + # This method is called when weak warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3476 + def warn(fmt, *args); end + + # This method is called when strong warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3481 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # source://prism//lib/prism/translation/ripper.rb#71 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper.rb#463 + def lex_state_name(state); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # source://prism//lib/prism/translation/ripper.rb#45 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#393 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#428 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Tokenizes the Ruby program and returns an array of strings. + # The +filename+ and +lineno+ arguments are mostly ignored, since the + # return value is just the tokenized input. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # p Ripper.tokenize("def m(a) nil end") + # # => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"] + # + # source://prism//lib/prism/translation/ripper.rb#90 + def tokenize(*_arg0, **_arg1, &_arg2); end + end +end + +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#349 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#301 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#460 +Prism::Translation::Ripper::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#459 +Prism::Translation::Ripper::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_END = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#461 +Prism::Translation::Ripper::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#455 +Prism::Translation::Ripper::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#457 +Prism::Translation::Ripper::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper.rb#458 +Prism::Translation::Ripper::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/ripper/filter.rb#6 +class Prism::Translation::Ripper::Filter + # :stopdoc: + # + # @return [Filter] a new instance of Filter + # + # source://prism//lib/prism/translation/ripper/filter.rb#8 + def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper/filter.rb#23 + def column; end + + # source://prism//lib/prism/translation/ripper/filter.rb#15 + def filename; end + + # source://prism//lib/prism/translation/ripper/filter.rb#19 + def lineno; end + + # source://prism//lib/prism/translation/ripper/filter.rb#31 + def parse(init = T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper/filter.rb#27 + def state; end + + private + + # source://prism//lib/prism/translation/ripper/filter.rb#46 + def on_default(event, token, data); end +end + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#304 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# Ripper-internal bitflags. +# +# source://prism//lib/prism/translation/ripper.rb#449 +Prism::Translation::Ripper::LEX_STATE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/translation/ripper/lexer.rb#10 +class Prism::Translation::Ripper::Lexer < ::Prism::Translation::Ripper + # Pretty much just the same as Prism.lex_compat. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#111 + def lex(raise_errors: T.unsafe(nil)); end + + # Returns the lex_compat result wrapped in `Elem`. Errors are omitted. + # Since ripper is a streaming parser, tokens are expected to be emitted in the order + # that the parser encounters them. This is not implemented. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#118 + def parse(*_arg0, **_arg1, &_arg2); end + + # Similar to parse but ripper sorts the elements by position in the source. Also + # includes errors. Since prism does error recovery, in cases of syntax errors + # the result may differ greatly compared to ripper. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#127 + def scan(*_arg0, **_arg1, &_arg2); end +end + +# source://prism//lib/prism/translation/ripper/lexer.rb#50 +class Prism::Translation::Ripper::Lexer::Elem + # @return [Elem] a new instance of Elem + # + # source://prism//lib/prism/translation/ripper/lexer.rb#53 + def initialize(pos, event, tok, state, message = T.unsafe(nil)); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#61 + def [](index); end + + # Returns the value of attribute event. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def event; end + + # Sets the attribute event + # + # @param value the value to set the attribute event to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def event=(_arg0); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#78 + def inspect; end + + # Returns the value of attribute message. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def message; end + + # Sets the attribute message + # + # @param value the value to set the attribute message to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def message=(_arg0); end + + # Returns the value of attribute pos. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def pos=(_arg0); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#84 + def pretty_print(q); end + + # Returns the value of attribute state. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def state=(_arg0); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#101 + def to_a; end + + # source://prism//lib/prism/translation/ripper/lexer.rb#82 + def to_s; end + + # Returns the value of attribute tok. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def tok; end + + # Sets the attribute tok + # + # @param value the value to set the attribute tok to. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#51 + def tok=(_arg0); end +end + +# :stopdoc: +# +# source://prism//lib/prism/translation/ripper/lexer.rb#11 +class Prism::Translation::Ripper::Lexer::State + # @return [State] a new instance of State + # + # source://prism//lib/prism/translation/ripper/lexer.rb#15 + def initialize(i); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#36 + def &(i); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#35 + def ==(i); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#21 + def [](index); end + + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper/lexer.rb#38 + def allbits?(i); end + + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper/lexer.rb#39 + def anybits?(i); end + + # Returns the value of attribute to_s. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#33 + def inspect; end + + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper/lexer.rb#40 + def nobits?(i); end + + # source://prism//lib/prism/translation/ripper/lexer.rb#34 + def pretty_print(q); end + + # Returns the value of attribute to_int. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#32 + def to_i; end + + # Returns the value of attribute to_int. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#13 + def to_int; end + + # Returns the value of attribute to_s. + # + # source://prism//lib/prism/translation/ripper/lexer.rb#13 + def to_s; end + + # source://prism//lib/prism/translation/ripper/lexer.rb#37 + def |(i); end + + class << self + # source://prism//lib/prism/translation/ripper/lexer.rb#45 + def cached(i); end + end +end + +# Instances are frozen and there are only a handful of them so we cache them here. +# +# source://prism//lib/prism/translation/ripper/lexer.rb#43 +Prism::Translation::Ripper::Lexer::State::STATES = T.let(T.unsafe(nil), Hash) + +# This array contains name of parser events. +# +# source://prism//lib/prism/translation/ripper.rb#295 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#96 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#298 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#239 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#11 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#14 + def error; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_zsuper(*args); end + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#67 + def compile_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#18 + def dedent_element(e, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#62 + def on_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#25 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#75 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#93 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#97 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#80 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#110 + def on_mlhs_add_post(list, post); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#106 + def on_mlhs_add_star(list, star); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#102 + def on_mlhs_paren(list); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#118 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#116 + def on_xstring_new; end +end + +# This module is the entry-point for converting a prism syntax tree into the +# seattlerb/ruby_parser gem's syntax tree. +# +# source://prism//lib/prism/translation/ruby_parser.rb#20 +class Prism::Translation::RubyParser + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1917 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1923 + def parse_file(filepath); end + + # Parse the give file and translate it into the + # seattlerb/ruby_parser gem's Sexp format. This method is + # provided for API compatibility to RubyParser and takes an + # optional +timeout+ argument. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1931 + def process(ruby, file = T.unsafe(nil), timeout = T.unsafe(nil)); end + + private + + # Translate the given parse result and filepath into the + # seattlerb/ruby_parser gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1953 + def translate(result, filepath); end + + class << self + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1938 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1944 + def parse_file(filepath); end + end +end + +# A prism visitor that builds Sexp objects. +# +# source://prism//lib/prism/translation/ruby_parser.rb#22 +class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given file name. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/ruby_parser.rb#37 + def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # This is the name of the file that we are compiling. We set it on every + # Sexp object that is generated, and also use it to compile `__FILE__` + # nodes. + # + # source://prism//lib/prism/translation/ruby_parser.rb#26 + def file; end + + # Class variables will change their type based on if they are inside of + # a method definition or not, so we need to track that state. + # + # source://prism//lib/prism/translation/ruby_parser.rb#30 + def in_def; end + + # Some nodes will change their representation if they are inside of a + # pattern, so we need to track that state. + # + # source://prism//lib/prism/translation/ruby_parser.rb#34 + def in_pattern; end + + # ``` + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#55 + def visit_alias_global_variable_node(node); end + + # ``` + # alias foo bar + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#47 + def visit_alias_method_node(node); end + + # ``` + # foo => bar | baz + # ^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#63 + def visit_alternation_pattern_node(node); end + + # ``` + # a and b + # ^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#71 + def visit_and_node(node); end + + # ``` + # foo(bar) + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#128 + def visit_arguments_node(node); end + + # ``` + # [] + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#91 + def visit_array_node(node); end + + # ``` + # foo => [bar] + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#103 + def visit_array_pattern_node(node); end + + # ``` + # { a: 1 } + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#136 + def visit_assoc_node(node); end + + # ``` + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#147 + def visit_assoc_splat_node(node); end + + # ``` + # $+ + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#159 + def visit_back_reference_read_node(node); end + + # ``` + # begin end + # ^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#167 + def visit_begin_node(node); end + + # ``` + # foo(&bar) + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#202 + def visit_block_argument_node(node); end + + # ``` + # foo { |; bar| } + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#212 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # source://prism//lib/prism/translation/ruby_parser.rb#217 + def visit_block_node(node); end + + # ``` + # def foo(&bar); end + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#225 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ruby_parser.rb#230 + def visit_block_parameters_node(node); end + + # ``` + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#272 + def visit_break_node(node); end + + # ``` + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#346 + def visit_call_and_write_node(node); end + + # ``` + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#292 + def visit_call_node(node); end + + # ``` + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#334 + def visit_call_operator_write_node(node); end + + # ``` + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#358 + def visit_call_or_write_node(node); end + + # ``` + # foo.bar, = 1 + # ^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#383 + def visit_call_target_node(node); end + + # ``` + # foo => bar => baz + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#391 + def visit_capture_pattern_node(node); end + + # ``` + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#407 + def visit_case_match_node(node); end + + # ``` + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#399 + def visit_case_node(node); end + + # ``` + # class Foo; end + # ^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#415 + def visit_class_node(node); end + + # ``` + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#468 + def visit_class_variable_and_write_node(node); end + + # ``` + # @@foo += bar + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#460 + def visit_class_variable_operator_write_node(node); end + + # ``` + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#476 + def visit_class_variable_or_write_node(node); end + + # ``` + # @@foo + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#441 + def visit_class_variable_read_node(node); end + + # ``` + # @@foo, = bar + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#484 + def visit_class_variable_target_node(node); end + + # ``` + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#452 + def visit_class_variable_write_node(node); end + + # ``` + # Foo &&= bar + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#525 + def visit_constant_and_write_node(node); end + + # ``` + # Foo += bar + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#517 + def visit_constant_operator_write_node(node); end + + # ``` + # Foo ||= bar + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#533 + def visit_constant_or_write_node(node); end + + # ``` + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#580 + def visit_constant_path_and_write_node(node); end + + # ``` + # Foo::Bar + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#549 + def visit_constant_path_node(node); end + + # ``` + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#572 + def visit_constant_path_operator_write_node(node); end + + # ``` + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#588 + def visit_constant_path_or_write_node(node); end + + # ``` + # Foo::Bar, = baz + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#596 + def visit_constant_path_target_node(node); end + + # ``` + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#564 + def visit_constant_path_write_node(node); end + + # ``` + # Foo + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#498 + def visit_constant_read_node(node); end + + # ``` + # Foo, = bar + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#541 + def visit_constant_target_node(node); end + + # ``` + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#509 + def visit_constant_write_node(node); end + + # ``` + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#614 + def visit_def_node(node); end + + # ``` + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#649 + def visit_defined_node(node); end + + # ``` + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#657 + def visit_else_node(node); end + + # ``` + # "foo #{bar}" + # ^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#665 + def visit_embedded_statements_node(node); end + + # ``` + # "foo #@bar" + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#675 + def visit_embedded_variable_node(node); end + + # ``` + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#683 + def visit_ensure_node(node); end + + # ``` + # false + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#691 + def visit_false_node(node); end + + # ``` + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#699 + def visit_find_pattern_node(node); end + + # ``` + # if foo .. bar; end + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#707 + def visit_flip_flop_node(node); end + + # ``` + # 1.0 + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#719 + def visit_float_node(node); end + + # ``` + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#727 + def visit_for_node(node); end + + # ``` + # def foo(...); bar(...); end + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#735 + def visit_forwarding_arguments_node(node); end + + # ``` + # def foo(...); end + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#743 + def visit_forwarding_parameter_node(node); end + + # ``` + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#754 + def visit_forwarding_super_node(node); end + + # ``` + # $foo &&= bar + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#789 + def visit_global_variable_and_write_node(node); end + + # ``` + # $foo += bar + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#781 + def visit_global_variable_operator_write_node(node); end + + # ``` + # $foo ||= bar + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#797 + def visit_global_variable_or_write_node(node); end + + # ``` + # $foo + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#762 + def visit_global_variable_read_node(node); end + + # ``` + # $foo, = bar + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#805 + def visit_global_variable_target_node(node); end + + # ``` + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#773 + def visit_global_variable_write_node(node); end + + # ``` + # {} + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#813 + def visit_hash_node(node); end + + # ``` + # foo => {} + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#821 + def visit_hash_pattern_node(node); end + + # ``` + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#844 + def visit_if_node(node); end + + # 1i + # + # source://prism//lib/prism/translation/ruby_parser.rb#849 + def visit_imaginary_node(node); end + + # ``` + # { foo: } + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#857 + def visit_implicit_node(node); end + + # ``` + # foo { |bar,| } + # ^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#864 + def visit_implicit_rest_node(node); end + + # ``` + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#871 + def visit_in_node(node); end + + # ``` + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#901 + def visit_index_and_write_node(node); end + + # ``` + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#886 + def visit_index_operator_write_node(node); end + + # ``` + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#916 + def visit_index_or_write_node(node); end + + # ``` + # foo[bar], = 1 + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#931 + def visit_index_target_node(node); end + + # ``` + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#969 + def visit_instance_variable_and_write_node(node); end + + # ``` + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#961 + def visit_instance_variable_operator_write_node(node); end + + # ``` + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#977 + def visit_instance_variable_or_write_node(node); end + + # ``` + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#942 + def visit_instance_variable_read_node(node); end + + # ``` + # @foo, = bar + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#985 + def visit_instance_variable_target_node(node); end + + # ``` + # ^^^^^^^^ + # + # @foo, @bar = 1 + # ^^^^ ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#953 + def visit_instance_variable_write_node(node); end + + # ``` + # 1 + # ^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#993 + def visit_integer_node(node); end + + # ``` + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1001 + def visit_interpolated_match_last_line_node(node); end + + # ``` + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1020 + def visit_interpolated_regular_expression_node(node); end + + # ``` + # "foo #{bar}" + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1037 + def visit_interpolated_string_node(node); end + + # ``` + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1046 + def visit_interpolated_symbol_node(node); end + + # ``` + # `foo #{bar}` + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1055 + def visit_interpolated_x_string_node(node); end + + # ``` + # -> { it } + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1138 + def visit_it_local_variable_read_node(node); end + + # ``` + # foo(bar: baz) + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1146 + def visit_keyword_hash_node(node); end + + # ``` + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1157 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1162 + def visit_lambda_node(node); end + + # ``` + # foo &&= bar + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1213 + def visit_local_variable_and_write_node(node); end + + # ``` + # foo += bar + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1205 + def visit_local_variable_operator_write_node(node); end + + # ``` + # foo ||= bar + # ^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1221 + def visit_local_variable_or_write_node(node); end + + # ``` + # foo + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1182 + def visit_local_variable_read_node(node); end + + # ``` + # foo, = bar + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1229 + def visit_local_variable_target_node(node); end + + # ``` + # foo = 1 + # ^^^^^^^ + # + # foo, bar = 1 + # ^^^ ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1197 + def visit_local_variable_write_node(node); end + + # ``` + # if /foo/ then end + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1237 + def visit_match_last_line_node(node); end + + # ``` + # foo in bar + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1245 + def visit_match_predicate_node(node); end + + # ``` + # foo => bar + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1253 + def visit_match_required_node(node); end + + # ``` + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1261 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1268 + def visit_missing_node(node); end + + # ``` + # module Foo; end + # ^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1276 + def visit_module_node(node); end + + # ``` + # foo, bar = baz + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1302 + def visit_multi_target_node(node); end + + # ``` + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1314 + def visit_multi_write_node(node); end + + # ``` + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1340 + def visit_next_node(node); end + + # ``` + # nil + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1355 + def visit_nil_node(node); end + + # ``` + # def foo(**nil); end + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1363 + def visit_no_keywords_parameter_node(node); end + + # ``` + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1371 + def visit_numbered_parameters_node(node); end + + # ``` + # $1 + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1379 + def visit_numbered_reference_read_node(node); end + + # ``` + # def foo(bar: baz); end + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1387 + def visit_optional_keyword_parameter_node(node); end + + # ``` + # def foo(bar = 1); end + # ^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1395 + def visit_optional_parameter_node(node); end + + # ``` + # a or b + # ^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1403 + def visit_or_node(node); end + + # ``` + # def foo(bar, *baz); end + # ^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1423 + def visit_parameters_node(node); end + + # ``` + # () + # ^^ + # + # (1) + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1465 + def visit_parentheses_node(node); end + + # ``` + # foo => ^(bar) + # ^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1477 + def visit_pinned_expression_node(node); end + + # ``` + # foo = 1 and bar => ^foo + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1485 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1494 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1499 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1504 + def visit_program_node(node); end + + # ``` + # 0..5 + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1512 + def visit_range_node(node); end + + # ``` + # 1r + # ^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1536 + def visit_rational_node(node); end + + # ``` + # redo + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1544 + def visit_redo_node(node); end + + # ``` + # /foo/ + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1552 + def visit_regular_expression_node(node); end + + # ``` + # def foo(bar:); end + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1560 + def visit_required_keyword_parameter_node(node); end + + # ``` + # def foo(bar); end + # ^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1568 + def visit_required_parameter_node(node); end + + # ``` + # foo rescue bar + # ^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1576 + def visit_rescue_modifier_node(node); end + + # ``` + # begin; rescue; end + # ^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1584 + def visit_rescue_node(node); end + + # ``` + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1606 + def visit_rest_parameter_node(node); end + + # ``` + # retry + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1614 + def visit_retry_node(node); end + + # ``` + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1625 + def visit_return_node(node); end + + # ``` + # self + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1640 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1645 + def visit_shareable_constant_node(node); end + + # ``` + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1653 + def visit_singleton_class_node(node); end + + # ``` + # __ENCODING__ + # ^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1663 + def visit_source_encoding_node(node); end + + # ``` + # __FILE__ + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1672 + def visit_source_file_node(node); end + + # ``` + # __LINE__ + # ^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1680 + def visit_source_line_node(node); end + + # ``` + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1694 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1703 + def visit_statements_node(node); end + + # ``` + # "foo" + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1717 + def visit_string_node(node); end + + # ``` + # super(foo) + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1732 + def visit_super_node(node); end + + # ``` + # :foo + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1748 + def visit_symbol_node(node); end + + # ``` + # true + # ^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1756 + def visit_true_node(node); end + + # ``` + # undef foo + # ^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1764 + def visit_undef_node(node); end + + # ``` + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1776 + def visit_unless_node(node); end + + # ``` + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1787 + def visit_until_node(node); end + + # ``` + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1795 + def visit_when_node(node); end + + # ``` + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1806 + def visit_while_node(node); end + + # ``` + # `foo` + # ^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1814 + def visit_x_string_node(node); end + + # ``` + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1832 + def visit_yield_node(node); end + + private + + # Attach prism comments to the given sexp. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1839 + def attach_comments(sexp, node); end + + # If a class variable is written within a method definition, it has a + # different type than everywhere else. + # + # source://prism//lib/prism/translation/ruby_parser.rb#490 + def class_variable_write_type; end + + # Create a new compiler with the given options. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1850 + def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # Call nodes with operators following them will either be op_asgn or + # op_asgn2 nodes. That is determined by their call operator and their + # right-hand side. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ruby_parser.rb#369 + def op_asgn?(node); end + + # Call nodes with operators following them can use &. as an operator, + # which changes their type by prefixing "safe_". + # + # source://prism//lib/prism/translation/ruby_parser.rb#375 + def op_asgn_type(node, type); end + + # Create a new Sexp object from the given prism node and arguments. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1855 + def s(node, *arguments); end + + # Visit a block node, which will modify the AST by wrapping the given + # visited node in an iter node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1865 + def visit_block(node, sexp, block); end + + # ``` + # def foo((bar, baz)); end + # ^^^^^^^^^^ + # ``` + # + # source://prism//lib/prism/translation/ruby_parser.rb#1440 + def visit_destructured_parameter(node); end + + # Visit the interpolated content of the string-like node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1062 + def visit_interpolated_parts(parts); end + + # Pattern constants get wrapped in another layer of :const. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1886 + def visit_pattern_constant(node); end + + # If the bounds of a range node are empty parentheses, then they do not + # get replaced by their usual s(:nil), but instead are s(:begin). + # + # source://prism//lib/prism/translation/ruby_parser.rb#1524 + def visit_range_bounds_node(node); end + + # Visit the value of a write, which will be on the right-hand side of + # a write operator. Because implicit arrays can have splats, those could + # potentially be wrapped in an svalue node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1900 + def visit_write_value(node); end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#18630 +class Prism::TrueNode < ::Prism::Node + # Initialize a new TrueNode node. + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#18632 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18695 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18640 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18645 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18661 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18656 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode + # + # source://prism//lib/prism/node.rb#18666 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18671 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#18674 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#18650 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18679 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18684 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18689 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18704 +class Prism::UndefNode < ::Prism::Node + # Initialize a new UndefNode node. + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#18706 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, names, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18793 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18716 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18721 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18738 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18733 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode + # + # source://prism//lib/prism/node.rb#18743 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18748 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#18751 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#18726 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18777 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18772 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18759 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#18756 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18767 + def save_keyword_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18782 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18787 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18808 +class Prism::UnlessNode < ::Prism::Node + # Initialize a new UnlessNode node. + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#18810 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18986 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18824 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18829 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18852 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18843 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the else clause of the unless node. This method is deprecated in + # favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#506 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode + # + # source://prism//lib/prism/node.rb#18857 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#18862 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#18865 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [predicate] + # + # source://prism//lib/prism/node.rb#18834 + def each_child_node; end + + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#18930 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18965 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#18936 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18970 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18955 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#18876 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#98 + def newline_flag!(lines); end + + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # source://prism//lib/prism/node.rb#18895 + sig { returns(Prism::Node) } + def predicate; end + + # Save the end_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18950 + def save_end_keyword_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18884 + def save_keyword_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#18915 + def save_then_keyword_loc(repository); end + + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#18924 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18960 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # + # unless cond then bar end + # ^^^^ + # + # source://prism//lib/prism/node.rb#18901 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#18975 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#18980 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#19004 +class Prism::UntilNode < ::Prism::Node + # Initialize a new UntilNode node. + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#19006 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19156 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19019 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19063 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19024 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#19135 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#19100 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19045 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19037 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode + # + # source://prism//lib/prism/node.rb#19050 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#19058 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#19130 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#19081 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [predicate] + # + # source://prism//lib/prism/node.rb#19029 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19140 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19125 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19068 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#104 + def newline_flag!(lines); end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#19119 + sig { returns(Prism::Node) } + def predicate; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19114 + def save_closing_loc(repository); end + + # Save the do_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19095 + def save_do_keyword_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19076 + def save_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#19122 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#19145 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#19150 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == :foo +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#57 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#59 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#64 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#69 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#74 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#79 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#84 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#89 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#94 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#99 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#104 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#109 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#114 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#119 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#124 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#129 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#134 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#139 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#144 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#149 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#154 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#159 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # source://prism//lib/prism/visitor.rb#164 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#169 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#174 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#179 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#184 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#189 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#194 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#199 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#204 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#209 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#214 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#219 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#224 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#229 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#234 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#239 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#244 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#249 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#254 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#259 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#264 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#269 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#274 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#279 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#284 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#289 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#294 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#299 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#304 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#309 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#314 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#319 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#324 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#329 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#334 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#339 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#344 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#349 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#354 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#359 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#364 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#369 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#374 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#379 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#384 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#389 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#394 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#399 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # source://prism//lib/prism/visitor.rb#404 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#409 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#414 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#419 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#424 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # source://prism//lib/prism/visitor.rb#429 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#434 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#439 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#444 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#449 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#454 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#459 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#464 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#469 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#474 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#479 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#484 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#489 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#494 + sig { params(node: Prism::ItLocalVariableReadNode).void } + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node + # + # source://prism//lib/prism/visitor.rb#499 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#504 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#509 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#514 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#519 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#524 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#529 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#534 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#539 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#544 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#549 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#554 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#559 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#564 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#569 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#574 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#579 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#584 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#589 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#594 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#599 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # source://prism//lib/prism/visitor.rb#604 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#609 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#614 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#619 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#624 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#629 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#634 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#639 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#644 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#649 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#654 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#659 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#664 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#669 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#674 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#679 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#684 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#689 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#694 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#699 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#704 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#709 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#714 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#719 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a ShareableConstantNode node + # + # source://prism//lib/prism/visitor.rb#724 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#729 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#734 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#739 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#744 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#749 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#754 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#759 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#764 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#769 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#774 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#779 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#784 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#789 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#794 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#799 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#804 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#809 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#19173 +class Prism::WhenNode < ::Prism::Node + # Initialize a new WhenNode node. + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#19175 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19187 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19213 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19205 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#19244 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode + # + # source://prism//lib/prism/node.rb#19218 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19223 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#19226 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [statements] + # + # source://prism//lib/prism/node.rb#19197 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19279 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19269 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19231 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19239 + def save_keyword_loc(repository); end + + # Save the then_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19261 + def save_then_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#19266 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#19274 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#19247 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#19284 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#19289 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#19312 +class Prism::WhileNode < ::Prism::Node + # Initialize a new WhileNode node. + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#19314 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, do_keyword_loc, closing_loc, predicate, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19464 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19327 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19371 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19332 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#19443 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#19408 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19353 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19345 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?do_keyword_loc: Location?, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode + # + # source://prism//lib/prism/node.rb#19358 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19363 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, do_keyword_loc: Location?, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#19366 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#19438 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#19389 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [predicate] + # + # source://prism//lib/prism/node.rb#19337 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19448 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19433 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19376 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#110 + def newline_flag!(lines); end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#19427 + sig { returns(Prism::Node) } + def predicate; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19422 + def save_closing_loc(repository); end + + # Save the do_keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19403 + def save_do_keyword_loc(repository); end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19384 + def save_keyword_loc(repository); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#19430 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#19453 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#19458 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#19479 +class Prism::XStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new XStringNode node. + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#19481 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19615 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19493 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19498 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#19594 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#19568 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19514 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19509 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#19589 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#19555 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + # + # source://prism//lib/prism/node.rb#19519 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19524 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # source://prism//lib/prism/node.rb#19527 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # source://prism//lib/prism/node.rb#19503 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19537 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19532 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19599 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#19584 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#19542 + sig { returns(Prism::Location) } + def opening_loc; end + + # Save the closing_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19576 + def save_closing_loc(repository); end + + # Save the content_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19563 + def save_content_loc(repository); end + + # Save the opening_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19550 + def save_opening_loc(repository); end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#93 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#19604 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#19581 + sig { returns(String) } + def unescaped; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#19609 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#19629 +class Prism::YieldNode < ::Prism::Node + # Initialize a new YieldNode node. + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#19631 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19770 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19643 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#19717 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19648 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19667 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19660 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode + # + # source://prism//lib/prism/node.rb#19672 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[Node?] + # def deconstruct: () -> Array[Node?] + # + # source://prism//lib/prism/node.rb#19677 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } + # + # source://prism//lib/prism/node.rb#19680 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node] + # + # @yield [arguments] + # + # source://prism//lib/prism/node.rb#19653 + def each_child_node; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19754 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19739 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19685 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#19744 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19698 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#19749 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19720 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Save the keyword_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19693 + def save_keyword_loc(repository); end + + # Save the lparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19712 + def save_lparen_loc(repository); end + + # Save the rparen_loc location using the given saved source so that + # it can be retrieved later. + # + # source://prism//lib/prism/node.rb#19734 + def save_rparen_loc(repository); end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#19759 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#19764 + def type; end + end +end + +# source://prism//lib/prism/translation/ruby_parser.rb#11 +class RubyParser; end + +# source://prism//lib/prism/translation/ruby_parser.rb#12 +class RubyParser::SyntaxError < ::RuntimeError; end diff --git a/sorbet/rbi/gems/pry-byebug@3.12.0.rbi b/sorbet/rbi/gems/pry-byebug@3.12.0.rbi new file mode 100644 index 0000000..514ee12 --- /dev/null +++ b/sorbet/rbi/gems/pry-byebug@3.12.0.rbi @@ -0,0 +1,550 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry-byebug` gem. +# Please instead update this file by running `bin/tapioca gem pry-byebug`. + + +# source://pry-byebug//lib/byebug/processors/pry_processor.rb#5 +module Byebug + extend ::Byebug::Helpers::ReflectionHelper + + private + + def add_catchpoint(_arg0); end + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + def lock; end + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + def start; end + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + + class << self + def add_catchpoint(_arg0); end + def breakpoints; end + def catchpoints; end + def contexts; end + def current_context; end + def debug_load(*_arg0); end + def lock; end + def post_mortem=(_arg0); end + def post_mortem?; end + def raised_exception; end + def start; end + def started?; end + def stop; end + def stoppable?; end + def thread_context(_arg0); end + def tracing=(_arg0); end + def tracing?; end + def unlock; end + def verbose=(_arg0); end + def verbose?; end + end +end + +class Byebug::DebugThread < ::Thread + class << self + def inherited; end + end +end + +# Extends raw byebug's processor. +# +# source://pry-byebug//lib/byebug/processors/pry_processor.rb#9 +class Byebug::PryProcessor < ::Byebug::CommandProcessor + # Called when a breakpoint is hit. Note that `at_line`` is called + # inmediately after with the context's `stop_reason == :breakpoint`, so we + # must not resume the pry instance here + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#80 + def at_breakpoint(breakpoint); end + + # Called when the debugger wants to stop at a regular line + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#64 + def at_line; end + + # Called when the debugger wants to stop right before a method return + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#71 + def at_return(_return_value); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#14 + def bold(*args, **_arg1, &block); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#13 + def output(*args, **_arg1, &block); end + + # Set up a number of navigational commands to be performed by Byebug. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#45 + def perform(action, options = T.unsafe(nil)); end + + # Returns the value of attribute pry. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 + def pry; end + + # Sets the attribute pry + # + # @param value the value to set the attribute pry to. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 + def pry=(_arg0); end + + # Wrap a Pry REPL to catch navigational commands and act on them. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#26 + def run(&_block); end + + private + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#93 + def n_hits(breakpoint); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#114 + def perform_backtrace(_options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#142 + def perform_down(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#130 + def perform_finish(*_arg0); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#150 + def perform_frame(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#120 + def perform_next(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#125 + def perform_step(options); end + + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#134 + def perform_up(options); end + + # Resume an existing Pry REPL at the paused point. + # + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#102 + def resume_pry; end + + class << self + # source://pry-byebug//lib/byebug/processors/pry_processor.rb#16 + def start; end + end +end + +class Byebug::ThreadsTable; end + +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#3 +class Pry + extend ::Forwardable +end + +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#4 +module Pry::Byebug; end + +# Wrapper for Byebug.breakpoints that respects our Processor and has better +# failure behavior. Acts as an Enumerable. +# +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#9 +module Pry::Byebug::Breakpoints + extend ::Enumerable + extend ::Pry::Byebug::Breakpoints + + # Adds a file breakpoint. + # + # @raise [ArgumentError] + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#63 + def add_file(file, line, expression = T.unsafe(nil)); end + + # Adds a method breakpoint. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#51 + def add_method(method, expression = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#44 + def breakpoints; end + + # Changes the conditional expression for a breakpoint. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#78 + def change(id, expression = T.unsafe(nil)); end + + # Deletes an existing breakpoint with the given ID. + # + # @raise [ArgumentError] + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#89 + def delete(id); end + + # Deletes all breakpoints. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#100 + def delete_all; end + + # Disables a breakpoint with the given ID. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#115 + def disable(id); end + + # Disables all breakpoints. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#122 + def disable_all; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#136 + def each(&block); end + + # Enables a disabled breakpoint with the given ID. + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#108 + def enable(id); end + + # @raise [ArgumentError] + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#144 + def find_by_id(id); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#140 + def last; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#132 + def size; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#128 + def to_a; end + + private + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#153 + def change_status(id, enabled = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#159 + def validate_expression(exp); end +end + +# Breakpoint in a file:line location +# +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#16 +class Pry::Byebug::Breakpoints::FileBreakpoint < ::SimpleDelegator + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#17 + def source_code; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#21 + def to_s; end +end + +# Breakpoint in a Class#method location +# +# source://pry-byebug//lib/pry/byebug/breakpoints.rb#29 +class Pry::Byebug::Breakpoints::MethodBreakpoint < ::SimpleDelegator + # @return [MethodBreakpoint] a new instance of MethodBreakpoint + # + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#30 + def initialize(byebug_bp, method); end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#35 + def source_code; end + + # source://pry-byebug//lib/pry/byebug/breakpoints.rb#39 + def to_s; end +end + +class Pry::REPL + extend ::Forwardable + + class << self + # source://pry-byebug//lib/pry-byebug/pry_ext.rb#19 + def start(options = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 + def start_with_pry_byebug(options = T.unsafe(nil)); end + + # source://pry-byebug//lib/pry-byebug/pry_ext.rb#6 + def start_without_pry_byebug(options); end + end +end + +# Main container module for Pry-Byebug functionality +# +# source://pry-byebug//lib/pry-byebug/helpers/location.rb#3 +module PryByebug + # Reference to currently running pry-remote server. Used by the processor. + # + # source://pry-byebug//lib/pry-byebug/base.rb#10 + def current_remote_server; end + + # Reference to currently running pry-remote server. Used by the processor. + # + # source://pry-byebug//lib/pry-byebug/base.rb#10 + def current_remote_server=(_arg0); end + + private + + # Ensures that a command is executed in a local file context. + # + # source://pry-byebug//lib/pry-byebug/base.rb#25 + def check_file_context(target, msg = T.unsafe(nil)); end + + # Checks that a target binding is in a local file context. + # + # source://pry-byebug//lib/pry-byebug/base.rb#17 + def file_context?(target); end + + class << self + # Ensures that a command is executed in a local file context. + # + # @raise [Pry::CommandError] + # + # source://pry-byebug//lib/pry-byebug/base.rb#25 + def check_file_context(target, msg = T.unsafe(nil)); end + + # Checks that a target binding is in a local file context. + # + # @return [Boolean] + # + # source://pry-byebug//lib/pry-byebug/base.rb#17 + def file_context?(target); end + end +end + +# Display the current stack +# +# source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#9 +class PryByebug::BacktraceCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#23 + def process; end +end + +# Add, show and remove breakpoints +# +# source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#12 +class PryByebug::BreakCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Breakpoints + include ::PryByebug::Helpers::Location + include ::PryByebug::Helpers::Multiline + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#50 + def options(opt); end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#62 + def process; end + + private + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#111 + def add_breakpoint(place, condition); end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#93 + def new_breakpoint; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#102 + def option_to_method(option); end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#106 + def print_all; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#88 + def process_condition; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_delete; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_delete_all; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_disable; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_disable_all; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 + def process_enable; end + + # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#84 + def process_show; end +end + +# Continue program execution until the next breakpoint +# +# source://pry-byebug//lib/pry-byebug/commands/continue.rb#11 +class PryByebug::ContinueCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + include ::PryByebug::Helpers::Breakpoints + include ::PryByebug::Helpers::Location + + # source://pry-byebug//lib/pry-byebug/commands/continue.rb#31 + def process; end +end + +# Travel down the frame stack +# +# source://pry-byebug//lib/pry-byebug/commands/down.rb#9 +class PryByebug::DownCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/down.rb#27 + def process; end +end + +# Exit pry REPL with Byebug.stop +# +# source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#9 +class PryByebug::ExitAllCommand < ::Pry::Command::ExitAll + # source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#10 + def process; end +end + +# Run until the end of current frame +# +# source://pry-byebug//lib/pry-byebug/commands/finish.rb#9 +class PryByebug::FinishCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/finish.rb#20 + def process; end +end + +# Move to a specific frame in the callstack +# +# source://pry-byebug//lib/pry-byebug/commands/frame.rb#9 +class PryByebug::FrameCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/frame.rb#27 + def process; end +end + +# source://pry-byebug//lib/pry-byebug/helpers/location.rb#4 +module PryByebug::Helpers; end + +# Common helpers for breakpoint related commands +# +# source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#10 +module PryByebug::Helpers::Breakpoints + # Prints a message with bold font. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#21 + def bold_puts(msg); end + + # Byebug's array of breakpoints. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#14 + def breakpoints; end + + # Max width of breakpoints id column + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#77 + def max_width; end + + # Prints a header for the breakpoint list. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#63 + def print_breakpoints_header; end + + # Print out full information about a breakpoint. + # + # Includes surrounding code at that point. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#30 + def print_full_breakpoint(breakpoint); end + + # Print out concise information about a breakpoint. + # + # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#52 + def print_short_breakpoint(breakpoint); end +end + +# Compatibility helper to handle source location +# +# source://pry-byebug//lib/pry-byebug/helpers/location.rb#8 +module PryByebug::Helpers::Location + private + + # Current file in the target binding. Used as the default breakpoint + # location. + # + # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 + def current_file(source = T.unsafe(nil)); end + + class << self + # Current file in the target binding. Used as the default breakpoint + # location. + # + # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 + def current_file(source = T.unsafe(nil)); end + end +end + +# Helpers to help handling multiline inputs +# +# source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#8 +module PryByebug::Helpers::Multiline + # Returns true if we are in a multiline context and, as a side effect, + # updates the partial evaluation string with the current input. + # + # Returns false otherwise + # + # source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#15 + def check_multiline_context; end +end + +# Helpers to aid breaking out of the REPL loop +# +# source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#8 +module PryByebug::Helpers::Navigation + # Breaks out of the REPL loop and signals tracer + # + # source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#12 + def breakout_navigation(action, options = T.unsafe(nil)); end +end + +# Run a number of lines and then stop again +# +# source://pry-byebug//lib/pry-byebug/commands/next.rb#10 +class PryByebug::NextCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + include ::PryByebug::Helpers::Multiline + + # source://pry-byebug//lib/pry-byebug/commands/next.rb#29 + def process; end +end + +# Run a number of Ruby statements and then stop again +# +# source://pry-byebug//lib/pry-byebug/commands/step.rb#9 +class PryByebug::StepCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/step.rb#26 + def process; end +end + +# Travel up the frame stack +# +# source://pry-byebug//lib/pry-byebug/commands/up.rb#9 +class PryByebug::UpCommand < ::Pry::ClassCommand + include ::PryByebug::Helpers::Navigation + + # source://pry-byebug//lib/pry-byebug/commands/up.rb#27 + def process; end +end diff --git a/sorbet/rbi/gems/pry@0.16.0.rbi b/sorbet/rbi/gems/pry@0.16.0.rbi new file mode 100644 index 0000000..df546c3 --- /dev/null +++ b/sorbet/rbi/gems/pry@0.16.0.rbi @@ -0,0 +1,10232 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `pry` gem. +# Please instead update this file by running `bin/tapioca gem pry`. + + +# source://pry//lib/pry/core_extensions.rb#115 +class BasicObject + # Return a binding object for the receiver. + # + # The `self` of the binding is set to the current object, and it contains no + # local variables. + # + # The default definee (http://yugui.jp/articles/846) is set such that new + # methods defined will be added to the singleton class of the BasicObject. + # + # @return [Binding] + # + # source://pry//lib/pry/core_extensions.rb#125 + def __binding__; end +end + +# source://pry//lib/pry/core_extensions.rb#24 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # Return a binding object for the receiver. + # + # The `self` of the binding is set to the current object, and it contains no + # local variables. + # + # The default definee (http://yugui.jp/articles/846) is set such that: + # + # * If `self` is a class or module, then new methods created in the binding + # will be defined in that class or module (as in `class Foo; end`). + # * If `self` is a normal object, then new methods created in the binding will + # be defined on its singleton class (as in `class << self; end`). + # * If `self` doesn't have a real singleton class (i.e. it is a Fixnum, Float, + # Symbol, nil, true, or false), then new methods will be created on the + # object's class (as in `self.class.class_eval{ }`) + # + # Newly created constants, including classes and modules, will also be added + # to the default definee. + # + # @return [Binding] + # + # source://pry//lib/pry/core_extensions.rb#70 + def __binding__; end + + # Start a Pry REPL on self. + # + # If `self` is a Binding then that will be used to evaluate expressions; + # otherwise a new binding will be created. + # + # @example On any object + # "dummy".pry + # @example With a binding + # binding.pry + # @example With options + # def my_method + # binding.pry :quiet => true + # end + # my_method() + # @param hash [Hash] the options hash + # @param object [Object] the object or binding to pry + # (__deprecated__, use `object.pry`) + # @see Pry.start + # + # source://pry//lib/pry/core_extensions.rb#43 + def pry(object = T.unsafe(nil), hash = T.unsafe(nil)); end +end + +# source://pry//lib/pry/version.rb#3 +class Pry + extend ::Forwardable + extend ::Pry::Forwardable + + # Create a new {Pry} instance. + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [Pry] a new instance of Pry + # + # source://pry//lib/pry/pry_instance.rb#80 + def initialize(options = T.unsafe(nil)); end + + # Add a sticky local to this Pry instance. + # A sticky local is a local that persists between all bindings in a session. + # + # @param name [Symbol] The name of the sticky local. + # @yield The block that defines the content of the local. The local + # will be refreshed at each tick of the repl loop. + # + # source://pry//lib/pry/pry_instance.rb#210 + def add_sticky_local(name, &block); end + + # Returns the value of attribute backtrace. + # + # source://pry//lib/pry/pry_instance.rb#34 + def backtrace; end + + # Sets the attribute backtrace + # + # @param value the value to set the attribute backtrace to. + # + # source://pry//lib/pry/pry_instance.rb#34 + def backtrace=(_arg0); end + + # Returns the value of attribute binding_stack. + # + # source://pry//lib/pry/pry_instance.rb#31 + def binding_stack; end + + # Sets the attribute binding_stack + # + # @param value the value to set the attribute binding_stack to. + # + # source://pry//lib/pry/pry_instance.rb#31 + def binding_stack=(_arg0); end + + # source://pry//lib/pry/pry_instance.rb#51 + def color(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def color=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def commands(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def commands=(*args, **_arg1, &block); end + + # Generate completions. + # + # @param str [String] What the user has typed so far + # @return [Array] Possible completions + # + # source://pry//lib/pry/pry_instance.rb#143 + def complete(str); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/pry_instance.rb#49 + def config; end + + # The currently active `Binding`. + # + # @return [Binding] The currently active `Binding` for the session. + # + # source://pry//lib/pry/pry_instance.rb#122 + def current_binding; end + + # The currently active `Binding`. + # support previous API + # + # @return [Binding] The currently active `Binding` for the session. + # + # source://pry//lib/pry/pry_instance.rb#125 + def current_context; end + + # Returns the value of attribute custom_completions. + # + # source://pry//lib/pry/pry_instance.rb#32 + def custom_completions; end + + # Sets the attribute custom_completions + # + # @param value the value to set the attribute custom_completions to. + # + # source://pry//lib/pry/pry_instance.rb#32 + def custom_completions=(_arg0); end + + # source://pry//lib/pry/pry_instance.rb#51 + def editor(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def editor=(*args, **_arg1, &block); end + + # Pass a line of input to Pry. + # + # This is the equivalent of `Binding#eval` but with extra Pry! + # + # In particular: + # 1. Pry commands will be executed immediately if the line matches. + # 2. Partial lines of input will be queued up until a complete expression has + # been accepted. + # 3. Output is written to `#output` in pretty colours, not returned. + # + # Once this method has raised an exception or returned false, this instance + # is no longer usable. {#exit_value} will return the session's breakout + # value if applicable. + # + # @option options + # @param line [String?] The line of input; `nil` if the user types `` + # @param options [Hash] a customizable set of options + # @raise [Exception] If the user uses the `raise-up` command, this method + # will raise that exception. + # @return [Boolean] Is Pry ready to accept more input? + # + # source://pry//lib/pry/pry_instance.rb#253 + def eval(line, options = T.unsafe(nil)); end + + # Returns the value of attribute eval_string. + # + # source://pry//lib/pry/pry_instance.rb#33 + def eval_string; end + + # Sets the attribute eval_string + # + # @param value the value to set the attribute eval_string to. + # + # source://pry//lib/pry/pry_instance.rb#33 + def eval_string=(_arg0); end + + # source://pry//lib/pry/pry_instance.rb#284 + def evaluate_ruby(code); end + + # source://pry//lib/pry/pry_instance.rb#51 + def exception_handler(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def exception_handler=(*args, **_arg1, &block); end + + # Execute the specified hook. + # If executing a hook raises an exception, we log that and then continue successfully. + # To debug such errors, use the global variable $pry_hook_error, which is set as a + # result. + # + # @param args [*Object] The arguments to pass to the hook + # @param name [Symbol] The hook name to execute + # @return [Object, Exception] The return value of the hook or the exception raised + # + # source://pry//lib/pry/pry_instance.rb#392 + def exec_hook(name, *args, &block); end + + # Returns the value of attribute exit_value. + # + # source://pry//lib/pry/pry_instance.rb#41 + def exit_value; end + + # source://pry//lib/pry/pry_instance.rb#51 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def hooks(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def hooks=(*args, **_arg1, &block); end + + # Injects a local variable into the provided binding. + # + # @param binding [Binding] The binding to set the local on. + # @param name [String] The name of the local to inject. + # @param value [Object] The value to set the local to. + # @return [Object] The value the local was set to. + # + # source://pry//lib/pry/pry_instance.rb#171 + def inject_local(name, value, binding); end + + # Inject all the sticky locals into the current binding. + # + # source://pry//lib/pry/pry_instance.rb#199 + def inject_sticky_locals!; end + + # source://pry//lib/pry/pry_instance.rb#51 + def input(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def input=(*args, **_arg1, &block); end + + # @since v0.12.0 + # + # source://pry//lib/pry/pry_instance.rb#44 + def input_ring; end + + # Returns the value of attribute last_dir. + # + # source://pry//lib/pry/pry_instance.rb#38 + def last_dir; end + + # Sets the attribute last_dir + # + # @param value the value to set the attribute last_dir to. + # + # source://pry//lib/pry/pry_instance.rb#38 + def last_dir=(_arg0); end + + # Returns the value of attribute last_exception. + # + # source://pry//lib/pry/pry_instance.rb#40 + def last_exception; end + + # Set the last exception for a session. + # + # @param exception [Exception] The last exception. + # + # source://pry//lib/pry/pry_instance.rb#416 + def last_exception=(exception); end + + # Returns the value of attribute last_file. + # + # source://pry//lib/pry/pry_instance.rb#37 + def last_file; end + + # Sets the attribute last_file + # + # @param value the value to set the attribute last_file to. + # + # source://pry//lib/pry/pry_instance.rb#37 + def last_file=(_arg0); end + + # Returns the value of attribute last_result. + # + # source://pry//lib/pry/pry_instance.rb#36 + def last_result; end + + # Sets the attribute last_result + # + # @param value the value to set the attribute last_result to. + # + # source://pry//lib/pry/pry_instance.rb#36 + def last_result=(_arg0); end + + # @return [Boolean] True if the last result is an exception that was raised, + # as opposed to simply an instance of Exception (like the result of + # Exception.new) + # + # source://pry//lib/pry/pry_instance.rb#438 + def last_result_is_exception?; end + + # @return [Integer] The maximum amount of objects remembered by the inp and + # out arrays. Defaults to 100. + # + # source://pry//lib/pry/pry_instance.rb#51 + def memory_size; end + + # source://pry//lib/pry/pry_instance.rb#51 + def memory_size=(size); end + + # Returns an output device + # + # @example + # pry_instance.output.puts "ohai!" + # + # source://pry//lib/pry/pry_instance.rb#51 + def output; end + + # source://pry//lib/pry/pry_instance.rb#51 + def output=(*args, **_arg1, &block); end + + # @since v0.12.0 + # + # source://pry//lib/pry/pry_instance.rb#47 + def output_ring; end + + # Returns the currently configured pager + # + # @example + # pry_instance.pager.page text + # + # source://pry//lib/pry/pry_instance.rb#51 + def pager; end + + # source://pry//lib/pry/pry_instance.rb#51 + def pager=(*args, **_arg1, &block); end + + # Pops the current prompt off of the prompt stack. If the prompt you are + # popping is the last prompt, it will not be popped. Use this to restore the + # previous prompt. + # + # @example + # pry = Pry.new(prompt: Pry::Prompt[:my_prompt1]) + # pry.push_prompt(Pry::Prompt[:my_prompt2]) + # pry.pop_prompt # => prompt2 + # pry.pop_prompt # => prompt1 + # pry.pop_prompt # => prompt1 + # @return [Pry::Prompt] the prompt being popped + # + # source://pry//lib/pry/pry_instance.rb#492 + def pop_prompt; end + + # source://pry//lib/pry/pry_instance.rb#51 + def print(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_instance.rb#51 + def print=(*args, **_arg1, &block); end + + # If the given line is a valid command, process it in the context of the + # current `eval_string` and binding. + # + # @param val [String] The line to process. + # @return [Boolean] `true` if `val` is a command, `false` otherwise + # + # source://pry//lib/pry/pry_instance.rb#323 + def process_command(val); end + + # Same as process_command, but outputs exceptions to `#output` instead of + # raising. + # + # @param val [String] The line to process. + # @return [Boolean] `true` if `val` is a command, `false` otherwise + # + # source://pry//lib/pry/pry_instance.rb#358 + def process_command_safely(val); end + + # This is the prompt at the top of the prompt stack. + # + # @return [Pry::Prompt] the current prompt + # + # source://pry//lib/pry/pry_instance.rb#99 + def prompt; end + + # Sets the Pry prompt. + # + # @param new_prompt [Pry::Prompt] + # @return [void] + # + # source://pry//lib/pry/pry_instance.rb#106 + def prompt=(new_prompt); end + + # Push a binding for the given object onto the stack. If this instance is + # currently stopped, mark it as usable again. + # + # source://pry//lib/pry/pry_instance.rb#129 + def push_binding(object); end + + # Initialize this instance by pushing its initial context into the binding + # stack. If no target is given, start at the top level. + # + # source://pry//lib/pry/pry_instance.rb#116 + def push_initial_binding(target = T.unsafe(nil)); end + + # Pushes the current prompt onto a stack that it can be restored from later. + # Use this if you wish to temporarily change the prompt. + # + # @example + # push_prompt(Pry::Prompt[:my_prompt]) + # @param new_prompt [Pry::Prompt] + # @return [Pry::Prompt] new_prompt + # + # source://pry//lib/pry/pry_instance.rb#476 + def push_prompt(new_prompt); end + + # Convenience accessor for the `quiet` config key. + # + # @return [Boolean] + # + # source://pry//lib/pry/pry_instance.rb#562 + def quiet?; end + + # source://pry//lib/pry/pry_instance.rb#552 + def raise_up(*args); end + + # source://pry//lib/pry/pry_instance.rb#556 + def raise_up!(*args); end + + # Raise an exception out of Pry. + # + # See Kernel#raise for documentation of parameters. + # See rb_make_exception for the inbuilt implementation. + # + # This is necessary so that the raise-up command can tell the + # difference between an exception the user has decided to raise, + # and a mistake in specifying that exception. + # + # (i.e. raise-up RunThymeError.new should not be the same as + # raise-up NameError, "uninitialized constant RunThymeError") + # + # @raise [TypeError] + # + # source://pry//lib/pry/pry_instance.rb#524 + def raise_up_common(force, *args); end + + # Potentially deprecated. Use `Pry::REPL.new(pry, :target => target).start` + # (If nested sessions are going to exist, this method is fine, but a goal is + # to come up with an alternative to nested sessions altogether.) + # + # source://pry//lib/pry/pry_instance.rb#280 + def repl(target = T.unsafe(nil)); end + + # Reset the current eval string. If the user has entered part of a multiline + # expression, this discards that input. + # + # source://pry//lib/pry/pry_instance.rb#229 + def reset_eval_string; end + + # Run the specified command. + # + # @example + # pry_instance.run_command("ls -m") + # @param val [String] The command (and its params) to execute. + # @return [Pry::Command::VOID_VALUE] + # + # source://pry//lib/pry/pry_instance.rb#373 + def run_command(val); end + + # Returns the appropriate prompt to use. + # + # @return [String] The prompt. + # + # source://pry//lib/pry/pry_instance.rb#451 + def select_prompt; end + + # Set the last result of an eval. + # This method should not need to be invoked directly. + # + # @param code [String] The code that was run. + # @param result [Object] The result. + # + # source://pry//lib/pry/pry_instance.rb#407 + def set_last_result(result, code = T.unsafe(nil)); end + + # Whether the print proc should be invoked. + # Currently only invoked if the output is not suppressed. + # + # @return [Boolean] Whether the print proc should be invoked. + # + # source://pry//lib/pry/pry_instance.rb#445 + def should_print?; end + + # Output the result or pass to an exception handler (if result is an exception). + # + # source://pry//lib/pry/pry_instance.rb#296 + def show_result(result); end + + # source://pry//lib/pry/pry_instance.rb#214 + def sticky_locals; end + + # Returns the value of attribute suppress_output. + # + # source://pry//lib/pry/pry_instance.rb#35 + def suppress_output; end + + # Sets the attribute suppress_output + # + # @param value the value to set the attribute suppress_output to. + # + # source://pry//lib/pry/pry_instance.rb#35 + def suppress_output=(_arg0); end + + # Update Pry's internal state after evalling code. + # This method should not need to be invoked directly. + # + # @param code [String] The code we just eval'd + # + # source://pry//lib/pry/pry_instance.rb#426 + def update_input_history(code); end + + private + + # Force `eval_string` into the encoding of `val`. [Issue #284] + # + # source://pry//lib/pry/pry_instance.rb#650 + def ensure_correct_encoding!(val); end + + # source://pry//lib/pry/pry_instance.rb#568 + def handle_line(line, options); end + + # the array that the prompt stack is stored in + # + # source://pry//lib/pry/pry_instance.rb#659 + def prompt_stack; end + + class << self + # Convert the given object into an instance of `Pry::Code`, if it isn't + # already one. + # + # @param obj [Code, Method, UnboundMethod, Proc, Pry::Method, String, Array, IO] + # + # source://pry//lib/pry/code.rb#12 + def Code(obj); end + + # If the given object is a `Pry::Method`, return it unaltered. If it's + # anything else, return it wrapped in a `Pry::Method` instance. + # + # source://pry//lib/pry/method.rb#9 + def Method(obj); end + + # If the given object is a `Pry::WrappedModule`, return it unaltered. If it's + # anything else, return it wrapped in a `Pry::WrappedModule` instance. + # + # source://pry//lib/pry/wrapped_module.rb#7 + def WrappedModule(obj); end + + # source://pry//lib/pry/pry_class.rb#296 + def auto_resize!; end + + # Return a `Binding` object for `target` or return `target` if it is + # already a `Binding`. + # In the case where `target` is top-level then return `TOPLEVEL_BINDING` + # + # @param target [Object] The object to get a `Binding` object for. + # @return [Binding] The `Binding` object. + # + # source://pry//lib/pry/pry_class.rb#322 + def binding_for(target); end + + # Returns the value of attribute cli. + # + # source://pry//lib/pry/pry_class.rb#22 + def cli; end + + # Sets the attribute cli + # + # @param value the value to set the attribute cli to. + # + # source://pry//lib/pry/pry_class.rb#22 + def cli=(_arg0); end + + # source://pry//lib/pry/pry_class.rb#27 + def color(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def color=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def commands(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def commands=(*args, **_arg1, &block); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/pry_class.rb#25 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://pry//lib/pry/pry_class.rb#25 + def config=(_arg0); end + + # @example + # Pry.configure do |config| + # config.eager_load! # optional + # config.input = # .. + # config.foo = 2 + # end + # @yield [config] Yields a block with {Pry.config} as its argument. + # + # source://pry//lib/pry/pry_class.rb#46 + def configure; end + + # source://pry//lib/pry/pry_class.rb#355 + def critical_section; end + + # @return [Pry::Config] Returns a value store for an instance of Pry running on the current thread. + # + # source://pry//lib/pry/pry_class.rb#63 + def current; end + + # Returns the value of attribute current_line. + # + # source://pry//lib/pry/pry_class.rb#19 + def current_line; end + + # Sets the attribute current_line + # + # @param value the value to set the attribute current_line to. + # + # source://pry//lib/pry/pry_class.rb#19 + def current_line=(_arg0); end + + # Returns the value of attribute custom_completions. + # + # source://pry//lib/pry/pry_class.rb#18 + def custom_completions; end + + # Sets the attribute custom_completions + # + # @param value the value to set the attribute custom_completions to. + # + # source://pry//lib/pry/pry_class.rb#18 + def custom_completions=(_arg0); end + + # source://pry//lib/pry/pry_class.rb#27 + def editor(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def editor=(*args, **_arg1, &block); end + + # Returns the value of attribute eval_path. + # + # source://pry//lib/pry/pry_class.rb#21 + def eval_path; end + + # Sets the attribute eval_path + # + # @param value the value to set the attribute eval_path to. + # + # source://pry//lib/pry/pry_class.rb#21 + def eval_path=(_arg0); end + + # source://pry//lib/pry/pry_class.rb#27 + def exception_handler(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def exception_handler=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def extra_sticky_locals(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def extra_sticky_locals=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#139 + def final_session_setup; end + + # source://pry//lib/pry/pry_class.rb#27 + def history(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def history=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def hooks(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def hooks=(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://pry//lib/pry/pry_class.rb#350 + def in_critical_section?; end + + # Basic initialization. + # + # source://pry//lib/pry/pry_class.rb#313 + def init; end + + # @return [Boolean] Whether this is the first time a Pry session has + # been started since loading the Pry class. + # + # source://pry//lib/pry/pry_class.rb#259 + def initial_session?; end + + # Do basic setup for initial session including: loading pryrc, plugins, + # requires, and history. + # + # source://pry//lib/pry/pry_class.rb#129 + def initial_session_setup; end + + # source://pry//lib/pry/pry_class.rb#27 + def input(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def input=(*args, **_arg1, &block); end + + # Returns the value of attribute last_internal_error. + # + # source://pry//lib/pry/pry_class.rb#24 + def last_internal_error; end + + # Sets the attribute last_internal_error + # + # @param value the value to set the attribute last_internal_error to. + # + # source://pry//lib/pry/pry_class.rb#24 + def last_internal_error=(_arg0); end + + # Returns the value of attribute line_buffer. + # + # source://pry//lib/pry/pry_class.rb#20 + def line_buffer; end + + # Sets the attribute line_buffer + # + # @param value the value to set the attribute line_buffer to. + # + # source://pry//lib/pry/pry_class.rb#20 + def line_buffer=(_arg0); end + + # Load the given file in the context of `Pry.toplevel_binding` + # + # @param file [String] The unexpanded file path. + # + # source://pry//lib/pry/pry_class.rb#69 + def load_file_at_toplevel(file); end + + # Execute the file through the REPL loop, non-interactively. + # + # @param file_name [String] File name to load through the REPL. + # + # source://pry//lib/pry/pry_class.rb#204 + def load_file_through_repl(file_name); end + + # Load Readline history if required. + # + # source://pry//lib/pry/pry_class.rb#253 + def load_history; end + + # Load RC files if appropriate This method can also be used to reload the + # files if they have changed. + # + # source://pry//lib/pry/pry_class.rb#77 + def load_rc_files; end + + # Load any Ruby files specified with the -r flag on the command line. + # + # source://pry//lib/pry/pry_class.rb#101 + def load_requires; end + + # Trap interrupts on jruby, and make them behave like MRI so we can + # catch them. + # + # source://pry//lib/pry/pry_class.rb#109 + def load_traps; end + + # source://pry//lib/pry/pry_class.rb#113 + def load_win32console; end + + # @return [main] returns the special instance of Object, "main". + # + # source://pry//lib/pry/pry_class.rb#55 + def main; end + + # source://pry//lib/pry/pry_class.rb#27 + def memory_size(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def memory_size=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def output(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def output=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def pager(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def pager=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def print(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def print=(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def prompt(*args, **_arg1, &block); end + + # source://pry//lib/pry/pry_class.rb#27 + def prompt=(*args, **_arg1, &block); end + + # Returns the value of attribute quiet. + # + # source://pry//lib/pry/pry_class.rb#23 + def quiet; end + + # Sets the attribute quiet + # + # @param value the value to set the attribute quiet to. + # + # source://pry//lib/pry/pry_class.rb#23 + def quiet=(_arg0); end + + # Load the local RC file (./.pryrc) + # + # source://pry//lib/pry/pry_class.rb#86 + def rc_files_to_load; end + + # Expand a file to its canonical name (following symlinks as appropriate) + # + # source://pry//lib/pry/pry_class.rb#94 + def real_path_to(file); end + + # Set all the configurable options back to their default values + # + # source://pry//lib/pry/pry_class.rb#301 + def reset_defaults; end + + # Run a Pry command from outside a session. The commands available are + # those referenced by `Pry.config.commands` (the default command set). + # + # @example Display command output. + # Pry.run_command "ls -av", :show_output => true + # @example Run at top-level with no output. + # Pry.run_command "ls" + # @example Run under Pry class, returning only public methods. + # Pry.run_command "ls -m", :target => Pry + # @option options + # @option options + # @param command_string [String] The Pry command (including arguments, + # if any). + # @param options [Hash] Optional named parameters. + # @return [nil] + # + # source://pry//lib/pry/pry_class.rb#279 + def run_command(command_string, options = T.unsafe(nil)); end + + # Start a Pry REPL. + # This method also loads `pryrc` as necessary the first time it is invoked. + # + # @example + # Pry.start(Object.new, :input => MyInput.new) + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @param target [Object, Binding] The receiver of the Pry session + # + # source://pry//lib/pry/pry_class.rb#156 + def start(target = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://pry//lib/pry/pry_class.rb#329 + def toplevel_binding; end + + # Sets the attribute toplevel_binding + # + # @param value the value to set the attribute toplevel_binding to. + # + # source://pry//lib/pry/pry_class.rb#347 + def toplevel_binding=(_arg0); end + + # An inspector that clips the output to `max_length` chars. + # In case of > `max_length` chars the `# notation is used. + # + # @option options + # @option options + # @param obj [Object] The object to view. + # @param options [Hash] + # @return [String] The string representation of `obj`. + # + # source://pry//lib/pry/pry_class.rb#227 + def view_clip(obj, options = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/pry_class.rb#363 + def mutex_available?; end + end +end + +# @return [Array] Code of the method used when implementing Pry's +# __binding__, along with line indication to be used with instance_eval (and +# friends). +# @see Object#__binding__ +# +# source://pry//lib/pry/core_extensions.rb#9 +Pry::BINDING_METHOD_IMPL = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/basic_object.rb#4 +class Pry::BasicObject < ::BasicObject + include ::Kernel +end + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::Dir = Dir + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::ENV = T.let(T.unsafe(nil), Object) + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::File = File + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::Kernel = Kernel + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::LoadError = LoadError + +# source://pry//lib/pry/basic_object.rb#6 +Pry::BasicObject::Pry = Pry + +# A super-class for Commands that are created with a single block. +# +# This class ensures that the block is called with the correct number of +# arguments and the right context. +# +# Create subclasses using {Pry::CommandSet#command}. +# +# source://pry//lib/pry/block_command.rb#10 +class Pry::BlockCommand < ::Pry::Command + # Call the block that was registered with this command. + # + # @param args [Array] The arguments passed + # @return [Object] The return value of the block + # + # source://pry//lib/pry/block_command.rb#14 + def call(*args); end + + # source://pry//lib/pry/block_command.rb#18 + def help; end +end + +# Manage the processing of command line options +# +# source://pry//lib/pry/cli.rb#7 +class Pry::CLI + class << self + # Add a block responsible for processing parsed options. + # + # source://pry//lib/pry/cli.rb#39 + def add_option_processor(&block); end + + # Add another set of CLI options (a Pry::Slop block) + # + # source://pry//lib/pry/cli.rb#24 + def add_options(&block); end + + # @return [Array] The input array of strings to process + # as CLI options. + # + # source://pry//lib/pry/cli.rb#21 + def input_args; end + + # @return [Array] The input array of strings to process + # as CLI options. + # + # source://pry//lib/pry/cli.rb#21 + def input_args=(_arg0); end + + # @return [Array] The Procs that process the parsed options. Plugins can + # utilize this facility in order to add and process their own Pry + # options. + # + # source://pry//lib/pry/cli.rb#17 + def option_processors; end + + # @return [Array] The Procs that process the parsed options. Plugins can + # utilize this facility in order to add and process their own Pry + # options. + # + # source://pry//lib/pry/cli.rb#17 + def option_processors=(_arg0); end + + # @return [Proc] The Proc defining the valid command line options. + # + # source://pry//lib/pry/cli.rb#12 + def options; end + + # @return [Proc] The Proc defining the valid command line options. + # + # source://pry//lib/pry/cli.rb#12 + def options=(_arg0); end + + # source://pry//lib/pry/cli.rb#52 + def parse_options(args = T.unsafe(nil)); end + + # Clear `options` and `option_processors` + # + # source://pry//lib/pry/cli.rb#47 + def reset; end + + # source://pry//lib/pry/cli.rb#90 + def start(opts); end + end +end + +# source://pry//lib/pry/cli.rb#8 +class Pry::CLI::NoOptionsError < ::StandardError; end + +# A super-class of Commands with structure. +# +# This class implements the bare-minimum functionality that a command should +# have, namely a --help switch, and then delegates actual processing to its +# subclasses. +# +# Create subclasses using {Pry::CommandSet#create_command}, and override the +# `options(opt)` method to set up an instance of Pry::Slop, and the `process` +# method to actually run the command. If necessary, you can also override +# `setup` which will be called before `options`, for example to require any +# gems your command needs to run, or to set up state. +# +# source://pry//lib/pry/class_command.rb#15 +class Pry::ClassCommand < ::Pry::Command + # Returns the value of attribute args. + # + # source://pry//lib/pry/class_command.rb#64 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://pry//lib/pry/class_command.rb#64 + def args=(_arg0); end + + # Set up `opts` and `args`, and then call `process`. + # + # This method will display help if necessary. + # + # @param args [Array] The arguments passed + # @return [Object] The return value of `process` or VOID_VALUE + # + # source://pry//lib/pry/class_command.rb#72 + def call(*args); end + + # Generate shell completions + # + # @param search [String] The line typed so far + # @return [Array] the words to complete + # + # source://pry//lib/pry/class_command.rb#105 + def complete(search); end + + # Return the help generated by Pry::Slop for this command. + # + # source://pry//lib/pry/class_command.rb#87 + def help; end + + # A method to setup Pry::Slop so it can parse the options your command expects. + # + # method, as it may be called by Pry at any time for introspection reasons. + # If you need to set up default values, use `setup` instead. + # + # @example + # def options(opt) + # opt.banner "Gists methods or classes" + # opt.on(:c, :class, "gist a class") do + # @action = :class + # end + # end + # @note Please don't do anything side-effecty in the main part of this + # + # source://pry//lib/pry/class_command.rb#171 + def options(opt); end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/class_command.rb#63 + def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://pry//lib/pry/class_command.rb#63 + def opts=(_arg0); end + + # The actual body of your command should go here. + # + # The `opts` method can be called to get the options that Pry::Slop has passed, + # and `args` gives the remaining, unparsed arguments. + # + # The return value of this method is discarded unless the command was + # created with `:keep_retval => true`, in which case it is returned to the + # repl. + # + # @example + # def process + # if opts.present?(:class) + # gist_class + # else + # gist_method + # end + # end + # @raise [CommandError] + # + # source://pry//lib/pry/class_command.rb#190 + def process; end + + # A method called just before `options(opt)` as part of `call`. + # + # This method can be used to set up any context your command needs to run, + # for example requiring gems, or setting default values for options. + # + # @example + # def setup + # require 'gist' + # @action = :method + # end + # + # source://pry//lib/pry/class_command.rb#121 + def setup; end + + # Return an instance of Pry::Slop that can parse either subcommands or the + # options that this command accepts. + # + # source://pry//lib/pry/class_command.rb#93 + def slop; end + + # A method to setup Pry::Slop commands so it can parse the subcommands your + # command expects. If you need to set up default values, use `setup` + # instead. + # + # @example A minimal example + # def subcommands(cmd) + # cmd.command :download do |opt| + # description 'Downloads a content from a server' + # + # opt.on :verbose, 'Use verbose output' + # + # run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # end + # end + # @example Define the invocation block anywhere you want + # def subcommands(cmd) + # cmd.command :download do |opt| + # description 'Downloads a content from a server' + # + # opt.on :verbose, 'Use verbose output' + # end + # end + # + # def process + # # Perform calculations... + # opts.fetch_command(:download).run do |options, arguments| + # ContentDownloader.download(options, arguments) + # end + # # More calculations... + # end + # + # source://pry//lib/pry/class_command.rb#156 + def subcommands(cmd); end + + class << self + # source://pry//lib/pry/class_command.rb#29 + def doc; end + + # source://pry//lib/pry/class_command.rb#40 + def file; end + + # Ensure that subclasses inherit the options, description and + # match from a ClassCommand super class. + # + # source://pry//lib/pry/class_command.rb#19 + def inherited(klass); end + + # source://pry//lib/pry/class_command.rb#45 + def line; end + + # source://pry//lib/pry/class_command.rb#25 + def source; end + + # source://pry//lib/pry/class_command.rb#37 + def source_file; end + + # source://pry//lib/pry/class_command.rb#42 + def source_line; end + + # source://pry//lib/pry/class_command.rb#33 + def source_location; end + + private + + # The object used to extract the source for the command. + # + # This should be a `Pry::Method(block)` for a command made with `create_command` + # and a `Pry::WrappedModule(self)` for a command that's a standard class. + # + # @return [Pry::WrappedModule, Pry::Method] + # + # source://pry//lib/pry/class_command.rb#54 + def source_object; end + end +end + +# `Pry::Code` is a class that encapsulates lines of source code and their +# line numbers and formats them for terminal output. It can read from a file +# or method definition or be instantiated with a `String` or an `Array`. +# +# In general, the formatting methods in `Code` return a new `Code` object +# which will format the text as specified when `#to_s` is called. This allows +# arbitrary chaining of formatting methods without mutating the original +# object. +# +# source://pry//lib/pry/code.rb#32 +class Pry::Code + extend ::MethodSource::CodeHelpers + + # Instantiate a `Code` object containing code from the given `Array`, + # `String`, or `IO`. The first line will be line 1 unless specified + # otherwise. If you need non-contiguous line numbers, you can create an + # empty `Code` object and then use `#push` to insert the lines. + # + # @param code_type [Symbol?] + # @param lines [Array, String, IO] + # @param start_line [Integer?] + # @return [Code] a new instance of Code + # + # source://pry//lib/pry/code.rb#87 + def initialize(lines = T.unsafe(nil), start_line = T.unsafe(nil), code_type = T.unsafe(nil)); end + + # Append the given line. +lineno+ is one more than the last existing + # line, unless specified otherwise. + # + # @param line [String] + # @return [void] + # + # source://pry//lib/pry/code.rb#106 + def <<(line); end + + # Two `Code` objects are equal if they contain the same lines with the same + # numbers. Otherwise, call `to_s` and `chomp` and compare as Strings. + # + # @param other [Code, Object] + # @return [Boolean] + # + # source://pry//lib/pry/code.rb#325 + def ==(other); end + + # Remove all lines except for the +lines+ after and excluding +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#195 + def after(lineno, lines = T.unsafe(nil)); end + + # Remove all lines except for the +lines+ on either side of and including + # +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#182 + def around(lineno, lines = T.unsafe(nil)); end + + # Remove all lines except for the +lines+ up to and excluding +lineno+. + # + # @param lineno [Integer] + # @param lines [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#168 + def before(lineno, lines = T.unsafe(nil)); end + + # Remove all lines that aren't in the given range, expressed either as a + # `Range` object or a first and last line number (inclusive). Negative + # indices count from the end of the array of lines. + # + # @param end_line [Integer?] + # @param start_line [Range, Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#135 + def between(start_line, end_line = T.unsafe(nil)); end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code.rb#77 + def code_type; end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code.rb#77 + def code_type=(_arg0); end + + # Get the comment that describes the expression on the given line number. + # + # @param line_number [Integer] (1-based) + # @return [String] the code. + # + # source://pry//lib/pry/code.rb#286 + def comment_describing(line_number); end + + # Get the multiline expression that starts on the given line number. + # + # @param line_number [Integer] (1-based) + # @return [String] the code. + # + # source://pry//lib/pry/code.rb#294 + def expression_at(line_number, consume = T.unsafe(nil)); end + + # Remove all lines that don't match the given `pattern`. + # + # @param pattern [Regexp] + # @return [Code] + # + # source://pry//lib/pry/code.rb#207 + def grep(pattern); end + + # @return [String] a (possibly highlighted) copy of the source code. + # + # source://pry//lib/pry/code.rb#263 + def highlighted; end + + # Return the number of lines stored. + # + # @return [Integer] + # + # source://pry//lib/pry/code.rb#316 + def length; end + + # @return [Integer] the number of digits in the last line. + # + # source://pry//lib/pry/code.rb#252 + def max_lineno_width; end + + # Forward any missing methods to the output of `#to_s`. + # + # source://pry//lib/pry/code.rb#335 + def method_missing(method_name, *args, &block); end + + # Get the (approximate) Module.nesting at the give line number. + # + # @param line_number [Integer] line number starting from 1 + # @return [Array] a list of open modules. + # + # source://pry//lib/pry/code.rb#302 + def nesting_at(line_number); end + + # Writes a formatted representation (based on the configuration of the + # object) to the given output, which must respond to `#<<`. + # + # source://pry//lib/pry/code.rb#269 + def print_to_output(output, color = T.unsafe(nil)); end + + # Append the given line. +lineno+ is one more than the last existing + # line, unless specified otherwise. + # + # @param line [String] + # @return [void] + # + # source://pry//lib/pry/code.rb#102 + def push(line); end + + # Return an unformatted String of the code. + # + # @return [String] + # + # source://pry//lib/pry/code.rb#309 + def raw; end + + # Filter the lines using the given block. + # + # @return [Code] + # @yield [LOC] + # + # source://pry//lib/pry/code.rb#122 + def reject(&block); end + + # Filter the lines using the given block. + # + # @return [Code] + # @yield [LOC] + # + # source://pry//lib/pry/code.rb#112 + def select(&block); end + + # Take `num_lines` from `start_line`, forward or backwards. + # + # @param num_lines [Integer] + # @param start_line [Integer] + # @return [Code] + # + # source://pry//lib/pry/code.rb#150 + def take_lines(start_line, num_lines); end + + # @return [String] a formatted representation (based on the configuration of + # the object). + # + # source://pry//lib/pry/code.rb#258 + def to_s; end + + # Format output with the specified number of spaces in front of every line, + # unless `spaces` is falsy. + # + # @param spaces [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#244 + def with_indentation(spaces = T.unsafe(nil)); end + + # Format output with line numbers next to it, unless `y_n` is falsy. + # + # @param y_n [Boolean?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#221 + def with_line_numbers(y_n = T.unsafe(nil)); end + + # Format output with a marker next to the given +lineno+, unless +lineno+ is + # falsy. + # + # @param lineno [Integer?] + # @return [Code] + # + # source://pry//lib/pry/code.rb#232 + def with_marker(lineno = T.unsafe(nil)); end + + protected + + # An abstraction of the `dup.instance_eval` pattern used throughout this + # class. + # + # source://pry//lib/pry/code.rb#353 + def alter(&block); end + + private + + # Check whether String responds to missing methods. + # + # @return [Boolean] + # + # source://pry//lib/pry/code.rb#345 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + class << self + # Instantiate a `Code` object containing code loaded from a file or + # Pry's line buffer. + # + # @param code_type [Symbol] The type of code the file contains. + # @param filename [String] The name of a file, or "(pry)". + # @return [Code] + # + # source://pry//lib/pry/code.rb#42 + def from_file(filename, code_type = T.unsafe(nil)); end + + # Instantiate a `Code` object containing code extracted from a + # `::Method`, `UnboundMethod`, `Proc`, or `Pry::Method` object. + # + # @param meth [::Method, UnboundMethod, Proc, Pry::Method] The method + # object. + # @param start_line [Integer, nil] The line number to start on, or nil to + # use the method's original line numbers. + # @return [Code] + # + # source://pry//lib/pry/code.rb#55 + def from_method(meth, start_line = T.unsafe(nil)); end + + # Attempt to extract the source code for module (or class) `mod`. + # + # @param candidate_rank [Integer] The module candidate (by rank) + # to use (see `Pry::WrappedModule::Candidate` for more information). + # @param mod [Module, Class] The module (or class) of interest. + # @param start_line [Integer, nil] The line number to start on, or nil to + # use the method's original line numbers. + # @return [Code] + # + # source://pry//lib/pry/code.rb#69 + def from_module(mod, candidate_rank = T.unsafe(nil), start_line = T.unsafe(nil)); end + end +end + +# Represents a range of lines in a code listing. +# +# @api private +# +# source://pry//lib/pry/code/code_range.rb#8 +class Pry::Code::CodeRange + # @api private + # @param end_line [Integer?] + # @param start_line [Integer] + # @return [CodeRange] a new instance of CodeRange + # + # source://pry//lib/pry/code/code_range.rb#11 + def initialize(start_line, end_line = T.unsafe(nil)); end + + # @api private + # @param lines [Array] + # @return [Range] + # + # source://pry//lib/pry/code/code_range.rb#19 + def indices_range(lines); end + + private + + # @api private + # + # source://pry//lib/pry/code/code_range.rb#27 + def end_line; end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/code_range.rb#57 + def find_end_index(lines); end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/code_range.rb#50 + def find_start_index(lines); end + + # If `end_line` is equal to `nil`, then calculate it from the first + # parameter, `start_line`. Otherwise, leave it as it is. + # + # @api private + # @return [void] + # + # source://pry//lib/pry/code/code_range.rb#32 + def force_set_end_line; end + + # Finds indices of `start_line` and `end_line` in the given Array of + # +lines+. + # + # @api private + # @param lines [Array] + # @return [Array] + # + # source://pry//lib/pry/code/code_range.rb#45 + def indices(lines); end + + # For example, if the range is 4..10, then `start_line` would be equal to + # 4 and `end_line` to 10. + # + # @api private + # @return [void] + # + # source://pry//lib/pry/code/code_range.rb#66 + def set_end_line_from_range; end + + # @api private + # + # source://pry//lib/pry/code/code_range.rb#25 + def start_line; end +end + +# Represents a line of code (which may, in fact, contain multiple lines if +# the entirety was eval'd as a single unit following the `edit` command). +# +# A line of code is a tuple, which consists of a line and a line number. A +# `LOC` object's state (namely, the line parameter) can be changed via +# instance methods. `Pry::Code` heavily uses this class. +# +# @api private +# @example +# loc = LOC.new("def example\n :example\nend", 1) +# puts loc.line +# def example +# :example +# end +# #=> nil +# +# loc.indent(3) +# loc.line #=> " def example\n :example\nend" +# +# source://pry//lib/pry/code/loc.rb#23 +class Pry::Code::LOC + # @api private + # @param line [String] The line of code. + # @param lineno [Integer] The position of the +line+. + # @return [LOC] a new instance of LOC + # + # source://pry//lib/pry/code/loc.rb#29 + def initialize(line, lineno); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/code/loc.rb#34 + def ==(other); end + + # Prepends the line number `lineno` to the `line`. + # + # @api private + # @param max_width [Integer] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#64 + def add_line_number(max_width = T.unsafe(nil), color = T.unsafe(nil)); end + + # Prepends a marker "=>" or an empty marker to the +line+. + # + # @api private + # @param marker_lineno [Integer] If it is equal to the `lineno`, then + # prepend a hashrocket. Otherwise, an empty marker. + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#81 + def add_marker(marker_lineno); end + + # Paints the `line` of code. + # + # @api private + # @param code_type [Symbol] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#56 + def colorize(code_type); end + + # @api private + # + # source://pry//lib/pry/code/loc.rb#38 + def dup; end + + # @api private + # + # source://pry//lib/pry/code/loc.rb#98 + def handle_multiline_entries_from_edit_command(line, max_width); end + + # Indents the `line` with +distance+ spaces. + # + # @api private + # @param distance [Integer] + # @return [void] + # + # source://pry//lib/pry/code/loc.rb#94 + def indent(distance); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/code/loc.rb#43 + def line; end + + # @api private + # @return [Integer] + # + # source://pry//lib/pry/code/loc.rb#48 + def lineno; end + + # @api private + # @return [Array] + # + # source://pry//lib/pry/code/loc.rb#25 + def tuple; end +end + +# source://pry//lib/pry/code/code_file.rb#6 +class Pry::CodeFile + # @param code_type [Symbol] The type of code the `filename` contains + # @param filename [String] The name of a file with code to be detected + # @return [CodeFile] a new instance of CodeFile + # + # source://pry//lib/pry/code/code_file.rb#41 + def initialize(filename, code_type = T.unsafe(nil)); end + + # @return [String] The code contained in the current `@filename`. + # + # source://pry//lib/pry/code/code_file.rb#47 + def code; end + + # @return [Symbol] The type of code stored in this wrapper. + # + # source://pry//lib/pry/code/code_file.rb#37 + def code_type; end + + private + + # @raise [MethodSource::SourceNotFoundError] if the `filename` is not + # readable for some reason. + # @return [String] absolute path for the given `filename`. + # + # source://pry//lib/pry/code/code_file.rb#64 + def abs_path; end + + # @return [Array] All the paths that contain code that Pry can use for its + # API's. Skips directories. + # + # source://pry//lib/pry/code/code_file.rb#80 + def code_path; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#110 + def from_load_path; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#105 + def from_pry_init_pwd; end + + # @return [String] + # + # source://pry//lib/pry/code/code_file.rb#100 + def from_pwd; end + + # @param path [String] + # @return [Boolean] if the path, with or without the default ext, + # is a readable file then `true`, otherwise `false`. + # + # source://pry//lib/pry/code/code_file.rb#73 + def readable?(path); end + + # @param default [Symbol] (:unknown) the file type to assume if none could be + # detected. + # @param filename [String] + # @return [Symbol, nil] The SyntaxHighlighter type of a file from its + # extension, or `nil` if `:unknown`. + # + # source://pry//lib/pry/code/code_file.rb#89 + def type_from_filename(filename, default = T.unsafe(nil)); end +end + +# source://pry//lib/pry/code/code_file.rb#7 +Pry::CodeFile::DEFAULT_EXT = T.let(T.unsafe(nil), String) + +# List of all supported languages. +# +# @return [Hash] +# +# source://pry//lib/pry/code/code_file.rb#11 +Pry::CodeFile::EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/code/code_file.rb#28 +Pry::CodeFile::FILES = T.let(T.unsafe(nil), Hash) + +# Store the current working directory. This allows show-source etc. to work if +# your process has changed directory since boot. [Issue #675] +# +# source://pry//lib/pry/code/code_file.rb#34 +Pry::CodeFile::INITIAL_PWD = T.let(T.unsafe(nil), String) + +# This class is responsible for taking a string (identifying a +# command/class/method/etc) and returning the relevant type of object. +# For example, if the user looks up "show-source" then a +# `Pry::Command` will be returned. Alternatively, if the user passes in "Pry#repl" then +# a `Pry::Method` object will be returned. +# +# The `CodeObject.lookup` method is responsible for 1. figuring out what kind of +# object the user wants (applying precedence rules in doing so -- i.e methods +# get precedence over commands with the same name) and 2. Returning +# the appropriate object. If the user fails to provide a string +# identifier for the object (i.e they pass in `nil` or "") then the +# object looked up will be the 'current method' or 'current class' +# associated with the Binding. +# +# TODO: This class is a clusterfuck. We need a much more robust +# concept of what a "Code Object" really is. Currently +# commands/classes/candidates/methods and so on just share a very +# ill-defined interface. +# +# source://pry//lib/pry/code_object.rb#22 +class Pry::CodeObject + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + + # @return [CodeObject] a new instance of CodeObject + # + # source://pry//lib/pry/code_object.rb#82 + def initialize(str, pry_instance, options = T.unsafe(nil)); end + + # TODO: just make it so find_command_by_match_or_listing doesn't raise? + # + # source://pry//lib/pry/code_object.rb#94 + def command_lookup; end + + # lookup variables and constants and `self` that are not modules + # + # source://pry//lib/pry/code_object.rb#118 + def default_lookup; end + + # when no parameter is given (i.e CodeObject.lookup(nil)), then we + # lookup the 'current object' from the binding. + # + # source://pry//lib/pry/code_object.rb#102 + def empty_lookup; end + + # source://pry//lib/pry/code_object.rb#136 + def method_or_class_lookup; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/code_object.rb#79 + def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/code_object.rb#79 + def pry_instance=(_arg0); end + + # Returns the value of attribute str. + # + # source://pry//lib/pry/code_object.rb#77 + def str; end + + # Sets the attribute str + # + # @param value the value to set the attribute str to. + # + # source://pry//lib/pry/code_object.rb#77 + def str=(_arg0); end + + # Returns the value of attribute super_level. + # + # source://pry//lib/pry/code_object.rb#80 + def super_level; end + + # Sets the attribute super_level + # + # @param value the value to set the attribute super_level to. + # + # source://pry//lib/pry/code_object.rb#80 + def super_level=(_arg0); end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/code_object.rb#78 + def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/code_object.rb#78 + def target=(_arg0); end + + private + + # Returns true if `str` looks like a method, i.e Klass#method + # We need to consider this case because method lookups should fall + # through to the `method_or_class_lookup()` method but a + # defined?() on a "Klass#method` string will see the `#` as a + # comment and only evaluate the `Klass` part. + # + # @param str [String] + # @return [Boolean] Whether the string looks like an instance method. + # + # source://pry//lib/pry/code_object.rb#163 + def looks_like_an_instance_method?(str); end + + # grab the nth (`super_level`) super of `obj + # + # @param obj [Object] + # @param super_level [Fixnum] How far up the super chain to ascend. + # @raise [Pry::CommandError] + # + # source://pry//lib/pry/code_object.rb#188 + def lookup_super(obj, super_level); end + + # We use this method to decide whether code is safe to eval. Method's are + # generally not, but everything else is. + # TODO: is just checking != "method" enough?? + # TODO: see duplication of this method in Pry::WrappedModule + # + # @param str [String] The string to lookup + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#173 + def safe_to_evaluate?(str); end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#152 + def sourcable_object?(obj); end + + # source://pry//lib/pry/code_object.rb#181 + def target_self; end + + class << self + # source://pry//lib/pry/code_object.rb#69 + def lookup(str, pry_instance, options = T.unsafe(nil)); end + end +end + +# source://pry//lib/pry/code_object.rb#23 +module Pry::CodeObject::Helpers + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#30 + def c_method?; end + + # @note If a module defined by C was extended with a lot of methods written + # in Ruby, this method would fail. + # @return [Boolean] `true` if this module was defined by means of the C API, + # `false` if it's a Ruby module. + # + # source://pry//lib/pry/code_object.rb#46 + def c_module?; end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#38 + def command?; end + + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#34 + def module_with_yard_docs?; end + + # we need this helper as some Pry::Method objects can wrap Procs + # + # @return [Boolean] + # + # source://pry//lib/pry/code_object.rb#26 + def real_method_object?; end +end + +# PP subclass for streaming inspect output in color. +# +# source://pry//lib/pry/color_printer.rb#8 +class Pry::ColorPrinter < ::PP + # source://pry//lib/pry/color_printer.rb#25 + def pp(object); end + + # source://pry//lib/pry/color_printer.rb#37 + def text(str, max_width = T.unsafe(nil)); end + + private + + # source://pry//lib/pry/color_printer.rb#49 + def highlight_object_literal(object_literal); end + + # source://pry//lib/pry/color_printer.rb#55 + def inspect_object(object); end + + class << self + # source://pry//lib/pry/color_printer.rb#11 + def default(_output, value, pry_instance); end + + # source://pry//lib/pry/color_printer.rb#18 + def pp(obj, output = T.unsafe(nil), max_width = T.unsafe(nil)); end + end +end + +# N.B. using a regular expression here so that "raise-up 'foo'" does the right thing. +# +# source://pry//lib/pry/command.rb#11 +class Pry::Command + include ::Pry::Helpers::BaseHelpers + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + include ::Pry::Helpers::Text + extend ::Pry::Helpers::DocumentationHelpers + extend ::Pry::CodeObject::Helpers + + # Instantiate a command, in preparation for calling it. + # + # @param context [Hash] The runtime context to use with this command. + # @return [Command] a new instance of Command + # + # source://pry//lib/pry/command.rb#230 + def initialize(context = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#292 + def _pry_; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/command.rb#218 + def _pry_=(_arg0); end + + # Returns the value of attribute arg_string. + # + # source://pry//lib/pry/command.rb#213 + def arg_string; end + + # Sets the attribute arg_string + # + # @param value the value to set the attribute arg_string to. + # + # source://pry//lib/pry/command.rb#213 + def arg_string=(_arg0); end + + # source://pry//lib/pry/command.rb#253 + def block; end + + # Returns the value of attribute captures. + # + # source://pry//lib/pry/command.rb#211 + def captures; end + + # Sets the attribute captures + # + # @param value the value to set the attribute captures to. + # + # source://pry//lib/pry/command.rb#211 + def captures=(_arg0); end + + # Display a warning if a command collides with a local/method in + # the current scope. + # + # source://pry//lib/pry/command.rb#329 + def check_for_command_collision(command_match, arg_string); end + + # The block we pass *into* a command so long as `:takes_block` is + # not equal to `false` + # + # @example + # my-command | do + # puts "block content" + # end + # + # source://pry//lib/pry/command.rb#226 + def command_block; end + + # The block we pass *into* a command so long as `:takes_block` is + # not equal to `false` + # + # @example + # my-command | do + # puts "block content" + # end + # + # source://pry//lib/pry/command.rb#226 + def command_block=(_arg0); end + + # source://pry//lib/pry/command.rb#261 + def command_name; end + + # source://pry//lib/pry/command.rb#257 + def command_options; end + + # Returns the value of attribute command_set. + # + # source://pry//lib/pry/command.rb#215 + def command_set; end + + # Sets the attribute command_set + # + # @param value the value to set the attribute command_set to. + # + # source://pry//lib/pry/command.rb#215 + def command_set=(_arg0); end + + # source://pry//lib/pry/command.rb#284 + def commands; end + + # Generate completions for this command + # + # @param _search [String] The line typed so far + # @return [Array] Completion words + # + # source://pry//lib/pry/command.rb#411 + def complete(_search); end + + # Returns the value of attribute context. + # + # source://pry//lib/pry/command.rb#214 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://pry//lib/pry/command.rb#214 + def context=(_arg0); end + + # source://pry//lib/pry/command.rb#249 + def description; end + + # Returns the value of attribute eval_string. + # + # source://pry//lib/pry/command.rb#212 + def eval_string; end + + # Sets the attribute eval_string + # + # @param value the value to set the attribute eval_string to. + # + # source://pry//lib/pry/command.rb#212 + def eval_string=(_arg0); end + + # Returns the value of attribute hooks. + # + # source://pry//lib/pry/command.rb#216 + def hooks; end + + # Sets the attribute hooks + # + # @param value the value to set the attribute hooks to. + # + # source://pry//lib/pry/command.rb#216 + def hooks=(_arg0); end + + # Revaluate the string (str) and perform interpolation. + # + # @param str [String] The string to reevaluate with interpolation. + # @return [String] The reevaluated string with interpolations + # applied (if any). + # + # source://pry//lib/pry/command.rb#318 + def interpolate_string(str); end + + # source://pry//lib/pry/command.rb#245 + def match; end + + # Make those properties accessible to instances + # + # source://pry//lib/pry/command.rb#241 + def name; end + + # Properties of one execution of a command (passed by {Pry#run_command} as a hash of + # context and expanded in `#initialize` + # + # source://pry//lib/pry/command.rb#209 + def output; end + + # Properties of one execution of a command (passed by {Pry#run_command} as a hash of + # context and expanded in `#initialize` + # + # source://pry//lib/pry/command.rb#209 + def output=(_arg0); end + + # Process a line that Command.matches? this command. + # + # @param line [String] The line to process + # @return [Object, Command::VOID_VALUE] + # + # source://pry//lib/pry/command.rb#394 + def process_line(line); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/command.rb#217 + def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/command.rb#217 + def pry_instance=(_arg0); end + + # Run a command from another command. + # + # @example + # run "show-input" + # @example + # run ".ls" + # @example + # run "amend-line", "5", 'puts "hello world"' + # @param args [Array] Further arguments to pass to the command + # @param command_string [String] The string that invokes the command + # + # source://pry//lib/pry/command.rb#278 + def run(command_string, *args); end + + # source://pry//lib/pry/command.rb#265 + def source; end + + # @example + # state.my_state = "my state" # this will not conflict with any + # # `state.my_state` used in another command. + # @return [Hash] Pry commands can store arbitrary state + # here. This state persists between subsequent command invocations. + # All state saved here is unique to the command, it does not + # need to be namespaced. + # + # source://pry//lib/pry/command.rb#309 + def state; end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/command.rb#210 + def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/command.rb#210 + def target=(_arg0); end + + # @return [Object] The value of `self` inside the `target` binding. + # + # source://pry//lib/pry/command.rb#298 + def target_self; end + + # Extract necessary information from a line that Command.matches? this + # command. + # + # Returns an array of four elements: + # + # ``` + # [String] the portion of the line that matched with the Command match + # [String] a string of all the arguments (i.e. everything but the match) + # [Array] the captures caught by the command_regex + # [Array] the arguments obtained by splitting the arg_string + # ``` + # + # @param val [String] The line of input + # @return [Array] + # + # source://pry//lib/pry/command.rb#356 + def tokenize(val); end + + # source://pry//lib/pry/command.rb#288 + def void; end + + private + + # source://pry//lib/pry/command.rb#485 + def after_hooks; end + + # source://pry//lib/pry/command.rb#481 + def before_hooks; end + + # Run the command with the given `args`. + # + # This is a public wrapper around `#call` which ensures all preconditions + # are met. + # + # @param args [Array] The arguments to pass to this command. + # @return [Object] The return value of the `#call` method, or + # {Command::VOID_VALUE}. + # + # source://pry//lib/pry/command.rb#425 + def call_safely(*args); end + + # Run the `#call` method and all the registered hooks. + # + # @param args [Array] The arguments to `#call` + # @return [Object] The return value from `#call` + # + # source://pry//lib/pry/command.rb#492 + def call_with_hooks(*args); end + + # source://pry//lib/pry/command.rb#476 + def find_hooks(event); end + + # Normalize method arguments according to its arity. + # + # @param args [Array] + # @param method [Integer] + # @return [Array] a (possibly shorter) array of the arguments to pass + # + # source://pry//lib/pry/command.rb#509 + def normalize_method_args(method, args); end + + # Pass a block argument to a command. + # + # @param arg_string [String] The arguments (as a string) passed to the command. + # We inspect these for a '| do' or a '| {' and if we find it we use it + # to start a block input sequence. Once we have a complete + # block, we save it to an accessor that can be retrieved from the command context. + # Note that if we find the '| do' or '| {' we delete this and the + # elements following it from `arg_string`. + # + # source://pry//lib/pry/command.rb#451 + def pass_block(arg_string); end + + # source://pry//lib/pry/command.rb#436 + def use_unpatched_symbol; end + + class << self + # Define or get the command's banner + # + # source://pry//lib/pry/command.rb#61 + def banner(arg = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#66 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://pry//lib/pry/command.rb#30 + def block=(_arg0); end + + # source://pry//lib/pry/command.rb#109 + def command_name; end + + # Define or get the command's options + # + # source://pry//lib/pry/command.rb#51 + def command_options(arg = T.unsafe(nil)); end + + # Sets the attribute command_options + # + # @param value the value to set the attribute command_options to. + # + # source://pry//lib/pry/command.rb#32 + def command_options=(_arg0); end + + # source://pry//lib/pry/command.rb#165 + def command_regex; end + + # source://pry//lib/pry/command.rb#172 + def convert_to_regex(obj); end + + # source://pry//lib/pry/command.rb#89 + def default_options(match); end + + # Define or get the command's description + # + # source://pry//lib/pry/command.rb#45 + def description(arg = T.unsafe(nil)); end + + # Sets the attribute description + # + # @param value the value to set the attribute description to. + # + # source://pry//lib/pry/command.rb#31 + def description=(_arg0); end + + # source://pry//lib/pry/command.rb#75 + def doc; end + + # source://pry//lib/pry/command.rb#82 + def file; end + + # The group in which the command should be displayed in "help" output. + # This is usually auto-generated from directory naming, but it can be + # manually overridden if necessary. + # Group should not be changed once it is initialized. + # + # source://pry//lib/pry/command.rb#185 + def group(name = T.unsafe(nil)); end + + # source://pry//lib/pry/command.rb#105 + def inspect; end + + # source://pry//lib/pry/command.rb#87 + def line; end + + # source://pry//lib/pry/command.rb#35 + def match(arg = T.unsafe(nil)); end + + # Sets the attribute match + # + # @param value the value to set the attribute match to. + # + # source://pry//lib/pry/command.rb#33 + def match=(_arg0); end + + # How well does this command match the given line? + # + # Higher scores are better because they imply that this command matches + # the line more closely. + # + # The score is calculated by taking the number of characters at the start + # of the string that are used only to identify the command, not as part of + # the arguments. + # + # @example + # /\.(.*)/.match_score(".foo") #=> 1 + # /\.*(.*)/.match_score("...foo") #=> 3 + # 'hi'.match_score("hi there") #=> 2 + # @param val [String] A line input at the REPL + # @return [Fixnum] + # + # source://pry//lib/pry/command.rb#153 + def match_score(val); end + + # Should this command be called for the given line? + # + # @param val [String] A line input at the REPL + # @return [Boolean] + # + # source://pry//lib/pry/command.rb#133 + def matches?(val); end + + # source://pry//lib/pry/command.rb#101 + def name; end + + # Define or get the command's options + # backward compatibility + # + # source://pry//lib/pry/command.rb#57 + def options(arg = T.unsafe(nil)); end + + # Sets the attribute command_options + # + # @param value the value to set the attribute command_options to. + # + # source://pry//lib/pry/command.rb#58 + def options=(_arg0); end + + # source://pry//lib/pry/command.rb#70 + def source; end + + # source://pry//lib/pry/command.rb#79 + def source_file; end + + # source://pry//lib/pry/command.rb#84 + def source_line; end + + # source://pry//lib/pry/command.rb#202 + def state; end + + # Create a new command with the given properties. + # + # @param description [String] The description to appear in `help` + # @param helpers [Module] A module of helper functions to be included. + # @param match [String, Regex] The thing that triggers this command + # @param options [Hash] Behavioral options (see {Pry::CommandSet#command}) + # @return [Class] (a subclass of {Pry::Command}) + # @yield optional, used for BlockCommands + # + # source://pry//lib/pry/command.rb#120 + def subclass(match, description, options, helpers, &block); end + end +end + +# source://pry//lib/pry/commands/amend_line.rb#5 +class Pry::Command::AmendLine < ::Pry::ClassCommand + # @raise [CommandError] + # + # source://pry//lib/pry/commands/amend_line.rb#22 + def process; end + + private + + # @return [String] A new string with the amendments applied to it. + # + # source://pry//lib/pry/commands/amend_line.rb#33 + def amend_input; end + + # source://pry//lib/pry/commands/amend_line.rb#47 + def delete_from_array(array, range); end + + # source://pry//lib/pry/commands/amend_line.rb#51 + def insert_into_array(array, range); end + + # @return [Fixnum] The number of lines currently in `eval_string` (the + # input buffer) + # + # source://pry//lib/pry/commands/amend_line.rb#62 + def line_count; end + + # The lines (or line) that will be modified by the `amend-line`. + # + # @return [Range, Fixnum] The lines or line. + # + # source://pry//lib/pry/commands/amend_line.rb#90 + def line_range; end + + # source://pry//lib/pry/commands/amend_line.rb#56 + def replace_in_array(array, range); end + + # Returns the (one-indexed) start and end lines given by the user. + # The lines in this range will be affected by the `amend-line`. + # Returns `nil` if no lines were specified by the user. + # + # @return [Array, nil] + # + # source://pry//lib/pry/commands/amend_line.rb#70 + def start_and_end_line_number; end + + # Takes two numbers that are 1-indexed, and returns a range (or + # number) that is 0-indexed. 1-indexed means the first element is + # identified by 1 rather than by 0 (as is the case for Ruby arrays). + # + # @param end_line_number [Fixnum] One-indexed number. + # @param start_line_number [Fixnum] One-indexed number. + # @return [Range] The zero-indexed range. + # + # source://pry//lib/pry/commands/amend_line.rb#83 + def zero_indexed_range_from_one_indexed_numbers(start_line_number, end_line_number); end +end + +# source://pry//lib/pry/commands/bang.rb#5 +class Pry::Command::Bang < ::Pry::ClassCommand + # source://pry//lib/pry/commands/bang.rb#16 + def process; end +end + +# source://pry//lib/pry/commands/bang_pry.rb#5 +class Pry::Command::BangPry < ::Pry::ClassCommand + # source://pry//lib/pry/commands/bang_pry.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/cat.rb#5 +class Pry::Command::Cat < ::Pry::ClassCommand + # source://pry//lib/pry/commands/cat.rb#53 + def complete(search); end + + # source://pry//lib/pry/commands/cat.rb#57 + def load_path_completions; end + + # source://pry//lib/pry/commands/cat.rb#23 + def options(opt); end + + # source://pry//lib/pry/commands/cat.rb#38 + def process; end +end + +# source://pry//lib/pry/commands/cat/abstract_formatter.rb#6 +class Pry::Command::Cat::AbstractFormatter + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + include ::Pry::Helpers::BaseHelpers + + private + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#26 + def between_lines; end + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#18 + def code_type; end + + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#12 + def decorate(content); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/cat/abstract_formatter.rb#22 + def use_line_numbers?; end +end + +# source://pry//lib/pry/commands/cat/exception_formatter.rb#6 +class Pry::Command::Cat::ExceptionFormatter < ::Pry::Command::Cat::AbstractFormatter + include ::Pry::Helpers::Text + + # @return [ExceptionFormatter] a new instance of ExceptionFormatter + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#12 + def initialize(exception, pry_instance, opts); end + + # Returns the value of attribute ex. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#7 + def ex; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#18 + def format; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#8 + def opts; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#9 + def pry_instance; end + + private + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#56 + def backtrace_file; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#37 + def backtrace_level; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#60 + def backtrace_line; end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/cat/exception_formatter.rb#64 + def check_for_errors; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#33 + def code_window_size; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#78 + def header; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#52 + def increment_backtrace_level; end + + # source://pry//lib/pry/commands/cat/exception_formatter.rb#71 + def start_and_end_line_for_code_window; end +end + +# source://pry//lib/pry/commands/cat/file_formatter.rb#6 +class Pry::Command::Cat::FileFormatter < ::Pry::Command::Cat::AbstractFormatter + # @return [FileFormatter] a new instance of FileFormatter + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#11 + def initialize(file_with_embedded_line, pry_instance, opts); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#27 + def file_and_line; end + + # Returns the value of attribute file_with_embedded_line. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#7 + def file_with_embedded_line; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#22 + def format; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#8 + def opts; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/cat/file_formatter.rb#9 + def pry_instance; end + + private + + # source://pry//lib/pry/commands/cat/file_formatter.rb#55 + def code_type; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#43 + def code_window_size; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#47 + def decorate(content); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#59 + def detect_code_type_from_file(file_name); end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#35 + def file_name; end + + # source://pry//lib/pry/commands/cat/file_formatter.rb#39 + def line_number; end +end + +# source://pry//lib/pry/commands/cat/input_expression_formatter.rb#6 +class Pry::Command::Cat::InputExpressionFormatter < ::Pry::Command::Cat::AbstractFormatter + # @return [InputExpressionFormatter] a new instance of InputExpressionFormatter + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#10 + def initialize(input_expressions, opts); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#15 + def format; end + + # Returns the value of attribute input_expressions. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 + def input_expressions; end + + # Sets the attribute input_expressions + # + # @param value the value to set the attribute input_expressions to. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 + def input_expressions=(_arg0); end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 + def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 + def opts=(_arg0); end + + private + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#42 + def normalized_expression_range; end + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#37 + def numbered_input_items; end + + # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#33 + def selected_input_items; end +end + +# source://pry//lib/pry/commands/cd.rb#5 +class Pry::Command::Cd < ::Pry::ClassCommand + # source://pry//lib/pry/commands/cd.rb#27 + def process; end +end + +# source://pry//lib/pry/commands/change_inspector.rb#5 +class Pry::Command::ChangeInspector < ::Pry::ClassCommand + # source://pry//lib/pry/commands/change_inspector.rb#17 + def process(inspector); end + + private + + # source://pry//lib/pry/commands/change_inspector.rb#28 + def inspector_map; end +end + +# source://pry//lib/pry/commands/change_prompt.rb#5 +class Pry::Command::ChangePrompt < ::Pry::ClassCommand + # source://pry//lib/pry/commands/change_prompt.rb#16 + def options(opt); end + + # source://pry//lib/pry/commands/change_prompt.rb#20 + def process(prompt); end + + private + + # source://pry//lib/pry/commands/change_prompt.rb#38 + def change_prompt(prompt); end + + # source://pry//lib/pry/commands/change_prompt.rb#30 + def list_prompts; end +end + +# source://pry//lib/pry/commands/clear_screen.rb#5 +class Pry::Command::ClearScreen < ::Pry::ClassCommand + # source://pry//lib/pry/commands/clear_screen.rb#10 + def process; end +end + +# source://pry//lib/pry/commands/code_collector.rb#5 +class Pry::Command::CodeCollector + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + + # @return [CodeCollector] a new instance of CodeCollector + # + # source://pry//lib/pry/commands/code_collector.rb#23 + def initialize(args, opts, pry_instance); end + + # Returns the value of attribute args. + # + # source://pry//lib/pry/commands/code_collector.rb#8 + def args; end + + # The code object + # + # @return [Pry::WrappedModule, Pry::Method, Pry::Command] + # + # source://pry//lib/pry/commands/code_collector.rb#86 + def code_object; end + + # The content (i.e code/docs) for the selected object. + # If the user provided a bare code object, it returns the source. + # If the user provided the `-i` or `-o` switches, it returns the + # selected input/output lines joined as a string. If the user used + # `-d CODE_OBJECT` it returns the docs for that code object. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#60 + def content; end + + # The name of the explicitly given file (if any). + # + # source://pry//lib/pry/commands/code_collector.rb#13 + def file; end + + # The name of the explicitly given file (if any). + # + # source://pry//lib/pry/commands/code_collector.rb#13 + def file=(_arg0); end + + # The line range passed to `--lines`, converted to a 0-indexed range. + # + # source://pry//lib/pry/commands/code_collector.rb#123 + def line_range; end + + # Name of the object argument + # + # source://pry//lib/pry/commands/code_collector.rb#128 + def obj_name; end + + # Returns the value of attribute opts. + # + # source://pry//lib/pry/commands/code_collector.rb#9 + def opts; end + + # The selected `pry_instance.input_ring` as a string, as specified by + # the `-i` switch. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#116 + def pry_input_content; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/code_collector.rb#10 + def pry_instance; end + + # The selected `pry_instance.output_ring` as a string, as specified by + # the `-o` switch. + # + # @return [String] + # + # source://pry//lib/pry/commands/code_collector.rb#104 + def pry_output_content; end + + # Given a string and a range, return the `range` lines of that + # string. + # + # @param content [String] + # @param range [Range, Fixnum] + # @return [String] The string restricted to the given range + # + # source://pry//lib/pry/commands/code_collector.rb#96 + def restrict_to_lines(content, range); end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/commands/code_collector.rb#134 + def bad_option_combination?; end + + # source://pry//lib/pry/commands/code_collector.rb#153 + def code_object_doc; end + + # source://pry//lib/pry/commands/code_collector.rb#157 + def code_object_source_or_file; end + + # source://pry//lib/pry/commands/code_collector.rb#175 + def convert_to_range(range); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/code_collector.rb#171 + def could_not_locate(name); end + + # source://pry//lib/pry/commands/code_collector.rb#161 + def file_content; end + + # source://pry//lib/pry/commands/code_collector.rb#139 + def pry_array_content_as_string(array, ranges); end + + class << self + # Add the `--lines`, `-o`, `-i`, `-s`, `-d` options. + # + # source://pry//lib/pry/commands/code_collector.rb#30 + def inject_options(opt); end + + # Returns the value of attribute input_expression_ranges. + # + # source://pry//lib/pry/commands/code_collector.rb#16 + def input_expression_ranges; end + + # Sets the attribute input_expression_ranges + # + # @param value the value to set the attribute input_expression_ranges to. + # + # source://pry//lib/pry/commands/code_collector.rb#16 + def input_expression_ranges=(_arg0); end + + # Returns the value of attribute output_result_ranges. + # + # source://pry//lib/pry/commands/code_collector.rb#17 + def output_result_ranges; end + + # Sets the attribute output_result_ranges + # + # @param value the value to set the attribute output_result_ranges to. + # + # source://pry//lib/pry/commands/code_collector.rb#17 + def output_result_ranges=(_arg0); end + end +end + +# source://pry//lib/pry/commands/disable_pry.rb#5 +class Pry::Command::DisablePry < ::Pry::ClassCommand + # source://pry//lib/pry/commands/disable_pry.rb#23 + def process; end +end + +# source://pry//lib/pry/commands/edit.rb#5 +class Pry::Command::Edit < ::Pry::ClassCommand + # source://pry//lib/pry/commands/edit.rb#91 + def apply_runtime_patch; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#174 + def bad_option_combination?; end + + # source://pry//lib/pry/commands/edit.rb#154 + def code_object; end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/edit.rb#107 + def ensure_file_name_is_valid(file_name); end + + # source://pry//lib/pry/commands/edit.rb#121 + def file_and_line; end + + # source://pry//lib/pry/commands/edit.rb#117 + def file_and_line_for_current_exception; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#80 + def file_based_exception?; end + + # source://pry//lib/pry/commands/edit.rb#137 + def file_edit; end + + # source://pry//lib/pry/commands/edit.rb#150 + def filename_argument; end + + # source://pry//lib/pry/commands/edit.rb#205 + def initial_temp_file_content; end + + # source://pry//lib/pry/commands/edit.rb#182 + def input_expression; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#197 + def never_reload?; end + + # source://pry//lib/pry/commands/edit.rb#27 + def options(opt); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#170 + def patch_exception?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#165 + def previously_patched?(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#217 + def probably_a_file?(str); end + + # source://pry//lib/pry/commands/edit.rb#48 + def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#160 + def pry_method?(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#201 + def reload?(file_name = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#193 + def reloadable?; end + + # source://pry//lib/pry/commands/edit.rb#71 + def repl_edit; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#66 + def repl_edit?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/edit.rb#84 + def runtime_patch?; end +end + +# source://pry//lib/pry/commands/edit/exception_patcher.rb#6 +class Pry::Command::Edit::ExceptionPatcher + # @return [ExceptionPatcher] a new instance of ExceptionPatcher + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#11 + def initialize(pry_instance, state, exception_file_and_line); end + + # Returns the value of attribute file_and_line. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 + def file_and_line; end + + # Sets the attribute file_and_line + # + # @param value the value to set the attribute file_and_line to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 + def file_and_line=(_arg0); end + + # perform the patch + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#18 + def perform_patch; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 + def pry_instance; end + + # Sets the attribute pry_instance + # + # @param value the value to set the attribute pry_instance to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 + def pry_instance=(_arg0); end + + # Returns the value of attribute state. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 + def state=(_arg0); end +end + +# source://pry//lib/pry/commands/edit/file_and_line_locator.rb#6 +module Pry::Command::Edit::FileAndLineLocator + class << self + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#8 + def from_binding(target); end + + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#16 + def from_code_object(code_object, filename_argument); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#24 + def from_exception(exception, backtrace_level); end + + # when file and line are passed as a single arg, e.g my_file.rb:30 + # + # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#38 + def from_filename_argument(filename_argument); end + end +end + +# source://pry//lib/pry/commands/exit.rb#5 +class Pry::Command::Exit < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit.rb#25 + def process; end + + # source://pry//lib/pry/commands/exit.rb#34 + def process_pop_and_return; end +end + +# source://pry//lib/pry/commands/exit_all.rb#5 +class Pry::Command::ExitAll < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit_all.rb#18 + def process; end +end + +# source://pry//lib/pry/commands/exit_program.rb#5 +class Pry::Command::ExitProgram < ::Pry::ClassCommand + # source://pry//lib/pry/commands/exit_program.rb#18 + def process; end +end + +# source://pry//lib/pry/commands/find_method.rb#5 +class Pry::Command::FindMethod < ::Pry::ClassCommand + extend ::Pry::Helpers::BaseHelpers + + # source://pry//lib/pry/commands/find_method.rb#31 + def options(opt); end + + # source://pry//lib/pry/commands/find_method.rb#36 + def process; end + + private + + # Return the matched lines of method source if `-c` is given or "" + # if `-c` was not given + # + # source://pry//lib/pry/commands/find_method.rb#100 + def additional_info(header, method); end + + # Search for all methods who's implementation matches the given regex + # within a namespace. + # + # @param namespace [Module] The namespace to search + # @return [Array] + # + # source://pry//lib/pry/commands/find_method.rb#186 + def content_search(namespace); end + + # source://pry//lib/pry/commands/find_method.rb#108 + def matched_method_lines(header, method); end + + # Search for all methods with a name that matches the given regex + # within a namespace. + # + # @param namespace [Module] The namespace to search + # @return [Array] + # + # source://pry//lib/pry/commands/find_method.rb#174 + def name_search(namespace); end + + # @return [Regexp] The pattern to search for. + # + # source://pry//lib/pry/commands/find_method.rb#48 + def pattern; end + + # pretty-print a list of matching methods. + # + # @param matches [Array] + # + # source://pry//lib/pry/commands/find_method.rb#80 + def print_matches(matches); end + + # Print matched methods for a class + # + # source://pry//lib/pry/commands/find_method.rb#90 + def print_matches_for_class(klass, grouped); end + + # Run the given block against every constant in the provided namespace. + # + # @param done [Hash] The namespaces we've already visited (private) + # @param klass [Module] The namespace in which to start the search. + # @yieldparam klass Each class/module in the namespace. + # + # source://pry//lib/pry/commands/find_method.rb#120 + def recurse_namespace(klass, done = T.unsafe(nil), &block); end + + # Gather all the methods in a namespace that pass the given block. + # + # @param namespace [Module] The namespace in which to search. + # @return [Array] + # @yieldparam method [Method] The method to test + # @yieldreturn [Boolean] + # + # source://pry//lib/pry/commands/find_method.rb#150 + def search_all_methods(namespace); end + + # The class to search for methods. + # We only search classes, so if the search object is an + # instance, return its class. If no search object is given + # search `target_self`. + # + # source://pry//lib/pry/commands/find_method.rb#67 + def search_class; end + + # Output the result of the search. + # + # @param matches [Array] + # + # source://pry//lib/pry/commands/find_method.rb#55 + def show_search_results(matches); end +end + +# source://pry//lib/pry/commands/fix_indent.rb#5 +class Pry::Command::FixIndent < ::Pry::ClassCommand + # source://pry//lib/pry/commands/fix_indent.rb#15 + def process; end +end + +# source://pry//lib/pry/commands/help.rb#5 +class Pry::Command::Help < ::Pry::ClassCommand + # Get a hash of available commands grouped by the "group" name. + # + # source://pry//lib/pry/commands/help.rb#29 + def command_groups; end + + # Display help for an individual command. + # + # @param command [Pry::Command] + # + # source://pry//lib/pry/commands/help.rb#125 + def display_command(command); end + + # Display help for a searched item, filtered by group + # + # @param search [String] The string to search for. + # @raise [CommandError] + # + # source://pry//lib/pry/commands/help.rb#111 + def display_filtered_commands(search); end + + # Display help for a searched item, filtered first by group + # and if that fails, filtered by command name. + # + # @param search [String] The string to search for. + # + # source://pry//lib/pry/commands/help.rb#98 + def display_filtered_search_results(search); end + + # Display the index view, with headings and short descriptions per command. + # + # @param groups [Hash>] + # + # source://pry//lib/pry/commands/help.rb#44 + def display_index(groups); end + + # Display help for an individual command or group. + # + # @param search [String] The string to search for. + # + # source://pry//lib/pry/commands/help.rb#86 + def display_search(search); end + + # source://pry//lib/pry/commands/help.rb#159 + def group_sort_key(group_name); end + + # Given a group name and an array of commands, + # return the help string for those commands. + # + # @param commands [Array] + # @param name [String] The group name. + # @return [String] The generated help string. + # + # source://pry//lib/pry/commands/help.rb#62 + def help_text_for_commands(name, commands); end + + # Clean search terms to make it easier to search group names + # + # @param key [String] + # @return [String] + # + # source://pry//lib/pry/commands/help.rb#155 + def normalize(key); end + + # source://pry//lib/pry/commands/help.rb#33 + def process; end + + # Find a subset of a hash that matches the user's search term. + # + # If there's an exact match a Hash of one element will be returned, + # otherwise a sub-Hash with every key that matches the search will + # be returned. + # + # @param hash [Hash] the hash to search + # @param search [String] the search term + # + # source://pry//lib/pry/commands/help.rb#137 + def search_hash(search, hash); end + + # Sort an array of commands by their `listing` name. + # + # @param commands [Array] The commands to sort + # @return [Array] commands sorted by listing name. + # + # source://pry//lib/pry/commands/help.rb#79 + def sorted_commands(commands); end + + # @param groups [Hash] + # @return [Array] An array of sorted group names. + # + # source://pry//lib/pry/commands/help.rb#71 + def sorted_group_names(groups); end + + # We only want to show commands that have descriptions, so that the + # easter eggs don't show up. + # + # source://pry//lib/pry/commands/help.rb#20 + def visible_commands; end +end + +# source://pry//lib/pry/commands/hist.rb#5 +class Pry::Command::Hist < ::Pry::ClassCommand + # source://pry//lib/pry/commands/hist.rb#25 + def options(opt); end + + # source://pry//lib/pry/commands/hist.rb#43 + def process; end + + private + + # Checks +replay_sequence+ for the presence of neighboring replay calls. + # + # @example + # [1] pry(main)> hist --show 46894 + # 46894: hist --replay 46675..46677 + # [2] pry(main)> hist --show 46675..46677 + # 46675: 1+1 + # 46676: a = 100 + # 46677: hist --tail + # [3] pry(main)> hist --replay 46894 + # Error: Replay index 46894 points out to another replay call: + # `hist -r 46675..46677` + # [4] pry(main)> + # @param replay_sequence [String] The sequence of commands to be replayed + # (per saltum) + # @raise [Pry::CommandError] If +replay_sequence+ contains another + # "hist --replay" call + # @return [Boolean] `false` if +replay_sequence+ does not contain another + # "hist --replay" call + # + # source://pry//lib/pry/commands/hist.rb#143 + def check_for_juxtaposed_replay(replay_sequence); end + + # Finds history depending on the given switch. + # + # @return [Pry::Code] if it finds `--all` (or `-a`) switch, returns all + # entries in history. Without the switch returns only the entries from the + # current Pry session. + # + # source://pry//lib/pry/commands/hist.rb#168 + def find_history; end + + # source://pry//lib/pry/commands/hist.rb#105 + def process_clear; end + + # source://pry//lib/pry/commands/hist.rb#78 + def process_display; end + + # source://pry//lib/pry/commands/hist.rb#110 + def process_replay; end + + # source://pry//lib/pry/commands/hist.rb#86 + def process_save; end +end + +# source://pry//lib/pry/commands/import_set.rb#5 +class Pry::Command::ImportSet < ::Pry::ClassCommand + # TODO: resolve unused parameter. + # + # @raise [CommandError] + # + # source://pry//lib/pry/commands/import_set.rb#17 + def process(_command_set_name); end +end + +# source://pry//lib/pry/commands/jump_to.rb#5 +class Pry::Command::JumpTo < ::Pry::ClassCommand + # source://pry//lib/pry/commands/jump_to.rb#14 + def process(break_level); end +end + +# source://pry//lib/pry/commands/list_inspectors.rb#5 +class Pry::Command::ListInspectors < ::Pry::ClassCommand + # source://pry//lib/pry/commands/list_inspectors.rb#16 + def process; end + + private + + # source://pry//lib/pry/commands/list_inspectors.rb#28 + def inspector_map; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/list_inspectors.rb#36 + def selected_inspector?(inspector); end + + # source://pry//lib/pry/commands/list_inspectors.rb#32 + def selected_text; end +end + +# source://pry//lib/pry/commands/ls/config.rb#7 +class Pry::Command::Ls < ::Pry::ClassCommand + # Exclude -q, -v and --grep because they, + # don't specify what the user wants to see. + # + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls.rb#64 + def no_user_opts?; end + + # source://pry//lib/pry/commands/ls.rb#31 + def options(opt); end + + # source://pry//lib/pry/commands/ls.rb#69 + def process; end + + private + + # source://pry//lib/pry/commands/ls.rb#85 + def error_list; end + + # source://pry//lib/pry/commands/ls.rb#105 + def raise_errors_if_arguments_are_weird; end +end + +# source://pry//lib/pry/commands/ls/config.rb#8 +class Pry::Command::Ls::Config + extend ::Forwardable + extend ::Pry::Forwardable + + # @return [Config] a new instance of Config + # + # source://pry//lib/pry/commands/ls/config.rb#44 + def initialize(config); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def [](*args, **_arg1, &block); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def []=(*args, **_arg1, &block); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def builtin_global_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def builtin_global_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def ceiling; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def ceiling=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def class_constant_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def class_constant_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def class_var_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def class_var_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def constant_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def constant_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def each(*args, **_arg1, &block); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def each_pair(*args, **_arg1, &block); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def exception_constant_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def exception_constant_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def global_var_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def global_var_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def heading_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def heading_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def instance_var_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def instance_var_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def keys(*args, **_arg1, &block); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def local_var_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def local_var_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def method_missing_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def method_missing_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def private_method_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def private_method_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def protected_method_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def protected_method_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def pry_var_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def pry_var_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def pseudo_global_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def pseudo_global_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def public_method_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def public_method_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def separator; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def separator=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def to_a(*args, **_arg1, &block); end + + # source://pry//lib/pry/commands/ls/config.rb#33 + def unloaded_constant_color; end + + # source://pry//lib/pry/commands/ls/config.rb#37 + def unloaded_constant_color=(value); end + + # source://pry//lib/pry/commands/ls/config.rb#42 + def values(*args, **_arg1, &block); end + + class << self + # source://pry//lib/pry/commands/ls/config.rb#48 + def default; end + end +end + +# source://pry//lib/pry/commands/ls/config.rb#11 +Pry::Command::Ls::Config::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/commands/ls/constants.rb#6 +class Pry::Command::Ls::Constants < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + + # @return [Constants] a new instance of Constants + # + # source://pry//lib/pry/commands/ls/constants.rb#14 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/constants.rb#23 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/constants.rb#27 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/constants.rb#39 + def format(mod, constants); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/constants.rb#35 + def show_deprecated_constants?; end +end + +# source://pry//lib/pry/commands/ls/constants.rb#7 +Pry::Command::Ls::Constants::DEPRECATED_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/commands/ls/formatter.rb#6 +class Pry::Command::Ls::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://pry//lib/pry/commands/ls/formatter.rb#10 + def initialize(pry_instance); end + + # Sets the attribute grep + # + # @param value the value to set the attribute grep to. + # + # source://pry//lib/pry/commands/ls/formatter.rb#7 + def grep=(_arg0); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/ls/formatter.rb#8 + def pry_instance; end + + # source://pry//lib/pry/commands/ls/formatter.rb#16 + def write_out; end + + private + + # source://pry//lib/pry/commands/ls/formatter.rb#24 + def color(type, str); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/formatter.rb#41 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/formatter.rb#37 + def format_value(value); end + + # source://pry//lib/pry/commands/ls/formatter.rb#49 + def grep; end + + # Add a new section to the output. + # Outputs nothing if the section would be empty. + # + # source://pry//lib/pry/commands/ls/formatter.rb#30 + def output_section(heading, body); end + + # @raise [NotImplementedError] + # + # source://pry//lib/pry/commands/ls/formatter.rb#45 + def output_self; end +end + +# source://pry//lib/pry/commands/ls/globals.rb#6 +class Pry::Command::Ls::Globals < ::Pry::Command::Ls::Formatter + # @return [Globals] a new instance of Globals + # + # source://pry//lib/pry/commands/ls/globals.rb#24 + def initialize(opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/globals.rb#29 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/globals.rb#36 + def format(globals); end +end + +# Taken from "puts global_variables.inspect". +# +# source://pry//lib/pry/commands/ls/globals.rb#8 +Pry::Command::Ls::Globals::BUILTIN_GLOBALS = T.let(T.unsafe(nil), Array) + +# `$SAFE` and `$?` are thread-local, the exception stuff only works in a +# rescue clause, everything else is basically a local variable with a `$` +# in its name. +# +# source://pry//lib/pry/commands/ls/globals.rb#19 +Pry::Command::Ls::Globals::PSEUDO_GLOBALS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/commands/ls/grep.rb#6 +class Pry::Command::Ls::Grep + # @return [Grep] a new instance of Grep + # + # source://pry//lib/pry/commands/ls/grep.rb#7 + def initialize(grep_regexp); end + + # source://pry//lib/pry/commands/ls/grep.rb#11 + def regexp; end +end + +# source://pry//lib/pry/commands/ls/instance_vars.rb#6 +class Pry::Command::Ls::InstanceVars < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + + # @return [InstanceVars] a new instance of InstanceVars + # + # source://pry//lib/pry/commands/ls/instance_vars.rb#9 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/instance_vars.rb#16 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/instance_vars.rb#20 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/instance_vars.rb#34 + def format(type, vars); end +end + +# source://pry//lib/pry/commands/ls/interrogatable.rb#6 +module Pry::Command::Ls::Interrogatable + private + + # source://pry//lib/pry/commands/ls/interrogatable.rb#13 + def interrogatee_mod; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/interrogatable.rb#9 + def interrogating_a_module?; end +end + +# source://pry//lib/pry/commands/ls/jruby_hacks.rb#6 +module Pry::Command::Ls::JRubyHacks + private + + # When removing jruby aliases, we want to keep the alias that is + # "least rubbish" according to this metric. + # + # source://pry//lib/pry/commands/ls/jruby_hacks.rb#40 + def rubbishness(name); end + + # JRuby creates lots of aliases for methods imported from java in an attempt + # to make life easier for ruby programmers. (e.g. getFooBar becomes + # get_foo_bar and foo_bar, and maybe foo_bar? if it returns a Boolean). The + # full transformations are in the assignAliases method of: + # https://github.com/jruby/jruby/blob/master/src/org/jruby/javasupport/JavaClass.java + # + # This has the unfortunate side-effect of making the output of ls even more + # incredibly verbose than it normally would be for these objects; and so we + # filter out all but the nicest of these aliases here. + # + # TODO: This is a little bit vague, better heuristics could be used. + # JRuby also has a lot of scala-specific logic, which we don't copy. + # + # source://pry//lib/pry/commands/ls/jruby_hacks.rb#21 + def trim_jruby_aliases(methods); end +end + +# source://pry//lib/pry/commands/ls/local_names.rb#6 +class Pry::Command::Ls::LocalNames < ::Pry::Command::Ls::Formatter + # @return [LocalNames] a new instance of LocalNames + # + # source://pry//lib/pry/commands/ls/local_names.rb#7 + def initialize(no_user_opts, args, pry_instance); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/local_names.rb#14 + def correct_opts?; end + + # source://pry//lib/pry/commands/ls/local_names.rb#18 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/local_names.rb#25 + def format(locals); end +end + +# source://pry//lib/pry/commands/ls/local_vars.rb#6 +class Pry::Command::Ls::LocalVars < ::Pry::Command::Ls::Formatter + # @return [LocalVars] a new instance of LocalVars + # + # source://pry//lib/pry/commands/ls/local_vars.rb#7 + def initialize(opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/local_vars.rb#13 + def output_self; end + + private + + # source://pry//lib/pry/commands/ls/local_vars.rb#34 + def colorized_assignment_style(lhs, rhs, desired_width = T.unsafe(nil)); end + + # source://pry//lib/pry/commands/ls/local_vars.rb#25 + def format(name_value_pairs); end +end + +# source://pry//lib/pry/commands/ls/ls_entity.rb#6 +class Pry::Command::Ls::LsEntity + # @return [LsEntity] a new instance of LsEntity + # + # source://pry//lib/pry/commands/ls/ls_entity.rb#9 + def initialize(opts); end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#18 + def entities_table; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/ls/ls_entity.rb#7 + def pry_instance; end + + private + + # source://pry//lib/pry/commands/ls/ls_entity.rb#32 + def constants; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#56 + def entities; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#28 + def globals; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#24 + def grep(entity); end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#44 + def instance_vars; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#48 + def local_names; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#52 + def local_vars; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#36 + def methods; end + + # source://pry//lib/pry/commands/ls/ls_entity.rb#40 + def self_methods; end +end + +# source://pry//lib/pry/commands/ls/methods.rb#6 +class Pry::Command::Ls::Methods < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + include ::Pry::Command::Ls::JRubyHacks + include ::Pry::Command::Ls::MethodsHelper + + # @return [Methods] a new instance of Methods + # + # source://pry//lib/pry/commands/ls/methods.rb#10 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/methods.rb#22 + def output_self; end + + private + + # Get a lambda that can be used with `take_while` to prevent over-eager + # traversal of the Object's ancestry graph. + # + # source://pry//lib/pry/commands/ls/methods.rb#41 + def below_ceiling; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/methods.rb#35 + def correct_opts?; end +end + +# source://pry//lib/pry/commands/ls/methods_helper.rb#6 +module Pry::Command::Ls::MethodsHelper + include ::Pry::Command::Ls::JRubyHacks + + private + + # Get all the methods that we'll want to output. + # + # source://pry//lib/pry/commands/ls/methods_helper.rb#12 + def all_methods(instance_methods = T.unsafe(nil)); end + + # source://pry//lib/pry/commands/ls/methods_helper.rb#34 + def format(methods); end + + # source://pry//lib/pry/commands/ls/methods_helper.rb#26 + def resolution_order; end +end + +# source://pry//lib/pry/commands/ls/self_methods.rb#6 +class Pry::Command::Ls::SelfMethods < ::Pry::Command::Ls::Formatter + include ::Pry::Command::Ls::Interrogatable + include ::Pry::Command::Ls::JRubyHacks + include ::Pry::Command::Ls::MethodsHelper + + # @return [SelfMethods] a new instance of SelfMethods + # + # source://pry//lib/pry/commands/ls/self_methods.rb#10 + def initialize(interrogatee, no_user_opts, opts, pry_instance); end + + # source://pry//lib/pry/commands/ls/self_methods.rb#18 + def output_self; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/commands/ls/self_methods.rb#28 + def correct_opts?; end +end + +# source://pry//lib/pry/commands/nesting.rb#5 +class Pry::Command::Nesting < ::Pry::ClassCommand + # source://pry//lib/pry/commands/nesting.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/play.rb#5 +class Pry::Command::Play < ::Pry::ClassCommand + # source://pry//lib/pry/commands/play.rb#74 + def code_object; end + + # source://pry//lib/pry/commands/play.rb#82 + def content; end + + # source://pry//lib/pry/commands/play.rb#60 + def content_after_options; end + + # source://pry//lib/pry/commands/play.rb#70 + def content_at_expression; end + + # The file to play from when no code object is specified. + # e.g `play --lines 4..10` + # + # source://pry//lib/pry/commands/play.rb#92 + def default_file; end + + # source://pry//lib/pry/commands/play.rb#102 + def file_content; end + + # source://pry//lib/pry/commands/play.rb#29 + def options(opt); end + + # source://pry//lib/pry/commands/play.rb#48 + def perform_play; end + + # source://pry//lib/pry/commands/play.rb#41 + def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/play.rb#78 + def should_use_default_file?; end + + # source://pry//lib/pry/commands/play.rb#53 + def show_input; end +end + +# source://pry//lib/pry/commands/pry_backtrace.rb#5 +class Pry::Command::PryBacktrace < ::Pry::ClassCommand + # source://pry//lib/pry/commands/pry_backtrace.rb#22 + def process; end +end + +# source://pry//lib/pry/commands/raise_up.rb#6 +class Pry::Command::RaiseUp < ::Pry::ClassCommand + # source://pry//lib/pry/commands/raise_up.rb#27 + def process; end +end + +# source://pry//lib/pry/commands/reload_code.rb#5 +class Pry::Command::ReloadCode < ::Pry::ClassCommand + # source://pry//lib/pry/commands/reload_code.rb#20 + def process; end + + private + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/reload_code.rb#58 + def check_for_reloadability(code_object, identifier); end + + # source://pry//lib/pry/commands/reload_code.rb#32 + def current_file; end + + # source://pry//lib/pry/commands/reload_code.rb#42 + def reload_current_file; end + + # source://pry//lib/pry/commands/reload_code.rb#51 + def reload_object(identifier); end +end + +# source://pry//lib/pry/commands/reset.rb#5 +class Pry::Command::Reset < ::Pry::ClassCommand + # source://pry//lib/pry/commands/reset.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/ri.rb#7 +class Pry::Command::Ri < ::Pry::ClassCommand + # source://pry//lib/pry/commands/ri.rb#21 + def process(spec); end +end + +# source://pry//lib/pry/commands/save_file.rb#5 +class Pry::Command::SaveFile < ::Pry::ClassCommand + # source://pry//lib/pry/commands/save_file.rb#50 + def display_content; end + + # source://pry//lib/pry/commands/save_file.rb#39 + def file_name; end + + # source://pry//lib/pry/commands/save_file.rb#56 + def mode; end + + # source://pry//lib/pry/commands/save_file.rb#21 + def options(opt); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/save_file.rb#28 + def process; end + + # source://pry//lib/pry/commands/save_file.rb#43 + def save_file; end +end + +# source://pry//lib/pry/commands/shell_command.rb#5 +class Pry::Command::ShellCommand < ::Pry::ClassCommand + # source://pry//lib/pry/commands/shell_command.rb#21 + def process(cmd); end + + private + + # source://pry//lib/pry/commands/shell_command.rb#50 + def cd_path_env; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/shell_command.rb#54 + def cd_path_exists?; end + + # source://pry//lib/pry/commands/shell_command.rb#36 + def parse_destination(dest); end + + # source://pry//lib/pry/commands/shell_command.rb#58 + def path_from_cd_path(dest); end + + # source://pry//lib/pry/commands/shell_command.rb#43 + def process_cd(dest); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/shell_command.rb#68 + def special_case_path?(dest); end +end + +# source://pry//lib/pry/commands/shell_mode.rb#5 +class Pry::Command::ShellMode < ::Pry::ClassCommand + # source://pry//lib/pry/commands/shell_mode.rb#15 + def process; end +end + +# source://pry//lib/pry/commands/show_doc.rb#5 +class Pry::Command::ShowDoc < ::Pry::Command::ShowInfo + include ::Pry::Helpers::DocumentationHelpers + + # The docs for code_object prepared for display. + # + # source://pry//lib/pry/commands/show_doc.rb#25 + def content_for(code_object); end + + # Return docs for the code_object, adjusting for whether the code_object + # has yard docs available, in which case it returns those. + # (note we only have to check yard docs for modules since they can + # have multiple docs, but methods can only be doc'd once so we + # dont need to check them) + # + # source://pry//lib/pry/commands/show_doc.rb#54 + def docs_for(code_object); end + + # Which sections to include in the 'header', can toggle: :owner, + # :signature and visibility. + # + # source://pry//lib/pry/commands/show_doc.rb#66 + def header_options; end + + # process the markup (if necessary) and apply colors + # + # source://pry//lib/pry/commands/show_doc.rb#34 + def render_doc_markup_for(code_object); end + + # figure out start line of docs by back-calculating based on + # number of lines in the comment and the start line of the code_object + # + # @return [Fixnum] start line of docs + # + # source://pry//lib/pry/commands/show_doc.rb#73 + def start_line_for(code_object); end +end + +# source://pry//lib/pry/commands/show_info.rb#5 +class Pry::Command::ShowInfo < ::Pry::ClassCommand + extend ::Pry::Helpers::BaseHelpers + + # @return [ShowInfo] a new instance of ShowInfo + # + # source://pry//lib/pry/commands/show_info.rb#10 + def initialize(*_arg0); end + + # source://pry//lib/pry/commands/show_info.rb#127 + def code_object_header(code_object, line_num); end + + # This method checks whether the `code_object` is a WrappedModule, if it + # is, then it returns the first candidate (monkeypatch) with accessible + # source (or docs). If `code_object` is not a WrappedModule (i.e a method + # or a command) then the `code_object` itself is just returned. + # + # @raise [CommandError] + # @return [Pry::WrappedModule, Pry::Method, Pry::Command] + # + # source://pry//lib/pry/commands/show_info.rb#61 + def code_object_with_accessible_source(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#213 + def complete(input); end + + # source://pry//lib/pry/commands/show_info.rb#77 + def content_and_header_for_code_object(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#81 + def content_and_headers_for_all_module_candidates(mod); end + + # takes into account possible yard docs, and returns yard_file / yard_line + # Also adjusts for start line of comments (using start_line_for), which it + # has to infer by subtracting number of lines of comment from start line + # of code_object + # + # source://pry//lib/pry/commands/show_info.rb#205 + def file_and_line_for(code_object); end + + # Generate a header (meta-data information) for all the code + # object types: methods, modules, commands, procs... + # + # source://pry//lib/pry/commands/show_info.rb#106 + def header(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#173 + def header_options; end + + # source://pry//lib/pry/commands/show_info.rb#142 + def method_header(code_object, line_num); end + + # source://pry//lib/pry/commands/show_info.rb#165 + def method_sections(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#151 + def module_header(code_object, line_num); end + + # source://pry//lib/pry/commands/show_info.rb#100 + def no_definition_message; end + + # source://pry//lib/pry/commands/show_info.rb#185 + def obj_name; end + + # source://pry//lib/pry/commands/show_info.rb#16 + def options(opt); end + + # @raise [CommandError] + # + # source://pry//lib/pry/commands/show_info.rb#26 + def process; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#181 + def show_all_modules?(code_object); end + + # source://pry//lib/pry/commands/show_info.rb#193 + def start_line_for(code_object); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#189 + def use_line_numbers?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/show_info.rb#73 + def valid_superclass?(code_object); end +end + +# source://pry//lib/pry/commands/show_input.rb#5 +class Pry::Command::ShowInput < ::Pry::ClassCommand + # source://pry//lib/pry/commands/show_input.rb#15 + def process; end +end + +# source://pry//lib/pry/commands/show_source.rb#5 +class Pry::Command::ShowSource < ::Pry::Command::ShowInfo + # The source for code_object prepared for display. + # + # source://pry//lib/pry/commands/show_source.rb#44 + def content_for(code_object); end + + # source://pry//lib/pry/commands/show_source.rb#28 + def options(opt); end + + # source://pry//lib/pry/commands/show_source.rb#34 + def process; end +end + +# source://pry//lib/pry/commands/stat.rb#5 +class Pry::Command::Stat < ::Pry::ClassCommand + # source://pry//lib/pry/commands/stat.rb#19 + def options(opt); end + + # source://pry//lib/pry/commands/stat.rb#23 + def process; end +end + +# source://pry//lib/pry/commands/switch_to.rb#5 +class Pry::Command::SwitchTo < ::Pry::ClassCommand + # source://pry//lib/pry/commands/switch_to.rb#14 + def process(selection); end +end + +# source://pry//lib/pry/commands/toggle_color.rb#5 +class Pry::Command::ToggleColor < ::Pry::ClassCommand + # source://pry//lib/pry/commands/toggle_color.rb#21 + def color_toggle; end + + # source://pry//lib/pry/commands/toggle_color.rb#16 + def process; end +end + +# represents a void return value for a command +# +# source://pry//lib/pry/command.rb#20 +Pry::Command::VOID_VALUE = T.let(T.unsafe(nil), Object) + +# source://pry//lib/pry/commands/pry_version.rb#5 +class Pry::Command::Version < ::Pry::ClassCommand + # source://pry//lib/pry/commands/pry_version.rb#14 + def process; end +end + +# source://pry//lib/pry/commands/watch_expression.rb#5 +class Pry::Command::WatchExpression < ::Pry::ClassCommand + # source://pry//lib/pry/commands/watch_expression.rb#31 + def options(opt); end + + # source://pry//lib/pry/commands/watch_expression.rb#42 + def process; end + + private + + # source://pry//lib/pry/commands/watch_expression.rb#91 + def add_expression; end + + # source://pry//lib/pry/commands/watch_expression.rb#96 + def add_hook; end + + # source://pry//lib/pry/commands/watch_expression.rb#59 + def delete(index); end + + # source://pry//lib/pry/commands/watch_expression.rb#84 + def eval_and_print_changed(output); end + + # source://pry//lib/pry/commands/watch_expression.rb#55 + def expressions; end + + # source://pry//lib/pry/commands/watch_expression.rb#69 + def list; end +end + +# source://pry//lib/pry/commands/watch_expression/expression.rb#6 +class Pry::Command::WatchExpression::Expression + # @return [Expression] a new instance of Expression + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#9 + def initialize(pry_instance, target, source); end + + # Has the value of the expression changed? + # + # We use the pretty-printed string representation to detect differences + # as this avoids problems with dup (causes too many differences) and == + # (causes too few) + # + # @return [Boolean] + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#29 + def changed?; end + + # source://pry//lib/pry/commands/watch_expression/expression.rb#15 + def eval!; end + + # Returns the value of attribute previous_value. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def previous_value; end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def pry_instance; end + + # Returns the value of attribute source. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def source; end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def target; end + + # source://pry//lib/pry/commands/watch_expression/expression.rb#20 + def to_s; end + + # Returns the value of attribute value. + # + # source://pry//lib/pry/commands/watch_expression/expression.rb#7 + def value; end + + private + + # source://pry//lib/pry/commands/watch_expression/expression.rb#35 + def target_eval(target, source); end +end + +# source://pry//lib/pry/commands/whereami.rb#7 +class Pry::Command::Whereami < ::Pry::ClassCommand + # @return [Whereami] a new instance of Whereami + # + # source://pry//lib/pry/commands/whereami.rb#8 + def initialize(*_arg0); end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#83 + def bad_option_combination?; end + + # source://pry//lib/pry/commands/whereami.rb#63 + def code; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#77 + def code?; end + + # source://pry//lib/pry/commands/whereami.rb#88 + def location; end + + # source://pry//lib/pry/commands/whereami.rb#55 + def options(opt); end + + # source://pry//lib/pry/commands/whereami.rb#92 + def process; end + + # source://pry//lib/pry/commands/whereami.rb#44 + def setup; end + + private + + # source://pry//lib/pry/commands/whereami.rb#171 + def class_code; end + + # source://pry//lib/pry/commands/whereami.rb#152 + def code_window; end + + # source://pry//lib/pry/commands/whereami.rb#144 + def default_code; end + + # source://pry//lib/pry/commands/whereami.rb#185 + def expand_path(filename); end + + # source://pry//lib/pry/commands/whereami.rb#132 + def handle_internal_binding; end + + # source://pry//lib/pry/commands/whereami.rb#124 + def marker; end + + # source://pry//lib/pry/commands/whereami.rb#156 + def method_code; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#116 + def nothing_to_do?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#140 + def small_method?; end + + # This either returns the `target_self` + # or it returns the class of `target_self` if `target_self` is not a class. + # + # @return [Pry::WrappedModule] + # + # source://pry//lib/pry/commands/whereami.rb#165 + def target_class; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#128 + def top_level?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#120 + def use_line_numbers?; end + + # @return [Boolean] + # + # source://pry//lib/pry/commands/whereami.rb#180 + def valid_method?; end + + # source://pry//lib/pry/commands/whereami.rb#192 + def window_size; end + + class << self + # Returns the value of attribute method_size_cutoff. + # + # source://pry//lib/pry/commands/whereami.rb#15 + def method_size_cutoff; end + + # Sets the attribute method_size_cutoff + # + # @param value the value to set the attribute method_size_cutoff to. + # + # source://pry//lib/pry/commands/whereami.rb#15 + def method_size_cutoff=(_arg0); end + end +end + +# source://pry//lib/pry/commands/wtf.rb#5 +class Pry::Command::Wtf < ::Pry::ClassCommand + # source://pry//lib/pry/commands/wtf.rb#27 + def options(opt); end + + # source://pry//lib/pry/commands/wtf.rb#32 + def process; end + + private + + # source://pry//lib/pry/commands/wtf.rb#64 + def format_backtrace(backtrace); end + + # source://pry//lib/pry/commands/wtf.rb#60 + def format_header(title, exception); end + + # source://pry//lib/pry/commands/wtf.rb#83 + def read_line(file, line); end + + # source://pry//lib/pry/commands/wtf.rb#76 + def trim_backtrace(backtrace); end + + # source://pry//lib/pry/commands/wtf.rb#48 + def unwind_exceptions; end +end + +# source://pry//lib/pry/commands/wtf.rb#25 +Pry::Command::Wtf::RUBY_FRAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# CommandErrors are caught by the REPL loop and displayed to the user. They +# indicate an exceptional condition that's fatal to the current command. +# +# source://pry//lib/pry/exceptions.rb#68 +class Pry::CommandError < ::StandardError; end + +# This class is used to create sets of commands. Commands can be imported from +# different sets, aliased, removed, etc. +# +# source://pry//lib/pry/command_set.rb#12 +class Pry::CommandSet + include ::Enumerable + include ::Pry::Helpers::BaseHelpers + + # @param imported_sets [Array] Sets which will be imported automatically + # @return [CommandSet] a new instance of CommandSet + # @yield Optional block run to define commands + # + # source://pry//lib/pry/command_set.rb#20 + def initialize(*imported_sets, &block); end + + # Find a command that matches the given line + # + # @param pattern [String] The line that might be a command invocation + # @return [Pry::Command, nil] + # + # source://pry//lib/pry/command_set.rb#275 + def [](pattern); end + + # Re-assign the command found at _pattern_ with _command_. + # + # @example + # Pry.config.commands["help"] = MyHelpCommand + # @param command [Pry::Command] The command to add. + # @param pattern [Regexp, String] The command to add or replace(found at _pattern_). + # @return [Pry::Command] Returns the new command (matched with "pattern".) + # + # source://pry//lib/pry/command_set.rb#298 + def []=(pattern, command); end + + # Add a command to set. + # + # @param command [Command] a subclass of Pry::Command. + # + # source://pry//lib/pry/command_set.rb#324 + def add_command(command); end + + # Aliases a command + # + # @example Creating an alias for `ls -M` + # Pry.config.commands.alias_command "lM", "ls -M" + # @example Pass explicit description (overriding default). + # Pry.config.commands.alias_command "lM", "ls -M", :desc => "cutiepie" + # @param action [String] The action to be performed (typically + # another command). + # @param match [String, Regex] The match of the alias (can be a regex). + # @param options [Hash] The optional configuration parameters, + # accepts the same as the `command` method, but also allows the + # command description to be passed this way too as `:desc` + # + # source://pry//lib/pry/command_set.rb#190 + def alias_command(match, action, options = T.unsafe(nil)); end + + # Defines a new Pry command. + # + # @example + # MyCommands = Pry::CommandSet.new do + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> greet john + # # Good afternoon John! + # # pry(main)> help greet + # # Greet somebody + # @example Regexp command + # MyCommands = Pry::CommandSet.new do + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> number-10 john + # # hello john, nice number: 10 + # # pry(main)> help number + # # number-N regex command + # @option options + # @option options + # @option options + # @option options + # @option options + # @param description [String] A description of the command. + # @param match [String, Regexp] The start of invocations of this command. + # @param options [Hash] The optional configuration parameters. + # @yield The action to perform. The parameters in the block + # determines the parameters the command will receive. All + # parameters passed into the block will be strings. Successive + # command parameters are separated by whitespace at the Pry prompt. + # + # source://pry//lib/pry/command_set.rb#78 + def block_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Defines a new Pry command. + # + # @example + # MyCommands = Pry::CommandSet.new do + # command "greet", "Greet somebody" do |name| + # puts "Good afternoon #{name.capitalize}!" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> greet john + # # Good afternoon John! + # # pry(main)> help greet + # # Greet somebody + # @example Regexp command + # MyCommands = Pry::CommandSet.new do + # command( + # /number-(\d+)/, "number-N regex command", :listing => "number" + # ) do |num, name| + # puts "hello #{name}, nice number: #{num}" + # end + # end + # + # # From pry: + # # pry(main)> pry_instance.commands = MyCommands + # # pry(main)> number-10 john + # # hello john, nice number: 10 + # # pry(main)> help number + # # number-N regex command + # @option options + # @option options + # @option options + # @option options + # @option options + # @param description [String] A description of the command. + # @param match [String, Regexp] The start of invocations of this command. + # @param options [Hash] The optional configuration parameters. + # @yield The action to perform. The parameters in the block + # determines the parameters the command will receive. All + # parameters passed into the block will be strings. Successive + # command parameters are separated by whitespace at the Pry prompt. + # + # source://pry//lib/pry/command_set.rb#89 + def command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Generate completions for the user's search. + # + # @param context [Hash] The context to create the command with + # @param search [String] The line to search for + # @return [Array] + # + # source://pry//lib/pry/command_set.rb#365 + def complete(search, context = T.unsafe(nil)); end + + # Defines a new Pry command class. + # + # @example + # Pry::Commands.create_command "echo", "echo's the input", :shellwords => false do + # def options(opt) + # opt.banner "Usage: echo [-u | -d] " + # opt.on :u, :upcase, "ensure the output is all upper-case" + # opt.on :d, :downcase, "ensure the output is all lower-case" + # end + # + # def process + # if opts.present?(:u) && opts.present?(:d) + # raise Pry::CommandError, "-u and -d makes no sense" + # end + # result = args.join(" ") + # result.downcase! if opts.present?(:downcase) + # result.upcase! if opts.present?(:upcase) + # output.puts result + # end + # end + # @param description [String] A description of the command. + # @param match [String, Regexp] The start of invocations of this command. + # @param options [Hash] The optional configuration parameters, see {#command} + # @yield The class body's definition. + # + # source://pry//lib/pry/command_set.rb#117 + def create_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Removes some commands from the set + # + # @param searches [Array] the matches or listings of the commands + # to remove + # + # source://pry//lib/pry/command_set.rb#138 + def delete(*searches); end + + # Sets or gets the description for a command (replacing the old + # description). Returns current description if no description + # parameter provided. + # + # @example Getting + # Pry.config.commands.desc "amend-line" + # @example Setting + # MyCommands = Pry::CommandSet.new do + # desc "help", "help description" + # end + # @param description [String?] (nil) The command description. + # @param search [String, Regexp] The command match. + # + # source://pry//lib/pry/command_set.rb#253 + def desc(search, description = T.unsafe(nil)); end + + # source://pry//lib/pry/command_set.rb#131 + def each(&block); end + + # Find a command that matches the given line + # + # @param pattern [String] The line that might be a command invocation + # @return [Pry::Command, nil] + # + # source://pry//lib/pry/command_set.rb#281 + def find_command(pattern); end + + # @param match_or_listing [String, Regexp] The match or listing of a command. + # of the command to retrieve. + # @return [Command] The command object matched. + # + # source://pry//lib/pry/command_set.rb#173 + def find_command_by_match_or_listing(match_or_listing); end + + # Find the command that the user might be trying to refer to. + # + # @param search [String] The user's search. + # @return [Pry::Command?] + # + # source://pry//lib/pry/command_set.rb#331 + def find_command_for_help(search); end + + # Returns the value of attribute helper_module. + # + # source://pry//lib/pry/command_set.rb#15 + def helper_module; end + + # Imports all the commands from one or more sets. + # + # @param sets [Array] Command sets, all of the commands of which + # will be imported. + # @return [Pry::CommandSet] Returns the receiver (a command set). + # + # source://pry//lib/pry/command_set.rb#149 + def import(*sets); end + + # Imports some commands from a set + # + # @param matches [Array] Commands to import + # @param set [CommandSet] Set to import commands from + # @return [Pry::CommandSet] Returns the receiver (a command set). + # + # source://pry//lib/pry/command_set.rb#161 + def import_from(set, *matches); end + + # @return [Array] The list of commands provided by the command set. + # + # source://pry//lib/pry/command_set.rb#265 + def keys; end + + # @return [Array] The list of commands provided by the command set. + # + # source://pry//lib/pry/command_set.rb#262 + def list_commands; end + + # Process the given line to see whether it needs executing as a command. + # + # @param context [Hash] The context to execute the commands with + # @param val [String] The line to execute + # @return [CommandSet::Result] + # + # source://pry//lib/pry/command_set.rb#351 + def process_line(val, context = T.unsafe(nil)); end + + # Rename a command. Accepts either match or listing for the search. + # + # @example Renaming the `ls` command and changing its description. + # Pry.config.commands.rename "dir", "ls", :description => "DOS friendly ls" + # @param new_match [String, Regexp] The new match for the command. + # @param options [Hash] The optional configuration parameters, + # accepts the same as the `command` method, but also allows the + # command description to be passed this way too. + # @param search [String, Regexp] The command's current match or listing. + # + # source://pry//lib/pry/command_set.rb#227 + def rename_command(new_match, search, options = T.unsafe(nil)); end + + # source://pry//lib/pry/command_set.rb#270 + def to_h; end + + # source://pry//lib/pry/command_set.rb#267 + def to_hash; end + + # Is the given line a command invocation? + # + # @param val [String] + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#343 + def valid_command?(val); end + + private + + # Defines helpers methods for this command sets. + # Those helpers are only defined in this command set. + # + # @example + # helpers do + # def hello + # puts "Hello!" + # end + # + # include OtherModule + # end + # @yield A block defining helper methods + # + # source://pry//lib/pry/command_set.rb#390 + def helpers(&block); end +end + +# CommandState is a data structure to hold per-command state. +# +# Pry commands can store arbitrary state here. This state persists between +# subsequent command invocations. All state saved here is unique to the +# command. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/command_state.rb#12 +class Pry::CommandState + # @api private + # @return [CommandState] a new instance of CommandState + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#17 + def initialize; end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#25 + def reset(command_class); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#21 + def state_for(command_class); end + + private + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#31 + def command_struct(command_class); end + + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/command_state.rb#13 + def default; end + end +end + +# source://pry//lib/pry.rb#35 +Pry::Commands = T.let(T.unsafe(nil), Pry::CommandSet) + +# @api private +# +# source://pry//lib/pry/config/attributable.rb#4 +class Pry::Config + extend ::Pry::Config::Attributable + + # @api private + # @return [Config] a new instance of Config + # + # source://pry//lib/pry/config.rb#151 + def initialize; end + + # @api private + # + # source://pry//lib/pry/config.rb#224 + def [](attr); end + + # @api private + # + # source://pry//lib/pry/config.rb#220 + def []=(attr, value); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#109 + def auto_indent; end + + # source://pry//lib/pry/config.rb#109 + def auto_indent=(_arg0); end + + # @api private + # @return [Boolean] whether or not display a warning when a command name + # collides with a method/local in the current context. + # + # source://pry//lib/pry/config.rb#116 + def collision_warning; end + + # source://pry//lib/pry/config.rb#116 + def collision_warning=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#59 + def color; end + + # source://pry//lib/pry/config.rb#59 + def color=(_arg0); end + + # @api private + # @return [Proc] + # + # source://pry//lib/pry/config.rb#132 + def command_completions; end + + # source://pry//lib/pry/config.rb#132 + def command_completions=(_arg0); end + + # A string that must precede all commands. For example, if is is + # set to "%", the "cd" command must be invoked as "%cd"). + # + # @api private + # @return [String] + # + # source://pry//lib/pry/config.rb#56 + def command_prefix; end + + # source://pry//lib/pry/config.rb#56 + def command_prefix=(_arg0); end + + # @api private + # @return [Pry::CommandSet] + # + # source://pry//lib/pry/config.rb#16 + def commands; end + + # source://pry//lib/pry/config.rb#16 + def commands=(_arg0); end + + # @api private + # @return [#build_completion_proc] a completer to use + # + # source://pry//lib/pry/config.rb#122 + def completer; end + + # source://pry//lib/pry/config.rb#122 + def completer=(_arg0); end + + # @api private + # + # source://pry//lib/pry/config.rb#249 + def control_d_handler; end + + # @api private + # + # source://pry//lib/pry/config.rb#250 + def control_d_handler=(value); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#112 + def correct_indent; end + + # source://pry//lib/pry/config.rb#112 + def correct_indent=(_arg0); end + + # @api private + # @return [Integer] The number of lines of context to show before and after + # exceptions + # + # source://pry//lib/pry/config.rb#29 + def default_window_size; end + + # source://pry//lib/pry/config.rb#29 + def default_window_size=(_arg0); end + + # @api private + # @return [Boolean] whether to disable edit-method's auto-reloading behavior + # + # source://pry//lib/pry/config.rb#77 + def disable_auto_reload; end + + # source://pry//lib/pry/config.rb#77 + def disable_auto_reload=(_arg0); end + + # If it is a String, then that String is used as the shell + # command to invoke the editor. + # + # If it responds to #call is callable then `file`, `line`, and `reloading` + # are passed to it. `reloading` indicates whether Pry will be reloading code + # after the shell command returns. All parameters are optional. + # + # @api private + # @return [String, #call] + # + # source://pry//lib/pry/config.rb#51 + def editor; end + + # source://pry//lib/pry/config.rb#51 + def editor=(_arg0); end + + # @api private + # @return [Proc] the printer for exceptions + # + # source://pry//lib/pry/config.rb#22 + def exception_handler; end + + # source://pry//lib/pry/config.rb#22 + def exception_handler=(_arg0); end + + # @api private + # @return [String] a line of code to execute in context before the session + # starts + # + # source://pry//lib/pry/config.rb#142 + def exec_string; end + + # source://pry//lib/pry/config.rb#142 + def exec_string=(_arg0); end + + # @api private + # @return [Hash{Symbol=>Proc}] + # + # source://pry//lib/pry/config.rb#119 + def extra_sticky_locals; end + + # source://pry//lib/pry/config.rb#119 + def extra_sticky_locals=(_arg0); end + + # @api private + # @return [Proc] + # + # source://pry//lib/pry/config.rb#135 + def file_completions; end + + # source://pry//lib/pry/config.rb#135 + def file_completions=(_arg0); end + + # @api private + # @return [Pry::History] + # + # source://pry//lib/pry/config.rb#85 + def history; end + + # source://pry//lib/pry/config.rb#85 + def history=(_arg0); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/config.rb#94 + def history_file; end + + # source://pry//lib/pry/config.rb#94 + def history_file=(_arg0); end + + # @api private + # @return [Array] + # + # source://pry//lib/pry/config.rb#97 + def history_ignorelist; end + + # source://pry//lib/pry/config.rb#97 + def history_ignorelist=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#91 + def history_load; end + + # source://pry//lib/pry/config.rb#91 + def history_load=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#88 + def history_save; end + + # source://pry//lib/pry/config.rb#88 + def history_save=(_arg0); end + + # @api private + # @return [Pry::Hooks] + # + # source://pry//lib/pry/config.rb#32 + def hooks; end + + # source://pry//lib/pry/config.rb#32 + def hooks=(_arg0); end + + # @api private + # @return [IO, #readline] the object from which Pry retrieves its lines of + # input + # + # source://pry//lib/pry/config.rb#10 + def input; end + + # source://pry//lib/pry/config.rb#10 + def input=(_arg0); end + + # @api private + # @return [Hash] + # + # source://pry//lib/pry/config.rb#138 + def ls; end + + # source://pry//lib/pry/config.rb#138 + def ls=(_arg0); end + + # @api private + # @return [Integer] how many input/output lines to keep in memory + # + # source://pry//lib/pry/config.rb#103 + def memory_size; end + + # source://pry//lib/pry/config.rb#103 + def memory_size=(_arg0); end + + # @api private + # + # source://pry//lib/pry/config.rb#216 + def merge(config_hash); end + + # @api private + # + # source://pry//lib/pry/config.rb#211 + def merge!(config_hash); end + + # @api private + # + # source://pry//lib/pry/config.rb#229 + def method_missing(method_name, *args, &_block); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#65 + def multiline; end + + # source://pry//lib/pry/config.rb#65 + def multiline=(_arg0); end + + # @api private + # @return [IO, #puts] where Pry should output results provided by {input} + # + # source://pry//lib/pry/config.rb#13 + def output; end + + # source://pry//lib/pry/config.rb#13 + def output=(_arg0); end + + # @api private + # @return [String] + # + # source://pry//lib/pry/config.rb#145 + def output_prefix; end + + # source://pry//lib/pry/config.rb#145 + def output_prefix=(_arg0); end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#62 + def pager; end + + # source://pry//lib/pry/config.rb#62 + def pager=(_arg0); end + + # @api private + # @return [Proc] the printer for Ruby expressions (not commands) + # + # source://pry//lib/pry/config.rb#19 + def print; end + + # source://pry//lib/pry/config.rb#19 + def print=(_arg0); end + + # @api private + # @return [Pry::Prompt] + # + # source://pry//lib/pry/config.rb#35 + def prompt; end + + # source://pry//lib/pry/config.rb#35 + def prompt=(_arg0); end + + # @api private + # @return [String] The display name that is part of the prompt + # + # source://pry//lib/pry/config.rb#38 + def prompt_name; end + + # source://pry//lib/pry/config.rb#38 + def prompt_name=(_arg0); end + + # @api private + # @return [Array] the list of objects that are known to have a + # 1-line #inspect output suitable for prompt + # + # source://pry//lib/pry/config.rb#42 + def prompt_safe_contexts; end + + # source://pry//lib/pry/config.rb#42 + def prompt_safe_contexts=(_arg0); end + + # @api private + # @return [Boolean] suppresses whereami output on `binding.pry` + # + # source://pry//lib/pry/config.rb#125 + def quiet; end + + # source://pry//lib/pry/config.rb#125 + def quiet=(_arg0); end + + # @api private + # @return [String] + # @since v0.13.0 + # + # source://pry//lib/pry/config.rb#149 + def rc_file; end + + # source://pry//lib/pry/config.rb#149 + def rc_file=(_arg0); end + + # @api private + # @return [Array] Ruby files to be required + # + # source://pry//lib/pry/config.rb#100 + def requires; end + + # source://pry//lib/pry/config.rb#100 + def requires=(_arg0); end + + # @api private + # @return [Boolean] whether the local ./.pryrc should be loaded + # + # source://pry//lib/pry/config.rb#71 + def should_load_local_rc; end + + # source://pry//lib/pry/config.rb#71 + def should_load_local_rc=(_arg0); end + + # @api private + # @return [Boolean] whether the global ~/.pryrc should be loaded + # + # source://pry//lib/pry/config.rb#68 + def should_load_rc; end + + # source://pry//lib/pry/config.rb#68 + def should_load_rc=(_arg0); end + + # @api private + # @return [Boolean] whether to load files specified with the -r flag + # + # source://pry//lib/pry/config.rb#74 + def should_load_requires; end + + # source://pry//lib/pry/config.rb#74 + def should_load_requires=(_arg0); end + + # Whether Pry should trap SIGINT and cause it to raise an Interrupt + # exception. This is only useful on JRuby, MRI does this for us. + # + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#82 + def should_trap_interrupts; end + + # source://pry//lib/pry/config.rb#82 + def should_trap_interrupts=(_arg0); end + + # @api private + # @return [Proc] The proc that runs system commands + # + # source://pry//lib/pry/config.rb#106 + def system; end + + # source://pry//lib/pry/config.rb#106 + def system=(_arg0); end + + # @api private + # @return [Array] Exception that Pry shouldn't rescue + # + # source://pry//lib/pry/config.rb#25 + def unrescued_exceptions; end + + # source://pry//lib/pry/config.rb#25 + def unrescued_exceptions=(_arg0); end + + # @api private + # @return [Boolean] displays a warning about experience improvement on + # Windows + # + # source://pry//lib/pry/config.rb#129 + def windows_console_warning; end + + # source://pry//lib/pry/config.rb#129 + def windows_console_warning=(_arg0); end + + private + + # @api private + # + # source://pry//lib/pry/config.rb#279 + def choose_input; end + + # @api private + # + # source://pry//lib/pry/config.rb#310 + def default_rc_file; end + + # @api private + # + # source://pry//lib/pry/config.rb#244 + def initialize_dup(other); end + + # @api private + # + # source://pry//lib/pry/config.rb#289 + def load_readline; end + + # @api private + # @return [Boolean] + # + # source://pry//lib/pry/config.rb#240 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end +end + +# Attributable provides the ability to create "attribute" +# accessors. Attribute accessors create a standard "attr_writer" and a +# customised "attr_reader". This reader is Proc-aware (lazy). +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/config/attributable.rb#11 +module Pry::Config::Attributable + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/attributable.rb#12 + def attribute(attr_name); end +end + +# LazyValue is a Proc (block) wrapper. It is meant to be used as a +# configuration value. Subsequent `#call` calls always evaluate the given +# block. +# +# @api private +# @example +# num = 19 +# value = Pry::Config::LazyValue.new { num += 1 } +# value.foo # => 20 +# value.foo # => 21 +# value.foo # => 22 +# @see Pry::Config::MemoizedValue +# @since v0.13.0 +# +# source://pry//lib/pry/config/lazy_value.rb#19 +class Pry::Config::LazyValue + # @api private + # @return [LazyValue] a new instance of LazyValue + # @since v0.13.0 + # + # source://pry//lib/pry/config/lazy_value.rb#20 + def initialize(&block); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/lazy_value.rb#24 + def call; end +end + +# MemoizedValue is a Proc (block) wrapper. It is meant to be used as a +# configuration value. Subsequent `#call` calls return the same memoized +# result. +# +# @api private +# @example +# num = 19 +# value = Pry::Config::MemoizedValue.new { num += 1 } +# value.call # => 20 +# value.call # => 20 +# value.call # => 20 +# @see Pry::Config::LazyValue +# @since v0.13.0 +# +# source://pry//lib/pry/config/memoized_value.rb#19 +class Pry::Config::MemoizedValue + # @api private + # @return [MemoizedValue] a new instance of MemoizedValue + # @since v0.13.0 + # + # source://pry//lib/pry/config/memoized_value.rb#20 + def initialize(&block); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/memoized_value.rb#26 + def call; end +end + +# Value holds a value for the given attribute and decides how it should +# be read. Procs get called, other values are returned as is. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/config/value.rb#10 +class Pry::Config::Value + # @api private + # @return [Value] a new instance of Value + # @since v0.13.0 + # + # source://pry//lib/pry/config/value.rb#11 + def initialize(value); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/config/value.rb#15 + def call; end +end + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/control_d_handler.rb#6 +module Pry::ControlDHandler + class << self + # Deal with the ^D key being pressed. Different behaviour in different + # cases: + # 1. In an expression behave like `!` command. + # 2. At top-level session behave like `exit` command. + # 3. In a nested session behave like `cd ..`. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/control_d_handler.rb#12 + def default(pry_instance); end + end +end + +# source://pry//lib/pry/pry_instance.rb#58 +Pry::EMPTY_COMPLETIONS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/editor.rb#6 +class Pry::Editor + include ::Pry::Helpers::OptionsHelpers + include ::Pry::Helpers::CommandHelpers + + # @return [Editor] a new instance of Editor + # + # source://pry//lib/pry/editor.rb#27 + def initialize(pry_instance); end + + # Generate the string that's used to start the editor. This includes + # all the flags we want as well as the file and line number we + # want to open at. + # + # source://pry//lib/pry/editor.rb#60 + def build_editor_invocation_string(file, line, blocking); end + + # source://pry//lib/pry/editor.rb#31 + def edit_tempfile_with_content(initial_content, line = T.unsafe(nil)); end + + # source://pry//lib/pry/editor.rb#41 + def invoke_editor(file, line, blocking = T.unsafe(nil)); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/editor.rb#25 + def pry_instance; end + + private + + # Some editors that run outside the terminal allow you to control whether or + # not to block the process from which they were launched (in this case, Pry). + # For those editors, return the flag that produces the desired behavior. + # + # source://pry//lib/pry/editor.rb#100 + def blocking_flag_for_editor(blocking); end + + # Get the name of the binary that Pry.config.editor points to. + # + # This is useful for deciding which flags we pass to the editor as + # we can just use the program's name and ignore any absolute paths. + # + # @example + # Pry.config.editor="/home/conrad/bin/textmate -w" + # editor_name + # # => textmate + # + # source://pry//lib/pry/editor.rb#153 + def editor_name; end + + # Start the editor running, using the calculated invocation string + # + # source://pry//lib/pry/editor.rb#76 + def open_editor(editor_invocation); end + + # We need JRuby specific code here cos just shelling out using + # system() appears to be pretty broken :/ + # + # source://pry//lib/pry/editor.rb#89 + def open_editor_on_jruby(editor_invocation); end + + # Return the syntax for a given editor for starting the editor + # and moving to a particular line within that file + # + # source://pry//lib/pry/editor.rb#115 + def start_line_syntax_for_editor(file_name, line_number); end + + class << self + # source://pry//lib/pry/editor.rb#7 + def default; end + end +end + +# Env is a helper module to work with environment variables. +# +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/env.rb#8 +module Pry::Env + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/env.rb#9 + def [](key); end + end +end + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/exception_handler.rb#6 +module Pry::ExceptionHandler + class << self + # Will only show the first line of the backtrace. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#9 + def handle_exception(output, exception, _pry_instance); end + + private + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#42 + def cause_text(cause); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#32 + def exception_text(exception); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/exception_handler.rb#19 + def standard_error_text_for(exception); end + end +end + +# source://pry//lib/pry/forwardable.rb#4 +module Pry::Forwardable + include ::Forwardable + + # Since Ruby 2.4, Forwardable will print a warning when + # calling a method that is private on a delegate, and + # in the future it could be an error: https://bugs.ruby-lang.org/issues/12782#note-3 + # + # That's why we revert to a custom implementation for delegating one + # private method to another. + # + # source://pry//lib/pry/forwardable.rb#16 + def def_private_delegators(target, *private_delegates); end +end + +# When we try to get a binding for an object, we try to define a method on +# that Object's singleton class. This doesn't work for "frozen" Object's, and +# the exception is just a vanilla RuntimeError. +# +# source://pry//lib/pry/exceptions.rb#56 +module Pry::FrozenObjectException + class << self + # source://pry//lib/pry/exceptions.rb#57 + def ===(exception); end + end +end + +# @return [Boolean] true if this Ruby supports safe levels and tainting, +# to guard against using deprecated or unsupported features +# +# source://pry//lib/pry/pry_class.rb#11 +Pry::HAS_SAFE_LEVEL = T.let(T.unsafe(nil), FalseClass) + +# source://pry//lib/pry/helpers/base_helpers.rb#4 +module Pry::Helpers + class << self + # source://pry//lib/pry/helpers/table.rb#27 + def tablify(things, line_length, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#5 + def tablify_or_one_line(heading, things, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#16 + def tablify_to_screen_width(things, options, pry_instance = T.unsafe(nil)); end + end +end + +# source://pry//lib/pry/helpers/base_helpers.rb#5 +module Pry::Helpers::BaseHelpers + extend ::Pry::Helpers::BaseHelpers + + # source://pry//lib/pry/helpers/base_helpers.rb#43 + def colorize_code(code); end + + # source://pry//lib/pry/helpers/base_helpers.rb#27 + def find_command(name, set = T.unsafe(nil)); end + + # formatting + # + # source://pry//lib/pry/helpers/base_helpers.rb#54 + def heading(text); end + + # source://pry//lib/pry/helpers/base_helpers.rb#47 + def highlight(string, regexp, highlight_color = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/base_helpers.rb#34 + def not_a_real_file?(file); end + + # Acts like send but ignores any methods defined below Object or Class in the + # inheritance hierarchy. + # This is required to introspect methods on objects like Net::HTTP::Get that + # have overridden the `method` method. + # + # source://pry//lib/pry/helpers/base_helpers.rb#22 + def safe_send(obj, method, *args, &block); end + + # source://pry//lib/pry/helpers/base_helpers.rb#8 + def silence_warnings; end + + # Send the given text through the best available pager (if Pry.config.pager is + # enabled). Infers where to send the output if used as a mixin. + # DEPRECATED. + # + # source://pry//lib/pry/helpers/base_helpers.rb#62 + def stagger_output(text, _out = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/base_helpers.rb#38 + def use_ansi_codes?; end +end + +# source://pry//lib/pry/helpers/command_helpers.rb#7 +module Pry::Helpers::CommandHelpers + include ::Pry::Helpers::OptionsHelpers + extend ::Pry::Helpers::OptionsHelpers + extend ::Pry::Helpers::CommandHelpers + + # source://pry//lib/pry/helpers/command_helpers.rb#115 + def absolute_index_number(line_number, array_length); end + + # source://pry//lib/pry/helpers/command_helpers.rb#123 + def absolute_index_range(range_or_number, array_length); end + + # source://pry//lib/pry/helpers/command_helpers.rb#31 + def get_method_or_raise(method_name, context, opts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/command_helpers.rb#21 + def internal_binding?(context); end + + # source://pry//lib/pry/helpers/command_helpers.rb#97 + def one_index_number(line_number); end + + # convert a 1-index range to a 0-indexed one + # + # source://pry//lib/pry/helpers/command_helpers.rb#102 + def one_index_range(range); end + + # source://pry//lib/pry/helpers/command_helpers.rb#106 + def one_index_range_or_number(range_or_number); end + + # Restrict a string to the given range of lines (1-indexed) + # + # @param content [String] The string. + # @param lines [Range, Integer] The line(s) to restrict it to. + # @return [String] The resulting string. + # + # source://pry//lib/pry/helpers/command_helpers.rb#92 + def restrict_to_lines(content, lines); end + + # source://pry//lib/pry/helpers/command_helpers.rb#135 + def set_file_and_dir_locals(file_name, pry = T.unsafe(nil), ctx = T.unsafe(nil)); end + + # Open a temp file and yield it to the block, closing it after + # + # @return [String] The path of the temp file + # + # source://pry//lib/pry/helpers/command_helpers.rb#14 + def temp_file(ext = T.unsafe(nil)); end + + # Remove any common leading whitespace from every line in `text`. This + # can be used to make a HEREDOC line up with the left margin, without + # sacrificing the indentation level of the source code. + # + # @example + # opt.banner(unindent(<<-USAGE)) + # Lorem ipsum dolor sit amet, consectetur adipisicing elit, + # sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + # "Ut enim ad minim veniam." + # USAGE + # @param dirty_text [String] The text from which to remove indentation + # @return [String] the text with indentation stripped + # + # source://pry//lib/pry/helpers/command_helpers.rb#68 + def unindent(dirty_text, left_padding = T.unsafe(nil)); end +end + +# This class contains methods useful for extracting +# documentation from methods and classes. +# +# source://pry//lib/pry/helpers/documentation_helpers.rb#7 +module Pry::Helpers::DocumentationHelpers + private + + # Given a string that makes up a comment in a source-code file parse out the content + # that the user is intended to read. (i.e. without leading indentation, #-characters + # or shebangs) + # + # @param comment [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#67 + def get_comment_content(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#51 + def process_comment_markup(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#15 + def process_rdoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#45 + def process_yardoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#30 + def process_yardoc_tag(comment, tag); end + + # @param code [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#57 + def strip_comments_from_c_code(code); end + + # @param text [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#79 + def strip_leading_whitespace(text); end + + class << self + # Given a string that makes up a comment in a source-code file parse out the content + # that the user is intended to read. (i.e. without leading indentation, #-characters + # or shebangs) + # + # @param comment [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#67 + def get_comment_content(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#51 + def process_comment_markup(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#15 + def process_rdoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#45 + def process_yardoc(comment); end + + # source://pry//lib/pry/helpers/documentation_helpers.rb#30 + def process_yardoc_tag(comment, tag); end + + # @param code [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#57 + def strip_comments_from_c_code(code); end + + # @param text [String] + # @return [String] + # + # source://pry//lib/pry/helpers/documentation_helpers.rb#79 + def strip_leading_whitespace(text); end + end +end + +# source://pry//lib/pry/helpers/documentation_helpers.rb#8 +Pry::Helpers::DocumentationHelpers::YARD_TAGS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/helpers/options_helpers.rb#5 +module Pry::Helpers::OptionsHelpers + private + + # Get the method object parsed by the slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#23 + def method_object; end + + # Add method options to the Pry::Slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#9 + def method_options(opt); end + + class << self + # Get the method object parsed by the slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#23 + def method_object; end + + # Add method options to the Pry::Slop instance + # + # source://pry//lib/pry/helpers/options_helpers.rb#9 + def method_options(opt); end + end +end + +# Contains methods for querying the platform that Pry is running on +# +# @api public +# @since v0.12.0 +# +# source://pry//lib/pry/helpers/platform.rb#10 +module Pry::Helpers::Platform + class << self + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#35 + def jruby?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#40 + def jruby_19?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#17 + def linux?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#12 + def mac_osx?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#45 + def mri?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#50 + def mri_2?; end + + # @api public + # @return [Boolean] true when Pry is running on Windows with ANSI support, + # false otherwise + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#23 + def windows?; end + + # @api public + # @return [Boolean] + # @since v0.12.0 + # + # source://pry//lib/pry/helpers/platform.rb#28 + def windows_ansi?; end + end +end + +# source://pry//lib/pry/helpers/table.rb#35 +class Pry::Helpers::Table + # @return [Table] a new instance of Table + # + # source://pry//lib/pry/helpers/table.rb#37 + def initialize(items, args, pry_instance = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#81 + def ==(other); end + + # Returns the value of attribute column_count. + # + # source://pry//lib/pry/helpers/table.rb#36 + def column_count; end + + # source://pry//lib/pry/helpers/table.rb#68 + def column_count=(count); end + + # source://pry//lib/pry/helpers/table.rb#77 + def columns; end + + # @return [Boolean] + # + # source://pry//lib/pry/helpers/table.rb#73 + def fits_on_line?(line_length); end + + # Returns the value of attribute items. + # + # source://pry//lib/pry/helpers/table.rb#36 + def items; end + + # source://pry//lib/pry/helpers/table.rb#62 + def items=(items); end + + # source://pry//lib/pry/helpers/table.rb#47 + def rows_to_s(style = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/table.rb#85 + def to_a; end + + # source://pry//lib/pry/helpers/table.rb#43 + def to_s; end + + private + + # source://pry//lib/pry/helpers/table.rb#91 + def _max_width(things); end + + # source://pry//lib/pry/helpers/table.rb#95 + def _rebuild_colorless_cache; end + + # source://pry//lib/pry/helpers/table.rb#116 + def _recall_color_for(thing); end + + # source://pry//lib/pry/helpers/table.rb#105 + def _recolumn; end +end + +# The methods defined on {Text} are available to custom commands via +# {Pry::Command#text}. +# +# source://pry//lib/pry/helpers/text.rb#7 +module Pry::Helpers::Text + extend ::Pry::Helpers::Text + + # source://pry//lib/pry/helpers/text.rb#23 + def black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def black_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def blue_on_yellow(text); end + + # Returns _text_ as bold text for use on a terminal. + # + # @param text [String, #to_s] + # @return [String] _text_ + # + # source://pry//lib/pry/helpers/text.rb#54 + def bold(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_black_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_blue_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_cyan_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_green_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_magenta_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_purple_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_red_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_white_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#27 + def bright_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#36 + def bright_yellow_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def cyan_on_yellow(text); end + + # Returns `text` in the default foreground colour. + # Use this instead of "black" or "white" when you mean absence of colour. + # + # @param text [String, #to_s] + # @return [String] + # + # source://pry//lib/pry/helpers/text.rb#63 + def default(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def green_on_yellow(text); end + + # Returns _text_ indented by _chars_ spaces. + # + # @param chars [Fixnum] + # @param text [String] + # + # source://pry//lib/pry/helpers/text.rb#113 + def indent(text, chars); end + + # source://pry//lib/pry/helpers/text.rb#23 + def magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def magenta_on_yellow(text); end + + # @return [void] + # @yield Yields a block with color turned off. + # + # source://pry//lib/pry/helpers/text.rb#73 + def no_color; end + + # @return [void] + # @yield Yields a block with paging turned off. + # + # source://pry//lib/pry/helpers/text.rb#87 + def no_pager; end + + # source://pry//lib/pry/helpers/text.rb#23 + def purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def purple_on_yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def red_on_yellow(text); end + + # Remove any color codes from _text_. + # + # @param text [String, #to_s] + # @return [String] _text_ stripped of any color codes. + # + # source://pry//lib/pry/helpers/text.rb#46 + def strip_color(text); end + + # source://pry//lib/pry/helpers/text.rb#23 + def white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def white_on_yellow(text); end + + # Returns _text_ in a numbered list, beginning at _offset_. + # + # @param offset [Fixnum] + # @param text [#each_line] + # @return [String] + # + # source://pry//lib/pry/helpers/text.rb#100 + def with_line_numbers(text, offset, color = T.unsafe(nil)); end + + # source://pry//lib/pry/helpers/text.rb#23 + def yellow(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_black(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_blue(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_cyan(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_green(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_magenta(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_purple(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_red(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_white(text); end + + # source://pry//lib/pry/helpers/text.rb#32 + def yellow_on_yellow(text); end +end + +# source://pry//lib/pry/helpers/text.rb#10 +Pry::Helpers::Text::COLORS = T.let(T.unsafe(nil), Hash) + +# The History class is responsible for maintaining the user's input history, +# both internally and within Readline. +# +# source://pry//lib/pry/history.rb#6 +class Pry::History + # @return [History] a new instance of History + # + # source://pry//lib/pry/history.rb#29 + def initialize(options = T.unsafe(nil)); end + + # Add a line to the input history, ignoring blank and duplicate lines. + # + # @param line [String] + # @return [String] The same line that was passed in + # + # source://pry//lib/pry/history.rb#70 + def <<(line); end + + # Clear this session's history. This won't affect the contents of the + # history file. + # + # source://pry//lib/pry/history.rb#74 + def clear; end + + # Filter the history with the histignore options + # + # @return [Array] An array containing all the lines that are not + # included in the histignore. + # + # source://pry//lib/pry/history.rb#95 + def filter(history); end + + # @return [Integer] total number of lines, including original lines + # + # source://pry//lib/pry/history.rb#27 + def history_line_count; end + + # Load the input history using `History.loader`. + # + # @return [Integer] The number of lines loaded + # + # source://pry//lib/pry/history.rb#40 + def load; end + + # Returns the value of attribute loader. + # + # source://pry//lib/pry/history.rb#21 + def loader; end + + # Sets the attribute loader + # + # @param value the value to set the attribute loader to. + # + # source://pry//lib/pry/history.rb#21 + def loader=(_arg0); end + + # @return [Fixnum] Number of lines in history when Pry first loaded. + # + # source://pry//lib/pry/history.rb#24 + def original_lines; end + + # Add a line to the input history, ignoring blank and duplicate lines. + # + # @param line [String] + # @return [String] The same line that was passed in + # + # source://pry//lib/pry/history.rb#53 + def push(line); end + + # Returns the value of attribute saver. + # + # source://pry//lib/pry/history.rb#21 + def saver; end + + # Sets the attribute saver + # + # @param value the value to set the attribute saver to. + # + # source://pry//lib/pry/history.rb#21 + def saver=(_arg0); end + + # @return [Fixnum] The number of lines in history from just this session. + # + # source://pry//lib/pry/history.rb#81 + def session_line_count; end + + # Return an Array containing all stored history. + # + # @return [Array] An Array containing all lines of history loaded + # or entered by the user in the current session. + # + # source://pry//lib/pry/history.rb#88 + def to_a; end + + private + + # The history file, opened for appending. + # + # source://pry//lib/pry/history.rb#127 + def history_file; end + + # source://pry//lib/pry/history.rb#143 + def history_file_path; end + + # @return [Boolean] + # + # source://pry//lib/pry/history.rb#147 + def invalid_readline_line?(line); end + + # The default loader. Yields lines from `Pry.config.history_file`. + # + # source://pry//lib/pry/history.rb#113 + def read_from_file; end + + # The default saver. Appends the given line to `Pry.config.history_file`. + # + # source://pry//lib/pry/history.rb#122 + def save_to_file(line); end + + # Check if the line match any option in the histignore + # [Pry.config.history_ignorelist] + # + # @return [Boolean] a boolean that notifies if the line was found in the + # histignore array. + # + # source://pry//lib/pry/history.rb#105 + def should_ignore?(line); end + + class << self + # source://pry//lib/pry/history.rb#7 + def default_file; end + end +end + +# Implements a hooks system for Pry. A hook is a callable that is associated +# with an event. A number of events are currently provided by Pry, these +# include: `:when_started`, `:before_session`, `:after_session`. A hook must +# have a name, and is connected with an event by the `Pry::Hooks#add_hook` +# method. +# +# @example Adding a hook for the `:before_session` event. +# Pry.config.hooks.add_hook(:before_session, :say_hi) do +# puts "hello" +# end +# +# source://pry//lib/pry/hooks.rb#14 +class Pry::Hooks + # @return [Hooks] a new instance of Hooks + # + # source://pry//lib/pry/hooks.rb#25 + def initialize; end + + # Add a new hook to be executed for the `event_name` event. + # + # @param callable [#call] The callable. + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook. + # @raise [ArgumentError] + # @return [Pry:Hooks] The receiver. + # @yield The block to use as the callable (if no `callable` provided). + # + # source://pry//lib/pry/hooks.rb#81 + def add_hook(event_name, hook_name, callable = T.unsafe(nil), &block); end + + # Clear all hooks functions for a given event. + # + # @param event_name [String] The name of the event. + # @return [void] + # + # source://pry//lib/pry/hooks.rb#165 + def clear_event_hooks(event_name); end + + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook. + # to delete. + # @return [#call] The deleted hook. + # + # source://pry//lib/pry/hooks.rb#147 + def delete_hook(event_name, hook_name); end + + # source://pry//lib/pry/hooks.rb#39 + def errors; end + + # Execute the list of hooks for the `event_name` event. + # + # @param args [Array] The arguments to pass to each hook function. + # @param event_name [Symbol] The name of the event. + # @return [Object] The return value of the last executed hook. + # + # source://pry//lib/pry/hooks.rb#108 + def exec_hook(event_name, *args, &block); end + + # @param event_name [Symbol] The name of the event. + # @param hook_name [Symbol] The name of the hook + # @return [#call] a specific hook for a given event. + # + # source://pry//lib/pry/hooks.rb#128 + def get_hook(event_name, hook_name); end + + # `add_hook`/`delete_hook` for that. + # + # @note Modifying the returned hash does not alter the hooks, use + # @param event_name [Symbol] The name of the event. + # @return [Hash] The hash of hook names / hook functions. + # + # source://pry//lib/pry/hooks.rb#139 + def get_hooks(event_name); end + + # @param event_name [Symbol] The name of the event. + # @return [Fixnum] The number of hook functions for `event_name`. + # + # source://pry//lib/pry/hooks.rb#121 + def hook_count(event_name); end + + # @param event_name [Symbol] Name of the event. + # @param hook_name [Symbol] Name of the hook. + # @return [Boolean] Whether the hook by the name `hook_name`. + # + # source://pry//lib/pry/hooks.rb#172 + def hook_exists?(event_name, hook_name); end + + # @example + # hooks = Pry::Hooks.new.add_hook(:before_session, :say_hi) { puts "hi!" } + # Pry::Hooks.new.merge(hooks) + # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge + # @return [Pry::Hooks] a new `Pry::Hooks` instance containing a merge of the + # contents of two `Pry:Hooks` instances. + # + # source://pry//lib/pry/hooks.rb#69 + def merge(other); end + + # Destructively merge the contents of two `Pry:Hooks` instances. + # + # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge + # @return [Pry:Hooks] The receiver. + # @see #merge + # + # source://pry//lib/pry/hooks.rb#48 + def merge!(other); end + + protected + + # Returns the value of attribute hooks. + # + # source://pry//lib/pry/hooks.rb#178 + def hooks; end + + private + + # Ensure that duplicates have their @hooks object. + # + # source://pry//lib/pry/hooks.rb#30 + def initialize_copy(_orig); end + + class << self + # source://pry//lib/pry/hooks.rb#15 + def default; end + end +end + +# Pry::Indent is a class that can be used to indent a number of lines +# containing Ruby code similar as to how IRB does it (but better). The class +# works by tokenizing a string using CodeRay and then looping over those +# tokens. Based on the tokens in a line of code that line (or the next one) +# will be indented or un-indented by correctly. +# +# source://pry//lib/pry/indent.rb#11 +class Pry::Indent + include ::Pry::Helpers::BaseHelpers + + # @return [Indent] a new instance of Indent + # + # source://pry//lib/pry/indent.rb#107 + def initialize(pry_instance = T.unsafe(nil)); end + + # Return a string which, when printed, will rewrite the previous line with + # the correct indentation. Mostly useful for fixing 'end'. + # + # @param code [String] The code the user just typed in + # @param overhang [Integer] The number of characters to erase afterwards (the + # the difference in length between the old line and the new one) + # @param prompt [String] The user's prompt + # @return [String] correctly indented line + # + # source://pry//lib/pry/indent.rb#395 + def correct_indentation(prompt, code, overhang = T.unsafe(nil)); end + + # Get the indentation for the start of the next line. + # + # This is what's used between the prompt and the cursor in pry. + # + # @return String The correct number of spaces + # + # source://pry//lib/pry/indent.rb#185 + def current_prefix; end + + # If the code just before an "if" or "while" token on a line looks like the + # end of a statement, then we want to treat that "if" as a singleline, not + # multiline statement. + # + # @return [Boolean] + # + # source://pry//lib/pry/indent.rb#268 + def end_of_statement?(last_token, last_kind); end + + # Are we currently in the middle of a string literal. + # + # This is used to determine whether to re-indent a given line, we mustn't + # re-indent within string literals because to do so would actually change + # the value of the String! + # + # @return [Boolean] Boolean + # + # source://pry//lib/pry/indent.rb#279 + def in_string?; end + + # Indents a string and returns it. This string can either be a single line + # or multiple ones. + # + # @example + # str = <] + # + # source://pry//lib/pry/indent.rb#378 + def module_nesting; end + + # All the open delimiters, in the order that they first appeared. + # + # @return [String] + # + # source://pry//lib/pry/indent.rb#314 + def open_delimiters; end + + # Return a string which restores the CodeRay string status to the correct value by + # opening HEREDOCs and strings. + # + # @return String + # + # source://pry//lib/pry/indent.rb#322 + def open_delimiters_line; end + + # reset internal state + # + # source://pry//lib/pry/indent.rb#113 + def reset; end + + # @return [Array] The stack of open tokens. + # + # source://pry//lib/pry/indent.rb#24 + def stack; end + + # Given a string of Ruby code, use CodeRay to export the tokens. + # + # @param string [String] The Ruby to lex + # @return [Array] An Array of pairs of [token_value, token_type] + # + # source://pry//lib/pry/indent.rb#287 + def tokenize(string); end + + # Update the internal state about what kind of strings are open. + # + # Most of the complication here comes from the fact that HEREDOCs can be + # nested. For normal strings (which can't be nested) we assume that CodeRay + # correctly pairs open-and-close delimiters so we don't bother checking what + # they are. + # + # @param token [String] The token (of type :delimiter) + # + # source://pry//lib/pry/indent.rb#299 + def track_delimiter(token); end + + # Update the internal state relating to module nesting. + # + # It's responsible for adding to the @module_nesting array, which looks + # something like: + # + # [ ["class", "Foo"], ["module", "Bar::Baz"], ["class <<", "self"] ] + # + # A nil value in the @module_nesting array happens in two places: either + # when @awaiting_class is true and we're still waiting for the string to + # fill that space, or when a parse was rejected. + # + # At the moment this function is quite restricted about what formats it will + # parse, for example we disallow expressions after the class keyword. This + # could maybe be improved in the future. + # + # @param kind [Symbol] the kind of that token + # @param token [String] a token from Coderay + # + # source://pry//lib/pry/indent.rb#343 + def track_module_nesting(token, kind); end + + # Update the internal state relating to module nesting on 'end'. + # + # If the current 'end' pairs up with a class or a module then we should + # pop an array off of @module_nesting + # + # @param kind [Symbol] the kind of that token + # @param token [String] a token from Coderay + # + # source://pry//lib/pry/indent.rb#368 + def track_module_nesting_end(token, kind = T.unsafe(nil)); end + + class << self + # Clean the indentation of a fragment of ruby. + # + # @param str [String] + # @return [String] + # + # source://pry//lib/pry/indent.rb#85 + def indent(str); end + + # Get the module nesting at the given point in the given string. + # + # NOTE If the line specified contains a method definition, then the nesting + # at the start of the method definition is used. Otherwise the nesting from + # the end of the line is used. + # + # @param line_number [Fixnum] The line number (starting from 1) + # @param str [String] The ruby code to analyze + # @return [Array] + # + # source://pry//lib/pry/indent.rb#98 + def nesting_at(str, line_number); end + end +end + +# Collection of token types that should be ignored. Without this list +# keywords such as "class" inside strings would cause the code to be +# indented incorrectly. +# +# :pre_constant and :preserved_constant are the CodeRay 0.9.8 and 1.0.0 +# classifications of "true", "false", and "nil". +# +# source://pry//lib/pry/indent.rb#63 +Pry::Indent::IGNORE_TOKENS = T.let(T.unsafe(nil), Array) + +# Collection of tokens that should appear dedented even though they +# don't affect the surrounding code. +# +# source://pry//lib/pry/indent.rb#79 +Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) + +# Hash containing all the tokens that should increase the indentation +# level. The keys of this hash are open tokens, the values the matching +# tokens that should prevent a line from being indented if they appear on +# the same line. +# +# source://pry//lib/pry/indent.rb#33 +Pry::Indent::OPEN_TOKENS = T.let(T.unsafe(nil), Hash) + +# Which tokens can be followed by an optional "do" keyword. +# +# source://pry//lib/pry/indent.rb#55 +Pry::Indent::OPTIONAL_DO_TOKENS = T.let(T.unsafe(nil), Array) + +# Which tokens can either be open tokens, or appear as modifiers on +# a single-line. +# +# source://pry//lib/pry/indent.rb#52 +Pry::Indent::SINGLELINE_TOKENS = T.let(T.unsafe(nil), Array) + +# The amount of spaces to insert for each indent level. +# +# source://pry//lib/pry/indent.rb#27 +Pry::Indent::SPACES = T.let(T.unsafe(nil), String) + +# Tokens that indicate the end of a statement (i.e. that, if they appear +# directly before an "if" indicates that that if applies to the same line, +# not the next line) +# +# :reserved and :keywords are the CodeRay 0.9.8 and 1.0.0 respectively +# classifications of "super", "next", "return", etc. +# +# source://pry//lib/pry/indent.rb#72 +Pry::Indent::STATEMENT_END_TOKENS = T.let(T.unsafe(nil), Array) + +# Raised if {#module_nesting} would not work. +# +# source://pry//lib/pry/indent.rb#15 +class Pry::Indent::UnparseableNestingError < ::StandardError; end + +# source://pry//lib/pry/input/simple_stdio.rb#4 +module Pry::Input; end + +# Readline replacement for low-capability terminals. +# +# source://pry//lib/pry/input/simple_stdio.rb#6 +class Pry::Input::SimpleStdio + class << self + # source://pry//lib/pry/input/simple_stdio.rb#7 + def readline(prompt); end + end +end + +# source://pry//lib/pry/input_completer.rb#6 +class Pry::InputCompleter + # @return [InputCompleter] a new instance of InputCompleter + # + # source://pry//lib/pry/input_completer.rb#42 + def initialize(input, pry = T.unsafe(nil)); end + + # build_path separates the input into two parts: path and input. + # input is the partial string that should be completed + # path is a proc that takes an input and builds a full path. + # + # source://pry//lib/pry/input_completer.rb#240 + def build_path(input); end + + # Return a new completion proc for use by Readline. + # + # source://pry//lib/pry/input_completer.rb#56 + def call(str, options = T.unsafe(nil)); end + + # source://pry//lib/pry/input_completer.rb#255 + def ignored_modules; end + + # source://pry//lib/pry/input_completer.rb#229 + def select_message(path, receiver, message, candidates); end +end + +# source://pry//lib/pry/input_completer.rb#8 +Pry::InputCompleter::ARRAY_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#15 +Pry::InputCompleter::CONSTANT_OR_METHOD_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#14 +Pry::InputCompleter::CONSTANT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#17 +Pry::InputCompleter::GLOBALVARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#16 +Pry::InputCompleter::HEX_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#7 +Pry::InputCompleter::NUMERIC_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#12 +Pry::InputCompleter::PROC_OR_HASH_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#11 +Pry::InputCompleter::REGEX_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#20 +Pry::InputCompleter::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/input_completer.rb#10 +Pry::InputCompleter::SYMBOL_METHOD_CALL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#9 +Pry::InputCompleter::SYMBOL_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#13 +Pry::InputCompleter::TOPLEVEL_LOOKUP_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#18 +Pry::InputCompleter::VARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://pry//lib/pry/input_completer.rb#40 +Pry::InputCompleter::WORD_ESCAPE_STR = T.let(T.unsafe(nil), String) + +# There is one InputLock per input (such as STDIN) as two REPLs on the same +# input makes things delirious. InputLock serializes accesses to the input so +# that threads to not conflict with each other. The latest thread to request +# ownership of the input wins. +# +# source://pry//lib/pry/input_lock.rb#8 +class Pry::InputLock + # @return [InputLock] a new instance of InputLock + # + # source://pry//lib/pry/input_lock.rb#29 + def initialize; end + + # Adds ourselves to the ownership list. The last one in the list may access + # the input through interruptible_region(). + # + # source://pry//lib/pry/input_lock.rb#38 + def __with_ownership; end + + # source://pry//lib/pry/input_lock.rb#81 + def enter_interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#108 + def interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#95 + def leave_interruptible_region; end + + # source://pry//lib/pry/input_lock.rb#75 + def with_ownership(&block); end + + class << self + # source://pry//lib/pry/input_lock.rb#19 + def for(input); end + + # Returns the value of attribute global_lock. + # + # source://pry//lib/pry/input_lock.rb#13 + def global_lock; end + + # Sets the attribute global_lock + # + # @param value the value to set the attribute global_lock to. + # + # source://pry//lib/pry/input_lock.rb#13 + def global_lock=(_arg0); end + + # Returns the value of attribute input_locks. + # + # source://pry//lib/pry/input_lock.rb#12 + def input_locks; end + + # Sets the attribute input_locks + # + # @param value the value to set the attribute input_locks to. + # + # source://pry//lib/pry/input_lock.rb#12 + def input_locks=(_arg0); end + end +end + +# source://pry//lib/pry/input_lock.rb#9 +class Pry::InputLock::Interrupt < ::Exception; end + +# source://pry//lib/pry/inspector.rb#4 +class Pry::Inspector; end + +# source://pry//lib/pry/inspector.rb#5 +Pry::Inspector::MAP = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/pry_class.rb#7 +Pry::LOCAL_RC_FILE = T.let(T.unsafe(nil), String) + +# source://pry//lib/pry/last_exception.rb#12 +class Pry::LastException < ::BasicObject + # @return [LastException] a new instance of LastException + # + # source://pry//lib/pry/last_exception.rb#15 + def initialize(exception); end + + # Returns the value of attribute bt_index. + # + # source://pry//lib/pry/last_exception.rb#13 + def bt_index; end + + # Sets the attribute bt_index + # + # @param value the value to set the attribute bt_index to. + # + # source://pry//lib/pry/last_exception.rb#13 + def bt_index=(_arg0); end + + # source://pry//lib/pry/last_exception.rb#52 + def bt_source_location_for(index); end + + # @return [String] returns the path to a file for the current backtrace. see {#bt_index}. + # + # source://pry//lib/pry/last_exception.rb#37 + def file; end + + # source://pry//lib/pry/last_exception.rb#57 + def inc_bt_index; end + + # @return [Fixnum] returns the line for the current backtrace. see {#bt_index}. + # + # source://pry//lib/pry/last_exception.rb#43 + def line; end + + # source://pry//lib/pry/last_exception.rb#21 + def method_missing(name, *args, &block); end + + # @return [Exception] returns the wrapped exception + # + # source://pry//lib/pry/last_exception.rb#48 + def wrapped_exception; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/last_exception.rb#29 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# This class wraps the normal `Method` and `UnboundMethod` classes +# to provide extra functionality useful to Pry. +# +# source://pry//lib/pry/method.rb#20 +class Pry::Method + include ::Pry::Helpers::BaseHelpers + include ::Pry::Helpers::DocumentationHelpers + include ::Pry::CodeObject::Helpers + extend ::Pry::Helpers::BaseHelpers + extend ::Forwardable + extend ::Pry::Forwardable + + # A new instance of `Pry::Method` wrapping the given `::Method`, + # `UnboundMethod`, or `Proc`. + # + # @param known_info [Hash] Can be used to pre-cache expensive to compute stuff. + # @param method [::Method, UnboundMethod, Proc] + # @return [Pry::Method] + # + # source://pry//lib/pry/method.rb#263 + def initialize(method, known_info = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#483 + def ==(other); end + + # @return [Boolean] Is the method definitely an alias? + # + # source://pry//lib/pry/method.rb#478 + def alias?; end + + # @return [Array] All known aliases for the method. + # + # source://pry//lib/pry/method.rb#461 + def aliases; end + + # @return [Boolean] Whether the method is bound. + # + # source://pry//lib/pry/method.rb#446 + def bound_method?; end + + # source://pry//lib/pry/method.rb#515 + def comment; end + + # @return [String, nil] The documentation for the method, or `nil` if it's + # unavailable. + # + # source://pry//lib/pry/method.rb#329 + def doc; end + + # @return [Boolean] Was the method defined outside a source file? + # + # source://pry//lib/pry/method.rb#436 + def dynamically_defined?; end + + # @param klass [Class] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#491 + def is_a?(klass); end + + # @param klass [Class] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#494 + def kind_of?(klass); end + + # Delegate any unknown calls to the wrapped method. + # + # source://pry//lib/pry/method.rb#503 + def method_missing(method_name, *args, &block); end + + # Get the name of the method as a String, regardless of the underlying + # Method#name type. + # + # @return [String] + # + # source://pry//lib/pry/method.rb#272 + def name; end + + # Get the name of the method including the class on which it was defined. + # + # @example + # method(:puts).method_name + # => "Kernel.puts" + # @return [String] + # + # source://pry//lib/pry/method.rb#299 + def name_with_owner; end + + # @return [String, nil] The original name the method was defined under, + # before any aliasing, or `nil` if it can't be determined. + # + # source://pry//lib/pry/method.rb#429 + def original_name; end + + # source://pry//lib/pry/method.rb#255 + def owner(*args, **_arg1, &block); end + + # source://pry//lib/pry/method.rb#255 + def parameters(*args, **_arg1, &block); end + + # @return [Boolean] Was the method defined within the Pry REPL? + # + # source://pry//lib/pry/method.rb#456 + def pry_method?; end + + # source://pry//lib/pry/method.rb#255 + def receiver(*args, **_arg1, &block); end + + # Update the live copy of the method's source. + # + # source://pry//lib/pry/method.rb#314 + def redefine(source); end + + # @param method_name [String, Symbol] + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#498 + def respond_to?(method_name, include_all = T.unsafe(nil)); end + + # @return [String] A representation of the method's signature, including its + # name and parameters. Optional and "rest" parameters are marked with `*` + # and block parameters with `&`. Keyword arguments are shown with `:` + # If the parameter names are unavailable, they're given numbered names instead. + # Paraphrased from `awesome_print` gem. + # + # source://pry//lib/pry/method.rb#391 + def signature; end + + # @return [Boolean] Whether the method is a singleton method. + # + # source://pry//lib/pry/method.rb#451 + def singleton_method?; end + + # @return [String, nil] The source code of the method, or `nil` if it's unavailable. + # + # source://pry//lib/pry/method.rb#304 + def source; end + + # Can we get the source code for this method? + # + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#321 + def source?; end + + # @return [String, nil] The name of the file the method is defined in, or + # `nil` if the filename is unavailable. + # + # source://pry//lib/pry/method.rb#348 + def source_file; end + + # @return [Fixnum, nil] The line of code in `source_file` which begins + # the method's definition, or `nil` if that information is unavailable. + # + # source://pry//lib/pry/method.rb#361 + def source_line; end + + # @return [Range, nil] The range of lines in `source_file` which contain + # the method's definition, or `nil` if that information is unavailable. + # + # source://pry//lib/pry/method.rb#367 + def source_range; end + + # @return [Symbol] The source type of the method. The options are + # `:ruby` for Ruby methods or `:c` for methods written in C. + # + # source://pry//lib/pry/method.rb#342 + def source_type; end + + # @return [Pry::Method, nil] The wrapped method that is called when you + # use "super" in the body of this method. + # + # source://pry//lib/pry/method.rb#417 + def super(times = T.unsafe(nil)); end + + # @return [Boolean] Whether the method is unbound. + # + # source://pry//lib/pry/method.rb#441 + def unbound_method?; end + + # Is the method undefined? (aka `Disowned`) + # + # @return [Boolean] false + # + # source://pry//lib/pry/method.rb#290 + def undefined?; end + + # @return [Symbol] The visibility of the method. May be `:public`, + # `:protected`, or `:private`. + # + # source://pry//lib/pry/method.rb#373 + def visibility; end + + # Get underlying object wrapped by this Pry::Method instance + # + # @return [Method, UnboundMethod, Proc] + # + # source://pry//lib/pry/method.rb#284 + def wrapped; end + + # Get the owner of the method as a Pry::Module + # + # @return [Pry::Module] + # + # source://pry//lib/pry/method.rb#278 + def wrapped_owner; end + + private + + # source://pry//lib/pry/method.rb#577 + def c_source; end + + # @param first_ln [String] The first line of a method definition. + # @return [String, nil] + # + # source://pry//lib/pry/method.rb#564 + def method_name_from_first_line(first_ln); end + + # @raise [CommandError] when the method can't be found or `pry-doc` isn't installed. + # @return [YARD::CodeObjects::MethodObject] + # + # source://pry//lib/pry/method.rb#523 + def pry_doc_info; end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#511 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + # source://pry//lib/pry/method.rb#582 + def ruby_source; end + + # @param ancestors [Class, Module] The ancestors to investigate + # @return [Method] The unwrapped super-method + # + # source://pry//lib/pry/method.rb#543 + def super_using_ancestors(ancestors, times = T.unsafe(nil)); end + + class << self + # Get all of the instance methods of a `Class` or `Module` + # + # @param include_super [Boolean] Whether to include methods from ancestors. + # @param klass [Class, Module] + # @return [Array[Pry::Method]] + # + # source://pry//lib/pry/method.rb#161 + def all_from_class(klass, include_super = T.unsafe(nil)); end + + # Get all of the methods on an `Object` + # + # @param include_super [Boolean] indicates whether or not to include methods from ancestors. + # @param obj [Object] + # @return [Array[Pry::Method]] + # + # source://pry//lib/pry/method.rb#184 + def all_from_obj(obj, include_super = T.unsafe(nil)); end + + # Given a `Binding`, try to extract the `::Method` it originated from and + # use it to instantiate a `Pry::Method`. Return `nil` if this isn't + # possible. + # + # @param binding [Binding] + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#77 + def from_binding(binding); end + + # Given a `Class` or `Module` and the name of a method, try to + # instantiate a `Pry::Method` containing the instance method of + # that name. Return `nil` if no such method exists. + # + # @param klass [Class, Module] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#136 + def from_class(klass, name, target = T.unsafe(nil)); end + + # Given a `Class` or `Module` and the name of a method, try to + # instantiate a `Pry::Method` containing the instance method of + # that name. Return `nil` if no such method exists. + # + # @param klass [Class, Module] + # @param name [String] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#141 + def from_module(klass, name, target = T.unsafe(nil)); end + + # Given an object and the name of a method, try to instantiate + # a `Pry::Method` containing the method of that name bound to + # that object. Return `nil` if no such method exists. + # + # @param name [String] + # @param obj [Object] + # @param target [Binding] The binding where the method is looked up. + # @return [Pry::Method, nil] + # + # source://pry//lib/pry/method.rb#151 + def from_obj(obj, name, target = T.unsafe(nil)); end + + # Given a string representing a method name and optionally a binding to + # search in, find and return the requested method wrapped in a + # `Pry::Method` instance. + # + # @option options + # @option options + # @param name [String] The name of the method to retrieve. + # @param options [Hash] + # @param target [Binding] The context in which to search for the method. + # @return [Pry::Method, nil] A `Pry::Method` instance containing the + # requested method, or `nil` if name is `nil` or no method could be + # located matching the parameters. + # + # source://pry//lib/pry/method.rb#43 + def from_str(name, target = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#227 + def instance_method_definition?(name, definition_line); end + + # Get every `Class` and `Module`, in order, that will be checked when looking + # for methods on instances of the given `Class` or `Module`. + # This does not treat singleton classes of classes specially. + # + # @param klass [Class, Module] + # @return [Array[Class, Module]] + # + # source://pry//lib/pry/method.rb#210 + def instance_resolution_order(klass); end + + # In order to support 2.0 Refinements we need to look up methods + # inside the relevant Binding. + # + # @param method_name [Symbol] The name of the method. + # @param method_type [Symbol] The type of method: :method or :instance_method + # @param obj [Object] The owner/receiver of the method. + # @param target [Binding] The binding where the method is looked up. + # @return [Method, UnboundMethod] The 'refined' method object. + # + # source://pry//lib/pry/method.rb#114 + def lookup_method_via_binding(obj, method_name, method_type, target = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#215 + def method_definition?(name, definition_line); end + + # Get every `Class` and `Module`, in order, that will be checked when looking + # for an instance method to call on this object. + # + # @param obj [Object] + # @return [Array[Class, Module]] + # + # source://pry//lib/pry/method.rb#192 + def resolution_order(obj); end + + # source://pry//lib/pry/method.rb#247 + def singleton_class_of(obj); end + + # Get the singleton classes of superclasses that could define methods on + # the given class object, and any modules they include. + # If a module is included at multiple points in the ancestry, only + # the lowest copy will be returned. + # + # source://pry//lib/pry/method.rb#238 + def singleton_class_resolution_order(klass); end + + # @return [Boolean] + # + # source://pry//lib/pry/method.rb#220 + def singleton_method_definition?(name, definition_line); end + end +end + +# A Disowned Method is one that's been removed from the class on which it was defined. +# +# e.g. +# class C +# def foo +# C.send(:undefine_method, :foo) +# Pry::Method.from_binding(binding) +# end +# end +# +# In this case we assume that the "owner" is the singleton class of the receiver. +# +# This occurs mainly in Sinatra applications. +# +# source://pry//lib/pry/method/disowned.rb#18 +class Pry::Method::Disowned < ::Pry::Method + # Create a new Disowned method. + # + # @param method_name [String] + # @param receiver [Object] + # @return [Disowned] a new instance of Disowned + # + # source://pry//lib/pry/method/disowned.rb#25 + def initialize(receiver, method_name); end + + # Raise a more useful error message instead of trying to forward to nil. + # + # source://pry//lib/pry/method/disowned.rb#52 + def method_missing(method_name, *args, &block); end + + # Returns the value of attribute name. + # + # source://pry//lib/pry/method/disowned.rb#19 + def name; end + + # Get the hypothesized owner of the method. + # + # @return [Object] + # + # source://pry//lib/pry/method/disowned.rb#46 + def owner; end + + # Returns the value of attribute receiver. + # + # source://pry//lib/pry/method/disowned.rb#19 + def receiver; end + + # Can we get the source for this method? + # + # @return [Boolean] false + # + # source://pry//lib/pry/method/disowned.rb#39 + def source?; end + + # Is the method undefined? (aka `Disowned`) + # + # @return [Boolean] true + # + # source://pry//lib/pry/method/disowned.rb#33 + def undefined?; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/method/disowned.rb#62 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# source://pry//lib/pry/method/patcher.rb#5 +class Pry::Method::Patcher + # @return [Patcher] a new instance of Patcher + # + # source://pry//lib/pry/method/patcher.rb#12 + def initialize(method); end + + # Returns the value of attribute method. + # + # source://pry//lib/pry/method/patcher.rb#6 + def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://pry//lib/pry/method/patcher.rb#6 + def method=(_arg0); end + + # perform the patch + # + # source://pry//lib/pry/method/patcher.rb#21 + def patch_in_ram(source); end + + private + + # source://pry//lib/pry/method/patcher.rb#38 + def cache_key; end + + # Update the definition line so that it can be eval'd directly on the Method's + # owner instead of from the original context. + # + # In particular this takes `def self.foo` and turns it into `def foo` so that we + # don't end up creating the method on the singleton class of the singleton class + # by accident. + # + # This is necessarily done by String manipulation because we can't find out what + # syntax is needed for the argument list by ruby-level introspection. + # + # @param line [String] The original definition line. e.g. def self.foo(bar, baz=1) + # @return [String] The new definition line. e.g. def foo(bar, baz=1) + # + # source://pry//lib/pry/method/patcher.rb#78 + def definition_for_owner(line); end + + # source://pry//lib/pry/method/patcher.rb#33 + def redefine(source); end + + # Run some code ensuring that at the end target#meth_name will not have changed. + # + # When we're redefining aliased methods we will overwrite the method at the + # unaliased name (so that super continues to work). By wrapping that code in a + # translation we make that not happen, which means that alias_method_chains, etc. + # continue to work. + # + # source://pry//lib/pry/method/patcher.rb#49 + def with_method_transaction; end + + # Apply wrap_for_owner and wrap_for_nesting successively to `source` + # + # @param source [String] + # @return [String] The wrapped source. + # + # source://pry//lib/pry/method/patcher.rb#91 + def wrap(source); end + + # Update the new source code to have the correct Module.nesting. + # + # This method uses syntactic analysis of the original source file to determine + # the new nesting, so that we can tell the difference between: + # + # class A; def self.b; end; end + # class << A; def b; end; end + # + # The resulting code should be evaluated in the TOPLEVEL_BINDING. + # + # @param source [String] The source to wrap. + # @return [String] + # + # source://pry//lib/pry/method/patcher.rb#122 + def wrap_for_nesting(source); end + + # Update the source code so that when it has the right owner when eval'd. + # + # This (combined with definition_for_owner) is backup for the case that + # wrap_for_nesting fails, to ensure that the method will still be defined in + # the correct place. + # + # @param source [String] The source to wrap + # @return [String] + # + # source://pry//lib/pry/method/patcher.rb#103 + def wrap_for_owner(source); end + + class << self + # source://pry//lib/pry/method/patcher.rb#16 + def code_for(filename); end + end +end + +# This class is responsible for locating the *real* `Pry::Method` +# object captured by a binding. +# +# Given a `Binding` from inside a method and a 'seed' Pry::Method object, +# there are primarily two situations where the seed method doesn't match +# the Binding: +# 1. The Pry::Method is from a subclass +# 2. The Pry::Method represents a method of the same name while the original +# was renamed to something else. For 1. we search vertically up the +# inheritance chain, and for 2. we search laterally along the object's +# method table. +# +# When we locate the method that matches the Binding we wrap it in +# Pry::Method and return it, or return nil if we fail. +# +# source://pry//lib/pry/method/weird_method_locator.rb#19 +class Pry::Method::WeirdMethodLocator + # @param method [Pry::Method] The seed method. + # @param target [Binding] The Binding that captures the method + # we want to locate. + # @return [WeirdMethodLocator] a new instance of WeirdMethodLocator + # + # source://pry//lib/pry/method/weird_method_locator.rb#55 + def initialize(method, target); end + + # @return [Pry::Method, nil] The Pry::Method that matches the + # given binding. + # + # source://pry//lib/pry/method/weird_method_locator.rb#62 + def find_method; end + + # @return [Boolean] Whether the Pry::Method is unrecoverable + # This usually happens when the method captured by the Binding + # has been subsequently deleted. + # + # source://pry//lib/pry/method/weird_method_locator.rb#69 + def lost_method?; end + + # Returns the value of attribute method. + # + # source://pry//lib/pry/method/weird_method_locator.rb#49 + def method; end + + # Sets the attribute method + # + # @param value the value to set the attribute method to. + # + # source://pry//lib/pry/method/weird_method_locator.rb#49 + def method=(_arg0); end + + # Returns the value of attribute target. + # + # source://pry//lib/pry/method/weird_method_locator.rb#50 + def target; end + + # Sets the attribute target + # + # @param value the value to set the attribute target to. + # + # source://pry//lib/pry/method/weird_method_locator.rb#50 + def target=(_arg0); end + + private + + # source://pry//lib/pry/method/weird_method_locator.rb#215 + def all_methods_for(obj); end + + # source://pry//lib/pry/method/weird_method_locator.rb#167 + def expanded_source_location(source_location); end + + # it's possible in some cases that the method we find by this approach is + # a sub-method of the one we're currently in, consider: + # + # class A; def b; binding.pry; end; end + # class B < A; def b; super; end; end + # + # Given that we can normally find the source_range of methods, and that we + # know which __FILE__ and __LINE__ the binding is at, we can hope to + # disambiguate these cases. + # + # This obviously won't work if the source is unavailable for some reason, + # or if both methods have the same __FILE__ and __LINE__. + # + # @return [Pry::Method, nil] The Pry::Method representing the + # superclass method. + # + # source://pry//lib/pry/method/weird_method_locator.rb#131 + def find_method_in_superclass; end + + # This is the case where the name of a method has changed + # (via alias_method) so we locate the Method object for the + # renamed method. + # + # @return [Pry::Method, nil] The Pry::Method representing the + # renamed method + # + # source://pry//lib/pry/method/weird_method_locator.rb#156 + def find_renamed_method; end + + # source://pry//lib/pry/method/weird_method_locator.rb#197 + def index_to_line_number(index); end + + # source://pry//lib/pry/method/weird_method_locator.rb#206 + def lines_for_file(file); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#80 + def normal_method?(method); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#106 + def pry_file?; end + + # Use static analysis to locate the start of the method definition. + # We have the `__FILE__` and `__LINE__` from the binding and the + # original name of the method so we search up until we find a + # def/define_method, etc defining a method of the appropriate name. + # + # @return [Array] The `source_location` of the + # renamed method + # + # source://pry//lib/pry/method/weird_method_locator.rb#184 + def renamed_method_source_location; end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#75 + def skip_superclass_search?; end + + # source://pry//lib/pry/method/weird_method_locator.rb#88 + def target_file; end + + # source://pry//lib/pry/method/weird_method_locator.rb#98 + def target_line; end + + # source://pry//lib/pry/method/weird_method_locator.rb#84 + def target_self; end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#202 + def valid_file?(file); end + + class << self + # Whether the given method object matches the associated binding. + # If the method object does not match the binding, then it's + # most likely not the method captured by the binding, and we + # must commence a search. + # + # @param binding [Binding] + # @param method [Pry::Method] + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#29 + def normal_method?(method, binding); end + + # @return [Boolean] + # + # source://pry//lib/pry/method/weird_method_locator.rb#44 + def weird_method?(method, binding); end + end +end + +# source://pry//lib/pry/exceptions.rb#69 +class Pry::MethodNotFound < ::Pry::CommandError; end + +# source://pry//lib/pry/command_set.rb#4 +class Pry::NoCommandError < ::StandardError + # @return [NoCommandError] a new instance of NoCommandError + # + # source://pry//lib/pry/command_set.rb#5 + def initialize(match, owner); end +end + +# `ObjectPath` implements the resolution of "object paths", which are strings +# that are similar to filesystem paths but meant for traversing Ruby objects. +# Examples of valid object paths include: +# +# x +# @foo/@bar +# "string"/upcase +# Pry/Method +# +# Object paths are mostly relevant in the context of the `cd` command. +# +# @see https://github.com/pry/pry/wiki/State-navigation +# +# source://pry//lib/pry/object_path.rb#17 +class Pry::ObjectPath + # @param current_stack [Array] The current state of the binding + # stack. + # @param path_string [String] The object path expressed as a string. + # @return [ObjectPath] a new instance of ObjectPath + # + # source://pry//lib/pry/object_path.rb#23 + def initialize(path_string, current_stack); end + + # @return [Array] a new stack resulting from applying the given + # path to the current stack. + # + # source://pry//lib/pry/object_path.rb#30 + def resolve; end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/object_path.rb#74 + def complete?(segment); end + + # source://pry//lib/pry/object_path.rb#78 + def handle_failure(context, err); end +end + +# source://pry//lib/pry/object_path.rb#18 +Pry::ObjectPath::SPECIAL_TERMS = T.let(T.unsafe(nil), Array) + +# indicates obsolete API +# +# source://pry//lib/pry/exceptions.rb#72 +class Pry::ObsoleteError < ::StandardError; end + +# source://pry//lib/pry/output.rb#4 +class Pry::Output + # @return [Output] a new instance of Output + # + # source://pry//lib/pry/output.rb#10 + def initialize(pry_instance); end + + # source://pry//lib/pry/output.rb#34 + def <<(*objs); end + + # source://pry//lib/pry/output.rb#53 + def decolorize_maybe(str); end + + # Return a screen height or the default if that fails. + # + # source://pry//lib/pry/output.rb#74 + def height; end + + # source://pry//lib/pry/output.rb#41 + def method_missing(method_name, *args, &block); end + + # source://pry//lib/pry/output.rb#28 + def print(*objs); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/output.rb#8 + def pry_instance; end + + # source://pry//lib/pry/output.rb#15 + def puts(*objs); end + + # @return [Array] a pair of [rows, columns] which gives the size of + # the window. If the window size cannot be determined, the default value. + # + # source://pry//lib/pry/output.rb#61 + def size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#37 + def tty?; end + + # Return a screen width or the default if that fails. + # + # source://pry//lib/pry/output.rb#69 + def width; end + + # source://pry//lib/pry/output.rb#35 + def write(*objs); end + + private + + # source://pry//lib/pry/output.rb#80 + def actual_screen_size; end + + # source://pry//lib/pry/output.rb#125 + def ansicon_env_size; end + + # source://pry//lib/pry/output.rb#109 + def env_size; end + + # source://pry//lib/pry/output.rb#92 + def io_console_size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#132 + def nonzero_column?(size); end + + # source://pry//lib/pry/output.rb#114 + def readline_size; end + + # @return [Boolean] + # + # source://pry//lib/pry/output.rb#49 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# @return [Array] default terminal screen size [rows, cols] +# +# source://pry//lib/pry/output.rb#6 +Pry::Output::DEFAULT_SIZE = T.let(T.unsafe(nil), Array) + +# source://pry//lib/pry/pager.rb#7 +class Pry::Pager + # @return [Pager] a new instance of Pager + # + # source://pry//lib/pry/pager.rb#13 + def initialize(pry_instance); end + + # Yields a pager object (`NullPager`, `SimplePager`, or `SystemPager`). + # All pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. + # + # source://pry//lib/pry/pager.rb#33 + def open; end + + # Send the given text through the best available pager (if + # `Pry.config.pager` is enabled). If you want to send text through in + # chunks as you generate it, use `open` to get a writable object + # instead. + # + # @param text [String] Text to run through a pager. + # + # source://pry//lib/pry/pager.rb#25 + def page(text); end + + # Returns the value of attribute pry_instance. + # + # source://pry//lib/pry/pager.rb#11 + def pry_instance; end + + private + + # Return an instance of the "best" available pager class -- + # `SystemPager` if possible, `SimplePager` if `SystemPager` isn't + # available, and `NullPager` if the user has disabled paging. All + # pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. You + # must call `#close` when you're done writing output to a pager, and + # you must rescue `Pry::Pager::StopPaging`. These requirements can be + # avoided by using `.open` instead. + # + # source://pry//lib/pry/pager.rb#56 + def best_available; end + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#43 + def enabled?; end + + # Returns the value of attribute output. + # + # source://pry//lib/pry/pager.rb#47 + def output; end +end + +# `NullPager` is a "pager" that actually just prints all output as it +# comes in. Used when `Pry.config.pager` is false. +# +# source://pry//lib/pry/pager.rb#68 +class Pry::Pager::NullPager + # @return [NullPager] a new instance of NullPager + # + # source://pry//lib/pry/pager.rb#69 + def initialize(out); end + + # source://pry//lib/pry/pager.rb#80 + def <<(str); end + + # source://pry//lib/pry/pager.rb#86 + def close; end + + # source://pry//lib/pry/pager.rb#77 + def print(str); end + + # source://pry//lib/pry/pager.rb#73 + def puts(str); end + + # source://pry//lib/pry/pager.rb#82 + def write(str); end + + private + + # source://pry//lib/pry/pager.rb#90 + def height; end + + # source://pry//lib/pry/pager.rb#94 + def width; end +end + +# `PageTracker` tracks output to determine whether it's likely to take +# up a whole page. This doesn't need to be super precise, but we can +# use it for `SimplePager` and to avoid invoking the system pager +# unnecessarily. +# +# One simplifying assumption is that we don't need `#page?` to return +# `true` on the basis of an incomplete line. Long lines should be +# counted as multiple lines, but we don't have to transition from +# `false` to `true` until we see a newline. +# +# source://pry//lib/pry/pager.rb#213 +class Pry::Pager::PageTracker + # @return [PageTracker] a new instance of PageTracker + # + # source://pry//lib/pry/pager.rb#214 + def initialize(rows, cols); end + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#231 + def page?; end + + # source://pry//lib/pry/pager.rb#220 + def record(str); end + + # source://pry//lib/pry/pager.rb#235 + def reset; end + + private + + # Approximation of the printable length of a given line, without the + # newline and without ANSI color codes. + # + # source://pry//lib/pry/pager.rb#244 + def line_length(line); end +end + +# `SimplePager` is a straightforward pure-Ruby pager. We use it on +# JRuby and when we can't find a usable external pager. +# +# source://pry//lib/pry/pager.rb#101 +class Pry::Pager::SimplePager < ::Pry::Pager::NullPager + # @return [SimplePager] a new instance of SimplePager + # + # source://pry//lib/pry/pager.rb#102 + def initialize(*_arg0); end + + # source://pry//lib/pry/pager.rb#107 + def write(str); end +end + +# source://pry//lib/pry/pager.rb#8 +class Pry::Pager::StopPaging < ::StandardError; end + +# `SystemPager` buffers output until we're pretty sure it's at least a +# page long, then invokes an external pager and starts streaming output +# to it. If `#close` is called before then, it just prints out the +# buffered content. +# +# source://pry//lib/pry/pager.rb#129 +class Pry::Pager::SystemPager < ::Pry::Pager::NullPager + # @return [SystemPager] a new instance of SystemPager + # + # source://pry//lib/pry/pager.rb#161 + def initialize(*_arg0); end + + # source://pry//lib/pry/pager.rb#181 + def close; end + + # source://pry//lib/pry/pager.rb#168 + def write(str); end + + private + + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#195 + def invoked_pager?; end + + # source://pry//lib/pry/pager.rb#199 + def pager; end + + # source://pry//lib/pry/pager.rb#191 + def write_to_pager(text); end + + class << self + # @return [Boolean] + # + # source://pry//lib/pry/pager.rb#142 + def available?; end + + # source://pry//lib/pry/pager.rb#130 + def default_pager; end + end +end + +# Prompt represents the Pry prompt, which can be used with Readline-like +# libraries. It defines a few default prompts (default prompt, simple prompt, +# etc) and also provides an API for adding and implementing custom prompts. +# +# @api public +# @example Manually instantiating the Prompt class +# prompt_procs = [ +# proc { '#{rand(1)}>" }, +# proc { "#{('a'..'z').to_a.sample}*" } +# ] +# prompt = Pry::Prompt.new( +# :random, +# 'Random number or letter prompt.', +# prompt_procs +# ) +# prompt.wait_proc.call(...) #=> +# prompt.incomplete_proc.call(...) +# @example Registering a new Pry prompt +# Pry::Prompt.add( +# :ipython, +# 'IPython-like prompt', [':', '...:'] +# ) do |_context, _nesting, pry_instance, sep| +# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' +# end +# +# # Produces: +# # In [3]: def foo +# # ...: puts 'foo' +# # ...: end +# # => :foo +# # In [4]: +# @since v0.11.0 +# +# source://pry//lib/pry/prompt.rb#38 +class Pry::Prompt + # @api public + # @param description [String] + # @param name [String] + # @param prompt_procs [Array] + # @return [Prompt] a new instance of Prompt + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#117 + def initialize(name, description, prompt_procs); end + + # @api public + # @deprecated Use a `Pry::Prompt` instance directly + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#135 + def [](key); end + + # @api public + # @return [String] + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#108 + def description; end + + # @api public + # @return [Proc] the proc which builds the prompt when in the middle of an + # expression such as open method, etc. (`*`) + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#130 + def incomplete_proc; end + + # @api public + # @return [String] + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#105 + def name; end + + # @api public + # @return [Array] the array of procs that hold + # `[wait_proc, incomplete_proc]` + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#112 + def prompt_procs; end + + # @api public + # @return [Proc] the proc which builds the wait prompt (`>`) + # @since v0.11.0 + # + # source://pry//lib/pry/prompt.rb#124 + def wait_proc; end + + class << self + # Retrieves a prompt. + # + # @api public + # @example + # Prompt[:my_prompt] + # @param name [Symbol] The name of the prompt you want to access + # @return [Hash{Symbol=>Object}] + # @since v0.12.0 + # + # source://pry//lib/pry/prompt.rb#52 + def [](name); end + + # Adds a new prompt to the prompt hash. + # + # @api public + # @param description [String] + # @param name [Symbol] + # @param separators [Array] The separators to differentiate + # between prompt modes (default mode and class/method definition mode). + # The Array *must* have a size of 2. + # @raise [ArgumentError] if the size of `separators` is not 2 + # @raise [ArgumentError] if `prompt_name` is already occupied + # @return [nil] + # @since v0.12.0 + # @yield [context, nesting, pry_instance, sep] + # @yieldparam context [Object] the context where Pry is currently in + # @yieldparam nesting [Integer] whether the context is nested + # @yieldparam pry_instance [Pry] the Pry instance + # @yieldparam separator [String] separator string + # + # source://pry//lib/pry/prompt.rb#79 + def add(name, description = T.unsafe(nil), separators = T.unsafe(nil)); end + + # @api public + # @note Use this for read-only operations + # @return [Hash{Symbol=>Hash}] the duplicate of the internal prompts hash + # @since v0.12.0 + # + # source://pry//lib/pry/prompt.rb#59 + def all; end + end +end + +# source://pry//lib/pry/repl.rb#4 +class Pry::REPL + extend ::Forwardable + extend ::Pry::Forwardable + + # Create an instance of {REPL} wrapping the given {Pry}. + # + # @option options + # @param options [Hash] Options for this {REPL} instance. + # @param pry [Pry] The instance of {Pry} that this {REPL} will control. + # @return [REPL] a new instance of REPL + # + # source://pry//lib/pry/repl.rb#22 + def initialize(pry, options = T.unsafe(nil)); end + + # source://pry//lib/pry/repl.rb#6 + def input(*args, **_arg1, &block); end + + # source://pry//lib/pry/repl.rb#6 + def output(*args, **_arg1, &block); end + + # @return [Pry] The instance of {Pry} that the user is controlling. + # + # source://pry//lib/pry/repl.rb#9 + def pry; end + + # @return [Pry] The instance of {Pry} that the user is controlling. + # + # source://pry//lib/pry/repl.rb#9 + def pry=(_arg0); end + + # Start the read-eval-print loop. + # + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. + # @return [Object?] If the session throws `:breakout`, return the value + # thrown with it. + # + # source://pry//lib/pry/repl.rb#36 + def start; end + + private + + # Calculates correct overhang for current line. Supports vi Readline + # mode and its indicators such as "(ins)" or "(cmd)". + # + # @note This doesn't calculate overhang for Readline's emacs mode with an + # indicator because emacs is the default mode and it doesn't use + # indicators in 99% of cases. + # @return [Integer] + # + # source://pry//lib/pry/repl.rb#307 + def calculate_overhang(current_prompt, original_val, indented_val); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#287 + def complete_expression?(multiline_input); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#246 + def coolline_available?; end + + # Clean up after the repl session. + # + # @return [void] + # + # source://pry//lib/pry/repl.rb#84 + def epilogue; end + + # Manage switching of input objects on encountering `EOFError`s. + # + # @return [Object] Whatever the given block returns. + # @return [:no_more_input] Indicates that no more input can be read. + # + # source://pry//lib/pry/repl.rb#127 + def handle_read_errors; end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#234 + def input_multiline?; end + + # source://pry//lib/pry/repl.rb#228 + def input_readline(*args); end + + # source://pry//lib/pry/repl.rb#219 + def input_readmultiline(*args); end + + # If `$stdout` is not a tty, it's probably a pipe. + # + # @example + # # `piping?` returns `false` + # % pry + # [1] pry(main) + # + # # `piping?` returns `true` + # % pry | tee log + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#272 + def piping?; end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#250 + def prism_available?; end + + # Set up the repl session. + # + # @return [void] + # + # source://pry//lib/pry/repl.rb#47 + def prologue; end + + # Read a line of input from the user. + # + # @return [String] The line entered by the user. + # @return [nil] On ``. + # @return [:control_c] On ``. + # @return [:no_more_input] On EOF. + # + # source://pry//lib/pry/repl.rb#93 + def read; end + + # Returns the next line of input to be sent to the {Pry} instance. + # + # @param current_prompt [String] The prompt to use for input. + # @return [String?] The next line of input, or `nil` on . + # + # source://pry//lib/pry/repl.rb#169 + def read_line(current_prompt); end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#242 + def readline_available?; end + + # @return [Boolean] + # + # source://pry//lib/pry/repl.rb#238 + def reline_available?; end + + # The actual read-eval-print loop. + # + # The {REPL} instance is responsible for reading and looping, whereas the + # {Pry} instance is responsible for evaluating user input and printing + # return values and command output. + # + # @raise [Exception] If the session throws `:raise_up`, raise the exception + # thrown with it. + # @return [Object?] If the session throws `:breakout`, return the value + # thrown with it. + # + # source://pry//lib/pry/repl.rb#66 + def repl; end + + # @return [void] + # + # source://pry//lib/pry/repl.rb#279 + def set_readline_output; end + + class << self + # Instantiate a new {Pry} instance with the given options, then start a + # {REPL} instance wrapping it. + # + # @option options + # @param options [Hash] a customizable set of options + # + # source://pry//lib/pry/repl.rb#14 + def start(options = T.unsafe(nil)); end + end +end + +# source://pry//lib/pry/repl.rb#285 +Pry::REPL::UNEXPECTED_TOKENS = T.let(T.unsafe(nil), Array) + +# A class to manage the loading of files through the REPL loop. +# This is an interesting trick as it processes your file as if it +# was user input in an interactive session. As a result, all Pry +# commands are available, and they are executed non-interactively. Furthermore +# the session becomes interactive when the repl loop processes a +# 'make-interactive' command in the file. The session also becomes +# interactive when an exception is encountered, enabling you to fix +# the error before returning to non-interactive processing with the +# 'make-non-interactive' command. +# +# source://pry//lib/pry/repl_file_loader.rb#14 +class Pry::REPLFileLoader + # @return [REPLFileLoader] a new instance of REPLFileLoader + # + # source://pry//lib/pry/repl_file_loader.rb#15 + def initialize(file_name); end + + # Define a few extra commands useful for flipping back & forth + # between interactive/non-interactive modes + # + # source://pry//lib/pry/repl_file_loader.rb#59 + def define_additional_commands; end + + # Switch to interactive mode, i.e take input from the user + # and use the regular print and exception handlers. + # + # @param pry_instance [Pry] the Pry instance to make interactive. + # + # source://pry//lib/pry/repl_file_loader.rb#26 + def interactive_mode(pry_instance); end + + # Actually load the file through the REPL by setting file content + # as the REPL input stream. + # + # source://pry//lib/pry/repl_file_loader.rb#75 + def load; end + + # Switch to non-interactive mode. Essentially + # this means there is no result output + # and that the session becomes interactive when an exception is encountered. + # + # @param pry_instance [Pry] the Pry instance to make non-interactive. + # + # source://pry//lib/pry/repl_file_loader.rb#37 + def non_interactive_mode(pry_instance, content); end +end + +# As a REPL, we often want to catch any unexpected exceptions that may have +# been raised; however we don't want to go overboard and prevent the user +# from exiting Pry when they want to. +# +# source://pry//lib/pry/exceptions.rb#7 +module Pry::RescuableException + class << self + # source://pry//lib/pry/exceptions.rb#8 + def ===(exception); end + end +end + +# Wraps the return result of process_commands, indicates if the +# result IS a command and what kind of command (e.g void) +# +# source://pry//lib/pry/command_set.rb#397 +class Pry::Result + # @return [Result] a new instance of Result + # + # source://pry//lib/pry/command_set.rb#400 + def initialize(is_command, retval = T.unsafe(nil)); end + + # Is the result a command? + # + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#407 + def command?; end + + # Returns the value of attribute retval. + # + # source://pry//lib/pry/command_set.rb#398 + def retval; end + + # Is the result a command and if it is, is it a void command? + # (one that does not return a value) + # + # @return [Boolean] + # + # source://pry//lib/pry/command_set.rb#414 + def void_command?; end +end + +# A ring is a thread-safe fixed-capacity array to which you can only add +# elements. Older entries are overwritten as you add new elements, so that the +# ring can never contain more than `max_size` elements. +# +# @api public +# @example +# ring = Pry::Ring.new(3) +# ring << 1 << 2 << 3 +# ring.to_a #=> [1, 2, 3] +# ring << 4 +# ring.to_a #=> [2, 3, 4] +# +# ring[0] #=> 2 +# ring[-1] #=> 4 +# ring.clear +# ring[0] #=> nil +# @since v0.12.0 +# +# source://pry//lib/pry/ring.rb#22 +class Pry::Ring + # @api public + # @param max_size [Integer] Maximum buffer size. The buffer will start + # overwriting elements once its reaches its maximum capacity + # @return [Ring] a new instance of Ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#33 + def initialize(max_size); end + + # Push `value` to the current index. + # + # @api public + # @param value [Object] + # @return [self] + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#43 + def <<(value); end + + # Read the value stored at `index`. + # + # @api public + # @param index [Integer, Range] The element (if Integer) or elements + # (if Range) associated with `index` + # @return [Object, Array, nil] element(s) at `index`, `nil` if none + # exist + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#57 + def [](index); end + + # Clear the buffer and reset count. + # + # @api public + # @return [void] + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#75 + def clear; end + + # @api public + # @return [Integer] how many objects were added during the lifetime of the + # ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#28 + def count; end + + # @api public + # @return [Integer] maximum buffer size + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#24 + def max_size; end + + # @api public + # @return [Integer] how many objects were added during the lifetime of the + # ring + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#29 + def size; end + + # @api public + # @return [Array] the buffer as unwinded array + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#67 + def to_a; end + + private + + # @api public + # @since v0.12.0 + # + # source://pry//lib/pry/ring.rb#84 + def transpose_buffer_tail; end +end + +# source://pry//lib/pry/slop.rb#5 +class Pry::Slop + include ::Enumerable + + # Create a new instance of Slop and optionally build options via a block. + # + # config - A Hash of configuration options. + # block - An optional block used to specify options. + # + # @return [Slop] a new instance of Slop + # + # source://pry//lib/pry/slop.rb#127 + def initialize(config = T.unsafe(nil), &block); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://pry//lib/pry/slop.rb#278 + def [](key); end + + # Add a callback. + # + # label - The Symbol identifier to attach this callback. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#398 + def add_callback(label, &block); end + + # Get or set the banner. + # + # banner - The String to set the banner. + # + # Returns the banner String. + # + # source://pry//lib/pry/slop.rb#168 + def banner(banner = T.unsafe(nil)); end + + # Set the banner. + # + # banner - The String to set the banner. + # + # source://pry//lib/pry/slop.rb#159 + def banner=(banner); end + + # Add a new command. + # + # command - The Symbol or String used to identify this command. + # options - A Hash of configuration options (see Slop::new) + # + # Returns a new instance of Slop mapped to this command. + # + # source://pry//lib/pry/slop.rb#196 + def command(command, options = T.unsafe(nil), &block); end + + # The Hash of configuration options for this Slop instance. + # + # source://pry//lib/pry/slop.rb#118 + def config; end + + # Get or set the description (used for commands). + # + # desc - The String to set the description. + # + # Returns the description String. + # + # source://pry//lib/pry/slop.rb#185 + def description(desc = T.unsafe(nil)); end + + # Set the description (used for commands). + # + # desc - The String to set the description. + # + # source://pry//lib/pry/slop.rb#176 + def description=(desc); end + + # Enumerable interface. Yields each Slop::Option. + # + # source://pry//lib/pry/slop.rb#297 + def each(&block); end + + # Fetch a Slop object associated with this command. + # + # command - The String or Symbol name of the command. + # + # Examples: + # + # opts.command :foo do + # on :v, :verbose, 'Enable verbose mode' + # end + # + # # ruby run.rb foo -v + # opts.fetch_command(:foo).verbose? #=> true + # + # source://pry//lib/pry/slop.rb#389 + def fetch_command(command); end + + # Fetch a Slop::Option object. + # + # key - The Symbol or String option key. + # + # Examples: + # + # opts.on(:foo, 'Something fooey', :argument => :optional) + # opt = opts.fetch_option(:foo) + # opt.class #=> Slop::Option + # opt.accepts_optional_argument? #=> true + # + # Returns an Option or nil if none were found. + # + # source://pry//lib/pry/slop.rb#373 + def fetch_option(key); end + + # Fetch an options argument value. + # + # key - The Symbol or String option short or long flag. + # + # Returns the Object value for this option, or nil. + # + # source://pry//lib/pry/slop.rb#282 + def get(key); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://pry//lib/pry/slop.rb#440 + def help; end + + # Fetch a list of options which were missing from the parsed list. + # + # Examples: + # + # opts = Slop.new do + # on :n, :name= + # on :p, :password= + # end + # + # opts.parse %w[ --name Lee ] + # opts.missing #=> ['password'] + # + # Returns an Array of Strings representing missing options. + # + # source://pry//lib/pry/slop.rb#357 + def missing; end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#265 + def on(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#271 + def opt(*objects, &block); end + + # Add an Option. + # + # objects - An Array with an optional Hash as the last element. + # + # Examples: + # + # on '-u', '--username=', 'Your username' + # on :v, :verbose, 'Enable verbose mode' + # + # Returns the created instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#270 + def option(*objects, &block); end + + # The Array of Slop::Option objects tied to this Slop instance. + # + # source://pry//lib/pry/slop.rb#121 + def options; end + + # Parse a list of items, executing and gathering options along the way. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items. + # + # source://pry//lib/pry/slop.rb#206 + def parse(items = T.unsafe(nil), &block); end + + # Parse a list of items, executing and gathering options along the way. + # unlike parse() this method will remove any options and option arguments + # from the original Array. + # + # items - The Array of items to extract options from (default: ARGV). + # block - An optional block which when used will yield non options. + # + # Returns an Array of original items with options removed. + # + # source://pry//lib/pry/slop.rb#219 + def parse!(items = T.unsafe(nil), &block); end + + # Check for an options presence. + # + # Examples: + # + # opts.parse %w( --foo ) + # opts.present?(:foo) #=> true + # opts.present?(:bar) #=> false + # + # Returns true if all of the keys are present in the parsed arguments. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#333 + def present?(*keys); end + + # Specify code to be executed when these options are parsed. + # + # callable - An object responding to a call method. + # + # yields - The instance of Slop parsing these options + # An Array of unparsed arguments + # + # Example: + # + # Slop.parse do + # on :v, :verbose + # + # run do |opts, args| + # puts "Arguments: #{args.inspect}" if opts.verbose? + # end + # end + # + # @raise [ArgumentError] + # + # source://pry//lib/pry/slop.rb#317 + def run(callable = T.unsafe(nil), &block); end + + # Add string separators between options. + # + # text - The String text to print. + # + # source://pry//lib/pry/slop.rb#405 + def separator(text); end + + # Is strict mode enabled? + # + # Returns true if strict mode is enabled, false otherwise. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#152 + def strict?; end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://pry//lib/pry/slop.rb#294 + def to_h(include_commands = T.unsafe(nil)); end + + # Returns a new Hash with option flags as keys and option values as values. + # + # include_commands - If true, merge options from all sub-commands. + # + # source://pry//lib/pry/slop.rb#287 + def to_hash(include_commands = T.unsafe(nil)); end + + # Print a handy Slop help string. + # + # Returns the banner followed by available option help strings. + # + # source://pry//lib/pry/slop.rb#416 + def to_s; end + + private + + # Autocreate an option on the fly. See the :autocreate Slop config option. + # + # items - The Array of items we're parsing. + # index - The current Integer index for the item we're processing. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#590 + def autocreate(items, index); end + + # Build an option from a list of objects. + # + # objects - An Array of objects used to build this option. + # + # Returns a new instance of Slop::Option. + # + # source://pry//lib/pry/slop.rb#606 + def build_option(objects, &block); end + + # Remove any leading -- characters from a string. + # + # object - The Object we want to cast to a String and clean. + # + # Returns the newly cleaned String with leading -- characters removed. + # + # source://pry//lib/pry/slop.rb#659 + def clean(object); end + + # source://pry//lib/pry/slop.rb#663 + def commands_to_help; end + + # Execute a `-abc` type option where a, b and c are all options. This + # method is only executed if the multiple_switches argument is true. + # + # option - The first Option object. + # argument - The argument to this option. (Split into multiple Options). + # index - The index of the current item being processed. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#552 + def execute_multiple_switches(option, argument, index); end + + # Execute an option, firing off callbacks and assigning arguments. + # + # option - The Slop::Option object found by #process_item. + # argument - The argument Object to assign to this option. + # index - The current Integer index of the object we're processing. + # item - The optional String item we're processing. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#519 + def execute_option(option, argument, index, item = T.unsafe(nil)); end + + # Extract the long flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://pry//lib/pry/slop.rb#644 + def extract_long_flag(objects, config); end + + # Extract an option from a flag. + # + # flag - The flag key used to extract an option. + # + # Returns an Array of [option, argument]. + # + # source://pry//lib/pry/slop.rb#567 + def extract_option(flag); end + + # Extract the short flag from an item. + # + # objects - The Array of objects passed from #build_option. + # config - The Hash of configuration options built in #build_option. + # + # source://pry//lib/pry/slop.rb#626 + def extract_short_flag(objects, config); end + + # Convenience method for present?(:option). + # + # Examples: + # + # opts.parse %( --verbose ) + # opts.verbose? #=> true + # opts.other? #=> false + # + # Returns true if this option is present. If this method does not end + # with a ? character it will instead call super(). + # + # source://pry//lib/pry/slop.rb#454 + def method_missing(method, *args, &block); end + + # Process a list item, figure out if it's an option, execute any + # callbacks, assign any option arguments, and do some sanity checks. + # + # items - The Array of items to process. + # index - The current Integer index of the item we want to process. + # block - An optional block which when passed will yield non options. + # + # Returns nothing. + # + # source://pry//lib/pry/slop.rb#472 + def process_item(items, index, &block); end + + # Override this method so we can check if an option? method exists. + # + # Returns true if this option key exists in our list of options. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop.rb#340 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end + + class << self + # Build a Slop object from a option specification. + # + # This allows you to design your options via a simple String rather + # than programmatically. Do note though that with this method, you're + # unable to pass any advanced options to the on() method when creating + # options. + # + # string - The optspec String + # config - A Hash of configuration options to pass to Slop.new + # + # Examples: + # + # opts = Slop.optspec(<<-SPEC) + # ruby foo.rb [options] + # --- + # n,name= Your name + # a,age= Your age + # A,auth Sign in with auth + # p,passcode= Your secret pass code + # SPEC + # + # opts.fetch_option(:name).description #=> "Your name" + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#97 + def optspec(string, config = T.unsafe(nil)); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Examples: + # + # Slop.parse(ARGV, :help => true) do + # on '-n', '--name', 'Your username', :argument => true + # end + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#54 + def parse(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # items - The Array of items to extract options from (default: ARGV). + # config - The Hash of configuration options to send to Slop.new(). + # block - An optional block used to add options. + # + # Returns a new instance of Slop. + # + # source://pry//lib/pry/slop.rb#63 + def parse!(items = T.unsafe(nil), config = T.unsafe(nil), &block); end + end +end + +# source://pry//lib/pry/slop/commands.rb#5 +class Pry::Slop::Commands + include ::Enumerable + + # Create a new instance of Slop::Commands and optionally build + # Slop instances via a block. Any configuration options used in + # this method will be the default configuration options sent to + # each Slop object created. + # + # config - An optional configuration Hash. + # block - Optional block used to define commands. + # + # Examples: + # + # commands = Slop::Commands.new do + # on :new do + # on '-o', '--outdir=', 'The output directory' + # on '-v', '--verbose', 'Enable verbose mode' + # end + # + # on :generate do + # on '--assets', 'Generate assets', :default => true + # end + # + # global do + # on '-D', '--debug', 'Enable debug mode', :default => false + # end + # end + # + # commands[:new].class #=> Slop + # commands.parse + # + # @return [Commands] a new instance of Commands + # + # source://pry//lib/pry/slop/commands.rb#39 + def initialize(config = T.unsafe(nil), &block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://pry//lib/pry/slop/commands.rb#100 + def [](key); end + + # Returns the value of attribute arguments. + # + # source://pry//lib/pry/slop/commands.rb#8 + def arguments; end + + # Optionally set the banner for this command help output. + # + # banner - The String text to set the banner. + # + # Returns the String banner if one is set. + # + # source://pry//lib/pry/slop/commands.rb#59 + def banner(banner = T.unsafe(nil)); end + + # Sets the attribute banner + # + # @param value the value to set the attribute banner to. + # + # source://pry//lib/pry/slop/commands.rb#9 + def banner=(_arg0); end + + # Returns the value of attribute commands. + # + # source://pry//lib/pry/slop/commands.rb#8 + def commands; end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/slop/commands.rb#8 + def config; end + + # Add a Slop instance used when no other commands exist. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to default. + # + # source://pry//lib/pry/slop/commands.rb#81 + def default(config = T.unsafe(nil), &block); end + + # Enumerable interface. + # + # source://pry//lib/pry/slop/commands.rb#119 + def each(&block); end + + # Fetch the instance of Slop tied to a command. + # + # key - The String or Symbol key used to locate this command. + # + # Returns the Slop instance if this key is found, nil otherwise. + # + # source://pry//lib/pry/slop/commands.rb#103 + def get(key); end + + # Add a global Slop instance. + # + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to global. + # + # source://pry//lib/pry/slop/commands.rb#91 + def global(config = T.unsafe(nil), &block); end + + # Returns the help String. + # + # source://pry//lib/pry/slop/commands.rb#167 + def help; end + + # Returns the inspection String. + # + # source://pry//lib/pry/slop/commands.rb#170 + def inspect; end + + # Add a Slop instance for a specific command. + # + # command - A String or Symbol key used to identify this command. + # config - A Hash of configuration options to pass to Slop. + # block - An optional block used to pass options to Slop. + # + # Returns the newly created Slop instance mapped to command. + # + # source://pry//lib/pry/slop/commands.rb#71 + def on(command, config = T.unsafe(nil), &block); end + + # Parse a list of items. + # + # items - The Array of items to parse. + # + # Returns the original Array of items. + # + # source://pry//lib/pry/slop/commands.rb#128 + def parse(items = T.unsafe(nil)); end + + # Parse a list of items, removing any options or option arguments found. + # + # items - The Array of items to parse. + # + # Returns the original Array of items with options removed. + # + # source://pry//lib/pry/slop/commands.rb#138 + def parse!(items = T.unsafe(nil)); end + + # Check for a command presence. + # + # Examples: + # + # cmds.parse %w( foo ) + # cmds.present?(:foo) #=> true + # cmds.present?(:bar) #=> false + # + # Returns true if the given key is present in the parsed arguments. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/commands.rb#114 + def present?(key); end + + # Returns a nested Hash with Slop options and values. See Slop#to_hash. + # + # source://pry//lib/pry/slop/commands.rb#153 + def to_hash; end + + # Returns the help String. + # + # source://pry//lib/pry/slop/commands.rb#158 + def to_s; end + + private + + # Returns nothing. + # + # source://pry//lib/pry/slop/commands.rb#177 + def execute_arguments!(items); end + + # Returns nothing. + # + # source://pry//lib/pry/slop/commands.rb#183 + def execute_global_opts!(items); end +end + +# Returns a default Hash of configuration options this Slop instance uses. +# +# source://pry//lib/pry/slop.rb#30 +Pry::Slop::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The main Error class, all Exception classes inherit from this class. +# +# source://pry//lib/pry/slop.rb#12 +class Pry::Slop::Error < ::StandardError; end + +# Raised when an argument does not match its intended match constraint. +# +# source://pry//lib/pry/slop.rb#21 +class Pry::Slop::InvalidArgumentError < ::Pry::Slop::Error; end + +# Raised when an invalid command is found and the strict flag is enabled. +# +# source://pry//lib/pry/slop.rb#27 +class Pry::Slop::InvalidCommandError < ::Pry::Slop::Error; end + +# Raised when an invalid option is found and the strict flag is enabled. +# +# source://pry//lib/pry/slop.rb#24 +class Pry::Slop::InvalidOptionError < ::Pry::Slop::Error; end + +# Raised when an option argument is expected but none are given. +# +# source://pry//lib/pry/slop.rb#15 +class Pry::Slop::MissingArgumentError < ::Pry::Slop::Error; end + +# Raised when an option is expected/required but not present. +# +# source://pry//lib/pry/slop.rb#18 +class Pry::Slop::MissingOptionError < ::Pry::Slop::Error; end + +# source://pry//lib/pry/slop/option.rb#5 +class Pry::Slop::Option + # Incapsulate internal option information, mainly used to store + # option specific configuration data, most of the meat of this + # class is found in the #value method. + # + # slop - The instance of Slop tied to this Option. + # short - The String or Symbol short flag. + # long - The String or Symbol long flag. + # description - The String description text. + # config - A Hash of configuration options. + # block - An optional block used as a callback. + # + # @return [Option] a new instance of Option + # + # source://pry//lib/pry/slop/option.rb#35 + def initialize(slop, short, long, description, config = T.unsafe(nil), &block); end + + # Returns true if this option accepts an optional argument. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/option.rb#72 + def accepts_optional_argument?; end + + # Returns the value of attribute argument_in_value. + # + # source://pry//lib/pry/slop/option.rb#23 + def argument_in_value; end + + # Sets the attribute argument_in_value + # + # @param value the value to set the attribute argument_in_value to. + # + # source://pry//lib/pry/slop/option.rb#23 + def argument_in_value=(_arg0); end + + # Call this options callback if one exists, and it responds to call(). + # + # Returns nothing. + # + # source://pry//lib/pry/slop/option.rb#84 + def call(*objects); end + + # Returns the value of attribute config. + # + # source://pry//lib/pry/slop/option.rb#22 + def config; end + + # Returns the value of attribute count. + # + # source://pry//lib/pry/slop/option.rb#23 + def count; end + + # Sets the attribute count + # + # @param value the value to set the attribute count to. + # + # source://pry//lib/pry/slop/option.rb#23 + def count=(_arg0); end + + # Returns the value of attribute description. + # + # source://pry//lib/pry/slop/option.rb#22 + def description; end + + # Returns true if this option expects an argument. + # + # @return [Boolean] + # + # source://pry//lib/pry/slop/option.rb#67 + def expects_argument?; end + + # Returns the help String for this option. + # + # source://pry//lib/pry/slop/option.rb#140 + def help; end + + # Returns the String inspection text. + # + # source://pry//lib/pry/slop/option.rb#143 + def inspect; end + + # Returns the String flag of this option. Preferring the long flag. + # + # source://pry//lib/pry/slop/option.rb#77 + def key; end + + # Returns the value of attribute long. + # + # source://pry//lib/pry/slop/option.rb#22 + def long; end + + # Returns the value of attribute short. + # + # source://pry//lib/pry/slop/option.rb#22 + def short; end + + # Returns the help String for this option. + # + # source://pry//lib/pry/slop/option.rb#124 + def to_s; end + + # Returns the value of attribute types. + # + # source://pry//lib/pry/slop/option.rb#22 + def types; end + + # Fetch the argument value for this option. + # + # Returns the Object once any type conversions have taken place. + # + # source://pry//lib/pry/slop/option.rb#108 + def value; end + + # Set the new argument value for this option. + # + # We use this setter method to handle concatenating lists. That is, + # when an array type is specified and used more than once, values from + # both options will be grouped together and flattened into a single array. + # + # source://pry//lib/pry/slop/option.rb#93 + def value=(new_value); end + + private + + # Convert an object to a Float if possible. + # + # value - The Object we want to convert to a float. + # + # Returns the Float value if possible to convert, else a zero. + # + # source://pry//lib/pry/slop/option.rb#173 + def value_to_float(value); end + + # Convert an object to an Integer if possible. + # + # value - The Object we want to convert to an integer. + # + # Returns the Integer value if possible to convert, else a zero. + # + # source://pry//lib/pry/slop/option.rb#156 + def value_to_integer(value); end + + # Convert an object to a Range if possible. + # + # value - The Object we want to convert to a range. + # + # Returns the Range value if one could be found, else the original object. + # + # source://pry//lib/pry/slop/option.rb#190 + def value_to_range(value); end +end + +# The default Hash of configuration options this class uses. +# +# source://pry//lib/pry/slop/option.rb#7 +Pry::Slop::Option::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://pry//lib/pry/slop.rb#9 +Pry::Slop::VERSION = T.let(T.unsafe(nil), String) + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/syntax_highlighter.rb#8 +class Pry::SyntaxHighlighter + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#9 + def highlight(code, language = T.unsafe(nil)); end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#17 + def keyword_token_color; end + + # Sets comment token to blue (black by default), so it's more legible. + # + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#22 + def overwrite_coderay_comment_token!; end + + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/syntax_highlighter.rb#13 + def tokenize(code, language = T.unsafe(nil)); end + end +end + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/system_command_handler.rb#6 +module Pry::SystemCommandHandler + class << self + # @api private + # @since v0.13.0 + # + # source://pry//lib/pry/system_command_handler.rb#8 + def default(output, command, _pry_instance); end + end +end + +# Catches SecurityErrors if $SAFE is set +# +# source://pry//lib/pry/exceptions.rb#28 +module Pry::TooSafeException + class << self + # source://pry//lib/pry/exceptions.rb#29 + def ===(exception); end + end +end + +# An Exception Tag (cf. Exceptional Ruby) that instructs Pry to show the error +# in a more user-friendly manner. This should be used when the exception +# happens within Pry itself as a direct consequence of the user typing +# something wrong. +# +# This allows us to distinguish between the user typing: +# +# pry(main)> def ) +# SyntaxError: unexpected ) +# +# pry(main)> method_that_evals("def )") +# SyntaxError: (eval):1: syntax error, unexpected ')' +# from ./a.rb:2 in `eval' +# +# source://pry//lib/pry/exceptions.rb#51 +module Pry::UserError; end + +# source://pry//lib/pry/version.rb#4 +Pry::VERSION = T.let(T.unsafe(nil), String) + +# @api private +# @since v0.13.0 +# +# source://pry//lib/pry/warning.rb#6 +module Pry::Warning + class << self + # Prints a warning message with exact file and line location, similar to how + # Ruby's -W prints warnings. + # + # @api private + # @param message [String] + # @return [void] + # @since v0.13.0 + # + # source://pry//lib/pry/warning.rb#12 + def warn(message); end + end +end + +# source://pry//lib/pry/wrapped_module.rb#16 +class Pry::WrappedModule + include ::Pry::Helpers::BaseHelpers + include ::Pry::CodeObject::Helpers + + # @param mod [Module] + # @raise [ArgumentError] if the argument is not a `Module` + # @return [WrappedModule] a new instance of WrappedModule + # + # source://pry//lib/pry/wrapped_module.rb#56 + def initialize(mod); end + + # Return a candidate for this module of specified rank. A `rank` + # of 0 is equivalent to the 'primary candidate', which is the + # module definition with the highest number of methods. A `rank` + # of 1 is the module definition with the second highest number of + # methods, and so on. Module candidates are necessary as modules + # can be reopened multiple times and in multiple places in Ruby, + # the candidate API gives you access to the module definition + # representing each of those reopenings. + # + # @param rank [Fixnum] + # @raise [Pry::CommandError] If the `rank` is out of range. That + # is greater than `number_of_candidates - 1`. + # @return [Pry::WrappedModule::Candidate] + # + # source://pry//lib/pry/wrapped_module.rb#239 + def candidate(rank); end + + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#250 + def candidates; end + + # Is this strictly a class? + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#126 + def class?; end + + # Returns an array of the names of the constants accessible in the wrapped + # module. This avoids the problem of accidentally calling the singleton + # method `Module.constants`. + # + # @param inherit [Boolean] Include the names of constants from included + # modules? + # + # source://pry//lib/pry/wrapped_module.rb#76 + def constants(inherit = T.unsafe(nil)); end + + # Returns documentation for the module. + # This documentation is for the primary candidate, if + # you would like documentation for other candidates use + # `WrappedModule#candidate` to select the candidate you're + # interested in. + # + # @raise [Pry::CommandError] If documentation cannot be found. + # @return [String] The documentation for the module. + # + # source://pry//lib/pry/wrapped_module.rb#195 + def doc; end + + # @return [String, nil] The associated file for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#176 + def file; end + + # @return [Fixnum, nil] The associated line for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#183 + def line; end + + # Forward method invocations to the wrapped module + # + # source://pry//lib/pry/wrapped_module.rb#150 + def method_missing(method_name, *args, &block); end + + # The prefix that would appear before methods defined on this class. + # + # i.e. the "String." or "String#" in String.new and String#initialize. + # + # @return String + # + # source://pry//lib/pry/wrapped_module.rb#85 + def method_prefix; end + + # Is this strictly a module? (does not match classes) + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#120 + def module?; end + + # The name of the Module if it has one, otherwise #. + # + # @return [String] + # + # source://pry//lib/pry/wrapped_module.rb#100 + def nonblank_name; end + + # @return [Fixnum] The number of candidate definitions for the + # current module. + # + # source://pry//lib/pry/wrapped_module.rb#245 + def number_of_candidates; end + + # Is this a singleton class? + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#110 + def singleton_class?; end + + # Get the instance associated with this singleton class. + # + # @raise ArgumentError: tried to get instance of non singleton class + # @return [Object] + # + # source://pry//lib/pry/wrapped_module.rb#135 + def singleton_instance; end + + # Returns the source for the module. + # This source is for the primary candidate, if + # you would like source for other candidates use + # `WrappedModule#candidate` to select the candidate you're + # interested in. + # + # @raise [Pry::CommandError] If source cannot be found. + # @return [String] The source for the module. + # + # source://pry//lib/pry/wrapped_module.rb#206 + def source; end + + # @return [String, nil] The associated file for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#179 + def source_file; end + + # @return [Fixnum, nil] The associated line for the module (i.e + # the primary candidate: highest ranked monkeypatch). + # + # source://pry//lib/pry/wrapped_module.rb#186 + def source_line; end + + # Retrieve the source location of a module. Return value is in same + # format as Method#source_location. If the source location + # cannot be found this method returns `nil`. + # + # @return [Array, nil] The source location of the + # module (or class), or `nil` if no source location found. + # + # source://pry//lib/pry/wrapped_module.rb#168 + def source_location; end + + # @param times [Fixnum] How far to travel up the ancestor chain. + # @return [Pry::WrappedModule, nil] The wrapped module that is the + # superclass. + # When `self` is a `Module` then return the + # nth ancestor, otherwise (in the case of classes) return the + # nth ancestor that is a class. + # + # source://pry//lib/pry/wrapped_module.rb#270 + def super(times = T.unsafe(nil)); end + + # Returns the value of attribute wrapped. + # + # source://pry//lib/pry/wrapped_module.rb#20 + def wrapped; end + + # @return [String] Return the YARD docs for this module. + # + # source://pry//lib/pry/wrapped_module.rb#223 + def yard_doc; end + + # @return [Boolean] Whether YARD docs are available for this module. + # + # source://pry//lib/pry/wrapped_module.rb#260 + def yard_docs?; end + + # @return [String] Return the associated file for the + # module from YARD, if one exists. + # + # source://pry//lib/pry/wrapped_module.rb#212 + def yard_file; end + + # @return [Fixnum] Return the associated line for the + # module from YARD, if one exists. + # + # source://pry//lib/pry/wrapped_module.rb#218 + def yard_line; end + + private + + # Return all methods (instance methods and class methods) for a + # given module. + # + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#347 + def all_methods_for(mod); end + + # We only want methods that have a non-nil `source_location`. We also + # skip some spooky internal methods. + # + # @return [Array] + # + # source://pry//lib/pry/wrapped_module.rb#329 + def all_relevant_methods_for(mod); end + + # A helper method. + # + # source://pry//lib/pry/wrapped_module.rb#310 + def all_source_locations_by_popularity; end + + # memoized lines for file + # + # source://pry//lib/pry/wrapped_module.rb#371 + def lines_for_file(file); end + + # @return [Array>] The array of `Pry::Method` objects, + # there are two associated with each candidate. The first is the 'base + # method' for a candidate and it serves as the start point for + # the search in uncovering the module definition. The second is + # the last method defined for that candidate and it is used to + # speed up source code extraction. + # + # source://pry//lib/pry/wrapped_module.rb#302 + def method_candidates; end + + # Detect methods that are defined with `def_delegator` from the Forwardable + # module. We want to reject these methods as they screw up module + # extraction since the `source_location` for such methods points at forwardable.rb + # TODO: make this more robust as valid user-defined files called + # forwardable.rb are also skipped. + # + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#366 + def method_defined_by_forwardable_module?(method); end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#351 + def nested_module?(parent, name); end + + # @return [Pry::WrappedModule::Candidate] The candidate with the + # highest rank, that is the 'monkey patch' of this module with the + # highest number of methods, which contains a source code line that + # defines the module. It is considered the 'canonical' definition + # for the module. In the absence of a suitable candidate, the + # candidate of rank 0 will be returned, or a CommandError raised if + # there are no candidates at all. + # + # source://pry//lib/pry/wrapped_module.rb#292 + def primary_candidate; end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#158 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end + + class << self + # Convert a string to a module. + # + # @example + # Pry::WrappedModule.from_str("Pry::Code") + # @param mod_name [String] + # @param target [Binding] The binding where the lookup takes place. + # @return [Module, nil] The module or `nil` (if conversion failed). + # + # source://pry//lib/pry/wrapped_module.rb#29 + def from_str(mod_name, target = T.unsafe(nil)); end + + private + + # We use this method to decide whether code is safe to eval. Method's are + # generally not, but everything else is. + # TODO: is just checking != "method" enough?? + # TODO: see duplication of this method in Pry::CodeObject + # + # @param str [String] The string to lookup. + # @param target [Binding] Where the lookup takes place. + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module.rb#45 + def safe_to_evaluate?(str, target); end + end +end + +# This class represents a single candidate for a module/class definition. +# It provides access to the source, documentation, line and file +# for a monkeypatch (reopening) of a class/module. +# +# source://pry//lib/pry/wrapped_module/candidate.rb#8 +class Pry::WrappedModule::Candidate + include ::Pry::Helpers::DocumentationHelpers + include ::Pry::CodeObject::Helpers + extend ::Forwardable + extend ::Pry::Forwardable + + # @param rank [Fixnum] The rank of the candidate to + # retrieve. Passing 0 returns 'primary candidate' (the candidate with largest + # number of methods), passing 1 retrieves candidate with + # second largest number of methods, and so on, up to + # `Pry::WrappedModule#number_of_candidates() - 1` + # @param wrapper [Pry::WrappedModule] The associated + # `Pry::WrappedModule` instance that owns the candidates. + # @raise [Pry::CommandError] If `rank` is out of bounds. + # @return [Candidate] a new instance of Candidate + # + # source://pry//lib/pry/wrapped_module/candidate.rb#38 + def initialize(wrapper, rank); end + + # source://pry//lib/pry/wrapped_module/candidate.rb#27 + def class?(*args, **_arg1, &block); end + + # @raise [Pry::CommandError] If documentation cannot be found. + # @return [String] The documentation for the candidate. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#70 + def doc; end + + # @return [String] The file where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#14 + def file; end + + # @return [Fixnum] The line where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#18 + def line; end + + # source://pry//lib/pry/wrapped_module/candidate.rb#27 + def module?(*args, **_arg1, &block); end + + # source://pry//lib/pry/wrapped_module/candidate.rb#27 + def nonblank_name(*args, **_arg1, &block); end + + # source://pry//lib/pry/wrapped_module/candidate.rb#27 + def number_of_candidates(*args, **_arg1, &block); end + + # @raise [Pry::CommandError] If source code cannot be found. + # @return [String] The source for the candidate, i.e the + # complete module/class definition. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#59 + def source; end + + # @return [String] The file where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#15 + def source_file; end + + # @return [Fixnum] The line where the module definition is located. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#19 + def source_line; end + + # @return [Array, nil] A `[String, Fixnum]` pair representing the + # source location (file and line) for the candidate or `nil` + # if no source location found. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#79 + def source_location; end + + # source://pry//lib/pry/wrapped_module/candidate.rb#27 + def wrapped(*args, **_arg1, &block); end + + private + + # Locate the first line of the module definition. + # + # @param file [String] The file that contains the module + # definition (somewhere). + # @param line [Fixnum] The module definition should appear + # before this line (if it exists). + # @return [Fixnum] The line where the module is defined. This + # line number is one-indexed. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#99 + def first_line_of_module_definition(file, line); end + + # This method is used by `Candidate#source_location` as a + # starting point for the search for the candidate's definition. + # + # @return [Array] The source location of the base method used to + # calculate the source location of the candidate. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#116 + def first_method_source_location; end + + # @return [Array] The source location of the last method in this + # candidate's module definition. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#122 + def last_method_source_location; end + + # source://pry//lib/pry/wrapped_module/candidate.rb#28 + def lines_for_file(*a, &b); end + + # source://pry//lib/pry/wrapped_module/candidate.rb#28 + def method_candidates(*a, &b); end + + # @return [Boolean] + # + # source://pry//lib/pry/wrapped_module/candidate.rb#104 + def module_definition_first_line?(line); end + + # source://pry//lib/pry/wrapped_module/candidate.rb#28 + def name(*a, &b); end + + # Return the number of lines between the start of the class definition and + # the start of the last method. We use this value so we can quickly grab + # these lines from the file (without having to check each intervening line + # for validity, which is expensive) speeding up source extraction. + # + # @return [Integer] number of lines. + # + # source://pry//lib/pry/wrapped_module/candidate.rb#132 + def number_of_lines_in_first_chunk; end + + # source://pry//lib/pry/wrapped_module/candidate.rb#28 + def yard_docs?(*a, &b); end +end diff --git a/sorbet/rbi/gems/public_suffix@7.0.5.rbi b/sorbet/rbi/gems/public_suffix@7.0.5.rbi new file mode 100644 index 0000000..6e03d22 --- /dev/null +++ b/sorbet/rbi/gems/public_suffix@7.0.5.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `public_suffix` gem. +# Please instead update this file by running `bin/tapioca gem public_suffix`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi b/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi new file mode 100644 index 0000000..0230ef8 --- /dev/null +++ b/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails-dom-testing` gem. +# Please instead update this file by running `bin/tapioca gem rails-dom-testing`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rails-html-sanitizer@1.7.0.rbi b/sorbet/rbi/gems/rails-html-sanitizer@1.7.0.rbi new file mode 100644 index 0000000..e0bea21 --- /dev/null +++ b/sorbet/rbi/gems/rails-html-sanitizer@1.7.0.rbi @@ -0,0 +1,650 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rails-html-sanitizer` gem. +# Please instead update this file by running `bin/tapioca gem rails-html-sanitizer`. + + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#14 +module ActionView; end + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#15 +module ActionView::Helpers + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::UrlHelper + include ::ActionView::Helpers::SanitizeHelper + include ::ActionView::Helpers::TextHelper + include ::ActionView::Helpers::FormTagHelper + include ::ActionView::Helpers::FormHelper + include ::ActionView::Helpers::TranslationHelper + + mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods +end + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#16 +module ActionView::Helpers::SanitizeHelper + mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods +end + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#17 +module ActionView::Helpers::SanitizeHelper::ClassMethods + # Replaces the allowed HTML attributes for the +sanitize+ helper. + # + # class Application < Rails::Application + # config.action_view.sanitized_allowed_attributes = ['onclick', 'longdesc'] + # end + # + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#34 + def sanitized_allowed_attributes=(attributes); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_css_keywords; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_css_keywords=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_css_properties; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_css_properties=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_allowed_protocols; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_allowed_protocols=(_); end + + # Replaces the allowed tags for the +sanitize+ helper. + # + # class Application < Rails::Application + # config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td' + # end + # + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#24 + def sanitized_allowed_tags=(tags); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_bad_tags; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_bad_tags=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_protocol_separator; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_protocol_separator=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_shorthand_css_properties; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_shorthand_css_properties=(_); end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#47 + def sanitized_uri_attributes; end + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#48 + def sanitized_uri_attributes=(_); end + + private + + # source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#52 + def deprecate_option(name); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#3 +module Rails; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#4 +module Rails::HTML; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#198 +module Rails::HTML4; end + +# == Rails::HTML4::FullSanitizer +# +# Removes all tags from HTML4 but strips out scripts, forms and comments. +# +# full_sanitizer = Rails::HTML4::FullSanitizer.new +# full_sanitizer.sanitize("Bold no more! See more here...") +# # => "Bold no more! See more here..." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#229 +class Rails::HTML4::FullSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML4 + include ::Rails::HTML::Concern::Scrubber::Full + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML4::LinkSanitizer +# +# Removes +a+ tags and +href+ attributes from HTML4 leaving only the link text. +# +# link_sanitizer = Rails::HTML4::LinkSanitizer.new +# link_sanitizer.sanitize('Only the link text will be kept.') +# # => "Only the link text will be kept." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#244 +class Rails::HTML4::LinkSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML4 + include ::Rails::HTML::Concern::Scrubber::Link + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML4::SafeListSanitizer +# +# Sanitizes HTML4 and CSS from an extensive safe list. +# +# === Whitespace +# +# We can't make any guarantees about whitespace being kept or stripped. Loofah uses Nokogiri, +# which wraps either a C or Java parser for the respective Ruby implementation. Those two +# parsers determine how whitespace is ultimately handled. +# +# When the stripped markup will be rendered the users browser won't take whitespace into account +# anyway. It might be better to suggest your users wrap their whitespace sensitive content in +# pre tags or that you do so automatically. +# +# === Options +# +# Sanitizes both html and css via the safe lists found in +# Rails::HTML::Concern::Scrubber::SafeList +# +# SafeListSanitizer also accepts options to configure the safe list used when sanitizing html. +# There's a class level option: +# +# Rails::HTML4::SafeListSanitizer.allowed_tags = %w(table tr td) +# Rails::HTML4::SafeListSanitizer.allowed_attributes = %w(id class style) +# +# Tags and attributes can also be passed to +sanitize+. Passed options take precedence over the +# class level options. +# +# === Examples +# +# safe_list_sanitizer = Rails::HTML4::SafeListSanitizer.new +# +# # default: sanitize via a extensive safe list of allowed elements +# safe_list_sanitizer.sanitize(@article.body) +# +# # sanitize via the supplied tags and attributes +# safe_list_sanitizer.sanitize( +# @article.body, +# tags: %w(table tr td), +# attributes: %w(id class style), +# ) +# +# # sanitize via a custom Loofah scrubber +# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new) +# +# # prune nodes from the tree instead of stripping tags and leaving inner content +# safe_list_sanitizer = Rails::HTML4::SafeListSanitizer.new(prune: true) +# +# # the sanitizer can also sanitize CSS +# safe_list_sanitizer.sanitize_css('background-color: #000;') +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#302 +class Rails::HTML4::SafeListSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML4 + include ::Rails::HTML::Concern::Scrubber::SafeList + include ::Rails::HTML::Concern::Serializer::UTF8Encode + + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#149 + def allowed_attributes; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#149 + def allowed_attributes=(_arg0); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#148 + def allowed_tags; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#148 + def allowed_tags=(_arg0); end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#199 +module Rails::HTML4::Sanitizer + extend ::Rails::HTML4::Sanitizer::VendorMethods +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#200 +module Rails::HTML4::Sanitizer::VendorMethods + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#201 + def full_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#205 + def link_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#209 + def safe_list_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#213 + def white_list_sanitizer; end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#310 +module Rails::HTML5; end + +# == Rails::HTML5::FullSanitizer +# +# Removes all tags from HTML5 but strips out scripts, forms and comments. +# +# full_sanitizer = Rails::HTML5::FullSanitizer.new +# full_sanitizer.sanitize("Bold no more! See more here...") +# # => "Bold no more! See more here..." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#339 +class Rails::HTML5::FullSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML5 + include ::Rails::HTML::Concern::Scrubber::Full + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML5::LinkSanitizer +# +# Removes +a+ tags and +href+ attributes from HTML5 leaving only the link text. +# +# link_sanitizer = Rails::HTML5::LinkSanitizer.new +# link_sanitizer.sanitize('Only the link text will be kept.') +# # => "Only the link text will be kept." +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#354 +class Rails::HTML5::LinkSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML5 + include ::Rails::HTML::Concern::Scrubber::Link + include ::Rails::HTML::Concern::Serializer::UTF8Encode +end + +# == Rails::HTML5::SafeListSanitizer +# +# Sanitizes HTML5 and CSS from an extensive safe list. +# +# === Whitespace +# +# We can't make any guarantees about whitespace being kept or stripped. Loofah uses Nokogiri, +# which wraps either a C or Java parser for the respective Ruby implementation. Those two +# parsers determine how whitespace is ultimately handled. +# +# When the stripped markup will be rendered the users browser won't take whitespace into account +# anyway. It might be better to suggest your users wrap their whitespace sensitive content in +# pre tags or that you do so automatically. +# +# === Options +# +# Sanitizes both html and css via the safe lists found in +# Rails::HTML::Concern::Scrubber::SafeList +# +# SafeListSanitizer also accepts options to configure the safe list used when sanitizing html. +# There's a class level option: +# +# Rails::HTML5::SafeListSanitizer.allowed_tags = %w(table tr td) +# Rails::HTML5::SafeListSanitizer.allowed_attributes = %w(id class style) +# +# Tags and attributes can also be passed to +sanitize+. Passed options take precedence over the +# class level options. +# +# === Examples +# +# safe_list_sanitizer = Rails::HTML5::SafeListSanitizer.new +# +# # default: sanitize via a extensive safe list of allowed elements +# safe_list_sanitizer.sanitize(@article.body) +# +# # sanitize via the supplied tags and attributes +# safe_list_sanitizer.sanitize( +# @article.body, +# tags: %w(table tr td), +# attributes: %w(id class style), +# ) +# +# # sanitize via a custom Loofah scrubber +# safe_list_sanitizer.sanitize(@article.body, scrubber: ArticleScrubber.new) +# +# # prune nodes from the tree instead of stripping tags and leaving inner content +# safe_list_sanitizer = Rails::HTML5::SafeListSanitizer.new(prune: true) +# +# # the sanitizer can also sanitize CSS +# safe_list_sanitizer.sanitize_css('background-color: #000;') +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#412 +class Rails::HTML5::SafeListSanitizer < ::Rails::HTML::Sanitizer + include ::Rails::HTML::Concern::ComposedSanitize + include ::Rails::HTML::Concern::Parser::HTML5 + include ::Rails::HTML::Concern::Scrubber::SafeList + include ::Rails::HTML::Concern::Serializer::UTF8Encode + + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#149 + def allowed_attributes; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#149 + def allowed_attributes=(_arg0); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#148 + def allowed_tags; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#148 + def allowed_tags=(_arg0); end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#311 +class Rails::HTML5::Sanitizer + class << self + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#313 + def full_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#317 + def link_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#321 + def safe_list_sanitizer; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#325 + def white_list_sanitizer; end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#37 +module Rails::HTML::Concern; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#38 +module Rails::HTML::Concern::ComposedSanitize + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#39 + def sanitize(html, options = T.unsafe(nil)); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#47 +module Rails::HTML::Concern::Parser; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#48 +module Rails::HTML::Concern::Parser::HTML4 + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#49 + def parse_fragment(html); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#54 +module Rails::HTML::Concern::Parser::HTML5 + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#55 + def parse_fragment(html); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#61 +module Rails::HTML::Concern::Scrubber; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#62 +module Rails::HTML::Concern::Scrubber::Full + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#63 + def scrub(fragment, options = T.unsafe(nil)); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#68 +module Rails::HTML::Concern::Scrubber::Link + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#69 + def initialize; end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#76 + def scrub(fragment, options = T.unsafe(nil)); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#81 +module Rails::HTML::Concern::Scrubber::SafeList + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#156 + def initialize(prune: T.unsafe(nil)); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#173 + def sanitize_css(style_string); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#160 + def scrub(fragment, options = T.unsafe(nil)); end + + private + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#182 + def allowed_attributes(options); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#178 + def allowed_tags(options); end + + class << self + # @private + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#146 + def included(klass); end + end +end + +# The default safe list for attributes +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#130 +Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_ATTRIBUTES = T.let(T.unsafe(nil), Set) + +# The default safe list for tags +# +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#83 +Rails::HTML::Concern::Scrubber::SafeList::DEFAULT_ALLOWED_TAGS = T.let(T.unsafe(nil), Set) + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#188 +module Rails::HTML::Concern::Serializer; end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#189 +module Rails::HTML::Concern::Serializer::UTF8Encode + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#190 + def serialize(fragment); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#422 +Rails::HTML::FullSanitizer = Rails::HTML4::FullSanitizer + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#423 +Rails::HTML::LinkSanitizer = Rails::HTML4::LinkSanitizer + +# === Rails::HTML::PermitScrubber +# +# +Rails::HTML::PermitScrubber+ allows you to permit only your own tags and/or attributes. +# +# +Rails::HTML::PermitScrubber+ can be subclassed to determine: +# - When a node should be skipped via +skip_node?+. +# - When a node is allowed via +allowed_node?+. +# - When an attribute should be scrubbed via +scrub_attribute?+. +# +# Subclasses don't need to worry if tags or attributes are set or not. +# If tags or attributes are not set, Loofah's behavior will be used. +# If you override +allowed_node?+ and no tags are set, it will not be called. +# Instead Loofahs behavior will be used. +# Likewise for +scrub_attribute?+ and attributes respectively. +# +# Text and CDATA nodes are skipped by default. +# Unallowed elements will be stripped, i.e. element is removed but its subtree kept. +# Supplied tags and attributes should be Enumerables. +# +# +tags=+ +# If set, elements excluded will be stripped. +# If not, elements are stripped based on Loofahs +HTML5::Scrub.allowed_element?+. +# +# +attributes=+ +# If set, attributes excluded will be removed. +# If not, attributes are removed based on Loofahs +HTML5::Scrub.scrub_attributes+. +# +# class CommentScrubber < Rails::HTML::PermitScrubber +# def initialize +# super +# self.tags = %w(form script comment blockquote) +# end +# +# def skip_node?(node) +# node.text? +# end +# +# def scrub_attribute?(name) +# name == "style" +# end +# end +# +# See the documentation for +Nokogiri::XML::Node+ to understand what's possible +# with nodes: https://nokogiri.org/rdoc/Nokogiri/XML/Node.html +# +# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#49 +class Rails::HTML::PermitScrubber < ::Loofah::Scrubber + # @return [PermitScrubber] a new instance of PermitScrubber + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#52 + def initialize(prune: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + def attributes; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#62 + def attributes=(attributes); end + + # Returns the value of attribute prune. + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + def prune; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#66 + def scrub(node); end + + # Returns the value of attribute tags. + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#50 + def tags; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#58 + def tags=(tags); end + + protected + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#83 + def allowed_node?(node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#95 + def keep_node?(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#162 + def scrub_attribute(node, attr_node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#91 + def scrub_attribute?(name); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#112 + def scrub_attributes(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#128 + def scrub_css_attribute(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#103 + def scrub_node(node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#87 + def skip_node?(node); end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#137 + def validate!(var, name); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#424 +Rails::HTML::SafeListSanitizer = Rails::HTML4::SafeListSanitizer + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#5 +class Rails::HTML::Sanitizer + extend ::Rails::HTML4::Sanitizer::VendorMethods + + # @raise [NotImplementedError] + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#22 + def sanitize(html, options = T.unsafe(nil)); end + + private + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#32 + def properly_encode(fragment, options); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#27 + def remove_xpaths(node, xpaths); end + + class << self + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#17 + def allowed_uri?(uri_string); end + + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#13 + def best_supported_vendor; end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#7 + def html5_support?; end + end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer/version.rb#6 +Rails::HTML::Sanitizer::VERSION = T.let(T.unsafe(nil), String) + +# === Rails::HTML::TargetScrubber +# +# Where +Rails::HTML::PermitScrubber+ picks out tags and attributes to permit in +# sanitization, +Rails::HTML::TargetScrubber+ targets them for removal. +# +# +tags=+ +# If set, elements included will be stripped. +# +# +attributes=+ +# If set, attributes included will be removed. +# +# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#195 +class Rails::HTML::TargetScrubber < ::Rails::HTML::PermitScrubber + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#196 + def allowed_node?(node); end + + # @return [Boolean] + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#200 + def scrub_attribute?(name); end +end + +# === Rails::HTML::TextOnlyScrubber +# +# +Rails::HTML::TextOnlyScrubber+ allows you to permit text nodes. +# +# Unallowed elements will be stripped, i.e. element is removed but its subtree kept. +# +# source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#210 +class Rails::HTML::TextOnlyScrubber < ::Loofah::Scrubber + # @return [TextOnlyScrubber] a new instance of TextOnlyScrubber + # + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#211 + def initialize; end + + # source://rails-html-sanitizer//lib/rails/html/scrubbers.rb#215 + def scrub(node); end +end + +# source://rails-html-sanitizer//lib/rails/html/sanitizer.rb#425 +Rails::HTML::WhiteListSanitizer = Rails::HTML4::SafeListSanitizer + +# source://rails-html-sanitizer//lib/rails-html-sanitizer.rb#11 +Rails::Html = Rails::HTML diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi index a1a4eb4..62c9183 100644 --- a/sorbet/rbi/gems/rainbow@3.1.1.rbi +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -4,10 +4,9 @@ # This is an autogenerated file for types exported from the `rainbow` gem. # Please instead update this file by running `bin/tapioca gem rainbow`. + class Object < ::BasicObject include ::Kernel - include ::ActiveSupport::ForkTracker::CoreExt - include ::ActiveSupport::ForkTracker::CoreExtPrivate include ::PP::ObjectMixin private @@ -146,7 +145,7 @@ class Rainbow::NullPresenter < ::String # source://rainbow//lib/rainbow/null_presenter.rb#9 def background(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#9 + # source://rainbow//lib/rainbow/null_presenter.rb#95 def bg(*_values); end # source://rainbow//lib/rainbow/null_presenter.rb#49 @@ -158,7 +157,7 @@ class Rainbow::NullPresenter < ::String # source://rainbow//lib/rainbow/null_presenter.rb#65 def blue; end - # source://rainbow//lib/rainbow/null_presenter.rb#17 + # source://rainbow//lib/rainbow/null_presenter.rb#96 def bold; end # source://rainbow//lib/rainbow/null_presenter.rb#17 @@ -173,16 +172,16 @@ class Rainbow::NullPresenter < ::String # source://rainbow//lib/rainbow/null_presenter.rb#73 def cyan; end - # source://rainbow//lib/rainbow/null_presenter.rb#21 + # source://rainbow//lib/rainbow/null_presenter.rb#97 def dark; end # source://rainbow//lib/rainbow/null_presenter.rb#21 def faint; end - # source://rainbow//lib/rainbow/null_presenter.rb#5 + # source://rainbow//lib/rainbow/null_presenter.rb#94 def fg(*_values); end - # source://rainbow//lib/rainbow/null_presenter.rb#5 + # source://rainbow//lib/rainbow/null_presenter.rb#93 def foreground(*_values); end # source://rainbow//lib/rainbow/null_presenter.rb#57 @@ -209,7 +208,7 @@ class Rainbow::NullPresenter < ::String # source://rainbow//lib/rainbow/null_presenter.rb#13 def reset; end - # source://rainbow//lib/rainbow/null_presenter.rb#45 + # source://rainbow//lib/rainbow/null_presenter.rb#98 def strike; end # source://rainbow//lib/rainbow/null_presenter.rb#29 @@ -238,7 +237,7 @@ class Rainbow::Presenter < ::String # Sets background color of this text. # - # source://rainbow//lib/rainbow/presenter.rb#30 + # source://rainbow//lib/rainbow/presenter.rb#34 def bg(*values); end # source://rainbow//lib/rainbow/presenter.rb#92 @@ -255,7 +254,7 @@ class Rainbow::Presenter < ::String # Turns on bright/bold for this text. # - # source://rainbow//lib/rainbow/presenter.rb#45 + # source://rainbow//lib/rainbow/presenter.rb#49 def bold; end # Turns on bright/bold for this text. @@ -277,7 +276,7 @@ class Rainbow::Presenter < ::String # Turns on faint/dark for this text (not well supported by terminal # emulators). # - # source://rainbow//lib/rainbow/presenter.rb#53 + # source://rainbow//lib/rainbow/presenter.rb#57 def dark; end # Turns on faint/dark for this text (not well supported by terminal @@ -288,12 +287,12 @@ class Rainbow::Presenter < ::String # Sets color of this text. # - # source://rainbow//lib/rainbow/presenter.rb#22 + # source://rainbow//lib/rainbow/presenter.rb#27 def fg(*values); end # Sets color of this text. # - # source://rainbow//lib/rainbow/presenter.rb#22 + # source://rainbow//lib/rainbow/presenter.rb#26 def foreground(*values); end # source://rainbow//lib/rainbow/presenter.rb#100 @@ -335,7 +334,7 @@ class Rainbow::Presenter < ::String # source://rainbow//lib/rainbow/presenter.rb#40 def reset; end - # source://rainbow//lib/rainbow/presenter.rb#86 + # source://rainbow//lib/rainbow/presenter.rb#90 def strike; end # Turns on underline decoration for this text. diff --git a/sorbet/rbi/gems/rake@13.3.1.rbi b/sorbet/rbi/gems/rake@13.3.1.rbi new file mode 100644 index 0000000..b43366d --- /dev/null +++ b/sorbet/rbi/gems/rake@13.3.1.rbi @@ -0,0 +1,3031 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rake` gem. +# Please instead update this file by running `bin/tapioca gem rake`. + + +# :stopdoc: +# +# Some top level Constants. +# +# source://rake//lib/rake.rb#67 +FileList = Rake::FileList + +# -- +# This a FileUtils extension that defines several additional commands to be +# added to the FileUtils utility functions. +# +# source://rake//lib/rake/file_utils.rb#8 +module FileUtils + # Run a Ruby interpreter with the given arguments. + # + # Example: + # ruby %{-pe '$_.upcase!' ; rm # -rf /. + # + # If a block is given, upon command completion the block is called with an + # OK flag (true on a zero exit status) and a Process::Status object. + # Without a block a RuntimeError is raised when the command exits non-zero. + # + # Examples: + # + # sh 'ls -ltr' + # + # sh 'ls', 'file with spaces' + # + # # check exit status after command runs + # sh %{grep pattern file} do |ok, res| + # if !ok + # puts "pattern not found (status = #{res.exitstatus})" + # end + # end + # + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # Split a file path into individual directory names. + # + # Example: + # split_all("a/b/c") => ['a', 'b', 'c'] + # + # source://rake//lib/rake/file_utils.rb#126 + def split_all(path); end + + private + + # source://rake//lib/rake/file_utils.rb#61 + def create_shell_runner(cmd); end + + # source://rake//lib/rake/file_utils.rb#84 + def set_verbose_option(options); end + + # source://rake//lib/rake/file_utils.rb#71 + def sh_show_command(cmd); end +end + +# source://rake//lib/rake/file_utils.rb#106 +FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) + +# Path to the currently running Ruby program +# +# source://rake//lib/rake/file_utils.rb#10 +FileUtils::RUBY = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/ext/core.rb#2 +class Module + # Check for an existing method in the current class before extending. If + # the method already exists, then a warning is printed and the extension is + # not added. Otherwise the block is yielded and any definitions in the + # block will take effect. + # + # Usage: + # + # class String + # rake_extension("xyz") do + # def xyz + # ... + # end + # end + # end + # + # source://rake//lib/rake/ext/core.rb#18 + def rake_extension(method); end +end + +# source://rake//lib/rake.rb#24 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + class << self + # Add files to the rakelib list + # + # source://rake//lib/rake/rake_module.rb#33 + def add_rakelib(*files); end + + # Current Rake Application + # + # source://rake//lib/rake/rake_module.rb#8 + def application; end + + # Set the current Rake application object. + # + # source://rake//lib/rake/rake_module.rb#13 + def application=(app); end + + # Yield each file or directory component. + # + # source://rake//lib/rake/file_list.rb#418 + def each_dir_parent(dir); end + + # Convert Pathname and Pathname-like objects to strings; + # leave everything else alone + # + # source://rake//lib/rake/file_list.rb#429 + def from_pathname(path); end + + # Load a rakefile. + # + # source://rake//lib/rake/rake_module.rb#28 + def load_rakefile(path); end + + # Return the original directory where the Rake application was started. + # + # source://rake//lib/rake/rake_module.rb#23 + def original_dir; end + + # source://rake//lib/rake/rake_module.rb#17 + def suggested_thread_count; end + + # Make +block_application+ the default rake application inside a block so + # you can load rakefiles into a different application. + # + # This is useful when you want to run rake tasks inside a library without + # running rake in a sub-shell. + # + # Example: + # + # Dir.chdir 'other/directory' + # + # other_rake = Rake.with_application do |rake| + # rake.load_rakefile + # end + # + # puts other_rake.tasks + # + # source://rake//lib/rake/rake_module.rb#54 + def with_application(block_application = T.unsafe(nil)); end + end +end + +# Rake main application object. When invoking +rake+ from the +# command line, a Rake::Application object is created and run. +# +# source://rake//lib/rake/application.rb#19 +class Rake::Application + include ::Rake::TaskManager + include ::Rake::TraceOutput + + # Initialize a Rake::Application object. + # + # @return [Application] a new instance of Application + # + # source://rake//lib/rake/application.rb#49 + def initialize; end + + # Add a file to the list of files to be imported. + # + # source://rake//lib/rake/application.rb#800 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # source://rake//lib/rake/application.rb#161 + def add_loader(ext, loader); end + + # Collect the list of tasks on the command line. If no tasks are + # given, return a list containing only the default task. + # Environmental assignments are processed at this time as well. + # + # `args` is the list of arguments to peruse to get the list of tasks. + # It should be the command line that was given to rake, less any + # recognised command-line options, which OptionParser.parse will + # have taken care of already. + # + # source://rake//lib/rake/application.rb#781 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#795 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # source://rake//lib/rake/application.rb#288 + def deprecate(old_usage, new_usage, call_site); end + + # source://rake//lib/rake/application.rb#250 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # source://rake//lib/rake/application.rb#234 + def display_error_message(ex); end + + # source://rake//lib/rake/application.rb#275 + def display_exception_backtrace(ex); end + + # source://rake//lib/rake/application.rb#242 + def display_exception_details(ex); end + + # source://rake//lib/rake/application.rb#257 + def display_exception_details_seen; end + + # source://rake//lib/rake/application.rb#265 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # source://rake//lib/rake/application.rb#411 + def display_prerequisites; end + + # Display the tasks and comments. + # + # source://rake//lib/rake/application.rb#328 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # source://rake//lib/rake/application.rb#379 + def dynamic_width; end + + # source://rake//lib/rake/application.rb#383 + def dynamic_width_stty; end + + # source://rake//lib/rake/application.rb#387 + def dynamic_width_tput; end + + # Exit the program because of an unhandled exception. + # (may be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#229 + def exit_because_of_exception(ex); end + + # source://rake//lib/rake/application.rb#708 + def find_rakefile_location; end + + # Read and handle the command line options. Returns the command line + # arguments that we didn't understand, which should (in theory) be just + # task names and env vars. + # + # source://rake//lib/rake/application.rb#674 + def handle_options(argv); end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#261 + def has_cause?(ex); end + + # True if one of the files in RAKEFILES is in the current directory. + # If a match is found, it is copied into @rakefile. + # + # source://rake//lib/rake/application.rb#304 + def have_rakefile; end + + # Initialize the command line parameters and app name. + # + # source://rake//lib/rake/application.rb#88 + def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end + + # Invokes a task with arguments that are extracted from +task_string+ + # + # source://rake//lib/rake/application.rb#185 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # source://rake//lib/rake/application.rb#805 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # source://rake//lib/rake/application.rb#124 + def load_rakefile; end + + # The name of the application (typically 'rake') + # + # source://rake//lib/rake/application.rb#24 + def name; end + + # Application options from the command line + # + # source://rake//lib/rake/application.rb#167 + def options; end + + # The original directory where rake was invoked. + # + # source://rake//lib/rake/application.rb#27 + def original_dir; end + + # source://rake//lib/rake/application.rb#191 + def parse_task_string(string); end + + # source://rake//lib/rake/application.rb#720 + def print_rakefile_directory(location); end + + # Similar to the regular Ruby +require+ command, but will check + # for *.rake files in addition to *.rb files. + # + # source://rake//lib/rake/application.rb#694 + def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end + + # Name of the actual rakefile used. + # + # source://rake//lib/rake/application.rb#30 + def rakefile; end + + # source://rake//lib/rake/application.rb#821 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # source://rake//lib/rake/application.rb#725 + def raw_load_rakefile; end + + # Run the Rake application. The run method performs the following + # three steps: + # + # * Initialize the command line options (+init+). + # * Define the tasks (+load_rakefile+). + # * Run the top level tasks (+top_level+). + # + # If you wish to build a custom rake command, you should call + # +init+ on your application. Then define any tasks. Finally, + # call +top_level+ to run your top level tasks. + # + # source://rake//lib/rake/application.rb#79 + def run(argv = T.unsafe(nil)); end + + # Run the given block with the thread startup and shutdown. + # + # source://rake//lib/rake/application.rb#144 + def run_with_threads; end + + # source://rake//lib/rake/application.rb#830 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # source://rake//lib/rake/application.rb#213 + def standard_exception_handling; end + + # A list of all the standard options used in rake, suitable for + # passing to OptionParser. + # + # source://rake//lib/rake/application.rb#432 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # source://rake//lib/rake/application.rb#757 + def system_dir; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns=(_arg0); end + + # source://rake//lib/rake/application.rb#367 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # source://rake//lib/rake/application.rb#178 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # source://rake//lib/rake/application.rb#131 + def top_level; end + + # List of the top level task names (task names from the command line). + # + # source://rake//lib/rake/application.rb#36 + def top_level_tasks; end + + # source://rake//lib/rake/application.rb#418 + def trace(*strings); end + + # source://rake//lib/rake/application.rb#400 + def truncate(string, width); end + + # We will truncate output if we are outputting to a TTY or if we've been + # given an explicit column width to honor + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#323 + def truncate_output?; end + + # Override the detected TTY output state (mostly for testing) + # + # source://rake//lib/rake/application.rb#39 + def tty_output=(_arg0); end + + # True if we are outputting to TTY, false otherwise + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#317 + def tty_output?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#391 + def unix?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#396 + def windows?; end + + private + + # source://rake//lib/rake/application.rb#751 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#297 + def has_chain?(exception); end + + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#650 + def select_tasks_to_show(options, show_tasks, value); end + + # source://rake//lib/rake/application.rb#657 + def select_trace_output(options, trace_option, value); end + + # source://rake//lib/rake/application.rb#423 + def sort_options(options); end + + # source://rake//lib/rake/application.rb#767 + def standard_system_dir; end +end + +# source://rake//lib/rake/application.rb#41 +Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#3 +module Rake::Backtrace + class << self + # source://rake//lib/rake/backtrace.rb#19 + def collapse(backtrace); end + end +end + +# source://rake//lib/rake/backtrace.rb#8 +Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#12 +Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/backtrace.rb#17 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rake//lib/rake/backtrace.rb#4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#5 +Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) + +# Mixin for creating easily cloned objects. +# +# source://rake//lib/rake/cloneable.rb#6 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # source://rake//lib/rake/cloneable.rb#8 + def initialize_copy(source); end +end + +# source://rake//lib/rake/application.rb#13 +class Rake::CommandLineOptionError < ::StandardError; end + +# Based on a script at: +# http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed +# +# source://rake//lib/rake/cpu_counter.rb#6 +class Rake::CpuCounter + # source://rake//lib/rake/cpu_counter.rb#22 + def count; end + + # source://rake//lib/rake/cpu_counter.rb#11 + def count_with_default(default = T.unsafe(nil)); end + + class << self + # source://rake//lib/rake/cpu_counter.rb#7 + def count; end + end +end + +# DSL is a module that provides #task, #desc, #namespace, etc. Use this +# when you'd like to use rake outside the top level scope. +# +# For a Rakefile you run from the command line this module is automatically +# included. +# +# source://rake//lib/rake/dsl_definition.rb#14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # source://rake//lib/rake/dsl_definition.rb#24 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] do + # # ... run tests + # end + # + # source://rake//lib/rake/dsl_definition.rb#166 + def desc(description); end + + # Declare a set of files tasks to create the given directories on + # demand. + # + # Example: + # directory "testdata/doc" + # + # source://rake//lib/rake/dsl_definition.rb#92 + def directory(*args, &block); end + + # Declare a file task. + # + # Example: + # file "config.cfg" => ["config.template"] do + # open("config.cfg", "w") do |outfile| + # open("config.template") do |infile| + # while line = infile.gets + # outfile.puts line + # end + # end + # end + # end + # + # source://rake//lib/rake/dsl_definition.rb#76 + def file(*args, &block); end + + # Declare a file creation task. + # (Mainly used for the directory command). + # + # source://rake//lib/rake/dsl_definition.rb#82 + def file_create(*args, &block); end + + # Import the partial Rakefiles +fn+. Imported files are loaded + # _after_ the current file is completely loaded. This allows the + # import statement to appear anywhere in the importing file, and yet + # allowing the imported files to depend on objects defined in the + # importing file. + # + # A common use of the import statement is to include files + # containing dependency declarations. + # + # See also the --rakelibdir command line option. + # + # Example: + # import ".depend", "my_rules" + # + # source://rake//lib/rake/dsl_definition.rb#184 + def import(*fns); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def install(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def link(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # source://rake//lib/rake/dsl_definition.rb#113 + def multitask(*args, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # source://rake//lib/rake/dsl_definition.rb#136 + def namespace(name = T.unsafe(nil), &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rake_output_message(message); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#23 + def ruby(*args, **options, &block); end + + # Declare a rule for auto-tasks. + # + # Example: + # rule '.o' => '.c' do |t| + # sh 'cc', '-c', '-o', t.name, t.source + # end + # + # source://rake//lib/rake/dsl_definition.rb#152 + def rule(*args, &block); end + + # source://rake//lib/rake/dsl_definition.rb#23 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#23 + def sh(*cmd, &block); end + + # source://rake//lib/rake/dsl_definition.rb#23 + def split_all(path); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # source://rake//lib/rake/dsl_definition.rb#59 + def task(*args, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/dsl_definition.rb#24 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# source://rake//lib/rake/default_loader.rb#5 +class Rake::DefaultLoader + # Loads a rakefile into the current application from +fn+ + # + # source://rake//lib/rake/default_loader.rb#10 + def load(fn); end +end + +# source://rake//lib/rake/early_time.rb#21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# source://rake//lib/rake/task_arguments.rb#112 +Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) + +# EarlyTime is a fake timestamp that occurs _before_ any other time value. +# +# source://rake//lib/rake/early_time.rb#5 +class Rake::EarlyTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # source://rake//lib/rake/early_time.rb#12 + def <=>(other); end + + # source://rake//lib/rake/early_time.rb#16 + def to_s; end + + class << self + private + + # source://rake//lib/rake/early_time.rb#7 + def allocate; end + + # source://rake//lib/rake/early_time.rb#7 + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# source://rake//lib/rake/file_creation_task.rb#12 +class Rake::FileCreationTask < ::Rake::FileTask + # Is this file task needed? Yes if it doesn't exist. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_creation_task.rb#14 + def needed?; end + + # Time stamp for file creation task. This time stamp is earlier + # than any other time stamp. + # + # source://rake//lib/rake/file_creation_task.rb#20 + def timestamp; end +end + +# A FileList is essentially an array with a few helper methods defined to +# make file manipulation a bit easier. +# +# FileLists are lazy. When given a list of glob patterns for possible files +# to be included in the file list, instead of searching the file structures +# to find the files, a FileList holds the pattern for latter use. +# +# This allows us to define a number of FileList to match any number of +# files, but only search out the actual files when then FileList itself is +# actually used. The key is that the first time an element of the +# FileList/Array is requested, the pending patterns are resolved into a real +# list of file names. +# +# source://rake//lib/rake/file_list.rb#22 +class Rake::FileList + include ::Rake::Cloneable + + # Create a file list from the globbable patterns given. If you wish to + # perform multiple includes or excludes at object build time, use the + # "yield self" pattern. + # + # Example: + # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb') + # + # pkg_files = FileList.new('lib/**/*') do |fl| + # fl.exclude(/\bCVS\b/) + # end + # + # @return [FileList] a new instance of FileList + # @yield [_self] + # @yieldparam _self [Rake::FileList] the object that the method was called on + # + # source://rake//lib/rake/file_list.rb#99 + def initialize(*patterns); end + + # source://rake//lib/rake/file_list.rb#67 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # source://rake//lib/rake/file_list.rb#193 + def *(other); end + + # source://rake//lib/rake/file_list.rb#67 + def +(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def -(*args, &block); end + + # source://rake//lib/rake/file_list.rb#203 + def <<(obj); end + + # source://rake//lib/rake/file_list.rb#76 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # source://rake//lib/rake/file_list.rb#171 + def ==(array); end + + # source://rake//lib/rake/file_list.rb#76 + def [](*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def []=(*args, &block); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#128 + def add(*filenames); end + + # source://rake//lib/rake/file_list.rb#76 + def all?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def any?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def append(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def assoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def bsearch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def bsearch_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def chain(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def chunk(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def chunk_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # source://rake//lib/rake/file_list.rb#164 + def clear_exclude; end + + # source://rake//lib/rake/file_list.rb#67 + def collect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def collect!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def collect_concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def compact(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def compact!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def count(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def cycle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def deconstruct(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def delete(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def delete_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def delete_if(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def detect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def difference(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def dig(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def drop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def drop_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each_cons(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each_entry(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each_slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each_with_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # source://rake//lib/rake/file_list.rb#293 + def egrep(pattern, *options); end + + # source://rake//lib/rake/file_list.rb#76 + def empty?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # source://rake//lib/rake/file_list.rb#150 + def exclude(*patterns, &block); end + + # Should the given file name be excluded from the list? + # + # NOTE: This method was formerly named "exclude?", but Rails + # introduced an exclude? method as an array method and setup a + # conflict with file list. We renamed the method to avoid + # confusion. If you were using "FileList#exclude?" in your user + # code, you will need to update. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#364 + def excluded_from_list?(fn); end + + # Return a new file list that only contains file names from the current + # file list that exist on the file system. + # + # source://rake//lib/rake/file_list.rb#320 + def existing; end + + # Modify the current file list so that it contains only file name that + # exist on the file system. + # + # source://rake//lib/rake/file_list.rb#326 + def existing!; end + + # Return a new FileList with String#ext method applied to + # each member of the array. + # + # This method is a shortcut for: + # + # array.collect { |item| item.ext(newext) } + # + # +ext+ is a user added method for the Array class. + # + # source://rake//lib/rake/file_list.rb#284 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/file_list.rb#76 + def fetch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def fill(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def filter(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def filter!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def filter_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def find(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def find_all(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def find_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def first(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def flat_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def flatten(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def flatten!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def grep(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def grep_v(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # source://rake//lib/rake/file_list.rb#253 + def gsub(pat, rep); end + + # Same as +gsub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#264 + def gsub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#391 + def import(array); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def include(*filenames); end + + # source://rake//lib/rake/file_list.rb#76 + def include?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def inject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def insert(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def inspect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def intersect?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def intersection(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def is_a?(klass); end + + # source://rake//lib/rake/file_list.rb#76 + def join(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def keep_if(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#190 + def kind_of?(klass); end + + # source://rake//lib/rake/file_list.rb#76 + def last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def lazy(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def length(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def map!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def max(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def max_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def member?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def min(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def min_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def minmax(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def minmax_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def none?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def one?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def pack(*args, &block); end + + # FileList version of partition. Needed because the nested arrays should + # be FileLists in this version. + # + # source://rake//lib/rake/file_list.rb#334 + def partition(&block); end + + # Apply the pathmap spec to each of the included file names, returning a + # new file list with the modified paths. (See String#pathmap for + # details.) + # + # source://rake//lib/rake/file_list.rb#272 + def pathmap(spec = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_list.rb#76 + def permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def pop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def prepend(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def product(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def push(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def rassoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def reduce(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def reject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def reject!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def repeated_combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def repeated_permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # source://rake//lib/rake/file_list.rb#210 + def resolve; end + + # source://rake//lib/rake/file_list.rb#76 + def reverse(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def reverse!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def reverse_each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def rindex(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def rotate(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def rotate!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def sample(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def select(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def select!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def shelljoin(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def shift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def shuffle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def shuffle!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def size(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def slice!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def slice_after(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def slice_before(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def slice_when(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def sort(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def sort!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def sort_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # source://rake//lib/rake/file_list.rb#242 + def sub(pat, rep); end + + # Same as +sub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#258 + def sub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#76 + def sum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def take(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def take_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def tally(*args, &block); end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#176 + def to_a; end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#182 + def to_ary; end + + # source://rake//lib/rake/file_list.rb#76 + def to_h(*args, &block); end + + # Convert a FileList to a string by joining all elements with a space. + # + # source://rake//lib/rake/file_list.rb#344 + def to_s; end + + # source://rake//lib/rake/file_list.rb#76 + def to_set(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def transpose(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def union(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def uniq(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def uniq!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def unshift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def values_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#76 + def zip(*args, &block); end + + # source://rake//lib/rake/file_list.rb#67 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # source://rake//lib/rake/file_list.rb#350 + def add_matching(pattern); end + + # source://rake//lib/rake/file_list.rb#220 + def resolve_add(fn); end + + # source://rake//lib/rake/file_list.rb#230 + def resolve_exclude; end + + class << self + # Create a new file list including the files listed. Similar to: + # + # FileList.new(*args) + # + # source://rake//lib/rake/file_list.rb#400 + def [](*args); end + + # Get a sorted list of files matching the pattern. This method + # should be preferred to Dir[pattern] and Dir.glob(pattern) because + # the files returned are guaranteed to be sorted. + # + # source://rake//lib/rake/file_list.rb#407 + def glob(pattern, *args); end + end +end + +# List of array methods (that are not in +Object+) that need to be +# delegated. +# +# source://rake//lib/rake/file_list.rb#44 +Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#381 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#387 +Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#61 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#86 +Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) + +# List of additional methods that must be delegated. +# +# source://rake//lib/rake/file_list.rb#47 +Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) + +# List of methods that should not be delegated here (we define special +# versions of them explicitly below). +# +# source://rake//lib/rake/file_list.rb#51 +Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) + +# List of delegated methods that return new array values which need +# wrapping. +# +# source://rake//lib/rake/file_list.rb#55 +Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) + +# A FileTask is a task that includes time based dependencies. If any of a +# FileTask's prerequisites have a timestamp that is later than the file +# represented by this task, then the file must be rebuilt (using the +# supplied actions). +# +# source://rake//lib/rake/file_task.rb#12 +class Rake::FileTask < ::Rake::Task + # Is this file task needed? Yes if it doesn't exist, or if its time stamp + # is out of date. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#16 + def needed?; end + + # Time stamp for file task. + # + # source://rake//lib/rake/file_task.rb#25 + def timestamp; end + + private + + # Are there any prerequisites with a later time than the given time stamp? + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#36 + def out_of_date?(stamp); end + + class << self + # Apply the scope to the task name according to the rules for this kind + # of task. File based tasks ignore the scope when creating the name. + # + # source://rake//lib/rake/file_task.rb#53 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# source://rake//lib/rake/file_utils_ext.rb#10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # source://rake//lib/rake/file_utils_ext.rb#33 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def cp_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def move(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # Check that the options do not contain options not listed in + # +optdecl+. An ArgumentError exception is thrown if non-declared + # options are found. + # + # @raise [ArgumentError] + # + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # Send the message to the default rake output (which is $stderr). + # + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def symlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#33 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # Use this function to prevent potentially destructive ruby code + # from running when the :nowrite flag is set. + # + # Example: + # + # when_writing("Building Project") do + # project.build + # end + # + # The following code will build the project under normal + # conditions. If the nowrite(true) flag is set, then the example + # will print: + # + # DRYRUN: Building Project + # + # instead of actually building the project. + # + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end + + class << self + # Returns the value of attribute nowrite_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag; end + + # Sets the attribute nowrite_flag + # + # @param value the value to set the attribute nowrite_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag=(_arg0); end + + # Returns the value of attribute verbose_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag; end + + # Sets the attribute verbose_flag + # + # @param value the value to set the attribute verbose_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag=(_arg0); end + end +end + +# source://rake//lib/rake/file_utils_ext.rb#17 +Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) + +# InvocationChain tracks the chain of task invocations to detect +# circular dependencies. +# +# source://rake//lib/rake/invocation_chain.rb#6 +class Rake::InvocationChain < ::Rake::LinkedList + # Append an invocation to the chain of invocations. It is an error + # if the invocation already listed. + # + # source://rake//lib/rake/invocation_chain.rb#15 + def append(invocation); end + + # Is the invocation already in the chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#9 + def member?(invocation); end + + # Convert to string, ie: TOP => invocation => invocation + # + # source://rake//lib/rake/invocation_chain.rb#23 + def to_s; end + + private + + # source://rake//lib/rake/invocation_chain.rb#34 + def prefix; end + + class << self + # Class level append. + # + # source://rake//lib/rake/invocation_chain.rb#28 + def append(invocation, chain); end + end +end + +# source://rake//lib/rake/invocation_chain.rb#55 +Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) + +# Null object for an empty chain. +# +# source://rake//lib/rake/invocation_chain.rb#39 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/invocation_chain.rb#46 + def append(invocation); end + + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#42 + def member?(obj); end + + # source://rake//lib/rake/invocation_chain.rb#50 + def to_s; end +end + +# source://rake//lib/rake/invocation_exception_mixin.rb#3 +module Rake::InvocationExceptionMixin + # Return the invocation chain (list of Rake tasks) that were in + # effect when this exception was detected by rake. May be null if + # no tasks were active. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#7 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#13 + def chain=(value); end +end + +# source://rake//lib/rake/late_time.rb#17 +Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) + +# LateTime is a fake timestamp that occurs _after_ any other time value. +# +# source://rake//lib/rake/late_time.rb#4 +class Rake::LateTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://rake//lib/rake/late_time.rb#8 + def <=>(other); end + + # source://rake//lib/rake/late_time.rb#12 + def to_s; end + + class << self + private + + # source://rake//lib/rake/late_time.rb#6 + def allocate; end + + # source://rake//lib/rake/late_time.rb#6 + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# source://rake//lib/rake/linked_list.rb#6 +class Rake::LinkedList + include ::Enumerable + + # @return [LinkedList] a new instance of LinkedList + # + # source://rake//lib/rake/linked_list.rb#84 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # source://rake//lib/rake/linked_list.rb#25 + def ==(other); end + + # Polymorphically add a new element to the head of a list. The + # type of head node will be the same list type as the tail. + # + # source://rake//lib/rake/linked_list.rb#12 + def conj(item); end + + # For each item in the list. + # + # source://rake//lib/rake/linked_list.rb#48 + def each; end + + # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method + # + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#20 + def empty?; end + + # Returns the value of attribute head. + # + # source://rake//lib/rake/linked_list.rb#8 + def head; end + + # Same as +to_s+, but with inspected items. + # + # source://rake//lib/rake/linked_list.rb#42 + def inspect; end + + # Returns the value of attribute tail. + # + # source://rake//lib/rake/linked_list.rb#8 + def tail; end + + # Convert to string: LL(item, item...) + # + # source://rake//lib/rake/linked_list.rb#36 + def to_s; end + + class << self + # Cons a new head onto the tail list. + # + # source://rake//lib/rake/linked_list.rb#73 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # source://rake//lib/rake/linked_list.rb#78 + def empty; end + + # Make a list out of the given arguments. This method is + # polymorphic + # + # source://rake//lib/rake/linked_list.rb#59 + def make(*args); end + end +end + +# source://rake//lib/rake/linked_list.rb#110 +Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) + +# Represent an empty list, using the Null Object Pattern. +# +# When inheriting from the LinkedList class, you should implement +# a type specific Empty class as well. Make sure you set the class +# instance variable @parent to the associated list class (this +# allows conj, cons and make to work polymorphically). +# +# source://rake//lib/rake/linked_list.rb#95 +class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList + # @return [EmptyLinkedList] a new instance of EmptyLinkedList + # + # source://rake//lib/rake/linked_list.rb#98 + def initialize; end + + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#101 + def empty?; end + + class << self + # source://rake//lib/rake/linked_list.rb#105 + def cons(head, tail); end + end +end + +# Same as a regular task, but the immediate prerequisites are done in +# parallel using Ruby threads. +# +# source://rake//lib/rake/multi_task.rb#7 +class Rake::MultiTask < ::Rake::Task + private + + # source://rake//lib/rake/multi_task.rb#10 + def invoke_prerequisites(task_args, invocation_chain); end +end + +# The NameSpace class will lookup task names in the scope defined by a +# +namespace+ command. +# +# source://rake//lib/rake/name_space.rb#6 +class Rake::NameSpace + # Create a namespace lookup object using the given task manager + # and the list of scopes. + # + # @return [NameSpace] a new instance of NameSpace + # + # source://rake//lib/rake/name_space.rb#12 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # source://rake//lib/rake/name_space.rb#20 + def [](name); end + + # The scope of the namespace (a LinkedList) + # + # source://rake//lib/rake/name_space.rb#27 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # source://rake//lib/rake/name_space.rb#34 + def tasks; end +end + +# Include PrivateReader to use +private_reader+. +# +# source://rake//lib/rake/private_reader.rb#5 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # source://rake//lib/rake/private_reader.rb#7 + def included(base); end + end +end + +# source://rake//lib/rake/private_reader.rb#11 +module Rake::PrivateReader::ClassMethods + # Declare a list of private accessors + # + # source://rake//lib/rake/private_reader.rb#14 + def private_reader(*names); end +end + +# A Promise object represents a promise to do work (a chore) in the +# future. The promise is created with a block and a list of +# arguments for the block. Calling value will return the value of +# the promised chore. +# +# Used by ThreadPool. +# +# source://rake//lib/rake/promise.rb#11 +class Rake::Promise + # Create a promise to do the chore specified by the block. + # + # @return [Promise] a new instance of Promise + # + # source://rake//lib/rake/promise.rb#17 + def initialize(args, &block); end + + # source://rake//lib/rake/promise.rb#14 + def recorder; end + + # source://rake//lib/rake/promise.rb#14 + def recorder=(_arg0); end + + # Return the value of this promise. + # + # If the promised chore is not yet complete, then do the work + # synchronously. We will wait. + # + # source://rake//lib/rake/promise.rb#29 + def value; end + + # If no one else is working this promise, go ahead and do the chore. + # + # source://rake//lib/rake/promise.rb#42 + def work; end + + private + + # Perform the chore promised + # + # source://rake//lib/rake/promise.rb#57 + def chore; end + + # Are we done with the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#83 + def complete?; end + + # free up these items for the GC + # + # source://rake//lib/rake/promise.rb#88 + def discard; end + + # Did the promise throw an error + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#78 + def error?; end + + # Do we have a result for the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#73 + def result?; end + + # Record execution statistics if there is a recorder + # + # source://rake//lib/rake/promise.rb#94 + def stat(*args); end +end + +# source://rake//lib/rake/promise.rb#12 +Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) + +# Exit status class for times the system just gives us a nil. +# +# source://rake//lib/rake/pseudo_status.rb#6 +class Rake::PseudoStatus + # @return [PseudoStatus] a new instance of PseudoStatus + # + # source://rake//lib/rake/pseudo_status.rb#9 + def initialize(code = T.unsafe(nil)); end + + # source://rake//lib/rake/pseudo_status.rb#17 + def >>(n); end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#25 + def exited?; end + + # source://rake//lib/rake/pseudo_status.rb#7 + def exitstatus; end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#21 + def stopped?; end + + # source://rake//lib/rake/pseudo_status.rb#13 + def to_i; end +end + +# Error indicating a recursion overflow error in task selection. +# +# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +class Rake::RuleRecursionOverflowError < ::StandardError + # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError + # + # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + def initialize(*args); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + def add_target(target); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + def message; end +end + +# source://rake//lib/rake/scope.rb#3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # source://rake//lib/rake/scope.rb#6 + def path; end + + # Path for the scope + the named path. + # + # source://rake//lib/rake/scope.rb#11 + def path_with_task_name(task_name); end + + # Trim +n+ innermost scope levels from the scope. In no case will + # this trim beyond the toplevel scope. + # + # source://rake//lib/rake/scope.rb#17 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# source://rake//lib/rake/scope.rb#41 +Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) + +# Scope lists always end with an EmptyScope object. See Null +# Object Pattern) +# +# source://rake//lib/rake/scope.rb#28 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/scope.rb#31 + def path; end + + # source://rake//lib/rake/scope.rb#35 + def path_with_task_name(task_name); end +end + +# A Task is the basic unit of work in a Rakefile. Tasks have associated +# actions (possibly more than one) and a list of prerequisites. When +# invoked, a task will first ensure that all of its prerequisites have an +# opportunity to run and then it will execute its own actions. +# +# Tasks are not usually created directly using the new method, but rather +# use the +file+ and +task+ convenience methods. +# +# source://rake//lib/rake/task.rb#15 +class Rake::Task + # Create a task named +task_name+ with no actions or prerequisites. Use + # +enhance+ to add actions and prerequisites. + # + # @return [Task] a new instance of Task + # + # source://rake//lib/rake/task.rb#99 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # source://rake//lib/rake/task.rb#24 + def actions; end + + # Add a description to the task. The description can consist of an option + # argument list (enclosed brackets) and an optional comment. + # + # source://rake//lib/rake/task.rb#298 + def add_description(description); end + + # List of all unique prerequisite tasks including prerequisite tasks' + # prerequisites. + # Includes self when cyclic dependencies are found. + # + # source://rake//lib/rake/task.rb#77 + def all_prerequisite_tasks; end + + # Has this task already been invoked? Already invoked tasks + # will be skipped unless you reenable them. + # + # source://rake//lib/rake/task.rb#39 + def already_invoked; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # source://rake//lib/rake/task.rb#136 + def arg_description; end + + # Name of arguments for this task. + # + # source://rake//lib/rake/task.rb#141 + def arg_names; end + + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. + # + # source://rake//lib/rake/task.rb#153 + def clear; end + + # Clear the existing actions on a rake task. + # + # source://rake//lib/rake/task.rb#168 + def clear_actions; end + + # Clear the existing arguments on a rake task. + # + # source://rake//lib/rake/task.rb#180 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # source://rake//lib/rake/task.rb#174 + def clear_comments; end + + # Clear the existing prerequisites of a rake task. + # + # source://rake//lib/rake/task.rb#162 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # source://rake//lib/rake/task.rb#322 + def comment; end + + # source://rake//lib/rake/task.rb#304 + def comment=(comment); end + + # Enhance a task with prerequisites or actions. Returns self. + # + # source://rake//lib/rake/task.rb#115 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # source://rake//lib/rake/task.rb#270 + def execute(args = T.unsafe(nil)); end + + # Full collection of comments. Multiple comments are separated by + # newlines. + # + # source://rake//lib/rake/task.rb#316 + def full_comment; end + + # source://rake//lib/rake/task.rb#46 + def inspect; end + + # Return a string describing the internal state of a task. Useful for + # debugging. + # + # source://rake//lib/rake/task.rb#354 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # source://rake//lib/rake/task.rb#186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # source://rake//lib/rake/task.rb#237 + def invoke_prerequisites(task_args, invocation_chain); end + + # Invoke all the prerequisites of a task in parallel. + # + # source://rake//lib/rake/task.rb#249 + def invoke_prerequisites_concurrently(task_args, invocation_chain); end + + # File/Line locations of each of the task definitions for this + # task (only valid if the task was defined with the detect + # location option set). + # + # source://rake//lib/rake/task.rb#35 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # source://rake//lib/rake/task.rb#122 + def name; end + + # Name of task with argument list description. + # + # source://rake//lib/rake/task.rb#127 + def name_with_args; end + + # Is this task needed? + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#286 + def needed?; end + + # List of order only prerequisites for a task. + # + # source://rake//lib/rake/task.rb#21 + def order_only_prerequisites; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#18 + def prereqs; end + + # List of prerequisite tasks + # + # source://rake//lib/rake/task.rb#61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prerequisites; end + + # Reenable the task, allowing its tasks to be executed if the task + # is invoked again. + # + # source://rake//lib/rake/task.rb#147 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # source://rake//lib/rake/task.rb#30 + def scope; end + + # Set the names of the arguments for this task. +args+ should be + # an array of symbols, one for each argument name. + # + # source://rake//lib/rake/task.rb#348 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # source://rake//lib/rake/task.rb#93 + def source; end + + # source://rake//lib/rake/task.rb#52 + def sources; end + + # List of sources for task. + # + # source://rake//lib/rake/task.rb#51 + def sources=(_arg0); end + + # Timestamp for this task. Basic tasks return the current time for their + # time stamp. Other tasks can be more sophisticated. + # + # source://rake//lib/rake/task.rb#292 + def timestamp; end + + # Return task name + # + # source://rake//lib/rake/task.rb#42 + def to_s; end + + # Add order only dependencies. + # + # source://rake//lib/rake/task.rb#379 + def |(deps); end + + protected + + # source://rake//lib/rake/task.rb#83 + def collect_prerequisites(seen); end + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + # + # source://rake//lib/rake/task.rb#197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # source://rake//lib/rake/task.rb#229 + def add_chain_to(exception, new_chain); end + + # source://rake//lib/rake/task.rb#308 + def add_comment(comment); end + + # Get the first sentence in a string. The sentence is terminated + # by the first period, exclamation mark, or the end of the line. + # Decimal points do not count as periods. + # + # source://rake//lib/rake/task.rb#341 + def first_sentence(string); end + + # Format the trace flags for display. + # + # source://rake//lib/rake/task.rb#261 + def format_trace_flags; end + + # source://rake//lib/rake/task.rb#65 + def lookup_prerequisite(prerequisite_name); end + + # Transform the list of comments as specified by the block and + # join with the separator. + # + # source://rake//lib/rake/task.rb#328 + def transform_comments(separator, &block); end + + class << self + # Return a task with the given name. If the task is not currently + # known, try to synthesize one from the defined rules. If no rules are + # found, but an existing file matches the task name, assume it is a file + # task with no dependencies or actions. + # + # source://rake//lib/rake/task.rb#404 + def [](task_name); end + + # Clear the task list. This cause rake to immediately forget all the + # tasks that have been assigned. (Normally used in the unit tests.) + # + # source://rake//lib/rake/task.rb#391 + def clear; end + + # Define a rule for synthesizing tasks. + # + # source://rake//lib/rake/task.rb#421 + def create_rule(*args, &block); end + + # Define a task given +args+ and an option block. If a rule with the + # given name already exists, the prerequisites and actions are added to + # the existing task. Returns the defined task. + # + # source://rake//lib/rake/task.rb#416 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # source://rake//lib/rake/task.rb#373 + def format_deps(deps); end + + # Apply the scope to the task name according to the rules for + # this kind of task. Generic tasks will accept the scope as + # part of the name. + # + # source://rake//lib/rake/task.rb#428 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # source://rake//lib/rake/task.rb#396 + def tasks; end + end +end + +# Error indicating an ill-formed task declaration. +# +# source://rake//lib/rake/task_argument_error.rb#5 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# source://rake//lib/rake/task_arguments.rb#7 +class Rake::TaskArguments + include ::Enumerable + + # Create a TaskArgument object with a list of argument +names+ and a set + # of associated +values+. +parent+ is the parent argument object. + # + # @return [TaskArguments] a new instance of TaskArguments + # + # source://rake//lib/rake/task_arguments.rb#15 + def initialize(names, values, parent = T.unsafe(nil)); end + + # Find an argument value by name or index. + # + # source://rake//lib/rake/task_arguments.rb#44 + def [](index); end + + # source://rake//lib/rake/task_arguments.rb#97 + def deconstruct_keys(keys); end + + # Enumerates the arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#56 + def each(&block); end + + # Retrieve the list of values not associated with named arguments + # + # source://rake//lib/rake/task_arguments.rb#32 + def extras; end + + # source://rake//lib/rake/task_arguments.rb#93 + def fetch(*args, &block); end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def has_key?(key); end + + # source://rake//lib/rake/task_arguments.rb#79 + def inspect; end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#91 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # source://rake//lib/rake/task_arguments.rb#66 + def method_missing(sym, *args); end + + # Argument names + # + # source://rake//lib/rake/task_arguments.rb#11 + def names; end + + # Create a new argument scope using the prerequisite argument + # names. + # + # source://rake//lib/rake/task_arguments.rb#38 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # source://rake//lib/rake/task_arguments.rb#27 + def to_a; end + + # Returns a Hash of arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#71 + def to_hash; end + + # source://rake//lib/rake/task_arguments.rb#75 + def to_s; end + + # Extracts the argument values at +keys+ + # + # source://rake//lib/rake/task_arguments.rb#61 + def values_at(*keys); end + + # Specify a hash of default values for task arguments. Use the + # defaults only if there is no specific value for the given + # argument. + # + # source://rake//lib/rake/task_arguments.rb#51 + def with_defaults(defaults); end + + protected + + # source://rake//lib/rake/task_arguments.rb#103 + def lookup(name); end +end + +# Base class for Task Libraries. +# +# source://rake//lib/rake/tasklib.rb#7 +class Rake::TaskLib + include ::Rake::Cloneable + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL +end + +# The TaskManager module is a mixin for managing tasks. +# +# source://rake//lib/rake/task_manager.rb#5 +module Rake::TaskManager + # source://rake//lib/rake/task_manager.rb#9 + def initialize; end + + # Find a matching task for +task_name+. + # + # source://rake//lib/rake/task_manager.rb#54 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#182 + def clear; end + + # source://rake//lib/rake/task_manager.rb#17 + def create_rule(*args, &block); end + + # Return the list of scope names currently active in the task + # manager. + # + # source://rake//lib/rake/task_manager.rb#222 + def current_scope; end + + # source://rake//lib/rake/task_manager.rb#23 + def define_task(task_class, *args, &block); end + + # If a rule can be found that matches the task name, enhance the + # task with the prerequisites and actions from the rule. Set the + # source attribute of the task appropriately for the rule. Return + # the enhanced task or nil of no rule was found. + # + # source://rake//lib/rake/task_manager.rb#151 + def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end + + # source://rake//lib/rake/task_manager.rb#68 + def generate_did_you_mean_suggestions(task_name); end + + # source://rake//lib/rake/task_manager.rb#62 + def generate_message_for_undefined_task(task_name); end + + # Evaluate the block in a nested namespace named +name+. Create + # an anonymous namespace if +name+ is nil. + # + # source://rake//lib/rake/task_manager.rb#228 + def in_namespace(name); end + + # Lookup a task. Return an existing task if found, otherwise + # create a task of the current type. + # + # source://rake//lib/rake/task_manager.rb#49 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description; end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description=(_arg0); end + + # Lookup a task, using scope and the scope hints in the task name. + # This method performs straight lookups without trying to + # synthesize file tasks or rules. Special scope names (e.g. '^') + # are recognized. If no scope argument is supplied, use the + # current scope. Return nil if the task cannot be found. + # + # source://rake//lib/rake/task_manager.rb#192 + def lookup(task_name, initial_scope = T.unsafe(nil)); end + + # Resolve the arguments for a task/rule. Returns a tuple of + # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. + # + # source://rake//lib/rake/task_manager.rb#88 + def resolve_args(args); end + + # source://rake//lib/rake/task_manager.rb#81 + def synthesize_file_task(task_name); end + + # List of all defined tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#168 + def tasks; end + + # List of all the tasks defined in the given scope (and its + # sub-scopes). + # + # source://rake//lib/rake/task_manager.rb#174 + def tasks_in_scope(scope); end + + private + + # Add a location to the locations field of the given task. + # + # source://rake//lib/rake/task_manager.rb#241 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # source://rake//lib/rake/task_manager.rb#271 + def attempt_rule(task_name, task_pattern, args, extensions, block, level); end + + # Find the location that called into the dsl layer. + # + # source://rake//lib/rake/task_manager.rb#248 + def find_location; end + + # Generate an anonymous namespace name. + # + # source://rake//lib/rake/task_manager.rb#259 + def generate_name; end + + # Return the current description, clearing it in the process. + # + # source://rake//lib/rake/task_manager.rb#319 + def get_description; end + + # Lookup the task name + # + # source://rake//lib/rake/task_manager.rb#208 + def lookup_in_scope(name, scope); end + + # Make a list of sources from the list of file name extensions / + # translation procs. + # + # source://rake//lib/rake/task_manager.rb#293 + def make_sources(task_name, task_pattern, extensions); end + + # Resolve task arguments for a task or rule when there are + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t, order_only: [:e] + # task :t => [:d] + # task :t => [:d], order_only: [:e] + # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] + # + # source://rake//lib/rake/task_manager.rb#127 + def resolve_args_with_dependencies(args, hash); end + + # Resolve task arguments for a task or rule when there are no + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t + # task :t, [:a] + # + # source://rake//lib/rake/task_manager.rb#105 + def resolve_args_without_dependencies(args); end + + # source://rake//lib/rake/task_manager.rb#265 + def trace_rule(level, message); end + + class << self + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata; end + + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata=(_arg0); end + end +end + +# source://rake//lib/rake/thread_history_display.rb#6 +class Rake::ThreadHistoryDisplay + include ::Rake::PrivateReader + extend ::Rake::PrivateReader::ClassMethods + + # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay + # + # source://rake//lib/rake/thread_history_display.rb#11 + def initialize(stats); end + + # source://rake//lib/rake/thread_history_display.rb#17 + def show; end + + private + + # source://rake//lib/rake/thread_history_display.rb#9 + def items; end + + # source://rake//lib/rake/thread_history_display.rb#35 + def rename(hash, key, renames); end + + # source://rake//lib/rake/thread_history_display.rb#9 + def stats; end + + # source://rake//lib/rake/thread_history_display.rb#9 + def threads; end +end + +# source://rake//lib/rake/thread_pool.rb#8 +class Rake::ThreadPool + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. + # + # @return [ThreadPool] a new instance of ThreadPool + # + # source://rake//lib/rake/thread_pool.rb#12 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # source://rake//lib/rake/thread_pool.rb#33 + def future(*args, &block); end + + # Enable the gathering of history events. + # + # source://rake//lib/rake/thread_pool.rb#68 + def gather_history; end + + # Return a array of history events for the thread pool. + # + # History gathering must be enabled to be able to see the events + # (see #gather_history). Best to call this when the job is + # complete (i.e. after ThreadPool#join is called). + # + # source://rake//lib/rake/thread_pool.rb#77 + def history; end + + # Waits until the queue of futures is empty and all threads have exited. + # + # source://rake//lib/rake/thread_pool.rb#44 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # source://rake//lib/rake/thread_pool.rb#84 + def statistics; end + + private + + # for testing only + # + # source://rake//lib/rake/thread_pool.rb#152 + def __queue__; end + + # processes one item on the queue. Returns true if there was an + # item to process, false if there was no item + # + # source://rake//lib/rake/thread_pool.rb#95 + def process_queue_item; end + + # source://rake//lib/rake/thread_pool.rb#111 + def start_thread; end + + # source://rake//lib/rake/thread_pool.rb#139 + def stat(event, data = T.unsafe(nil)); end +end + +# source://rake//lib/rake/trace_output.rb#3 +module Rake::TraceOutput + # Write trace output to output stream +out+. + # + # The write is done as a single IO call (to print) to lessen the + # chance that the trace output is interrupted by other tasks also + # producing output. + # + # source://rake//lib/rake/trace_output.rb#10 + def trace_on(out, *strings); end +end + +# source://rake//lib/rake/version.rb#3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#5 +module Rake::Version; end + +# source://rake//lib/rake/version.rb#6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::OTHER = T.let(T.unsafe(nil), Array) + +# Win 32 interface methods for Rake. Windows specific functionality +# will be placed here to collect that knowledge in one spot. +# +# source://rake//lib/rake/win32.rb#7 +module Rake::Win32 + class << self + # Normalize a win32 path so that the slashes are all forward slashes. + # + # source://rake//lib/rake/win32.rb#45 + def normalize(path); end + + # The standard directory containing system wide rake files on + # Win 32 systems. Try the following environment variables (in + # order): + # + # * HOME + # * HOMEDRIVE + HOMEPATH + # * APPDATA + # * USERPROFILE + # + # If the above are not defined, the return nil. + # + # @raise [Win32HomeError] + # + # source://rake//lib/rake/win32.rb#30 + def win32_system_dir; end + + # True if running on a windows system. + # + # @return [Boolean] + # + # source://rake//lib/rake/win32.rb#16 + def windows?; end + end +end + +# Error indicating a problem in locating the home directory on a +# Win32 system. +# +# source://rake//lib/rake/win32.rb#11 +class Rake::Win32::Win32HomeError < ::RuntimeError; end + +# source://rake//lib/rake.rb#68 +RakeFileUtils = Rake::FileUtilsExt + +# source://rake//lib/rake/ext/string.rb#4 +class String + include ::Comparable + + # source://rake//lib/rake/ext/string.rb#14 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/ext/string.rb#138 + def pathmap(spec = T.unsafe(nil), &block); end + + protected + + # source://rake//lib/rake/ext/string.rb#27 + def pathmap_explode; end + + # source://rake//lib/rake/ext/string.rb#41 + def pathmap_partial(n); end + + # source://rake//lib/rake/ext/string.rb#59 + def pathmap_replace(patterns, &block); end +end diff --git a/sorbet/rbi/gems/rbi@0.3.9.rbi b/sorbet/rbi/gems/rbi@0.3.9.rbi new file mode 100644 index 0000000..639eaee --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.3.9.rbi @@ -0,0 +1,5238 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + + +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bundle exec spoom srb sigs export`. + +# source://rbi//lib/rbi.rb#7 +module RBI; end + +# source://rbi//lib/rbi/model.rb#833 +class RBI::Arg < ::RBI::Node + # @return [Arg] a new instance of Arg + # + # source://rbi//lib/rbi/model.rb#838 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#844 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#849 + sig { returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#835 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#298 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # @return [Attr] a new instance of Attr + # + # source://rbi//lib/rbi/model.rb#316 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#59 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/model.rb#325 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#104 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#429 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#300 + sig { returns(T::Array[::Symbol]) } + def names; end + + # source://rbi//lib/rbi/model.rb#306 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#303 + sig { returns(::RBI::Visibility) } + def visibility; end + + # source://rbi//lib/rbi/model.rb#303 + def visibility=(_arg0); end + + private + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#80 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_getter_method(name, sig, visibility, loc, comments); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#99 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end + + # @raise [UnexpectedMultipleSigsError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#65 + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } + def parse_sig; end +end + +# source://rbi//lib/rbi/model.rb#328 +class RBI::AttrAccessor < ::RBI::Attr + # @return [AttrAccessor] a new instance of AttrAccessor + # + # source://rbi//lib/rbi/model.rb#337 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#458 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#130 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#344 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#351 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#357 +class RBI::AttrReader < ::RBI::Attr + # @return [AttrReader] a new instance of AttrReader + # + # source://rbi//lib/rbi/model.rb#366 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#442 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#145 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#373 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#380 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#386 +class RBI::AttrWriter < ::RBI::Attr + # @return [AttrWriter] a new instance of AttrWriter + # + # source://rbi//lib/rbi/model.rb#395 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#450 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#155 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#402 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#409 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# source://rbi//lib/rbi/model.rb#70 +class RBI::BlankLine < ::RBI::Comment + # @return [BlankLine] a new instance of BlankLine + # + # source://rbi//lib/rbi/model.rb#72 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/model.rb#679 +class RBI::BlockParam < ::RBI::Param + # @return [BlockParam] a new instance of BlockParam + # + # source://rbi//lib/rbi/model.rb#681 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#693 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#688 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#195 +class RBI::Class < ::RBI::Scope + # @return [Class] a new instance of Class + # + # source://rbi//lib/rbi/model.rb#203 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + end + def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#388 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#212 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#197 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#197 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#200 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # source://rbi//lib/rbi/model.rb#200 + def superclass_name=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#51 +class RBI::Comment < ::RBI::Node + # @return [Comment] a new instance of Comment + # + # source://rbi//lib/rbi/model.rb#56 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#62 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#53 + sig { returns(::String) } + def text; end + + # source://rbi//lib/rbi/model.rb#53 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#572 +class RBI::ConflictTree < ::RBI::Tree + # @return [ConflictTree] a new instance of ConflictTree + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#580 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#574 + sig { returns(::RBI::Tree) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#577 + sig { returns(::String) } + def left_name; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#574 + def right; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#577 + def right_name; end +end + +# Consts +# +# source://rbi//lib/rbi/model.rb#269 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [Const] a new instance of Const + # + # source://rbi//lib/rbi/model.rb#274 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#282 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#94 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#271 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#290 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#271 + def value; end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#358 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi.rb#8 +class RBI::Error < ::StandardError; end + +# source://rbi//lib/rbi/model.rb#726 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # @return [Extend] a new instance of Extend + # + # source://rbi//lib/rbi/model.rb#728 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#505 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#134 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#735 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#131 +class RBI::File + # @return [File] a new instance of File + # + # source://rbi//lib/rbi/model.rb#142 + sig do + params( + strictness: T.nilable(::String), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#150 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/model.rb#139 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # source://rbi//lib/rbi/model.rb#139 + def comments=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#155 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/printer.rb#819 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1231 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1237 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#133 + sig { returns(::RBI::Tree) } + def root; end + + # source://rbi//lib/rbi/model.rb#133 + def root=(_arg0); end + + # source://rbi//lib/rbi/model.rb#136 + sig { returns(T.nilable(::String)) } + def strictness; end + + # source://rbi//lib/rbi/model.rb#136 + def strictness=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#825 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/formatter.rb#5 +class RBI::Formatter + # @return [Formatter] a new instance of Formatter + # + # source://rbi//lib/rbi/formatter.rb#18 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_members: T::Boolean, + sort_nodes: T::Boolean, + replace_attributes_with_methods: T::Boolean + ).void + end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil), replace_attributes_with_methods: T.unsafe(nil)); end + + # source://rbi//lib/rbi/formatter.rb#43 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # source://rbi//lib/rbi/formatter.rb#48 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # source://rbi//lib/rbi/formatter.rb#7 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/formatter.rb#7 + def max_line_length=(_arg0); end + + # source://rbi//lib/rbi/formatter.rb#37 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#84 +class RBI::Group < ::RBI::Tree + # @return [Group] a new instance of Group + # + # source://rbi//lib/rbi/rewriters/group_nodes.rb#89 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#86 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#94 +class RBI::Group::Kind + class << self + private + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#109 + def new(*_arg0); end + end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#101 +RBI::Group::Kind::Attrs = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#107 +RBI::Group::Kind::Consts = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#97 +RBI::Group::Kind::Helpers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#104 +RBI::Group::Kind::Inits = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#105 +RBI::Group::Kind::Methods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#99 +RBI::Group::Kind::MixesInClassMethods = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#95 +RBI::Group::Kind::Mixins = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#96 +RBI::Group::Kind::RequiredAncestors = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 +RBI::Group::Kind::Sends = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#106 +RBI::Group::Kind::SingletonClasses = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#103 +RBI::Group::Kind::TEnums = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#102 +RBI::Group::Kind::TStructFields = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#98 +RBI::Group::Kind::TypeMembers = T.let(T.unsafe(nil), RBI::Group::Kind) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#5 +class RBI::GroupNodesError < ::RBI::Error; end + +# Sorbet's misc. +# +# source://rbi//lib/rbi/model.rb#1141 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [Helper] a new instance of Helper + # + # source://rbi//lib/rbi/model.rb#1146 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#521 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#164 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1143 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1154 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#712 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # @return [Include] a new instance of Include + # + # source://rbi//lib/rbi/model.rb#714 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#497 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#124 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#721 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/index.rb#5 +class RBI::Index < ::RBI::Visitor + # @return [Index] a new instance of Index + # + # source://rbi//lib/rbi/index.rb#16 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/index.rb#27 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # source://rbi//lib/rbi/index.rb#32 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # source://rbi//lib/rbi/index.rb#22 + sig { returns(T::Array[::String]) } + def keys; end + + # source://rbi//lib/rbi/index.rb#38 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/index.rb#55 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # source://rbi//lib/rbi/index.rb#8 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# +# source://rbi//lib/rbi/index.rb#69 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/index.rb#76 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# source://rbi//lib/rbi/model.rb#854 +class RBI::KwArg < ::RBI::Arg + # @return [KwArg] a new instance of KwArg + # + # source://rbi//lib/rbi/model.rb#859 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#865 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#856 + sig { returns(::String) } + def keyword; end + + # source://rbi//lib/rbi/model.rb#870 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#637 +class RBI::KwOptParam < ::RBI::Param + # @return [KwOptParam] a new instance of KwOptParam + # + # source://rbi//lib/rbi/model.rb#642 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#655 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#650 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#639 + sig { returns(::String) } + def value; end +end + +# source://rbi//lib/rbi/model.rb#618 +class RBI::KwParam < ::RBI::Param + # @return [KwParam] a new instance of KwParam + # + # source://rbi//lib/rbi/model.rb#620 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#632 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#627 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#660 +class RBI::KwRestParam < ::RBI::Param + # @return [KwRestParam] a new instance of KwRestParam + # + # source://rbi//lib/rbi/model.rb#662 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#674 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#669 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/loc.rb#5 +class RBI::Loc + # @return [Loc] a new instance of Loc + # + # source://rbi//lib/rbi/loc.rb#32 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # source://rbi//lib/rbi/loc.rb#23 + def begin_column; end + + # source://rbi//lib/rbi/loc.rb#23 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # source://rbi//lib/rbi/loc.rb#23 + def end_column; end + + # source://rbi//lib/rbi/loc.rb#23 + def end_line; end + + # source://rbi//lib/rbi/loc.rb#20 + sig { returns(T.nilable(::String)) } + def file; end + + # source://rbi//lib/rbi/loc.rb#41 + sig { params(other: ::RBI::Loc).returns(::RBI::Loc) } + def join(other); end + + # source://rbi//lib/rbi/loc.rb#61 + sig { returns(T.nilable(::String)) } + def source; end + + # source://rbi//lib/rbi/loc.rb#52 + sig { returns(::String) } + def to_s; end + + class << self + # source://rbi//lib/rbi/loc.rb#8 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#342 +class RBI::MergeTree < ::RBI::Tree + # @return [MergeTree] a new instance of MergeTree + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#351 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# source://rbi//lib/rbi/model.rb#417 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [Method] a new instance of Method + # + # source://rbi//lib/rbi/model.rb#442 + sig do + params( + name: ::String, + params: T::Array[::RBI::Param], + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#462 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#497 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#487 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#482 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#492 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#472 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#467 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#477 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#510 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#466 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#536 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#114 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#425 + sig { returns(T::Boolean) } + def is_singleton; end + + # source://rbi//lib/rbi/model.rb#425 + def is_singleton=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#476 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#419 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#419 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#422 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # source://rbi//lib/rbi/model.rb#431 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#431 + def sigs=(_arg0); end + + # source://rbi//lib/rbi/model.rb#546 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#428 + sig { returns(::RBI::Visibility) } + def visibility; end + + # source://rbi//lib/rbi/model.rb#428 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1185 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # @return [MixesInClassMethods] a new instance of MixesInClassMethods + # + # source://rbi//lib/rbi/model.rb#1192 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#513 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#144 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1199 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#701 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # @return [Mixin] a new instance of Mixin + # + # source://rbi//lib/rbi/model.rb#706 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#489 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#703 + sig { returns(T::Array[::String]) } + def names; end +end + +# source://rbi//lib/rbi/model.rb#175 +class RBI::Module < ::RBI::Scope + # @return [Module] a new instance of Module + # + # source://rbi//lib/rbi/model.rb#180 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#396 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#188 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#177 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#177 + def name=(_arg0); end +end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#8 +class RBI::Node + abstract! + + # @return [Node] a new instance of Node + # + # source://rbi//lib/rbi/model.rb#16 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # Can `self` and `_other` be merged into a single definition? + # + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#302 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # source://rbi//lib/rbi/model.rb#22 + sig { void } + def detach; end + + # source://rbi//lib/rbi/model.rb#13 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # source://rbi//lib/rbi/model.rb#13 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#308 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # source://rbi//lib/rbi/model.rb#44 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # source://rbi//lib/rbi/model.rb#10 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # source://rbi//lib/rbi/model.rb#10 + def parent_tree=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#834 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1246 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean + ).void + end + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1252 + sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/model.rb#31 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/filter_versions.rb#91 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # source://rbi//lib/rbi/printer.rb#840 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#88 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # @return [NodeWithComments] a new instance of NodeWithComments + # + # source://rbi//lib/rbi/model.rb#93 + sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#99 + sig { returns(T::Array[::String]) } + def annotations; end + + # source://rbi//lib/rbi/model.rb#90 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # source://rbi//lib/rbi/model.rb#90 + def comments=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#325 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#101 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# source://rbi//lib/rbi/model.rb#582 +class RBI::OptParam < ::RBI::Param + # @return [OptParam] a new instance of OptParam + # + # source://rbi//lib/rbi/model.rb#587 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#594 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#584 + sig { returns(::String) } + def value; end +end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#552 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # @return [Param] a new instance of Param + # + # source://rbi//lib/rbi/model.rb#557 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#554 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#564 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/parser.rb#7 +class RBI::ParseError < ::RBI::Error + # @return [ParseError] a new instance of ParseError + # + # source://rbi//lib/rbi/parser.rb#12 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # source://rbi//lib/rbi/parser.rb#9 + sig { returns(::RBI::Loc) } + def location; end +end + +# source://rbi//lib/rbi/parser.rb#49 +class RBI::Parser + # source://rbi//lib/rbi/parser.rb#80 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#75 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # source://rbi//lib/rbi/parser.rb#87 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # source://rbi//lib/rbi/parser.rb#57 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#62 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # source://rbi//lib/rbi/parser.rb#52 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # source://rbi//lib/rbi/parser.rb#68 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# source://rbi//lib/rbi/parser.rb#1003 +class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor + # @return [HeredocLocationVisitor] a new instance of HeredocLocationVisitor + # + # source://rbi//lib/rbi/parser.rb#1005 + sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void } + def initialize(source, begin_offset, end_offset); end + + # source://rbi//lib/rbi/parser.rb#1036 + sig { returns(::Prism::Location) } + def location; end + + # source://rbi//lib/rbi/parser.rb#1026 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://rbi//lib/rbi/parser.rb#1015 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + private + + # source://rbi//lib/rbi/parser.rb#1047 + sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } + def handle_string_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#915 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # @return [SigBuilder] a new instance of SigBuilder + # + # source://rbi//lib/rbi/parser.rb#920 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#986 + sig { params(node: ::Prism::CallNode, value: ::String).returns(T::Boolean) } + def allow_incompatible_override?(node, value); end + + # source://rbi//lib/rbi/parser.rb#917 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#978 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#928 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#164 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # @return [TreeBuilder] a new instance of TreeBuilder + # + # source://rbi//lib/rbi/parser.rb#172 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#169 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#166 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#361 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#185 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#236 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#229 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#221 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#291 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#313 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#332 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#344 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#539 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#557 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#580 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#585 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#592 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end + + # source://rbi//lib/rbi/parser.rb#604 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#666 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#699 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#673 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#765 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#774 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#822 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#859 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#873 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#883 + sig { void } + def set_root_tree_loc; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#902 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_enum_value?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#897 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#114 +class RBI::Parser::Visitor < ::Prism::Visitor + # @return [Visitor] a new instance of Visitor + # + # source://rbi//lib/rbi/parser.rb#116 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#143 + sig { params(node: ::Prism::Node).returns(::Prism::Location) } + def adjust_prism_location_for_heredoc(node); end + + # source://rbi//lib/rbi/parser.rb#126 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#131 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#138 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#154 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def self?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#159 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_sig_without_runtime?(node); end +end + +# source://rbi//lib/rbi/printer.rb#7 +class RBI::Printer < ::RBI::Visitor + # @return [Printer] a new instance of Printer + # + # source://rbi//lib/rbi/printer.rb#21 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/printer.rb#39 + sig { void } + def dedent; end + + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group; end + + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#34 + sig { void } + def indent; end + + # source://rbi//lib/rbi/printer.rb#18 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#45 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # source://rbi//lib/rbi/printer.rb#9 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#65 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#51 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#58 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#72 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/printer.rb#84 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#680 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # source://rbi//lib/rbi/printer.rb#638 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/printer.rb#648 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/printer.rb#654 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#736 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # source://rbi//lib/rbi/printer.rb#709 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # source://rbi//lib/rbi/printer.rb#672 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#796 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # source://rbi//lib/rbi/printer.rb#453 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/printer.rb#258 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/printer.rb#241 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/printer.rb#247 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/printer.rb#253 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/printer.rb#138 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/printer.rb#373 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/printer.rb#158 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/printer.rb#121 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/printer.rb#614 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/printer.rb#231 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/printer.rb#385 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/printer.rb#583 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/printer.rb#567 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/printer.rb#379 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/printer.rb#459 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/printer.rb#361 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#355 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/printer.rb#367 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#287 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/printer.rb#577 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/printer.rb#390 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/printer.rb#152 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/printer.rb#343 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#420 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/printer.rb#414 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/printer.rb#408 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/printer.rb#104 + sig { override.params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # source://rbi//lib/rbi/printer.rb#337 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/printer.rb#604 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/printer.rb#349 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#175 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/printer.rb#220 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/printer.rb#624 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/printer.rb#185 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/printer.rb#435 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/printer.rb#465 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/printer.rb#486 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/printer.rb#170 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/printer.rb#164 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/printer.rb#509 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # source://rbi//lib/rbi/printer.rb#528 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/printer.rb#534 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/printer.rb#547 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # source://rbi//lib/rbi/printer.rb#144 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/printer.rb#492 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/printer.rb#498 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/printer.rb#504 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/printer.rb#557 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/printer.rb#425 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/printer.rb#590 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# source://rbi//lib/rbi/printer.rb#5 +class RBI::PrinterError < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#792 +class RBI::Private < ::RBI::Visibility + # @return [Private] a new instance of Private + # + # source://rbi//lib/rbi/model.rb#794 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Private).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#784 +class RBI::Protected < ::RBI::Visibility + # @return [Protected] a new instance of Protected + # + # source://rbi//lib/rbi/model.rb#786 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Protected).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#776 +class RBI::Public < ::RBI::Visibility + # @return [Public] a new instance of Public + # + # source://rbi//lib/rbi/model.rb#778 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Public).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/rbs/method_type_translator.rb#5 +module RBI::RBS; end + +# source://rbi//lib/rbi/rbs/method_type_translator.rb#6 +class RBI::RBS::MethodTypeTranslator + # @return [MethodTypeTranslator] a new instance of MethodTypeTranslator + # + # source://rbi//lib/rbi/rbs/method_type_translator.rb#22 + sig { params(method: ::RBI::Method).void } + def initialize(method); end + + # source://rbi//lib/rbi/rbs/method_type_translator.rb#19 + sig { returns(::RBI::Sig) } + def result; end + + # source://rbi//lib/rbi/rbs/method_type_translator.rb#28 + sig { params(type: ::RBS::MethodType).void } + def visit(type); end + + private + + # source://rbi//lib/rbi/rbs/method_type_translator.rb#100 + sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) } + def translate_function_param(param, index); end + + # source://rbi//lib/rbi/rbs/method_type_translator.rb#115 + sig { params(type: T.untyped).returns(::RBI::Type) } + def translate_type(type); end + + # @raise [Error] + # + # source://rbi//lib/rbi/rbs/method_type_translator.rb#42 + sig { params(type: ::RBS::Types::Block).void } + def visit_block_type(type); end + + # source://rbi//lib/rbi/rbs/method_type_translator.rb#57 + sig { params(type: ::RBS::Types::Function).void } + def visit_function_type(type); end + + class << self + # source://rbi//lib/rbi/rbs/method_type_translator.rb#11 + sig { params(method: ::RBI::Method, type: ::RBS::MethodType).returns(::RBI::Sig) } + def translate(method, type); end + end +end + +# source://rbi//lib/rbi/rbs/method_type_translator.rb#7 +class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end + +# source://rbi//lib/rbi/rbs/type_translator.rb#6 +class RBI::RBS::TypeTranslator + class << self + # source://rbi//lib/rbi/rbs/type_translator.rb#33 + sig do + params( + type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) + ).returns(::RBI::Type) + end + def translate(type); end + + private + + # source://rbi//lib/rbi/rbs/type_translator.rb#106 + sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) } + def translate_class_instance(type); end + + # source://rbi//lib/rbi/rbs/type_translator.rb#114 + sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) } + def translate_function(type); end + + # source://rbi//lib/rbi/rbs/type_translator.rb#161 + sig { params(type_name: ::String).returns(::String) } + def translate_t_generic_type(type_name); end + + # source://rbi//lib/rbi/rbs/type_translator.rb#94 + sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) } + def translate_type_alias(type); end + end +end + +# A comment representing a RBS type prefixed with `#:` +# +# source://rbi//lib/rbi/model.rb#78 +class RBI::RBSComment < ::RBI::Comment + # source://rbi//lib/rbi/model.rb#80 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/rbs_printer.rb#5 +class RBI::RBSPrinter < ::RBI::Visitor + # @return [RBSPrinter] a new instance of RBSPrinter + # + # source://rbi//lib/rbi/rbs_printer.rb#30 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + positional_names: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#49 + sig { void } + def dedent; end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group; end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#44 + sig { void } + def indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#21 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/rbs_printer.rb#18 + sig { returns(T::Boolean) } + def positional_names; end + + # source://rbi//lib/rbi/rbs_printer.rb#18 + def positional_names=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#55 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/rbs_printer.rb#302 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + def print_locs=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#400 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#417 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig_inline(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#479 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig_multiline(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#75 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#61 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#68 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#82 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/rbs_printer.rb#680 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#270 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#253 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#259 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#265 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#124 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#612 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#144 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#107 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#816 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#237 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#624 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#94 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # source://rbi//lib/rbi/rbs_printer.rb#789 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#777 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#618 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#686 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#600 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#594 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#606 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#325 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#783 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#629 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#138 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#574 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#659 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#653 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#647 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#564 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#810 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#584 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#161 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#224 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#826 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#171 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#674 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#545 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#558 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#156 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#150 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#743 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#749 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#755 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#130 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#692 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#727 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#735 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#771 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#664 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#796 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#929 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # source://rbi//lib/rbi/rbs_printer.rb#963 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # source://rbi//lib/rbi/rbs_printer.rb#951 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#842 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#861 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#903 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/rbs_printer.rb#867 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # source://rbi//lib/rbi/rbs_printer.rb#921 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# source://rbi//lib/rbi/rbs_printer.rb#6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#5 +class RBI::ReplaceNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#569 +class RBI::ReqParam < ::RBI::Param + # @return [ReqParam] a new instance of ReqParam + # + # source://rbi//lib/rbi/model.rb#571 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#577 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/model.rb#1204 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [RequiresAncestor] a new instance of RequiresAncestor + # + # source://rbi//lib/rbi/model.rb#1209 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/index.rb#154 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1206 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1216 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#599 +class RBI::RestParam < ::RBI::Param + # @return [RestParam] a new instance of RestParam + # + # source://rbi//lib/rbi/model.rb#601 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#613 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#608 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 +module RBI::Rewriters; end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # @return [AddSigTemplates] a new instance of AddSigTemplates + # + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#8 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#29 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#44 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#55 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# source://rbi//lib/rbi/rewriters/annotate.rb#6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # @return [Annotate] a new instance of Annotate + # + # source://rbi//lib/rbi/rewriters/annotate.rb#8 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#17 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/annotate.rb#30 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/annotate.rb#37 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#22 +class RBI::Rewriters::AttrToMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#25 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#38 + sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } + def replace(node, with:); end +end + +# source://rbi//lib/rbi/rewriters/deannotate.rb#6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # @return [Deannotate] a new instance of Deannotate + # + # source://rbi//lib/rbi/rewriters/deannotate.rb#8 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#15 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/deannotate.rb#26 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # @return [FilterVersions] a new instance of FilterVersions + # + # source://rbi//lib/rbi/rewriters/filter_versions.rb#69 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#76 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/rewriters/filter_versions.rb#62 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# source://rbi//lib/rbi/rewriters/filter_versions.rb#58 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# Rewrite non-singleton methods inside singleton classes to singleton methods +# +# Example: +# ~~~rb +# class << self +# def m1; end +# def self.m2; end +# +# class << self +# def m3; end +# end +# end +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# def self.m1; end +# +# class << self +# def self.m2; end +# def self.m3; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Flattens visibility nodes into method nodes +# +# Example: +# ~~~rb +# class A +# def m1; end +# private +# def m2; end +# def m3; end +# end +# ~~~ +# +# will be transformed into: +# +# ~~~rb +# class A +# def m1; end +# private def m2; end +# private def m3; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # @return [FlattenVisibilities] a new instance of FlattenVisibilities + # + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#29 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#37 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#11 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#35 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } + def group_kind(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 +class RBI::Rewriters::Merge + # @return [Merge] a new instance of Merge + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#66 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#75 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#63 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # source://rbi//lib/rbi/rewriters/merge_trees.rb#50 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#82 +class RBI::Rewriters::Merge::Conflict + # @return [Conflict] a new instance of Conflict + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#90 + sig { params(left: ::RBI::Node, right: ::RBI::Node, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name:, right_name:); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#84 + sig { returns(::RBI::Node) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#87 + sig { returns(::String) } + def left_name; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#84 + def right; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#87 + def right_name; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#98 + sig { returns(::String) } + def to_s; end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#258 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#261 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#267 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#290 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#40 +class RBI::Rewriters::Merge::Keep + class << self + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#45 + def new(*_arg0); end + end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 +RBI::Rewriters::Merge::Keep::LEFT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#41 +RBI::Rewriters::Merge::Keep::NONE = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#43 +RBI::Rewriters::Merge::Keep::RIGHT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep) + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#103 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # @return [TreeMerger] a new instance of TreeMerger + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#108 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#105 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#121 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#181 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#198 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#205 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#186 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#217 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#6 +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# This rewriter moves top-level members into a top-level Object class +# +# Example: +# ~~~rb +# def foo; end +# attr_reader :bar +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# class Object +# def foo; end +# attr_reader :bar +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # @return [NestTopLevelMembers] a new instance of NestTopLevelMembers + # + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#24 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#32 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # @return [RemoveKnownDefinitions] a new instance of RemoveKnownDefinitions + # + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#53 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#50 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#75 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#69 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#103 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#121 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#94 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#61 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#126 +class RBI::Rewriters::RemoveKnownDefinitions::Operation + # @return [Operation] a new instance of Operation + # + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#131 + sig { params(deleted_node: ::RBI::Node, duplicate_of: ::RBI::Node).void } + def initialize(deleted_node:, duplicate_of:); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#128 + sig { returns(::RBI::Node) } + def deleted_node; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#128 + def duplicate_of; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#137 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#9 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#74 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#95 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#46 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#107 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Translate all RBS signature comments to Sorbet RBI signatures +# +# source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#7 +class RBI::Rewriters::TranslateRBSSigs < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#12 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#34 + sig { params(node: T.any(::RBI::Attr, ::RBI::Method)).returns(T::Array[::RBI::RBSComment]) } + def extract_rbs_comments(node); end + + # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#61 + sig { params(node: ::RBI::Attr, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_attr_type(node, comment); end + + # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#53 + sig { params(node: ::RBI::Method, comment: ::RBI::RBSComment).returns(::RBI::Sig) } + def translate_rbs_method_type(node, comment); end +end + +# source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#8 +class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#163 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # Duplicate `self` scope without its body + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#363 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/model.rb#166 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#84 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#170 + sig { override.returns(::String) } + def to_s; end +end + +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#603 +class RBI::ScopeConflict < ::RBI::Tree + # @return [ScopeConflict] a new instance of ScopeConflict + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#611 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#605 + sig { returns(::RBI::Scope) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#608 + sig { returns(::String) } + def left_name; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#605 + def right; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#608 + def right_name; end +end + +# Sends +# +# source://rbi//lib/rbi/model.rb#802 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [Send] a new instance of Send + # + # source://rbi//lib/rbi/model.rb#810 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Send).void) + ).void + end + def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#818 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # source://rbi//lib/rbi/model.rb#823 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#807 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#184 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#804 + sig { returns(::String) } + def method; end + + # source://rbi//lib/rbi/model.rb#828 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#877 +class RBI::Sig < ::RBI::NodeWithComments + # @return [Sig] a new instance of Sig + # + # source://rbi//lib/rbi/model.rb#926 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + allow_incompatible_override: T::Boolean, + allow_incompatible_override_visibility: T::Boolean, + without_runtime: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#958 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#968 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#963 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#897 + sig { returns(T::Boolean) } + def allow_incompatible_override; end + + # source://rbi//lib/rbi/model.rb#897 + def allow_incompatible_override=(_arg0); end + + # source://rbi//lib/rbi/model.rb#900 + sig { returns(T::Boolean) } + def allow_incompatible_override_visibility; end + + # source://rbi//lib/rbi/model.rb#900 + def allow_incompatible_override_visibility=(_arg0); end + + # source://rbi//lib/rbi/model.rb#909 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # source://rbi//lib/rbi/model.rb#909 + def checked=(_arg0); end + + # source://rbi//lib/rbi/model.rb#885 + sig { returns(T::Boolean) } + def is_abstract; end + + # source://rbi//lib/rbi/model.rb#885 + def is_abstract=(_arg0); end + + # source://rbi//lib/rbi/model.rb#894 + sig { returns(T::Boolean) } + def is_final; end + + # source://rbi//lib/rbi/model.rb#894 + def is_final=(_arg0); end + + # source://rbi//lib/rbi/model.rb#891 + sig { returns(T::Boolean) } + def is_overridable; end + + # source://rbi//lib/rbi/model.rb#891 + def is_overridable=(_arg0); end + + # source://rbi//lib/rbi/model.rb#888 + sig { returns(T::Boolean) } + def is_override; end + + # source://rbi//lib/rbi/model.rb#888 + def is_override=(_arg0); end + + # source://rbi//lib/rbi/model.rb#879 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # source://rbi//lib/rbi/model.rb#882 + sig { returns(T.any(::RBI::Type, ::String)) } + def return_type; end + + # source://rbi//lib/rbi/model.rb#882 + def return_type=(_arg0); end + + # source://rbi//lib/rbi/model.rb#906 + sig { returns(T::Array[::String]) } + def type_params; end + + # source://rbi//lib/rbi/model.rb#903 + sig { returns(T::Boolean) } + def without_runtime; end + + # source://rbi//lib/rbi/model.rb#903 + def without_runtime=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#977 +class RBI::SigParam < ::RBI::NodeWithComments + # @return [SigParam] a new instance of SigParam + # + # source://rbi//lib/rbi/model.rb#985 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) + ).void + end + def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#993 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#979 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#982 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end +end + +# source://rbi//lib/rbi/model.rb#219 +class RBI::SingletonClass < ::RBI::Scope + # @return [SingletonClass] a new instance of SingletonClass + # + # source://rbi//lib/rbi/model.rb#221 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#228 + sig { override.returns(::String) } + def fully_qualified_name; end +end + +# source://rbi//lib/rbi/model.rb#233 +class RBI::Struct < ::RBI::Scope + # @return [Struct] a new instance of Struct + # + # source://rbi//lib/rbi/model.rb#250 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + end + def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#404 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#260 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#241 + sig { returns(T::Boolean) } + def keyword_init; end + + # source://rbi//lib/rbi/model.rb#241 + def keyword_init=(_arg0); end + + # source://rbi//lib/rbi/model.rb#238 + sig { returns(T::Array[::Symbol]) } + def members; end + + # source://rbi//lib/rbi/model.rb#238 + def members=(_arg0); end + + # source://rbi//lib/rbi/model.rb#235 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#235 + def name=(_arg0); end +end + +# Sorbet's T::Enum +# +# source://rbi//lib/rbi/model.rb#1088 +class RBI::TEnum < ::RBI::Class + # @return [TEnum] a new instance of TEnum + # + # source://rbi//lib/rbi/model.rb#1090 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1096 +class RBI::TEnumBlock < ::RBI::Scope + # @return [TEnumBlock] a new instance of TEnumBlock + # + # source://rbi//lib/rbi/model.rb#1098 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1105 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#214 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1111 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#1116 +class RBI::TEnumValue < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [TEnumValue] a new instance of TEnumValue + # + # source://rbi//lib/rbi/model.rb#1121 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TEnumValue).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1128 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#224 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1118 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1134 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1000 +class RBI::TStruct < ::RBI::Class + # @return [TStruct] a new instance of TStruct + # + # source://rbi//lib/rbi/model.rb#1002 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1032 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # @return [TStructConst] a new instance of TStructConst + # + # source://rbi//lib/rbi/model.rb#1040 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#545 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1047 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#194 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1054 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract +# +# source://rbi//lib/rbi/model.rb#1009 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # @return [TStructField] a new instance of TStructField + # + # source://rbi//lib/rbi/model.rb#1020 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1017 + sig { returns(T.nilable(::String)) } + def default; end + + # source://rbi//lib/rbi/model.rb#1017 + def default=(_arg0); end + + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/model.rb#1029 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#1011 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1011 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1014 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end + + # source://rbi//lib/rbi/model.rb#1014 + def type=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1059 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # @return [TStructProp] a new instance of TStructProp + # + # source://rbi//lib/rbi/model.rb#1067 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#553 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1074 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#204 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1081 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#108 +class RBI::Tree < ::RBI::NodeWithComments + # @return [Tree] a new instance of Tree + # + # source://rbi//lib/rbi/model.rb#113 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#120 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#63 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#46 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#38 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#126 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#113 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#58 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#57 + sig { void } + def flatten_visibilities!; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#78 + sig { void } + def group_nodes!; end + + # source://rbi//lib/rbi/index.rb#62 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#336 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#43 + sig { void } + def nest_non_public_members!; end + + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#33 + sig { void } + def nest_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#60 + sig { void } + def nest_top_level_members!; end + + # source://rbi//lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#50 + sig { void } + def replace_attributes_with_methods!; end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#118 + sig { void } + def sort_nodes!; end + + # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#82 + sig { void } + def translate_rbs_sigs!; end +end + +# The base class for all RBI types. +# +# @abstract +# +# source://rbi//lib/rbi/type.rb#7 +class RBI::Type + abstract! + + # @return [Type] a new instance of Type + # + # source://rbi//lib/rbi/type.rb#993 + sig { void } + def initialize; end + + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/type.rb#1064 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type.rb#1067 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # source://rbi//lib/rbi/type.rb#1073 + sig { override.returns(::Integer) } + def hash; end + + # Returns a new type that is `nilable` if it is not already. + # + # If the type is already nilable, it returns itself. + # ```ruby + # type = RBI::Type.simple("String") + # type.to_rbi # => "String" + # type.nilable.to_rbi # => "::T.nilable(String)" + # type.nilable.nilable.to_rbi # => "::T.nilable(String)" + # ``` + # + # source://rbi//lib/rbi/type.rb#1007 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # @return [Boolean] + # + # source://rbi//lib/rbi/type.rb#1034 + sig { returns(T::Boolean) } + def nilable?; end + + # Returns the non-nilable version of the type. + # If the type is already non-nilable, it returns itself. + # If the type is nilable, it returns the inner type. + # + # ```ruby + # type = RBI::Type.nilable(RBI::Type.simple("String")) + # type.to_rbi # => "::T.nilable(String)" + # type.non_nilable.to_rbi # => "String" + # type.non_nilable.non_nilable.to_rbi # => "String" + # ``` + # + # source://rbi//lib/rbi/type.rb#1022 + sig { returns(::RBI::Type) } + def non_nilable; end + + # Returns a normalized version of the type. + # + # Normalized types are meant to be easier to process, not to read. + # For example, `T.any(TrueClass, FalseClass)` instead of `T::Boolean` or + # `T.any(String, NilClass)` instead of `T.nilable(String)`. + # + # This is the inverse of `#simplify`. + # + # + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/type.rb#1048 + sig { abstract.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/rbs_printer.rb#1261 + sig { returns(::String) } + def rbs_string; end + + # Returns a simplified version of the type. + # + # Simplified types are meant to be easier to read, not to process. + # For example, `T::Boolean` instead of `T.any(TrueClass, FalseClass)` or + # `T.nilable(String)` instead of `T.any(String, NilClass)`. + # + # This is the inverse of `#normalize`. + # + # + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/type.rb#1060 + sig { abstract.returns(::RBI::Type) } + def simplify; end + + # @abstract + # @raise [NotImplementedError] + # + # source://rbi//lib/rbi/type.rb#1079 + sig { abstract.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#1083 + sig { override.returns(::String) } + def to_s; end + + class << self + # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. + # + # Note that this method transforms types such as `T.all(String, String)` into `String`, so + # it may return something other than a `All`. + # + # source://rbi//lib/rbi/type.rb#929 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. + # + # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so + # it may return something other than a `Any`. + # + # source://rbi//lib/rbi/type.rb#938 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + # Builds a type that represents `T.anything`. + # + # source://rbi//lib/rbi/type.rb#854 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # source://rbi//lib/rbi/type.rb#860 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # source://rbi//lib/rbi/type.rb#866 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # source://rbi//lib/rbi/type.rb#910 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } + def class_of(type, type_parameter = T.unsafe(nil)); end + + # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. + # + # source://rbi//lib/rbi/type.rb#946 + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + # Builds a type that represents a nilable of another type like `T.nilable(String)`. + # + # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so + # it may return something other than a `RBI::Type::Nilable`. + # + # source://rbi//lib/rbi/type.rb#919 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # source://rbi//lib/rbi/type.rb#872 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # source://rbi//lib/rbi/type_parser.rb#26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#10 + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + # Builds a type that represents a proc type like `T.proc.void`. + # + # source://rbi//lib/rbi/type.rb#980 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # source://rbi//lib/rbi/type.rb#878 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # source://rbi//lib/rbi/type.rb#972 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + # Builds a simple type like `String` or `::Foo::Bar`. + # + # It raises a `NameError` if the name is not a valid Ruby class identifier. + # + # @raise [NameError] + # + # source://rbi//lib/rbi/type.rb#843 + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + # Builds a type that represents the class of another type like `T::Class[Foo]`. + # + # source://rbi//lib/rbi/type.rb#898 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + # Builds a type that represents the module of another type like `T::Module[Foo]`. + # + # source://rbi//lib/rbi/type.rb#904 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Module) } + def t_module(type); end + + # Builds a type that represents a tuple type like `[String, Integer]`. + # + # source://rbi//lib/rbi/type.rb#966 + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + # Builds a type that represents a type alias like `MyTypeAlias`. + # + # source://rbi//lib/rbi/type.rb#958 + sig { params(name: ::String, aliased_type: ::RBI::Type).returns(::RBI::Type::TypeAlias) } + def type_alias(name, aliased_type); end + + # Builds a type that represents a type parameter like `T.type_parameter(:U)`. + # + # source://rbi//lib/rbi/type.rb#952 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # source://rbi//lib/rbi/type.rb#884 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # source://rbi//lib/rbi/type.rb#890 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # source://rbi//lib/rbi/type_parser.rb#322 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # source://rbi//lib/rbi/type_parser.rb#309 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + # source://rbi//lib/rbi/type_parser.rb#294 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#96 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # source://rbi//lib/rbi/type_parser.rb#56 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + # source://rbi//lib/rbi/type_parser.rb#73 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).returns(::RBI::Type) } + def parse_constant_assignment(node); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#244 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # source://rbi//lib/rbi/type_parser.rb#223 + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + # source://rbi//lib/rbi/type_parser.rb#218 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#335 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#354 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#361 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#371 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#366 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_module?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#378 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type_parser.rb#347 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_type_alias?(node); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/type.rb#987 + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +# A type that is intersection of multiple types like `T.all(String, Integer)`. +# +# source://rbi//lib/rbi/type.rb#420 +class RBI::Type::All < ::RBI::Type::Composite + # source://rbi//lib/rbi/type.rb#429 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#449 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#423 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that is union of multiple types like `T.any(String, Integer)`. +# +# source://rbi//lib/rbi/type.rb#462 +class RBI::Type::Any < ::RBI::Type::Composite + # @return [Boolean] + # + # source://rbi//lib/rbi/type.rb#470 + sig { returns(T::Boolean) } + def nilable?; end + + # source://rbi//lib/rbi/type.rb#476 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#496 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#465 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# source://rbi//lib/rbi/type.rb#51 +class RBI::Type::Anything < ::RBI::Type + # source://rbi//lib/rbi/type.rb#54 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#66 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#72 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#60 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.attached_class`. +# +# source://rbi//lib/rbi/type.rb#78 +class RBI::Type::AttachedClass < ::RBI::Type + # source://rbi//lib/rbi/type.rb#81 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#93 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#99 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#87 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T::Boolean`. +# +# source://rbi//lib/rbi/type.rb#105 +class RBI::Type::Boolean < ::RBI::Type + # source://rbi//lib/rbi/type.rb#108 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#120 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#126 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#114 + sig { override.returns(::String) } + def to_rbi; end +end + +# The class of another type like `T::Class[Foo]`. +# +# source://rbi//lib/rbi/type.rb#242 +class RBI::Type::Class < ::RBI::Type + # @return [Class] a new instance of Class + # + # source://rbi//lib/rbi/type.rb#247 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#254 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#266 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#272 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#260 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#244 + sig { returns(::RBI::Type) } + def type; end +end + +# The singleton class of another type like `T.class_of(Foo)`. +# +# source://rbi//lib/rbi/type.rb#314 +class RBI::Type::ClassOf < ::RBI::Type + # @return [ClassOf] a new instance of ClassOf + # + # source://rbi//lib/rbi/type.rb#322 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + # source://rbi//lib/rbi/type.rb#330 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#346 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#352 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#336 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#316 + sig { returns(::RBI::Type::Simple) } + def type; end + + # source://rbi//lib/rbi/type.rb#319 + sig { returns(T.nilable(::RBI::Type)) } + def type_parameter; end +end + +# A type that is composed of multiple types like `T.all(String, Integer)`. +# +# @abstract +# +# source://rbi//lib/rbi/type.rb#402 +class RBI::Type::Composite < ::RBI::Type + abstract! + + # @return [Composite] a new instance of Composite + # + # source://rbi//lib/rbi/type.rb#407 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#414 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#404 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# source://rbi//lib/rbi/type_parser.rb#6 +class RBI::Type::Error < ::RBI::Error; end + +# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. +# +# source://rbi//lib/rbi/type.rb#547 +class RBI::Type::Generic < ::RBI::Type + # @return [Generic] a new instance of Generic + # + # source://rbi//lib/rbi/type.rb#555 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # source://rbi//lib/rbi/type.rb#563 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#549 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#575 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#552 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # source://rbi//lib/rbi/type.rb#581 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#569 + sig { override.returns(::String) } + def to_rbi; end +end + +# The module of another type like `T::Module[Foo]`. +# +# source://rbi//lib/rbi/type.rb#278 +class RBI::Type::Module < ::RBI::Type + # @return [Module] a new instance of Module + # + # source://rbi//lib/rbi/type.rb#283 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#290 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#302 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#308 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#296 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#280 + sig { returns(::RBI::Type) } + def type; end +end + +# A type that can be `nil` like `T.nilable(String)`. +# +# source://rbi//lib/rbi/type.rb#358 +class RBI::Type::Nilable < ::RBI::Type + # @return [Nilable] a new instance of Nilable + # + # source://rbi//lib/rbi/type.rb#363 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#382 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#388 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#376 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#360 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# source://rbi//lib/rbi/type.rb#132 +class RBI::Type::NoReturn < ::RBI::Type + # source://rbi//lib/rbi/type.rb#135 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#147 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#153 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#141 + sig { override.returns(::String) } + def to_rbi; end +end + +# A proc type like `T.proc.void`. +# +# source://rbi//lib/rbi/type.rb#743 +class RBI::Type::Proc < ::RBI::Type + # @return [Proc] a new instance of Proc + # + # source://rbi//lib/rbi/type.rb#754 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/type.rb#763 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#791 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # source://rbi//lib/rbi/type.rb#823 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#773 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # source://rbi//lib/rbi/type.rb#751 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # source://rbi//lib/rbi/type.rb#745 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # source://rbi//lib/rbi/type.rb#748 + sig { returns(::RBI::Type) } + def proc_returns; end + + # source://rbi//lib/rbi/type.rb#779 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # source://rbi//lib/rbi/type.rb#829 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#798 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#785 + sig { returns(T.self_type) } + def void; end +end + +# `T.self_type`. +# +# source://rbi//lib/rbi/type.rb#159 +class RBI::Type::SelfType < ::RBI::Type + # source://rbi//lib/rbi/type.rb#162 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#174 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#180 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#168 + sig { override.returns(::String) } + def to_rbi; end +end + +# A shape type like `{name: String, age: Integer}`. +# +# source://rbi//lib/rbi/type.rb#701 +class RBI::Type::Shape < ::RBI::Type + # @return [Shape] a new instance of Shape + # + # source://rbi//lib/rbi/type.rb#706 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#713 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#729 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#735 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#719 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#703 + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +# A type that represents a simple class name like `String` or `Foo`. +# +# It can also be a qualified name like `::Foo` or `Foo::Bar`. +# +# source://rbi//lib/rbi/type.rb#13 +class RBI::Type::Simple < ::RBI::Type + # @return [Simple] a new instance of Simple + # + # source://rbi//lib/rbi/type.rb#18 + sig { params(name: ::String).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#25 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#15 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#37 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#43 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#31 + sig { override.returns(::String) } + def to_rbi; end +end + +# A tuple type like `[String, Integer]`. +# +# source://rbi//lib/rbi/type.rb#665 +class RBI::Type::Tuple < ::RBI::Type + # @return [Tuple] a new instance of Tuple + # + # source://rbi//lib/rbi/type.rb#670 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#677 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#689 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#695 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#683 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#667 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type alias that references another type by name like `MyTypeAlias`. +# +# source://rbi//lib/rbi/type.rb#623 +class RBI::Type::TypeAlias < ::RBI::Type + # @return [TypeAlias] a new instance of TypeAlias + # + # source://rbi//lib/rbi/type.rb#631 + sig { params(name: ::String, aliased_type: ::RBI::Type).void } + def initialize(name, aliased_type); end + + # source://rbi//lib/rbi/type.rb#639 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#628 + sig { returns(::RBI::Type) } + def aliased_type; end + + # source://rbi//lib/rbi/type.rb#625 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#651 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#657 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#645 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# source://rbi//lib/rbi/type.rb#587 +class RBI::Type::TypeParameter < ::RBI::Type + # @return [TypeParameter] a new instance of TypeParameter + # + # source://rbi//lib/rbi/type.rb#592 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#599 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#589 + sig { returns(::Symbol) } + def name; end + + # source://rbi//lib/rbi/type.rb#611 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#617 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#605 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# source://rbi//lib/rbi/type.rb#186 +class RBI::Type::Untyped < ::RBI::Type + # source://rbi//lib/rbi/type.rb#189 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#201 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#207 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#195 + sig { override.returns(::String) } + def to_rbi; end +end + +# source://rbi//lib/rbi/type_visitor.rb#6 +class RBI::Type::Visitor + # source://rbi//lib/rbi/type_visitor.rb#10 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/type_visitor.rb#58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/type_visitor.rb#61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/type_visitor.rb#64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/type_visitor.rb#67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/type_visitor.rb#73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/type_visitor.rb#79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/type_visitor.rb#82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/type_visitor.rb#88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/type_visitor.rb#91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/type_visitor.rb#94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/type_visitor.rb#100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/type_visitor.rb#85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#112 + sig { params(type: ::RBI::Type::TypeAlias).void } + def visit_type_alias(type); end + + # source://rbi//lib/rbi/type_visitor.rb#106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/type_visitor.rb#109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/type_visitor.rb#97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# source://rbi//lib/rbi/type_visitor.rb#7 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# source://rbi//lib/rbi/type.rb#213 +class RBI::Type::Void < ::RBI::Type + # source://rbi//lib/rbi/type.rb#216 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#228 + sig { override.returns(::RBI::Type) } + def normalize; end + + # source://rbi//lib/rbi/type.rb#234 + sig { override.returns(::RBI::Type) } + def simplify; end + + # source://rbi//lib/rbi/type.rb#222 + sig { override.returns(::String) } + def to_rbi; end +end + +# source://rbi//lib/rbi/model.rb#1159 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # @return [TypeMember] a new instance of TypeMember + # + # source://rbi//lib/rbi/model.rb#1164 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1172 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#174 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1161 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1180 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#1161 + def value; end +end + +# source://rbi//lib/rbi/rbs_printer.rb#984 +class RBI::TypePrinter + # @return [TypePrinter] a new instance of TypePrinter + # + # source://rbi//lib/rbi/rbs_printer.rb#989 + sig { params(max_line_length: T.nilable(::Integer)).void } + def initialize(max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#986 + sig { returns(::String) } + def string; end + + # source://rbi//lib/rbi/rbs_printer.rb#995 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#1112 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1122 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1062 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1087 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1046 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1189 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1105 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1051 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1196 + sig { params(type: ::RBI::Type::Module).void } + def visit_module(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1092 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1072 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1162 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1082 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1142 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1041 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1132 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1184 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1077 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#1067 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#1205 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + +# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5 +class RBI::UnexpectedMultipleSigsError < ::RBI::Error + # @return [UnexpectedMultipleSigsError] a new instance of UnexpectedMultipleSigsError + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7 + sig { returns(::RBI::Node) } + def node; end +end + +# source://rbi//lib/rbi/parser.rb#18 +class RBI::UnexpectedParserError < ::RBI::Error + # @return [UnexpectedParserError] a new instance of UnexpectedParserError + # + # source://rbi//lib/rbi/parser.rb#23 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # source://rbi//lib/rbi/parser.rb#20 + sig { returns(::RBI::Loc) } + def last_location; end + + # source://rbi//lib/rbi/parser.rb#30 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/version.rb#5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# @abstract +# +# source://rbi//lib/rbi/model.rb#743 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # @return [Visibility] a new instance of Visibility + # + # source://rbi//lib/rbi/model.rb#748 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#754 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#771 + sig { returns(T::Boolean) } + def private?; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#766 + sig { returns(T::Boolean) } + def protected?; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#761 + sig { returns(T::Boolean) } + def public?; end + + # source://rbi//lib/rbi/model.rb#745 + sig { returns(::Symbol) } + def visibility; end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#49 +class RBI::VisibilityGroup < ::RBI::Tree + # @return [VisibilityGroup] a new instance of VisibilityGroup + # + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#54 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#51 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract +# +# source://rbi//lib/rbi/visitor.rb#8 +class RBI::Visitor + abstract! + + # source://rbi//lib/rbi/visitor.rb#10 + sig { params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/visitor.rb#108 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/visitor.rb#113 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # source://rbi//lib/rbi/visitor.rb#198 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#147 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/visitor.rb#150 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/visitor.rb#153 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/visitor.rb#126 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/visitor.rb#177 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/visitor.rb#132 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/visitor.rb#120 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/visitor.rb#246 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#144 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/visitor.rb#183 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/visitor.rb#240 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/visitor.rb#228 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/visitor.rb#180 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/visitor.rb#201 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#171 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#168 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/visitor.rb#174 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#156 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/visitor.rb#234 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/visitor.rb#129 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/visitor.rb#162 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#192 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/visitor.rb#189 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/visitor.rb#186 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/visitor.rb#123 + sig { params(node: ::RBI::RBSComment).void } + def visit_rbs_comment(node); end + + # source://rbi//lib/rbi/visitor.rb#159 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/visitor.rb#237 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/visitor.rb#165 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#249 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/visitor.rb#195 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/visitor.rb#204 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/visitor.rb#207 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/visitor.rb#135 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/visitor.rb#138 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/visitor.rb#219 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/visitor.rb#222 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/visitor.rb#225 + sig { params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + + # source://rbi//lib/rbi/visitor.rb#141 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#210 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/visitor.rb#213 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/visitor.rb#216 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/visitor.rb#231 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/visitor.rb#243 + sig { params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# source://rbi//lib/rbi/visitor.rb#5 +class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi b/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi new file mode 100644 index 0000000..a7796c0 --- /dev/null +++ b/sorbet/rbi/gems/rbs@4.0.0.dev.5.rbi @@ -0,0 +1,8278 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbs` gem. +# Please instead update this file by running `bin/tapioca gem rbs`. + + +# source://rbs//lib/rbs/version.rb#3 +module RBS + class << self + # source://rbs//lib/rbs.rb#81 + def logger; end + + # Returns the value of attribute logger_level. + # + # source://rbs//lib/rbs.rb#78 + def logger_level; end + + # source://rbs//lib/rbs.rb#90 + def logger_level=(level); end + + # Returns the value of attribute logger_output. + # + # source://rbs//lib/rbs.rb#79 + def logger_output; end + + # source://rbs//lib/rbs.rb#85 + def logger_output=(val); end + + # source://rbs//lib/rbs.rb#95 + def print_warning; end + end +end + +# source://rbs//lib/rbs/ast/type_param.rb#4 +module RBS::AST; end + +# source://rbs//lib/rbs/ast/annotation.rb#5 +class RBS::AST::Annotation + # @return [Annotation] a new instance of Annotation + # + # source://rbs//lib/rbs/ast/annotation.rb#9 + def initialize(string:, location:); end + + # source://rbs//lib/rbs/ast/annotation.rb#14 + def ==(other); end + + # source://rbs//lib/rbs/ast/annotation.rb#18 + def eql?(other); end + + # source://rbs//lib/rbs/ast/annotation.rb#20 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/annotation.rb#7 + def location; end + + # Returns the value of attribute string. + # + # source://rbs//lib/rbs/ast/annotation.rb#6 + def string; end + + # source://rbs//lib/rbs/ast/annotation.rb#24 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/comment.rb#5 +class RBS::AST::Comment + # @return [Comment] a new instance of Comment + # + # source://rbs//lib/rbs/ast/comment.rb#9 + def initialize(string:, location:); end + + # source://rbs//lib/rbs/ast/comment.rb#14 + def ==(other); end + + # source://rbs//lib/rbs/ast/comment.rb#18 + def eql?(other); end + + # source://rbs//lib/rbs/ast/comment.rb#20 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/comment.rb#7 + def location; end + + # Returns the value of attribute string. + # + # source://rbs//lib/rbs/ast/comment.rb#6 + def string; end + + # source://rbs//lib/rbs/ast/comment.rb#24 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#5 +module RBS::AST::Declarations; end + +# source://rbs//lib/rbs/ast/declarations.rb#423 +class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base + # @return [AliasDecl] a new instance of AliasDecl + # + # source://rbs//lib/rbs/ast/declarations.rb#426 + def initialize(new_name:, old_name:, location:, comment:, annotations: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/declarations.rb#434 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#424 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#424 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#440 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#442 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#424 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/declarations.rb#424 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs//lib/rbs/ast/declarations.rb#424 + def old_name; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#6 +class RBS::AST::Declarations::Base; end + +# source://rbs//lib/rbs/ast/declarations.rb#55 +class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # @return [Class] a new instance of Class + # + # source://rbs//lib/rbs/ast/declarations.rb#97 + def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#119 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#93 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#95 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#127 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#129 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#94 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#91 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#89 + def name; end + + # Returns the value of attribute super_class. + # + # source://rbs//lib/rbs/ast/declarations.rb#92 + def super_class; end + + # source://rbs//lib/rbs/ast/declarations.rb#133 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#90 + def type_params; end + + # source://rbs//lib/rbs/ast/declarations.rb#107 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), super_class: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#56 +class RBS::AST::Declarations::Class::Super + # @return [Super] a new instance of Super + # + # source://rbs//lib/rbs/ast/declarations.rb#61 + def initialize(name:, args:, location:); end + + # source://rbs//lib/rbs/ast/declarations.rb#67 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/declarations.rb#58 + def args; end + + # source://rbs//lib/rbs/ast/declarations.rb#71 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#73 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#59 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#57 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#77 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#447 +class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl + # source://rbs//lib/rbs/ast/declarations.rb#448 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#347 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # @return [Constant] a new instance of Constant + # + # source://rbs//lib/rbs/ast/declarations.rb#354 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/declarations.rb#362 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#352 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#351 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#368 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#370 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#350 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#348 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#374 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#349 + def type; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#385 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # @return [Global] a new instance of Global + # + # source://rbs//lib/rbs/ast/declarations.rb#392 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/declarations.rb#400 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#390 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#389 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#406 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#408 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#388 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#386 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#412 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#387 + def type; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#248 +class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::MixinHelper + + # @return [Interface] a new instance of Interface + # + # source://rbs//lib/rbs/ast/declarations.rb#258 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#278 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#252 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#254 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#285 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#287 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#253 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#251 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#249 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#291 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#250 + def type_params; end + + # source://rbs//lib/rbs/ast/declarations.rb#267 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#35 +module RBS::AST::Declarations::MixinHelper + # source://rbs//lib/rbs/ast/declarations.rb#36 + def each_mixin(&block); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#147 +class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # @return [Module] a new instance of Module + # + # source://rbs//lib/rbs/ast/declarations.rb#197 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#220 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#193 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#195 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#228 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#230 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#192 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#191 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#189 + def name; end + + # Returns the value of attribute self_types. + # + # source://rbs//lib/rbs/ast/declarations.rb#194 + def self_types; end + + # source://rbs//lib/rbs/ast/declarations.rb#234 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#190 + def type_params; end + + # source://rbs//lib/rbs/ast/declarations.rb#207 + def update(name: T.unsafe(nil), type_params: T.unsafe(nil), members: T.unsafe(nil), self_types: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#148 +class RBS::AST::Declarations::Module::Self + # @return [Self] a new instance of Self + # + # source://rbs//lib/rbs/ast/declarations.rb#153 + def initialize(name:, args:, location:); end + + # source://rbs//lib/rbs/ast/declarations.rb#159 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/declarations.rb#150 + def args; end + + # source://rbs//lib/rbs/ast/declarations.rb#163 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#165 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#151 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#149 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#169 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/declarations.rb#177 + def to_s; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#459 +class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl + # source://rbs//lib/rbs/ast/declarations.rb#460 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#9 +module RBS::AST::Declarations::NestedDeclarationHelper + # source://rbs//lib/rbs/ast/declarations.rb#22 + def each_decl; end + + # source://rbs//lib/rbs/ast/declarations.rb#10 + def each_member; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#304 +class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base + # @return [TypeAlias] a new instance of TypeAlias + # + # source://rbs//lib/rbs/ast/declarations.rb#312 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#321 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#308 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#310 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#328 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#330 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#309 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#305 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#334 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#307 + def type; end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#306 + def type_params; end +end + +# source://rbs//lib/rbs/ast/directives.rb#5 +module RBS::AST::Directives; end + +# source://rbs//lib/rbs/ast/directives.rb#6 +class RBS::AST::Directives::Base; end + +# source://rbs//lib/rbs/ast/directives.rb#37 +class RBS::AST::Directives::ResolveTypeNames < ::RBS::AST::Directives::Base + # @return [ResolveTypeNames] a new instance of ResolveTypeNames + # + # source://rbs//lib/rbs/ast/directives.rb#42 + def initialize(value:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#38 + def location; end + + # Returns the value of attribute value. + # + # source://rbs//lib/rbs/ast/directives.rb#40 + def value; end +end + +# source://rbs//lib/rbs/ast/directives.rb#9 +class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base + # @return [Use] a new instance of Use + # + # source://rbs//lib/rbs/ast/directives.rb#31 + def initialize(clauses:, location:); end + + # Returns the value of attribute clauses. + # + # source://rbs//lib/rbs/ast/directives.rb#29 + def clauses; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#29 + def location; end +end + +# source://rbs//lib/rbs/ast/directives.rb#10 +class RBS::AST::Directives::Use::SingleClause + # @return [SingleClause] a new instance of SingleClause + # + # source://rbs//lib/rbs/ast/directives.rb#13 + def initialize(type_name:, new_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#11 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/directives.rb#11 + def new_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/directives.rb#11 + def type_name; end +end + +# source://rbs//lib/rbs/ast/directives.rb#20 +class RBS::AST::Directives::Use::WildcardClause + # @return [WildcardClause] a new instance of WildcardClause + # + # source://rbs//lib/rbs/ast/directives.rb#23 + def initialize(namespace:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#21 + def location; end + + # Returns the value of attribute namespace. + # + # source://rbs//lib/rbs/ast/directives.rb#21 + def namespace; end +end + +# source://rbs//lib/rbs/ast/members.rb#5 +module RBS::AST::Members; end + +# source://rbs//lib/rbs/ast/members.rb#399 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/ast/members.rb#407 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#416 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#403 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#405 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#423 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#425 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#441 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#402 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#404 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/members.rb#400 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs//lib/rbs/ast/members.rb#401 + def old_name; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#445 + def singleton?; end + + # source://rbs//lib/rbs/ast/members.rb#429 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#329 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#332 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#311 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#314 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#347 +class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#350 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#260 +module RBS::AST::Members::Attribute + # source://rbs//lib/rbs/ast/members.rb#270 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#281 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#265 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#267 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#290 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#292 + def hash; end + + # Returns the value of attribute ivar_name. + # + # source://rbs//lib/rbs/ast/members.rb#264 + def ivar_name; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#263 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#266 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#261 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/members.rb#262 + def type; end + + # source://rbs//lib/rbs/ast/members.rb#296 + def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs//lib/rbs/ast/members.rb#268 + def visibility; end +end + +# source://rbs//lib/rbs/ast/members.rb#6 +class RBS::AST::Members::Base; end + +# source://rbs//lib/rbs/ast/members.rb#159 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#162 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#173 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#176 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#230 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#233 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#215 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#218 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#145 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#148 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#365 +module RBS::AST::Members::LocationOnly + # source://rbs//lib/rbs/ast/members.rb#368 + def initialize(location:); end + + # source://rbs//lib/rbs/ast/members.rb#372 + def ==(other); end + + # source://rbs//lib/rbs/ast/members.rb#376 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#378 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#366 + def location; end +end + +# source://rbs//lib/rbs/ast/members.rb#9 +class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base + # @return [MethodDefinition] a new instance of MethodDefinition + # + # source://rbs//lib/rbs/ast/members.rb#55 + def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end + + # source://rbs//lib/rbs/ast/members.rb#66 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#49 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#51 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#75 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#77 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#81 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#47 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#50 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#46 + def name; end + + # Returns the value of attribute overloading. + # + # source://rbs//lib/rbs/ast/members.rb#52 + def overloading; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#89 + def overloading?; end + + # Returns the value of attribute overloads. + # + # source://rbs//lib/rbs/ast/members.rb#48 + def overloads; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#85 + def singleton?; end + + # source://rbs//lib/rbs/ast/members.rb#106 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#93 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs//lib/rbs/ast/members.rb#53 + def visibility; end +end + +# source://rbs//lib/rbs/ast/members.rb#10 +class RBS::AST::Members::MethodDefinition::Overload + # @return [Overload] a new instance of Overload + # + # source://rbs//lib/rbs/ast/members.rb#13 + def initialize(method_type:, annotations:); end + + # source://rbs//lib/rbs/ast/members.rb#18 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#11 + def annotations; end + + # source://rbs//lib/rbs/ast/members.rb#26 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#22 + def hash; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/members.rb#11 + def method_type; end + + # source://rbs//lib/rbs/ast/members.rb#32 + def sub(subst); end + + # source://rbs//lib/rbs/ast/members.rb#38 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#28 + def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#187 +module RBS::AST::Members::Mixin + # source://rbs//lib/rbs/ast/members.rb#194 + def initialize(name:, args:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#202 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#190 + def annotations; end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/members.rb#189 + def args; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#192 + def comment; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#206 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#210 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#191 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#188 + def name; end +end + +# source://rbs//lib/rbs/ast/members.rb#245 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#248 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#391 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs//lib/rbs/ast/members.rb#394 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#383 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs//lib/rbs/ast/members.rb#386 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#121 +module RBS::AST::Members::Var + # source://rbs//lib/rbs/ast/members.rb#127 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#134 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#125 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#138 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#140 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#124 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#122 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/members.rb#123 + def type; end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#5 +module RBS::AST::Ruby; end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#6 +module RBS::AST::Ruby::Annotations; end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#43 +class RBS::AST::Ruby::Annotations::AliasAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [AliasAnnotation] a new instance of AliasAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#46 + def initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:); end + + # Returns the value of attribute keyword_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#44 + def keyword_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#53 + def map_type_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#44 + def type_name; end + + # Returns the value of attribute type_name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#44 + def type_name_location; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#7 +class RBS::AST::Ruby::Annotations::Base + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#10 + def initialize(location, prefix_location); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#15 + def buffer; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#8 + def location; end + + # Returns the value of attribute prefix_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#8 + def prefix_location; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#64 +class RBS::AST::Ruby::Annotations::ClassAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # source://rbs//lib/rbs/ast/ruby/annotations.rb#65 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#82 +class RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ColonMethodTypeAnnotation] a new instance of ColonMethodTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#85 + def initialize(location:, prefix_location:, annotations:, method_type:); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#83 + def annotations; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#91 + def map_type_name; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#83 + def method_type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#100 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#220 +class RBS::AST::Ruby::Annotations::InstanceVariableAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [InstanceVariableAnnotation] a new instance of InstanceVariableAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#223 + def initialize(location:, prefix_location:, ivar_name:, ivar_name_location:, colon_location:, type:, comment_location:); end + + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#221 + def colon_location; end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#221 + def comment_location; end + + # Returns the value of attribute ivar_name. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#221 + def ivar_name; end + + # Returns the value of attribute ivar_name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#221 + def ivar_name_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#232 + def map_type_name(&block); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#221 + def type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#244 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#109 +class RBS::AST::Ruby::Annotations::MethodTypesAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [MethodTypesAnnotation] a new instance of MethodTypesAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#114 + def initialize(location:, prefix_location:, overloads:, vertical_bar_locations:); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#120 + def map_type_name(&block); end + + # Returns the value of attribute overloads. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#112 + def overloads; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#131 + def type_fingerprint; end + + # Returns the value of attribute vertical_bar_locations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#112 + def vertical_bar_locations; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#110 +RBS::AST::Ruby::Annotations::MethodTypesAnnotation::Overload = RBS::AST::Members::MethodDefinition::Overload + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#73 +class RBS::AST::Ruby::Annotations::ModuleAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # source://rbs//lib/rbs/ast/ruby/annotations.rb#74 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#20 +class RBS::AST::Ruby::Annotations::NodeTypeAssertion < ::RBS::AST::Ruby::Annotations::Base + # @return [NodeTypeAssertion] a new instance of NodeTypeAssertion + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#23 + def initialize(location:, prefix_location:, type:); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#28 + def map_type_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#21 + def type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#35 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#153 +class RBS::AST::Ruby::Annotations::ReturnTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ReturnTypeAnnotation] a new instance of ReturnTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#162 + def initialize(location:, prefix_location:, return_location:, colon_location:, return_type:, comment_location:); end + + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#156 + def colon_location; end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#160 + def comment_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#170 + def map_type_name(&block); end + + # Returns the value of attribute return_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#154 + def return_location; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#158 + def return_type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#181 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#139 +class RBS::AST::Ruby::Annotations::SkipAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [SkipAnnotation] a new instance of SkipAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#142 + def initialize(location:, prefix_location:, skip_location:, comment_location:); end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#140 + def comment_location; end + + # Returns the value of attribute skip_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#140 + def skip_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#148 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#190 +class RBS::AST::Ruby::Annotations::TypeApplicationAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [TypeApplicationAnnotation] a new instance of TypeApplicationAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#193 + def initialize(location:, prefix_location:, type_args:, close_bracket_location:, comma_locations:); end + + # Returns the value of attribute close_bracket_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#191 + def close_bracket_location; end + + # Returns the value of attribute comma_locations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#191 + def comma_locations; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#200 + def map_type_name(&block); end + + # Returns the value of attribute type_args. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#191 + def type_args; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#212 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#6 +class RBS::AST::Ruby::CommentBlock + # @return [CommentBlock] a new instance of CommentBlock + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#9 + def initialize(source_buffer, comments); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#226 + def as_comment; end + + # Returns the value of attribute comment_buffer. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def comment_buffer; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#211 + def comments; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#98 + def each_paragraph(variables, &block); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#50 + def end_line; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#36 + def leading?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#215 + def leading_annotation?(index); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#174 + def line_location(start_line, end_line); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#54 + def line_starts; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#180 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def name; end + + # Returns the value of attribute offsets. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def offsets; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#187 + def parse_annotation_lines(start_line, end_line, variables); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#46 + def start_line; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#169 + def text(comment_index); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#41 + def trailing?; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#197 + def trailing_annotation(variables); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#130 + def yield_annotation(start_line, end_line, current_line, variables, &block); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#110 + def yield_paragraph(start_line, current_line, variables, &block); end + + class << self + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#60 + def build(buffer, comments); end + end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 +class RBS::AST::Ruby::CommentBlock::AnnotationSyntaxError < ::Struct + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def error; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def error=(_); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def location; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def location=(_); end + + class << self + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def [](*_arg0); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def inspect; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def keyword_init?; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def members; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#6 +module RBS::AST::Ruby::Declarations; end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#7 +class RBS::AST::Ruby::Declarations::Base + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#13 + def initialize(buffer); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#8 + def buffer; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#18 +class RBS::AST::Ruby::Declarations::ClassDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ClassDecl] a new instance of ClassDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#74 + def initialize(buffer, name, node, super_class); end + + # Returns the value of attribute class_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#66 + def class_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#82 + def each_decl(&block); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#94 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#68 + def members; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#98 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#70 + def node; end + + # Returns the value of attribute super_class. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#72 + def super_class; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#102 + def type_fingerprint; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#92 + def type_params; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#19 +class RBS::AST::Ruby::Declarations::ClassDecl::SuperClass + # @return [SuperClass] a new instance of SuperClass + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#28 + def initialize(type_name_location, operator_location, type_name, type_annotation); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#56 + def args; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#43 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#55 + def name; end + + # Returns the value of attribute operator_location. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#22 + def operator_location; end + + # Returns the value of attribute type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#26 + def type_annotation; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#35 + def type_args; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#58 + def type_fingerprint; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#24 + def type_name; end + + # Returns the value of attribute type_name_location. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#20 + def type_name_location; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#223 +class RBS::AST::Ruby::Declarations::ClassModuleAliasDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ClassModuleAliasDecl] a new instance of ClassModuleAliasDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#230 + def initialize(buffer, node, new_name, infered_old_name, leading_comment, annotation); end + + # Returns the value of attribute annotation. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#228 + def annotation; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#264 + def comment; end + + # Returns the value of attribute infered_old_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#227 + def infered_old_name; end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#225 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#239 + def location; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#243 + def name_location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#226 + def new_name; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#224 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#252 + def old_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#268 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#161 +class RBS::AST::Ruby::Declarations::ConstantDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ConstantDecl] a new instance of ConstantDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#167 + def initialize(buffer, constant_name, node, leading_comment, type_annotation); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#209 + def comment; end + + # Returns the value of attribute constant_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#163 + def constant_name; end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#162 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#175 + def location; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#179 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#164 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#188 + def type; end + + # Returns the value of attribute type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#165 + def type_annotation; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#213 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#114 +class RBS::AST::Ruby::Declarations::ModuleDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ModuleDecl] a new instance of ModuleDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#121 + def initialize(buffer, name, node); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#128 + def each_decl(&block); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#142 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#117 + def members; end + + # Returns the value of attribute module_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#115 + def module_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#146 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#119 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#140 + def self_types; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#150 + def type_fingerprint; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#138 + def type_params; end +end + +# source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#6 +module RBS::AST::Ruby::Helpers; end + +# source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#7 +module RBS::AST::Ruby::Helpers::ConstantHelper + private + + # source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#10 + def constant_as_type_name(node); end + + class << self + # source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#10 + def constant_as_type_name(node); end + end +end + +# source://rbs//lib/rbs/ast/ruby/helpers/location_helper.rb#7 +module RBS::AST::Ruby::Helpers::LocationHelper + # source://rbs//lib/rbs/ast/ruby/helpers/location_helper.rb#8 + def rbs_location(location); end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#6 +module RBS::AST::Ruby::Members; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#338 +class RBS::AST::Ruby::Members::AttrAccessorMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#332 +class RBS::AST::Ruby::Members::AttrReaderMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#335 +class RBS::AST::Ruby::Members::AttrWriterMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#287 +class RBS::AST::Ruby::Members::AttributeMember < ::RBS::AST::Ruby::Members::Base + # @return [AttributeMember] a new instance of AttributeMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#293 + def initialize(buffer, node, name_nodes, leading_comment, type_annotation); end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#291 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#307 + def location; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#311 + def name_locations; end + + # Returns the value of attribute name_nodes. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#289 + def name_nodes; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#301 + def names; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#288 + def node; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#317 + def type; end + + # Returns the value of attribute type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#290 + def type_annotation; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#321 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#7 +class RBS::AST::Ruby::Members::Base + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/members.rb#10 + def initialize(buffer); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#8 + def buffer; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#195 +class RBS::AST::Ruby::Members::DefMember < ::RBS::AST::Ruby::Members::Base + # @return [DefMember] a new instance of DefMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#203 + def initialize(buffer, name, node, method_type, leading_comment); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#223 + def annotations; end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#201 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#211 + def location; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#200 + def method_type; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#198 + def name; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#227 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#199 + def node; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#219 + def overloading?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#215 + def overloads; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#231 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#196 +RBS::AST::Ruby::Members::DefMember::Overload = RBS::AST::Members::MethodDefinition::Overload + +# source://rbs//lib/rbs/ast/ruby/members.rb#281 +class RBS::AST::Ruby::Members::ExtendMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#278 +class RBS::AST::Ruby::Members::IncludeMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#341 +class RBS::AST::Ruby::Members::InstanceVariableMember < ::RBS::AST::Ruby::Members::Base + # @return [InstanceVariableMember] a new instance of InstanceVariableMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#344 + def initialize(buffer, annotation); end + + # Returns the value of attribute annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#342 + def annotation; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#357 + def location; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#349 + def name; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#353 + def type; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#361 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#17 +class RBS::AST::Ruby::Members::MethodTypeAnnotation + # @return [MethodTypeAnnotation] a new instance of MethodTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/members.rb#68 + def initialize(type_annotations:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#143 + def empty?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#72 + def map_type_name(&block); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#147 + def overloads; end + + # Returns the value of attribute type_annotations. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#66 + def type_annotations; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#183 + def type_fingerprint; end + + class << self + # source://rbs//lib/rbs/ast/ruby/members.rb#85 + def build(leading_block, trailing_block, variables); end + end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#18 +class RBS::AST::Ruby::Members::MethodTypeAnnotation::DocStyle + # @return [DocStyle] a new instance of DocStyle + # + # source://rbs//lib/rbs/ast/ruby/members.rb#21 + def initialize; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#25 + def map_type_name(&block); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#35 + def method_type; end + + # Returns the value of attribute return_type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#19 + def return_type_annotation; end + + # Sets the attribute return_type_annotation + # + # @param value the value to set the attribute return_type_annotation to. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#19 + def return_type_annotation=(_arg0); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#31 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#241 +class RBS::AST::Ruby::Members::MixinMember < ::RBS::AST::Ruby::Members::Base + # @return [MixinMember] a new instance of MixinMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#246 + def initialize(buffer, node, module_name, annotation); end + + # Returns the value of attribute annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#244 + def annotation; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#253 + def location; end + + # Returns the value of attribute module_name. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#243 + def module_name; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#257 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#242 + def node; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#264 + def type_args; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#268 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#284 +class RBS::AST::Ruby::Members::PrependMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# source://rbs//lib/rbs/ast/type_param.rb#5 +class RBS::AST::TypeParam + # @return [TypeParam] a new instance of TypeParam + # + # source://rbs//lib/rbs/ast/type_param.rb#8 + def initialize(name:, variance:, upper_bound:, lower_bound:, location:, default_type: T.unsafe(nil), unchecked: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/type_param.rb#41 + def ==(other); end + + # Returns the value of attribute default_type. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def default_type; end + + # source://rbs//lib/rbs/ast/type_param.rb#51 + def eql?(other); end + + # source://rbs//lib/rbs/ast/type_param.rb#53 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def location; end + + # source://rbs//lib/rbs/ast/type_param.rb#25 + def lower_bound; end + + # Returns the value of attribute lower_bound_type. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def lower_bound_type; end + + # source://rbs//lib/rbs/ast/type_param.rb#69 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def name; end + + # source://rbs//lib/rbs/ast/type_param.rb#57 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/type_param.rb#133 + def to_s; end + + # source://rbs//lib/rbs/ast/type_param.rb#32 + def unchecked!(value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/type_param.rb#37 + def unchecked?; end + + # source://rbs//lib/rbs/ast/type_param.rb#18 + def upper_bound; end + + # Returns the value of attribute upper_bound_type. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def upper_bound_type; end + + # Returns the value of attribute variance. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def variance; end + + class << self + # source://rbs//lib/rbs/ast/type_param.rb#166 + def application(params, args); end + + # source://rbs//lib/rbs/ast/type_param.rb#198 + def normalize_args(params, args); end + + # source://rbs//lib/rbs/ast/type_param.rb#114 + def rename(params, new_names:); end + + # source://rbs//lib/rbs/ast/type_param.rb#92 + def resolve_variables(params); end + + # source://rbs//lib/rbs/ast/type_param.rb#102 + def subst_var(vars, type); end + + # source://rbs//lib/rbs/ast/type_param.rb#219 + def validate(type_params); end + end +end + +# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). +# +# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. +# +# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for +# different node types. +# +# Example usage: +# +# ~~~rb +# class MyVisitor < RBS::AST::Visitor +# def visit_declaration_class(node) +# puts "Visiting class: #{node.name}" +# +# super # call `super` to run the default visiting behavior +# end +# end +# +# visitor = MyVisitor.new +# visitor.visit(ast_node) +# ~~~ +# +# source://rbs//lib/rbs/ast/visitor.rb#26 +class RBS::AST::Visitor + # source://rbs//lib/rbs/ast/visitor.rb#27 + def visit(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#70 + def visit_all(nodes); end + + # source://rbs//lib/rbs/ast/visitor.rb#79 + def visit_declaration_class(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#87 + def visit_declaration_constant(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#76 + def visit_declaration_global(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#93 + def visit_declaration_interface(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#83 + def visit_declaration_module(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#90 + def visit_declaration_type_alias(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#97 + def visit_member_alias(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#124 + def visit_member_attr_accessor(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#118 + def visit_member_attr_reader(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#121 + def visit_member_attr_writer(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#100 + def visit_member_class_instance_variable(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#103 + def visit_member_class_variable(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#133 + def visit_member_extend(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#127 + def visit_member_include(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#106 + def visit_member_instance_variable(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#115 + def visit_member_method_definition(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#130 + def visit_member_prepend(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#109 + def visit_member_private(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#112 + def visit_member_public(node); end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#4 +class RBS::AncestorGraph + # @return [AncestorGraph] a new instance of AncestorGraph + # + # source://rbs//lib/rbs/ancestor_graph.rb#13 + def initialize(env:, ancestor_builder: T.unsafe(nil)); end + + # Returns the value of attribute ancestor_builder. + # + # source://rbs//lib/rbs/ancestor_graph.rb#9 + def ancestor_builder; end + + # source://rbs//lib/rbs/ancestor_graph.rb#19 + def build; end + + # source://rbs//lib/rbs/ancestor_graph.rb#32 + def build_ancestors(node, ancestors); end + + # Returns the value of attribute children. + # + # source://rbs//lib/rbs/ancestor_graph.rb#11 + def children; end + + # source://rbs//lib/rbs/ancestor_graph.rb#64 + def each_ancestor(node, yielded: T.unsafe(nil), &block); end + + # source://rbs//lib/rbs/ancestor_graph.rb#56 + def each_child(node, &block); end + + # source://rbs//lib/rbs/ancestor_graph.rb#78 + def each_descendant(node, yielded: T.unsafe(nil), &block); end + + # source://rbs//lib/rbs/ancestor_graph.rb#48 + def each_parent(node, &block); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/ancestor_graph.rb#8 + def env; end + + # Returns the value of attribute parents. + # + # source://rbs//lib/rbs/ancestor_graph.rb#10 + def parents; end + + # source://rbs//lib/rbs/ancestor_graph.rb#43 + def register(parent:, child:); end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#5 +class RBS::AncestorGraph::InstanceNode < ::Struct + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def type_name; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def type_name=(_); end + + class << self + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def [](*_arg0); end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def inspect; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def keyword_init?; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def members; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#6 +class RBS::AncestorGraph::SingletonNode < ::Struct + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def type_name; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def type_name=(_); end + + class << self + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def [](*_arg0); end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def inspect; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def keyword_init?; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def members; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/errors.rb#19 +class RBS::BaseError < ::StandardError; end + +# source://rbs//lib/rbs/buffer.rb#4 +class RBS::Buffer + # @return [Buffer] a new instance of Buffer + # + # source://rbs//lib/rbs/buffer.rb#9 + def initialize(content:, name: T.unsafe(nil), parent: T.unsafe(nil)); end + + # source://rbs//lib/rbs/buffer.rb#131 + def absolute_position(position); end + + # Returns the value of attribute content. + # + # source://rbs//lib/rbs/buffer.rb#6 + def content; end + + # source://rbs//lib/rbs/buffer.rb#148 + def detach; end + + # source://rbs//lib/rbs/buffer.rb#86 + def inspect; end + + # source://rbs//lib/rbs/buffer.rb#78 + def last_position; end + + # source://rbs//lib/rbs/buffer.rb#26 + def line_count; end + + # source://rbs//lib/rbs/buffer.rb#22 + def lines; end + + # source://rbs//lib/rbs/buffer.rb#68 + def loc_to_pos(loc); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/buffer.rb#5 + def name; end + + # Returns the value of attribute parent. + # + # source://rbs//lib/rbs/buffer.rb#7 + def parent; end + + # source://rbs//lib/rbs/buffer.rb#116 + def parent_buffer; end + + # source://rbs//lib/rbs/buffer.rb#122 + def parent_position(position); end + + # source://rbs//lib/rbs/buffer.rb#56 + def pos_to_loc(pos); end + + # source://rbs//lib/rbs/buffer.rb#30 + def ranges; end + + # source://rbs//lib/rbs/buffer.rb#90 + def rbs_location(location, loc2 = T.unsafe(nil)); end + + # source://rbs//lib/rbs/buffer.rb#98 + def sub_buffer(lines:); end + + # source://rbs//lib/rbs/buffer.rb#140 + def top_buffer; end +end + +# source://rbs//lib/rbs/builtin_names.rb#4 +module RBS::BuiltinNames; end + +# source://rbs//lib/rbs/builtin_names.rb#45 +RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#37 +RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#43 +RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#41 +RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#42 +RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#48 +RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#55 +RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#52 +RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#46 +RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#51 +RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#39 +RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#44 +RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#5 +class RBS::BuiltinNames::Name + # @return [Name] a new instance of Name + # + # source://rbs//lib/rbs/builtin_names.rb#8 + def initialize(name:); end + + # source://rbs//lib/rbs/builtin_names.rb#16 + def instance_type(*args); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/builtin_names.rb#20 + def instance_type?(type); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/builtin_names.rb#6 + def name; end + + # source://rbs//lib/rbs/builtin_names.rb#24 + def singleton_type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/builtin_names.rb#28 + def singleton_type?(type); end + + # source://rbs//lib/rbs/builtin_names.rb#12 + def to_s; end + + class << self + # source://rbs//lib/rbs/builtin_names.rb#32 + def define(name, namespace: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/builtin_names.rb#56 +RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#38 +RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#47 +RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#53 +RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#49 +RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#40 +RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#50 +RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#54 +RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/cli/colored_io.rb#4 +class RBS::CLI; end + +# source://rbs//lib/rbs/cli/colored_io.rb#5 +class RBS::CLI::ColoredIO + # @return [ColoredIO] a new instance of ColoredIO + # + # source://rbs//lib/rbs/cli/colored_io.rb#8 + def initialize(stdout:); end + + # source://rbs//lib/rbs/cli/colored_io.rb#28 + def puts(*_arg0, **_arg1, &_arg2); end + + # source://rbs//lib/rbs/cli/colored_io.rb#20 + def puts_green(string); end + + # source://rbs//lib/rbs/cli/colored_io.rb#12 + def puts_red(string); end + + # Returns the value of attribute stdout. + # + # source://rbs//lib/rbs/cli/colored_io.rb#6 + def stdout; end + + private + + # @return [Boolean] + # + # source://rbs//lib/rbs/cli/colored_io.rb#43 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/cli/colored_io.rb#39 + def are_colors_supported?; end + + # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 + # + # @return [Boolean] + # + # source://rbs//lib/rbs/cli/colored_io.rb#35 + def can_display_colors?; end +end + +# source://rbs//lib/rbs/errors.rb#345 +class RBS::ClassInstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # source://rbs//lib/rbs/errors.rb#346 + def kind; end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#4 +module RBS::Collection; end + +# source://rbs//lib/rbs/collection/cleaner.rb#5 +class RBS::Collection::Cleaner + # @return [Cleaner] a new instance of Cleaner + # + # source://rbs//lib/rbs/collection/cleaner.rb#8 + def initialize(lockfile_path:); end + + # source://rbs//lib/rbs/collection/cleaner.rb#12 + def clean; end + + # Returns the value of attribute lock. + # + # source://rbs//lib/rbs/collection/cleaner.rb#6 + def lock; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/cleaner.rb#30 + def needed?(gem_name, version); end +end + +# This class represent the configuration file. +# +# source://rbs//lib/rbs/collection/config.rb#7 +class RBS::Collection::Config + # @return [Config] a new instance of Config + # + # source://rbs//lib/rbs/collection/config.rb#49 + def initialize(data, config_path:); end + + # Returns the value of attribute config_path. + # + # source://rbs//lib/rbs/collection/config.rb#19 + def config_path; end + + # Returns the value of attribute data. + # + # source://rbs//lib/rbs/collection/config.rb#19 + def data; end + + # source://rbs//lib/rbs/collection/config.rb#54 + def gem(gem_name); end + + # source://rbs//lib/rbs/collection/config.rb#74 + def gems; end + + # source://rbs//lib/rbs/collection/config.rb#58 + def repo_path; end + + # source://rbs//lib/rbs/collection/config.rb#62 + def repo_path_data; end + + # source://rbs//lib/rbs/collection/config.rb#66 + def sources; end + + class << self + # source://rbs//lib/rbs/collection/config.rb#21 + def find_config_path; end + + # source://rbs//lib/rbs/collection/config.rb#41 + def from_path(path); end + + # Generate a rbs lockfile from Gemfile.lock to `config_path`. + # If `with_lockfile` is true, it respects existing rbs lockfile. + # + # source://rbs//lib/rbs/collection/config.rb#34 + def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/config.rb#45 + def to_lockfile_path(config_path); end + end +end + +# source://rbs//lib/rbs/collection/config.rb#8 +class RBS::Collection::Config::CollectionNotAvailable < ::StandardError + # @return [CollectionNotAvailable] a new instance of CollectionNotAvailable + # + # source://rbs//lib/rbs/collection/config.rb#9 + def initialize; end +end + +# source://rbs//lib/rbs/collection/config/lockfile.rb#6 +class RBS::Collection::Config::Lockfile + # @return [Lockfile] a new instance of Lockfile + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#9 + def initialize(lockfile_path:, path:, gemfile_lock_path:); end + + # @raise [CollectionNotAvailable] + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#73 + def check_rbs_availability!; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#18 + def fullpath; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#22 + def gemfile_lock_fullpath; end + + # Returns the value of attribute gemfile_lock_path. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def gemfile_lock_path; end + + # Returns the value of attribute gems. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def gems; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#65 + def library_data(lib); end + + # Returns the value of attribute lockfile_dir. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def lockfile_dir; end + + # Returns the value of attribute lockfile_path. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def lockfile_path; end + + # Returns the value of attribute path. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def path; end + + # Returns the value of attribute sources. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def sources; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#28 + def to_lockfile; end + + class << self + # source://rbs//lib/rbs/collection/config/lockfile.rb#42 + def from_lockfile(lockfile_path:, data:); end + end +end + +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#6 +class RBS::Collection::Config::LockfileGenerator + # @return [LockfileGenerator] a new instance of LockfileGenerator + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#44 + def initialize(config:, definition:, with_lockfile:); end + + # Returns the value of attribute config. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#36 + def config; end + + # Returns the value of attribute definition. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#36 + def definition; end + + # Returns the value of attribute existing_lockfile. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#36 + def existing_lockfile; end + + # Returns the value of attribute gem_entries. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#36 + def gem_entries; end + + # Returns the value of attribute gem_hash. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#36 + def gem_hash; end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#72 + def generate; end + + # Returns the value of attribute lockfile. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#36 + def lockfile; end + + private + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#105 + def assign_gem(name:, version:, skip: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#171 + def assign_stdlib(name:, from_gem: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#242 + def find_best_version(version:, versions:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#236 + def find_source(name:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#97 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#38 + def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#7 +RBS::Collection::Config::LockfileGenerator::ALUMNI_STDLIBS = T.let(T.unsafe(nil), Hash) + +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#20 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # @return [GemfileLockMismatchError] a new instance of GemfileLockMismatchError + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#21 + def initialize(expected:, actual:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#26 + def message; end +end + +# source://rbs//lib/rbs/collection/config.rb#17 +RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/collection/installer.rb#5 +class RBS::Collection::Installer + # @return [Installer] a new instance of Installer + # + # source://rbs//lib/rbs/collection/installer.rb#9 + def initialize(lockfile_path:, stdout: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/installer.rb#14 + def install_from_lockfile; end + + # Returns the value of attribute lockfile. + # + # source://rbs//lib/rbs/collection/installer.rb#6 + def lockfile; end + + # Returns the value of attribute stdout. + # + # source://rbs//lib/rbs/collection/installer.rb#7 + def stdout; end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#5 +module RBS::Collection::Sources + class << self + # source://rbs//lib/rbs/collection/sources.rb#12 + def from_config_entry(source_entry, base_directory:); end + end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#6 +module RBS::Collection::Sources::Base + # source://rbs//lib/rbs/collection/sources/base.rb#7 + def dependencies_of(name, version); end +end + +# source://rbs//lib/rbs/collection/sources/git.rb#11 +class RBS::Collection::Sources::Git + include ::RBS::Collection::Sources::Base + + # @return [Git] a new instance of Git + # + # source://rbs//lib/rbs/collection/sources/git.rb#19 + def initialize(name:, revision:, remote:, repo_dir:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#27 + def has?(name, version); end + + # source://rbs//lib/rbs/collection/sources/git.rb#44 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#224 + def load_metadata(dir:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#74 + def manifest_of(name, version); end + + # source://rbs//lib/rbs/collection/sources/git.rb#208 + def metadata_content(name:, version:); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/collection/sources/git.rb#17 + def name; end + + # Returns the value of attribute remote. + # + # source://rbs//lib/rbs/collection/sources/git.rb#17 + def remote; end + + # Returns the value of attribute repo_dir. + # + # source://rbs//lib/rbs/collection/sources/git.rb#17 + def repo_dir; end + + # source://rbs//lib/rbs/collection/sources/git.rb#173 + def resolved_revision; end + + # Returns the value of attribute revision. + # + # source://rbs//lib/rbs/collection/sources/git.rb#17 + def revision; end + + # source://rbs//lib/rbs/collection/sources/git.rb#114 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/git.rb#37 + def versions(name); end + + # source://rbs//lib/rbs/collection/sources/git.rb#216 + def write_metadata(dir:, name:, version:); end + + private + + # source://rbs//lib/rbs/collection/sources/git.rb#88 + def _install(dest:, name:, version:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#184 + def commit_hash?; end + + # source://rbs//lib/rbs/collection/sources/git.rb#100 + def cp_r(src, dest); end + + # source://rbs//lib/rbs/collection/sources/git.rb#124 + def format_config_entry(name, version); end + + # source://rbs//lib/rbs/collection/sources/git.rb#169 + def gem_repo_dir; end + + # source://rbs//lib/rbs/collection/sources/git.rb#230 + def gems_versions; end + + # source://rbs//lib/rbs/collection/sources/git.rb#188 + def git(*cmd, **opt); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#192 + def git?(*cmd, **opt); end + + # source://rbs//lib/rbs/collection/sources/git.rb#159 + def git_dir; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#153 + def need_to_fetch?(revision); end + + # source://rbs//lib/rbs/collection/sources/git.rb#131 + def setup!; end + + # source://rbs//lib/rbs/collection/sources/git.rb#198 + def sh!(*cmd, **opt); end +end + +# source://rbs//lib/rbs/collection/sources/git.rb#15 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# source://rbs//lib/rbs/collection/sources/git.rb#13 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# source://rbs//lib/rbs/collection/sources/local.rb#6 +class RBS::Collection::Sources::Local + include ::RBS::Collection::Sources::Base + + # @return [Local] a new instance of Local + # + # source://rbs//lib/rbs/collection/sources/local.rb#11 + def initialize(path:, base_directory:); end + + # Returns the value of attribute full_path. + # + # source://rbs//lib/rbs/collection/sources/local.rb#9 + def full_path; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/local.rb#17 + def has?(name, version); end + + # Create a symlink instead of copying file to refer files in @path. + # By avoiding copying RBS files, the users do not need re-run `rbs collection install` + # when the RBS files are updated. + # + # source://rbs//lib/rbs/collection/sources/local.rb#32 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/local.rb#64 + def manifest_of(name, version); end + + # Returns the value of attribute path. + # + # source://rbs//lib/rbs/collection/sources/local.rb#9 + def path; end + + # source://rbs//lib/rbs/collection/sources/local.rb#72 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/local.rb#25 + def versions(name); end + + private + + # source://rbs//lib/rbs/collection/sources/local.rb#59 + def _install(src, dst); end +end + +# Signatures that are included in gem package as sig/ directory. +# +# source://rbs//lib/rbs/collection/sources/rubygems.rb#9 +class RBS::Collection::Sources::Rubygems + include ::RBS::Collection::Sources::Base + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/rubygems.rb#13 + def has?(name, version); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#23 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#29 + def manifest_of(name, version); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#36 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#17 + def versions(name); end + + private + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#42 + def gem_sig_path(name, version); end + + class << self + private + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#11 + def allocate; end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#11 + def new(*_arg0); end + end +end + +# signatures that are bundled in rbs gem under the stdlib/ directory +# +# source://rbs//lib/rbs/collection/sources/stdlib.rb#9 +class RBS::Collection::Sources::Stdlib + include ::RBS::Collection::Sources::Base + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/stdlib.rb#15 + def has?(name, version); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#23 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#29 + def manifest_of(name, version); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#38 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#19 + def versions(name); end + + private + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#44 + def lookup(name, version); end + + class << self + private + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#11 + def allocate; end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#11 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/collection/sources/stdlib.rb#13 +RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) + +# source://rbs//lib/rbs/constant.rb#4 +class RBS::Constant + # @return [Constant] a new instance of Constant + # + # source://rbs//lib/rbs/constant.rb#9 + def initialize(name:, type:, entry:); end + + # source://rbs//lib/rbs/constant.rb#15 + def ==(other); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/constant.rb#7 + def entry; end + + # source://rbs//lib/rbs/constant.rb#22 + def eql?(other); end + + # source://rbs//lib/rbs/constant.rb#24 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/constant.rb#5 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/constant.rb#6 + def type; end +end + +# source://rbs//lib/rbs/errors.rb#598 +class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [CyclicClassAliasDefinitionError] a new instance of CyclicClassAliasDefinitionError + # + # source://rbs//lib/rbs/errors.rb#603 + def initialize(entry); end + + # Returns the value of attribute alias_entry. + # + # source://rbs//lib/rbs/errors.rb#601 + def alias_entry; end + + # source://rbs//lib/rbs/errors.rb#609 + def location; end +end + +# source://rbs//lib/rbs/errors.rb#559 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound + # + # source://rbs//lib/rbs/errors.rb#564 + def initialize(type_name:, method_name:, params:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#562 + def location; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#562 + def method_name; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/errors.rb#562 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#562 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#4 +class RBS::Definition + # @return [Definition] a new instance of Definition + # + # source://rbs//lib/rbs/definition.rb#302 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#296 + def ancestors; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#325 + def class?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#342 + def class_type?; end + + # Returns the value of attribute class_variables. + # + # source://rbs//lib/rbs/definition.rb#300 + def class_variables; end + + # source://rbs//lib/rbs/definition.rb#389 + def each_type(&block); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/definition.rb#295 + def entry; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#346 + def instance_type?; end + + # Returns the value of attribute instance_variables. + # + # source://rbs//lib/rbs/definition.rb#299 + def instance_variables; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#333 + def interface?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#350 + def interface_type?; end + + # source://rbs//lib/rbs/definition.rb#379 + def map_method_type(&block); end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition.rb#298 + def methods; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#329 + def module?; end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/definition.rb#297 + def self_type; end + + # source://rbs//lib/rbs/definition.rb#367 + def sub(s); end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#294 + def type_name; end + + # source://rbs//lib/rbs/definition.rb#354 + def type_params; end + + # source://rbs//lib/rbs/definition.rb#358 + def type_params_decl; end +end + +# source://rbs//lib/rbs/definition.rb#209 +module RBS::Definition::Ancestor; end + +# source://rbs//lib/rbs/definition.rb#210 +class RBS::Definition::Ancestor::Instance + # @return [Instance] a new instance of Instance + # + # source://rbs//lib/rbs/definition.rb#213 + def initialize(name:, args:, source:); end + + # source://rbs//lib/rbs/definition.rb#219 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/definition.rb#211 + def args; end + + # source://rbs//lib/rbs/definition.rb#223 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#225 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/definition.rb#211 + def name; end + + # Returns the value of attribute source. + # + # source://rbs//lib/rbs/definition.rb#211 + def source; end +end + +# source://rbs//lib/rbs/definition.rb#230 +class RBS::Definition::Ancestor::Singleton + # @return [Singleton] a new instance of Singleton + # + # source://rbs//lib/rbs/definition.rb#233 + def initialize(name:); end + + # source://rbs//lib/rbs/definition.rb#237 + def ==(other); end + + # source://rbs//lib/rbs/definition.rb#241 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#243 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/definition.rb#231 + def name; end +end + +# source://rbs//lib/rbs/definition.rb#249 +class RBS::Definition::InstanceAncestors + # @return [InstanceAncestors] a new instance of InstanceAncestors + # + # source://rbs//lib/rbs/definition.rb#254 + def initialize(type_name:, params:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#252 + def ancestors; end + + # source://rbs//lib/rbs/definition.rb#260 + def apply(args, env:, location:); end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/definition.rb#251 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#250 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#30 +class RBS::Definition::Method + # @return [Method] a new instance of Method + # + # source://rbs//lib/rbs/definition.rb#107 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition.rb#117 + def ==(other); end + + # Returns the value of attribute accessibility. + # + # source://rbs//lib/rbs/definition.rb#101 + def accessibility; end + + # Returns the value of attribute alias_member. + # + # source://rbs//lib/rbs/definition.rb#105 + def alias_member; end + + # Returns the value of attribute alias_of. + # + # source://rbs//lib/rbs/definition.rb#104 + def alias_of; end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/definition.rb#103 + def annotations; end + + # source://rbs//lib/rbs/definition.rb#151 + def comments; end + + # source://rbs//lib/rbs/definition.rb#133 + def defined_in; end + + # Returns the value of attribute defs. + # + # source://rbs//lib/rbs/definition.rb#100 + def defs; end + + # source://rbs//lib/rbs/definition.rb#127 + def eql?(other); end + + # Returns the value of attribute extra_annotations. + # + # source://rbs//lib/rbs/definition.rb#102 + def extra_annotations; end + + # source://rbs//lib/rbs/definition.rb#129 + def hash; end + + # source://rbs//lib/rbs/definition.rb#140 + def implemented_in; end + + # source://rbs//lib/rbs/definition.rb#190 + def map_method_type(&block); end + + # source://rbs//lib/rbs/definition.rb#176 + def map_type(&block); end + + # source://rbs//lib/rbs/definition.rb#183 + def map_type_bound(&block); end + + # source://rbs//lib/rbs/definition.rb#155 + def members; end + + # source://rbs//lib/rbs/definition.rb#147 + def method_types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#163 + def private?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#159 + def public?; end + + # source://rbs//lib/rbs/definition.rb#167 + def sub(s); end + + # Returns the value of attribute super_method. + # + # source://rbs//lib/rbs/definition.rb#99 + def super_method; end + + # source://rbs//lib/rbs/definition.rb#196 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/definition.rb#31 +class RBS::Definition::Method::TypeDef + # @return [TypeDef] a new instance of TypeDef + # + # source://rbs//lib/rbs/definition.rb#40 + def initialize(type:, member:, defined_in:, implemented_in:, overload_annotations: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition.rb#50 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/definition.rb#38 + def annotations; end + + # source://rbs//lib/rbs/definition.rb#64 + def comment; end + + # Returns the value of attribute defined_in. + # + # source://rbs//lib/rbs/definition.rb#34 + def defined_in; end + + # source://rbs//lib/rbs/definition.rb#89 + def each_annotation(&block); end + + # source://rbs//lib/rbs/definition.rb#58 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#60 + def hash; end + + # Returns the value of attribute implemented_in. + # + # source://rbs//lib/rbs/definition.rb#35 + def implemented_in; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/definition.rb#33 + def member; end + + # Returns the value of attribute member_annotations. + # + # source://rbs//lib/rbs/definition.rb#36 + def member_annotations; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#80 + def overload?; end + + # Returns the value of attribute overload_annotations. + # + # source://rbs//lib/rbs/definition.rb#37 + def overload_annotations; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition.rb#32 + def type; end + + # source://rbs//lib/rbs/definition.rb#73 + def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/definition.rb#284 +class RBS::Definition::SingletonAncestors + # @return [SingletonAncestors] a new instance of SingletonAncestors + # + # source://rbs//lib/rbs/definition.rb#288 + def initialize(type_name:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#286 + def ancestors; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#285 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#5 +class RBS::Definition::Variable + # @return [Variable] a new instance of Variable + # + # source://rbs//lib/rbs/definition.rb#11 + def initialize(parent_variable:, type:, declared_in:, source:); end + + # Returns the value of attribute declared_in. + # + # source://rbs//lib/rbs/definition.rb#8 + def declared_in; end + + # Returns the value of attribute parent_variable. + # + # source://rbs//lib/rbs/definition.rb#6 + def parent_variable; end + + # Returns the value of attribute source. + # + # source://rbs//lib/rbs/definition.rb#9 + def source; end + + # source://rbs//lib/rbs/definition.rb#18 + def sub(s); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition.rb#7 + def type; end +end + +# source://rbs//lib/rbs/definition_builder.rb#4 +class RBS::DefinitionBuilder + # @return [DefinitionBuilder] a new instance of DefinitionBuilder + # + # source://rbs//lib/rbs/definition_builder.rb#14 + def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end + + # Returns the value of attribute ancestor_builder. + # + # source://rbs//lib/rbs/definition_builder.rb#6 + def ancestor_builder; end + + # source://rbs//lib/rbs/definition_builder.rb#195 + def build_instance(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#43 + def build_interface(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#327 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # source://rbs//lib/rbs/definition_builder.rb#257 + def build_singleton0(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#85 + def define_instance(definition, type_name, subst, define_class_vars:); end + + # source://rbs//lib/rbs/definition_builder.rb#33 + def define_interface(definition, type_name, subst); end + + # source://rbs//lib/rbs/definition_builder.rb#682 + def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition_builder.rb#25 + def ensure_namespace!(namespace, location:); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/definition_builder.rb#5 + def env; end + + # source://rbs//lib/rbs/definition_builder.rb#950 + def expand_alias(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#954 + def expand_alias1(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#961 + def expand_alias2(type_name, args); end + + # source://rbs//lib/rbs/definition_builder.rb#621 + def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end + + # source://rbs//lib/rbs/definition_builder.rb#570 + def insert_variable(type_name, variables, name:, type:, source:); end + + # Returns the value of attribute instance_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#9 + def instance_cache; end + + # Returns the value of attribute interface_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#12 + def interface_cache; end + + # source://rbs//lib/rbs/definition_builder.rb#440 + def interface_methods(interface_ancestors); end + + # Returns the value of attribute method_builder. + # + # source://rbs//lib/rbs/definition_builder.rb#7 + def method_builder; end + + # Returns the value of attribute singleton0_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#11 + def singleton0_cache; end + + # Returns the value of attribute singleton_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#10 + def singleton_cache; end + + # source://rbs//lib/rbs/definition_builder.rb#470 + def source_location(source, decl); end + + # source://rbs//lib/rbs/definition_builder.rb#66 + def tapp_subst(name, args); end + + # source://rbs//lib/rbs/definition_builder.rb#946 + def try_cache(type_name, cache:); end + + # source://rbs//lib/rbs/definition_builder.rb#985 + def update(env:, except:, ancestor_builder:); end + + # source://rbs//lib/rbs/definition_builder.rb#460 + def validate_params_with(type_params, result:); end + + # @raise [NoTypeFoundError] + # + # source://rbs//lib/rbs/definition_builder.rb#1014 + def validate_type_name(name, location); end + + # source://rbs//lib/rbs/definition_builder.rb#488 + def validate_type_params(definition, ancestors:, methods:); end + + # source://rbs//lib/rbs/definition_builder.rb#1003 + def validate_type_presence(type); end + + # source://rbs//lib/rbs/definition_builder.rb#581 + def validate_variable(var); end +end + +# source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#5 +class RBS::DefinitionBuilder::AncestorBuilder + # @return [AncestorBuilder] a new instance of AncestorBuilder + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#162 + def initialize(env:); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#151 + def env; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#664 + def fill_ancestor_source(ancestor, name:, source:, &block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#492 + def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute instance_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#154 + def instance_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#628 + def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute interface_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#160 + def interface_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#474 + def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#350 + def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#192 + def one_instance_ancestors(type_name); end + + # Returns the value of attribute one_instance_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#153 + def one_instance_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#331 + def one_interface_ancestors(type_name); end + + # Returns the value of attribute one_interface_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#159 + def one_interface_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#277 + def one_singleton_ancestors(type_name); end + + # Returns the value of attribute one_singleton_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#156 + def one_singleton_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#573 + def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute singleton_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#157 + def singleton_ancestors_cache; end + + # @raise [SuperclassMismatchError] + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#175 + def validate_super_class!(type_name, entry); end +end + +# source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#6 +class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors + # @return [OneAncestors] a new instance of OneAncestors + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#17 + def initialize(type_name:, params:, super_class:, self_types:, included_modules:, included_interfaces:, prepended_modules:, extended_modules:, extended_interfaces:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#29 + def each_ancestor(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#86 + def each_extended_interface(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#78 + def each_extended_module(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#62 + def each_included_interface(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#54 + def each_included_module(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#70 + def each_prepended_module(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#46 + def each_self_type(&block); end + + # Returns the value of attribute extended_interfaces. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#15 + def extended_interfaces; end + + # Returns the value of attribute extended_modules. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#14 + def extended_modules; end + + # Returns the value of attribute included_interfaces. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#12 + def included_interfaces; end + + # Returns the value of attribute included_modules. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#11 + def included_modules; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#8 + def params; end + + # Returns the value of attribute prepended_modules. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#13 + def prepended_modules; end + + # Returns the value of attribute self_types. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#10 + def self_types; end + + # Returns the value of attribute super_class. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#9 + def super_class; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#7 + def type_name; end + + class << self + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#94 + def class_instance(type_name:, params:, super_class:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#136 + def interface(type_name:, params:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#122 + def module_instance(type_name:, params:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#108 + def singleton(type_name:, super_class:); end + end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#5 +class RBS::DefinitionBuilder::MethodBuilder + # @return [MethodBuilder] a new instance of MethodBuilder + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#91 + def initialize(env:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#211 + def build_alias(methods, type, member:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#216 + def build_attribute(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#99 + def build_instance(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#191 + def build_interface(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#250 + def build_method(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#232 + def build_ruby_attribute(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#162 + def build_singleton(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#261 + def each_rbs_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#86 + def env; end + + # Returns the value of attribute instance_methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#87 + def instance_methods; end + + # Returns the value of attribute interface_methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#89 + def interface_methods; end + + # Returns the value of attribute singleton_methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#88 + def singleton_methods; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#274 + def update(env:, except:); end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#6 +class RBS::DefinitionBuilder::MethodBuilder::Methods + # @return [Methods] a new instance of Methods + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#30 + def initialize(type:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#49 + def each; end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#28 + def methods; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#27 + def type; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#35 + def validate!; end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#7 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct + # source://rbs//lib/rbs/definition_builder/method_builder.rb#14 + def accessibility; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#10 + def original; end + + class << self + # source://rbs//lib/rbs/definition_builder/method_builder.rb#22 + def empty(name:, type:); end + end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#63 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter + include ::TSort + + # @return [Sorter] a new instance of Sorter + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#68 + def initialize(methods); end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#66 + def methods; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#76 + def tsort_each_child(defn); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#72 + def tsort_each_node(&block); end +end + +# source://rbs//lib/rbs/errors.rb#21 +class RBS::DefinitionError < ::RBS::BaseError; end + +# source://rbs//lib/rbs/errors.rb#23 +module RBS::DetailedMessageable + # source://rbs//lib/rbs/errors.rb#24 + def detailed_message(highlight: T.unsafe(nil), **_arg1); end +end + +# source://rbs//lib/rbs/diff.rb#4 +class RBS::Diff + # @return [Diff] a new instance of Diff + # + # source://rbs//lib/rbs/diff.rb#5 + def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end + + # source://rbs//lib/rbs/diff.rb#13 + def each_diff(&block); end + + private + + # source://rbs//lib/rbs/diff.rb#96 + def build_builder(env); end + + # source://rbs//lib/rbs/diff.rb#77 + def build_env(path); end + + # source://rbs//lib/rbs/diff.rb#49 + def build_methods(path); end + + # source://rbs//lib/rbs/diff.rb#122 + def constant_to_s(constant); end + + # source://rbs//lib/rbs/diff.rb#100 + def definition_method_to_s(key, kind, definition_method); end + + # source://rbs//lib/rbs/diff.rb#38 + def each_diff_constants(before_constant_children, after_constant_children); end + + # source://rbs//lib/rbs/diff.rb#27 + def each_diff_methods(kind, before_methods, after_methods); end +end + +# source://rbs//lib/rbs/errors.rb#419 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError + # + # source://rbs//lib/rbs/errors.rb#423 + def initialize(name, *decls); end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/errors.rb#421 + def decls; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#420 + def name; end +end + +# source://rbs//lib/rbs/errors.rb#292 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [DuplicatedInterfaceMethodDefinitionError] a new instance of DuplicatedInterfaceMethodDefinitionError + # + # source://rbs//lib/rbs/errors.rb#299 + def initialize(type:, method_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#307 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#297 + def member; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#296 + def method_name; end + + # source://rbs//lib/rbs/errors.rb#311 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#295 + def type; end + + # source://rbs//lib/rbs/errors.rb#320 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#251 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [DuplicatedMethodDefinitionError] a new instance of DuplicatedMethodDefinitionError + # + # source://rbs//lib/rbs/errors.rb#258 + def initialize(type:, method_name:, members:); end + + # source://rbs//lib/rbs/errors.rb#283 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/errors.rb#256 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#255 + def method_name; end + + # source://rbs//lib/rbs/errors.rb#287 + def other_locations; end + + # source://rbs//lib/rbs/errors.rb#270 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#254 + def type; end + + # source://rbs//lib/rbs/errors.rb#279 + def type_name; end +end + +# source://rbs//lib/rbs/environment.rb#4 +class RBS::Environment + # @return [Environment] a new instance of Environment + # + # source://rbs//lib/rbs/environment.rb#48 + def initialize; end + + # source://rbs//lib/rbs/environment.rb#981 + def absolute_type(resolver, map, type, context:); end + + # source://rbs//lib/rbs/environment.rb#976 + def absolute_type_name(resolver, map, type_name, context:); end + + # source://rbs//lib/rbs/environment.rb#455 + def add_source(source); end + + # source://rbs//lib/rbs/environment.rb#568 + def append_context(context, decl); end + + # source://rbs//lib/rbs/environment.rb#992 + def buffers; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#117 + def class_alias?(name); end + + # Returns the value of attribute class_alias_decls. + # + # source://rbs//lib/rbs/environment.rb#10 + def class_alias_decls; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#101 + def class_decl?(name); end + + # Returns the value of attribute class_decls. + # + # source://rbs//lib/rbs/environment.rb#5 + def class_decls; end + + # source://rbs//lib/rbs/environment.rb#125 + def class_entry(type_name, normalized: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#97 + def constant_decl?(name); end + + # Returns the value of attribute constant_decls. + # + # source://rbs//lib/rbs/environment.rb#8 + def constant_decls; end + + # source://rbs//lib/rbs/environment.rb#167 + def constant_entry(type_name, normalized: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#93 + def constant_name?(name); end + + # source://rbs//lib/rbs/environment.rb#14 + def declarations; end + + # source://rbs//lib/rbs/environment.rb#470 + def each_rbs_source(&block); end + + # source://rbs//lib/rbs/environment.rb#482 + def each_ruby_source(&block); end + + # Returns the value of attribute global_decls. + # + # source://rbs//lib/rbs/environment.rb#9 + def global_decls; end + + # source://rbs//lib/rbs/environment.rb#277 + def insert_rbs_decl(decl, context:, namespace:); end + + # source://rbs//lib/rbs/environment.rb#374 + def insert_ruby_decl(decl, context:, namespace:); end + + # source://rbs//lib/rbs/environment.rb#987 + def inspect; end + + # Returns the value of attribute interface_decls. + # + # source://rbs//lib/rbs/environment.rb#6 + def interface_decls; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#75 + def interface_name?(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#109 + def module_alias?(name); end + + # source://rbs//lib/rbs/environment.rb#154 + def module_class_entry(type_name, normalized: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#105 + def module_decl?(name); end + + # source://rbs//lib/rbs/environment.rb#132 + def module_entry(type_name, normalized: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#83 + def module_name?(name); end + + # source://rbs//lib/rbs/environment.rb#269 + def normalize_module_name(name); end + + # source://rbs//lib/rbs/environment.rb#273 + def normalize_module_name!(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#241 + def normalize_module_name?(name); end + + # source://rbs//lib/rbs/environment.rb#219 + def normalize_type_name(name); end + + # source://rbs//lib/rbs/environment.rb#206 + def normalize_type_name!(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#187 + def normalize_type_name?(name); end + + # source://rbs//lib/rbs/environment.rb#139 + def normalized_class_entry(type_name); end + + # source://rbs//lib/rbs/environment.rb#163 + def normalized_module_class_entry(type_name); end + + # source://rbs//lib/rbs/environment.rb#150 + def normalized_module_entry(type_name); end + + # source://rbs//lib/rbs/environment.rb#236 + def normalized_type_name!(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#223 + def normalized_type_name?(type_name); end + + # source://rbs//lib/rbs/environment.rb#577 + def resolve_declaration(resolver, map, decl, context:, prefix:); end + + # source://rbs//lib/rbs/environment.rb#862 + def resolve_member(resolver, map, member, context:); end + + # source://rbs//lib/rbs/environment.rb#962 + def resolve_method_type(resolver, map, type, context:); end + + # source://rbs//lib/rbs/environment.rb#713 + def resolve_ruby_decl(resolver, decl, context:, prefix:); end + + # source://rbs//lib/rbs/environment.rb#790 + def resolve_ruby_member(resolver, member, context:); end + + # source://rbs//lib/rbs/environment.rb#500 + def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment.rb#522 + def resolve_type_names(only: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment.rb#970 + def resolve_type_params(resolver, map, params, context:); end + + # source://rbs//lib/rbs/environment.rb#562 + def resolver_context(*nesting); end + + # Returns the value of attribute sources. + # + # source://rbs//lib/rbs/environment.rb#12 + def sources; end + + # Returns the value of attribute type_alias_decls. + # + # source://rbs//lib/rbs/environment.rb#7 + def type_alias_decls; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#79 + def type_alias_name?(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#87 + def type_name?(name); end + + # source://rbs//lib/rbs/environment.rb#996 + def unload(paths); end + + # source://rbs//lib/rbs/environment.rb#494 + def validate_type_params; end + + private + + # source://rbs//lib/rbs/environment.rb#59 + def initialize_copy(other); end + + class << self + # source://rbs//lib/rbs/environment.rb#69 + def from_loader(loader); end + end +end + +# source://rbs//lib/rbs/environment.rb#33 +class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment/class_entry.rb#5 +class RBS::Environment::ClassEntry + # @return [ClassEntry] a new instance of ClassEntry + # + # source://rbs//lib/rbs/environment/class_entry.rb#10 + def initialize(name); end + + # source://rbs//lib/rbs/environment/class_entry.rb#15 + def <<(context_decl); end + + # Returns the value of attribute context_decls. + # + # source://rbs//lib/rbs/environment/class_entry.rb#8 + def context_decls; end + + # source://rbs//lib/rbs/environment/class_entry.rb#21 + def each_decl(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment/class_entry.rb#31 + def empty?; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment/class_entry.rb#6 + def name; end + + # source://rbs//lib/rbs/environment/class_entry.rb#35 + def primary_decl; end + + # source://rbs//lib/rbs/environment/class_entry.rb#47 + def type_params; end + + # source://rbs//lib/rbs/environment/class_entry.rb#52 + def validate_type_params; end +end + +# source://rbs//lib/rbs/environment.rb#42 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#45 +class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#36 +class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#30 +class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment/module_entry.rb#5 +class RBS::Environment::ModuleEntry + # @return [ModuleEntry] a new instance of ModuleEntry + # + # source://rbs//lib/rbs/environment/module_entry.rb#10 + def initialize(name); end + + # source://rbs//lib/rbs/environment/module_entry.rb#15 + def <<(context_decl); end + + # Returns the value of attribute context_decls. + # + # source://rbs//lib/rbs/environment/module_entry.rb#8 + def context_decls; end + + # source://rbs//lib/rbs/environment/module_entry.rb#20 + def each_decl(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment/module_entry.rb#30 + def empty?; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment/module_entry.rb#6 + def name; end + + # source://rbs//lib/rbs/environment/module_entry.rb#34 + def primary_decl; end + + # source://rbs//lib/rbs/environment/module_entry.rb#43 + def self_types; end + + # source://rbs//lib/rbs/environment/module_entry.rb#38 + def type_params; end + + # source://rbs//lib/rbs/environment/module_entry.rb#49 + def validate_type_params; end +end + +# source://rbs//lib/rbs/environment.rb#18 +class RBS::Environment::SingleEntry + # @return [SingleEntry] a new instance of SingleEntry + # + # source://rbs//lib/rbs/environment.rb#23 + def initialize(name:, decl:, context:); end + + # Returns the value of attribute context. + # + # source://rbs//lib/rbs/environment.rb#20 + def context; end + + # Returns the value of attribute decl. + # + # source://rbs//lib/rbs/environment.rb#21 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment.rb#19 + def name; end +end + +# source://rbs//lib/rbs/environment.rb#39 +class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment/use_map.rb#5 +class RBS::Environment::UseMap + # @return [UseMap] a new instance of UseMap + # + # source://rbs//lib/rbs/environment/use_map.rb#30 + def initialize(table:); end + + # source://rbs//lib/rbs/environment/use_map.rb#36 + def build_map(clause); end + + # source://rbs//lib/rbs/environment/use_map.rb#72 + def resolve(type_name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment/use_map.rb#53 + def resolve?(type_name); end + + # Returns the value of attribute use_dirs. + # + # source://rbs//lib/rbs/environment/use_map.rb#28 + def use_dirs; end +end + +# source://rbs//lib/rbs/environment/use_map.rb#6 +class RBS::Environment::UseMap::Table + # @return [Table] a new instance of Table + # + # source://rbs//lib/rbs/environment/use_map.rb#9 + def initialize; end + + # Returns the value of attribute children. + # + # source://rbs//lib/rbs/environment/use_map.rb#7 + def children; end + + # source://rbs//lib/rbs/environment/use_map.rb#14 + def compute_children; end + + # Returns the value of attribute known_types. + # + # source://rbs//lib/rbs/environment/use_map.rb#7 + def known_types; end +end + +# source://rbs//lib/rbs/environment_loader.rb#4 +class RBS::EnvironmentLoader + include ::RBS::FileFinder + + # @return [EnvironmentLoader] a new instance of EnvironmentLoader + # + # source://rbs//lib/rbs/environment_loader.rb#40 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment_loader.rb#48 + def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment_loader.rb#74 + def add_collection(lockfile); end + + # Returns the value of attribute core_root. + # + # source://rbs//lib/rbs/environment_loader.rb#20 + def core_root; end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/environment_loader.rb#24 + def dirs; end + + # source://rbs//lib/rbs/environment_loader.rb#125 + def each_dir; end + + # source://rbs//lib/rbs/environment_loader.rb#148 + def each_signature; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment_loader.rb#98 + def has_library?(library:, version:); end + + # Returns the value of attribute libs. + # + # source://rbs//lib/rbs/environment_loader.rb#23 + def libs; end + + # source://rbs//lib/rbs/environment_loader.rb#106 + def load(env:); end + + # Returns the value of attribute repository. + # + # source://rbs//lib/rbs/environment_loader.rb#21 + def repository; end + + # source://rbs//lib/rbs/environment_loader.rb#59 + def resolve_dependencies(library:, version:); end + + class << self + # source://rbs//lib/rbs/environment_loader.rb#28 + def gem_sig_path(name, version); end + end +end + +# source://rbs//lib/rbs/environment_loader.rb#26 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/environment_loader.rb#17 +class RBS::EnvironmentLoader::Library < ::Struct; end + +# source://rbs//lib/rbs/environment_loader.rb#5 +class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError + # @return [UnknownLibraryError] a new instance of UnknownLibraryError + # + # source://rbs//lib/rbs/environment_loader.rb#8 + def initialize(lib:); end + + # Returns the value of attribute library. + # + # source://rbs//lib/rbs/environment_loader.rb#6 + def library; end +end + +# source://rbs//lib/rbs/environment_walker.rb#4 +class RBS::EnvironmentWalker + include ::TSort + + # @return [EnvironmentWalker] a new instance of EnvironmentWalker + # + # source://rbs//lib/rbs/environment_walker.rb#11 + def initialize(env:); end + + # source://rbs//lib/rbs/environment_walker.rb#16 + def builder; end + + # source://rbs//lib/rbs/environment_walker.rb#99 + def each_type_name(type, &block); end + + # source://rbs//lib/rbs/environment_walker.rb#105 + def each_type_node(type, &block); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/environment_walker.rb#9 + def env; end + + # source://rbs//lib/rbs/environment_walker.rb#20 + def only_ancestors!(only = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment_walker.rb#25 + def only_ancestors?; end + + # source://rbs//lib/rbs/environment_walker.rb#44 + def tsort_each_child(node, &block); end + + # source://rbs//lib/rbs/environment_walker.rb#31 + def tsort_each_node(&block); end +end + +# source://rbs//lib/rbs/environment_walker.rb#5 +class RBS::EnvironmentWalker::InstanceNode < ::Struct + # source://rbs//lib/rbs/environment_walker.rb#5 + def type_name; end + + # source://rbs//lib/rbs/environment_walker.rb#5 + def type_name=(_); end + + class << self + # source://rbs//lib/rbs/environment_walker.rb#5 + def [](*_arg0); end + + # source://rbs//lib/rbs/environment_walker.rb#5 + def inspect; end + + # source://rbs//lib/rbs/environment_walker.rb#5 + def keyword_init?; end + + # source://rbs//lib/rbs/environment_walker.rb#5 + def members; end + + # source://rbs//lib/rbs/environment_walker.rb#5 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_walker.rb#6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + # source://rbs//lib/rbs/environment_walker.rb#6 + def type_name; end + + # source://rbs//lib/rbs/environment_walker.rb#6 + def type_name=(_); end + + class << self + # source://rbs//lib/rbs/environment_walker.rb#6 + def [](*_arg0); end + + # source://rbs//lib/rbs/environment_walker.rb#6 + def inspect; end + + # source://rbs//lib/rbs/environment_walker.rb#6 + def keyword_init?; end + + # source://rbs//lib/rbs/environment_walker.rb#6 + def members; end + + # source://rbs//lib/rbs/environment_walker.rb#6 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_walker.rb#7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + # source://rbs//lib/rbs/environment_walker.rb#7 + def type_name; end + + # source://rbs//lib/rbs/environment_walker.rb#7 + def type_name=(_); end + + class << self + # source://rbs//lib/rbs/environment_walker.rb#7 + def [](*_arg0); end + + # source://rbs//lib/rbs/environment_walker.rb#7 + def inspect; end + + # source://rbs//lib/rbs/environment_walker.rb#7 + def keyword_init?; end + + # source://rbs//lib/rbs/environment_walker.rb#7 + def members; end + + # source://rbs//lib/rbs/environment_walker.rb#7 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/factory.rb#4 +class RBS::Factory + # source://rbs//lib/rbs/factory.rb#5 + def type_name(string); end +end + +# source://rbs//lib/rbs/file_finder.rb#4 +module RBS::FileFinder + class << self + # source://rbs//lib/rbs/file_finder.rb#7 + def each_file(path, skip_hidden:, immediate: T.unsafe(nil), &block); end + end +end + +# source://rbs//lib/rbs/errors.rb#407 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError + # + # source://rbs//lib/rbs/errors.rb#411 + def initialize(name:, decl:, location: T.unsafe(nil)); end + + # Returns the value of attribute decl. + # + # source://rbs//lib/rbs/errors.rb#409 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#408 + def name; end +end + +# source://rbs//lib/rbs/errors.rb#574 +class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [InconsistentClassModuleAliasError] a new instance of InconsistentClassModuleAliasError + # + # source://rbs//lib/rbs/errors.rb#579 + def initialize(entry); end + + # Returns the value of attribute alias_entry. + # + # source://rbs//lib/rbs/errors.rb#577 + def alias_entry; end + + # source://rbs//lib/rbs/errors.rb#593 + def location; end +end + +# source://rbs//lib/rbs/errors.rb#187 +class RBS::InheritModuleError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InheritModuleError] a new instance of InheritModuleError + # + # source://rbs//lib/rbs/errors.rb#192 + def initialize(super_decl); end + + # source://rbs//lib/rbs/errors.rb#198 + def location; end + + # Returns the value of attribute super_decl. + # + # source://rbs//lib/rbs/errors.rb#190 + def super_decl; end + + class << self + # source://rbs//lib/rbs/errors.rb#202 + def check!(super_decl, env:); end + end +end + +# source://rbs//lib/rbs/inline_parser.rb#4 +class RBS::InlineParser + class << self + # source://rbs//lib/rbs/inline_parser.rb#45 + def parse(buffer, prism); end + end +end + +# source://rbs//lib/rbs/inline_parser/comment_association.rb#5 +class RBS::InlineParser::CommentAssociation + # @return [CommentAssociation] a new instance of CommentAssociation + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#8 + def initialize(blocks); end + + # Returns the value of attribute associated_blocks. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def associated_blocks; end + + # Returns the value of attribute blocks. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def blocks; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#84 + def each_enclosed_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#104 + def each_unassociated_block; end + + # Returns the value of attribute end_line_map. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def end_line_map; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#47 + def leading_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#55 + def leading_block!(node); end + + # Returns the value of attribute start_line_map. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def start_line_map; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#63 + def trailing_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#76 + def trailing_block!(node); end + + class << self + # source://rbs//lib/rbs/inline_parser/comment_association.rb#24 + def build(buffer, result); end + end +end + +# source://rbs//lib/rbs/inline_parser/comment_association.rb#29 +class RBS::InlineParser::CommentAssociation::Reference + # @return [Reference] a new instance of Reference + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#32 + def initialize(block, association); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#37 + def associate!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#42 + def associated?; end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#30 + def block; end +end + +# source://rbs//lib/rbs/inline_parser.rb#20 +module RBS::InlineParser::Diagnostic; end + +# source://rbs//lib/rbs/inline_parser.rb#38 +class RBS::InlineParser::Diagnostic::AnnotationSyntaxError < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#41 +class RBS::InlineParser::Diagnostic::AttributeNonSymbolName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#21 +class RBS::InlineParser::Diagnostic::Base + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/inline_parser.rb#24 + def initialize(location, message); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/inline_parser.rb#22 + def location; end + + # Returns the value of attribute message. + # + # source://rbs//lib/rbs/inline_parser.rb#22 + def message; end +end + +# source://rbs//lib/rbs/inline_parser.rb#42 +class RBS::InlineParser::Diagnostic::ClassModuleAliasDeclarationMissingTypeName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#39 +class RBS::InlineParser::Diagnostic::MixinMultipleArguments < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#40 +class RBS::InlineParser::Diagnostic::MixinNonConstantModule < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#31 +class RBS::InlineParser::Diagnostic::NonConstantClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#36 +class RBS::InlineParser::Diagnostic::NonConstantConstantDeclaration < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#32 +class RBS::InlineParser::Diagnostic::NonConstantModuleName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#33 +class RBS::InlineParser::Diagnostic::NonConstantSuperClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#30 +class RBS::InlineParser::Diagnostic::NotImplementedYet < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#35 +class RBS::InlineParser::Diagnostic::TopLevelAttributeDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#34 +class RBS::InlineParser::Diagnostic::TopLevelMethodDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#37 +class RBS::InlineParser::Diagnostic::UnusedInlineAnnotation < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#57 +class RBS::InlineParser::Parser < ::Prism::Visitor + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Parser] a new instance of Parser + # + # source://rbs//lib/rbs/inline_parser.rb#63 + def initialize(result); end + + # source://rbs//lib/rbs/inline_parser.rb#69 + def buffer; end + + # Returns the value of attribute comments. + # + # source://rbs//lib/rbs/inline_parser.rb#58 + def comments; end + + # source://rbs//lib/rbs/inline_parser.rb#73 + def current_module; end + + # source://rbs//lib/rbs/inline_parser.rb#77 + def current_module!; end + + # source://rbs//lib/rbs/inline_parser.rb#81 + def diagnostics; end + + # source://rbs//lib/rbs/inline_parser.rb#472 + def insert_declaration(decl); end + + # Returns the value of attribute module_nesting. + # + # source://rbs//lib/rbs/inline_parser.rb#58 + def module_nesting; end + + # source://rbs//lib/rbs/inline_parser.rb#315 + def parse_attribute_call(node); end + + # source://rbs//lib/rbs/inline_parser.rb#375 + def parse_constant_declaration(node); end + + # source://rbs//lib/rbs/inline_parser.rb#259 + def parse_mixin_call(node); end + + # source://rbs//lib/rbs/inline_parser.rb#508 + def parse_super_class(super_class_expr, inheritance_operator_loc); end + + # source://rbs//lib/rbs/inline_parser.rb#85 + def push_module_nesting(mod); end + + # source://rbs//lib/rbs/inline_parser.rb#480 + def report_unused_annotation(*annotations); end + + # source://rbs//lib/rbs/inline_parser.rb#495 + def report_unused_block(block); end + + # Returns the value of attribute result. + # + # source://rbs//lib/rbs/inline_parser.rb#58 + def result; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/inline_parser.rb#92 + def skip_node?(node); end + + # source://rbs//lib/rbs/inline_parser.rb#217 + def visit_call_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#103 + def visit_class_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#253 + def visit_constant_path_write_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#246 + def visit_constant_write_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#178 + def visit_def_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#156 + def visit_module_node(node); end +end + +# source://rbs//lib/rbs/inline_parser.rb#5 +class RBS::InlineParser::Result + # @return [Result] a new instance of Result + # + # source://rbs//lib/rbs/inline_parser.rb#8 + def initialize(buffer, prism); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def declarations; end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def diagnostics; end + + # Returns the value of attribute prism_result. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def prism_result; end + + # source://rbs//lib/rbs/inline_parser.rb#15 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/errors.rb#341 +class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # source://rbs//lib/rbs/errors.rb#342 + def kind; end +end + +# source://rbs//lib/rbs/errors.rb#378 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InvalidOverloadMethodError] a new instance of InvalidOverloadMethodError + # + # source://rbs//lib/rbs/errors.rb#386 + def initialize(type_name:, method_name:, kind:, members:); end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/errors.rb#383 + def kind; end + + # source://rbs//lib/rbs/errors.rb#402 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/errors.rb#384 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#382 + def method_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#381 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#67 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # @return [InvalidTypeApplicationError] a new instance of InvalidTypeApplicationError + # + # source://rbs//lib/rbs/errors.rb#74 + def initialize(type_name:, args:, params:, location:); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/errors.rb#69 + def args; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#72 + def location; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/errors.rb#70 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#68 + def type_name; end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/errors.rb#71 + def type_params; end + + class << self + # source://rbs//lib/rbs/errors.rb#83 + def check!(type_name:, args:, params:, location:); end + + # source://rbs//lib/rbs/errors.rb#92 + def check2!(env:, type_name:, args:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#432 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError + # + # source://rbs//lib/rbs/errors.rb#439 + def initialize(type_name:, param:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#437 + def location; end + + # Returns the value of attribute param. + # + # source://rbs//lib/rbs/errors.rb#436 + def param; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#435 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#20 +class RBS::LoadingError < ::RBS::BaseError; end + +# source://rbs//lib/rbs/location_aux.rb#4 +class RBS::Location + def initialize(_arg0, _arg1, _arg2); end + + # source://rbs//lib/rbs/location_aux.rb#79 + def ==(other); end + + def [](_arg0); end + def _add_optional_child(_arg0, _arg1, _arg2); end + def _add_optional_no_child(_arg0); end + def _add_required_child(_arg0, _arg1, _arg2); end + def _end_pos; end + def _optional_keys; end + def _required_keys; end + def _start_pos; end + + # source://rbs//lib/rbs/location_aux.rb#110 + def add_optional_child(name, range); end + + # source://rbs//lib/rbs/location_aux.rb#106 + def add_required_child(name, range); end + + # source://rbs//lib/rbs/location_aux.rb#27 + def aref(_arg0); end + + def buffer; end + + # source://rbs//lib/rbs/location_aux.rb#118 + def each_optional_key(&block); end + + # source://rbs//lib/rbs/location_aux.rb#126 + def each_required_key(&block); end + + # source://rbs//lib/rbs/location_aux.rb#55 + def end_column; end + + # source://rbs//lib/rbs/location_aux.rb#51 + def end_line; end + + # source://rbs//lib/rbs/location_aux.rb#63 + def end_loc; end + + # source://rbs//lib/rbs/location_aux.rb#35 + def end_pos; end + + # source://rbs//lib/rbs/location_aux.rb#5 + def inspect; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#134 + def key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#146 + def local_location; end + + # source://rbs//lib/rbs/location_aux.rb#166 + def local_source; end + + # source://rbs//lib/rbs/location_aux.rb#39 + def name; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#138 + def optional_key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#67 + def range; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#142 + def required_key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#71 + def source; end + + # source://rbs//lib/rbs/location_aux.rb#47 + def start_column; end + + # source://rbs//lib/rbs/location_aux.rb#43 + def start_line; end + + # source://rbs//lib/rbs/location_aux.rb#59 + def start_loc; end + + # source://rbs//lib/rbs/location_aux.rb#31 + def start_pos; end + + # source://rbs//lib/rbs/location_aux.rb#86 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/location_aux.rb#75 + def to_s; end + + private + + def initialize_copy(_arg0); end + + class << self + # source://rbs//lib/rbs/location_aux.rb#16 + def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # source://rbs//lib/rbs/location_aux.rb#102 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/location_aux.rb#29 +RBS::Location::WithChildren = RBS::Location + +# source://rbs//lib/rbs/locator.rb#4 +class RBS::Locator + # @return [Locator] a new instance of Locator + # + # source://rbs//lib/rbs/locator.rb#7 + def initialize(buffer:, dirs:, decls:); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/locator.rb#5 + def buffer; end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/locator.rb#5 + def decls; end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/locator.rb#5 + def dirs; end + + # source://rbs//lib/rbs/locator.rb#13 + def find(line:, column:); end + + # source://rbs//lib/rbs/locator.rb#29 + def find2(line:, column:); end + + # source://rbs//lib/rbs/locator.rb#60 + def find_in_decl(pos, decl:, array:); end + + # source://rbs//lib/rbs/locator.rb#42 + def find_in_directive(pos, dir, array); end + + # source://rbs//lib/rbs/locator.rb#212 + def find_in_loc(pos, location:, array:); end + + # source://rbs//lib/rbs/locator.rb#131 + def find_in_member(pos, member:, array:); end + + # source://rbs//lib/rbs/locator.rb#154 + def find_in_method_type(pos, method_type:, array:); end + + # source://rbs//lib/rbs/locator.rb#196 + def find_in_type(pos, type:, array:); end + + # source://rbs//lib/rbs/locator.rb#172 + def find_in_type_param(pos, type_param:, array:); end + + # source://rbs//lib/rbs/locator.rb#239 + def test_loc(pos, location:); end +end + +# source://rbs//lib/rbs/errors.rb#4 +module RBS::MethodNameHelper + # source://rbs//lib/rbs/errors.rb#5 + def method_name_string; end +end + +# source://rbs//lib/rbs/method_type.rb#4 +class RBS::MethodType + # @return [MethodType] a new instance of MethodType + # + # source://rbs//lib/rbs/method_type.rb#10 + def initialize(type_params:, type:, block:, location:); end + + # source://rbs//lib/rbs/method_type.rb#17 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/method_type.rb#7 + def block; end + + # source://rbs//lib/rbs/method_type.rb#86 + def each_type(&block); end + + # source://rbs//lib/rbs/method_type.rb#59 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/method_type.rb#127 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/method_type.rb#123 + def has_self_type?; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/method_type.rb#8 + def location; end + + # source://rbs//lib/rbs/method_type.rb#65 + def map_type(&block); end + + # source://rbs//lib/rbs/method_type.rb#74 + def map_type_bound(&block); end + + # source://rbs//lib/rbs/method_type.rb#33 + def sub(s); end + + # source://rbs//lib/rbs/method_type.rb#24 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/method_type.rb#100 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/method_type.rb#6 + def type; end + + # source://rbs//lib/rbs/method_type.rb#119 + def type_param_names; end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/method_type.rb#5 + def type_params; end + + # source://rbs//lib/rbs/method_type.rb#50 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/method_type.rb#131 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/errors.rb#468 +class RBS::MixinClassError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [MixinClassError] a new instance of MixinClassError + # + # source://rbs//lib/rbs/errors.rb#474 + def initialize(type_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#481 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#472 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#471 + def type_name; end + + private + + # source://rbs//lib/rbs/errors.rb#502 + def member_name(member); end + + # source://rbs//lib/rbs/errors.rb#513 + def mixin_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#485 + def check!(type_name:, env:, member:); end + end +end + +# source://rbs//lib/rbs/namespace.rb#4 +class RBS::Namespace + # @return [Namespace] a new instance of Namespace + # + # source://rbs//lib/rbs/namespace.rb#7 + def initialize(path:, absolute:); end + + # source://rbs//lib/rbs/namespace.rb#20 + def +(other); end + + # source://rbs//lib/rbs/namespace.rb#59 + def ==(other); end + + # source://rbs//lib/rbs/namespace.rb#47 + def absolute!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/namespace.rb#39 + def absolute?; end + + # source://rbs//lib/rbs/namespace.rb#28 + def append(component); end + + # source://rbs//lib/rbs/namespace.rb#101 + def ascend; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/namespace.rb#55 + def empty?; end + + # source://rbs//lib/rbs/namespace.rb#63 + def eql?(other); end + + # source://rbs//lib/rbs/namespace.rb#65 + def hash; end + + # source://rbs//lib/rbs/namespace.rb#32 + def parent; end + + # Returns the value of attribute path. + # + # source://rbs//lib/rbs/namespace.rb#5 + def path; end + + # source://rbs//lib/rbs/namespace.rb#51 + def relative!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/namespace.rb#43 + def relative?; end + + # source://rbs//lib/rbs/namespace.rb#69 + def split; end + + # source://rbs//lib/rbs/namespace.rb#75 + def to_s; end + + # source://rbs//lib/rbs/namespace.rb#84 + def to_type_name; end + + class << self + # source://rbs//lib/rbs/namespace.rb#12 + def empty; end + + # source://rbs//lib/rbs/namespace.rb#93 + def parse(string); end + + # source://rbs//lib/rbs/namespace.rb#16 + def root; end + end +end + +# source://rbs//lib/rbs/errors.rb#229 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoMixinFoundError] a new instance of NoMixinFoundError + # + # source://rbs//lib/rbs/errors.rb#235 + def initialize(type_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#242 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#233 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#232 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#246 + def check!(type_name, env:, member:); end + end +end + +# source://rbs//lib/rbs/errors.rb#210 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoSelfTypeFoundError] a new instance of NoSelfTypeFoundError + # + # source://rbs//lib/rbs/errors.rb#216 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#214 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#213 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#223 + def check!(self_type, env:); end + end +end + +# source://rbs//lib/rbs/errors.rb#167 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # @return [NoSuperclassFoundError] a new instance of NoSuperclassFoundError + # + # source://rbs//lib/rbs/errors.rb#171 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#169 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#168 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#178 + def check!(type_name, env:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#148 +class RBS::NoTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoTypeFoundError] a new instance of NoTypeFoundError + # + # source://rbs//lib/rbs/errors.rb#154 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#152 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#151 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#161 + def check!(type_name, env:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#545 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError + # + # source://rbs//lib/rbs/errors.rb#551 + def initialize(diagnostic:, location:); end + + # Returns the value of attribute diagnostic. + # + # source://rbs//lib/rbs/errors.rb#548 + def diagnostic; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#549 + def location; end +end + +# source://rbs//lib/rbs/parser/lex_result.rb#4 +class RBS::Parser + class << self + def _lex(_arg0, _arg1); end + def _parse_inline_leading_annotation(_arg0, _arg1, _arg2, _arg3); end + def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_signature(_arg0, _arg1, _arg2); end + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); end + def _parse_type_params(_arg0, _arg1, _arg2, _arg3); end + + # source://rbs//lib/rbs/parser_aux.rb#76 + def buffer(source); end + + # source://rbs//lib/rbs/parser_aux.rb#67 + def lex(source); end + + # source://rbs//lib/rbs/parser_aux.rb#43 + def magic_comment(buf); end + + # source://rbs//lib/rbs/parser_aux.rb#119 + def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#124 + def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#13 + def parse_method_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#18 + def parse_signature(source); end + + # source://rbs//lib/rbs/parser_aux.rb#8 + def parse_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil), void_allowed: T.unsafe(nil), self_allowed: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#38 + def parse_type_params(source, module_type_params: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/parser_aux.rb#85 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rbs//lib/rbs/parser/lex_result.rb#5 +class RBS::Parser::LexResult + # @return [LexResult] a new instance of LexResult + # + # source://rbs//lib/rbs/parser/lex_result.rb#9 + def initialize(buffer:, value:); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/parser/lex_result.rb#6 + def buffer; end + + # Returns the value of attribute value. + # + # source://rbs//lib/rbs/parser/lex_result.rb#7 + def value; end +end + +# source://rbs//lib/rbs/parser/token.rb#5 +class RBS::Parser::Token + # @return [Token] a new instance of Token + # + # source://rbs//lib/rbs/parser/token.rb#9 + def initialize(type:, location:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/parser/token.rb#18 + def comment?; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/parser/token.rb#7 + def location; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/parser/token.rb#6 + def type; end + + # source://rbs//lib/rbs/parser/token.rb#14 + def value; end +end + +# source://rbs//lib/rbs/errors.rb#51 +class RBS::ParsingError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [ParsingError] a new instance of ParsingError + # + # source://rbs//lib/rbs/errors.rb#58 + def initialize(location, error_message, token_type); end + + # Returns the value of attribute error_message. + # + # source://rbs//lib/rbs/errors.rb#55 + def error_message; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#54 + def location; end + + # Returns the value of attribute token_type. + # + # source://rbs//lib/rbs/errors.rb#56 + def token_type; end +end + +# source://rbs//lib/rbs/prototype/helpers.rb#4 +module RBS::Prototype; end + +# source://rbs//lib/rbs/prototype/helpers.rb#5 +module RBS::Prototype::Helpers + private + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/helpers.rb#96 + def any_node?(node, nodes: T.unsafe(nil), &block); end + + # NOTE: args_node may be a nil by a bug + # https://bugs.ruby-lang.org/issues/17495 + # + # source://rbs//lib/rbs/prototype/helpers.rb#120 + def args_from_node(args_node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#8 + def block_from_body(node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#84 + def each_child(node, &block); end + + # source://rbs//lib/rbs/prototype/helpers.rb#88 + def each_node(nodes); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/helpers.rb#108 + def keyword_hash?(node); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/helpers.rb#124 + def symbol_literal_node?(node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#135 + def untyped; end +end + +# source://rbs//lib/rbs/prototype/node_usage.rb#5 +class RBS::Prototype::NodeUsage + include ::RBS::Prototype::Helpers + + # @return [NodeUsage] a new instance of NodeUsage + # + # source://rbs//lib/rbs/prototype/node_usage.rb#10 + def initialize(node); end + + # source://rbs//lib/rbs/prototype/node_usage.rb#25 + def calculate(node, conditional:); end + + # Returns the value of attribute conditional_nodes. + # + # source://rbs//lib/rbs/prototype/node_usage.rb#8 + def conditional_nodes; end + + # source://rbs//lib/rbs/prototype/node_usage.rb#17 + def each_conditional_node(&block); end +end + +# source://rbs//lib/rbs/prototype/rb.rb#5 +class RBS::Prototype::RB + include ::RBS::Prototype::Helpers + + # @return [RB] a new instance of RB + # + # source://rbs//lib/rbs/prototype/rb.rb#45 + def initialize; end + + # source://rbs//lib/rbs/prototype/rb.rb#561 + def block_type(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#541 + def body_type(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#456 + def const_to_name(node, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#433 + def const_to_name!(node, context: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#772 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#49 + def decls; end + + # source://rbs//lib/rbs/prototype/rb.rb#812 + def find_def_index_by_name(decls, name); end + + # source://rbs//lib/rbs/prototype/rb.rb#536 + def function_return_type_from_body(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#478 + def function_type_from_body(node, def_name); end + + # source://rbs//lib/rbs/prototype/rb.rb#554 + def if_unless_type(node); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rb.rb#808 + def is_accessibility?(decl); end + + # source://rbs//lib/rbs/prototype/rb.rb#467 + def literal_to_symbol(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#575 + def literal_to_type(node); end + + # backward compatible + # + # source://rbs//lib/rbs/prototype/rb.rb#762 + def node_type(node, default: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#719 + def param_type(node, default: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#75 + def parse(string); end + + # source://rbs//lib/rbs/prototype/rb.rb#764 + def private; end + + # source://rbs//lib/rbs/prototype/rb.rb#107 + def process(node, decls:, comments:, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#427 + def process_children(node, decls:, comments:, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#768 + def public; end + + # source://rbs//lib/rbs/prototype/rb.rb#699 + def range_element_type(types); end + + # source://rbs//lib/rbs/prototype/rb.rb#782 + def remove_unnecessary_accessibility_methods!(decls); end + + # source://rbs//lib/rbs/prototype/rb.rb#830 + def sort_members!(decls); end + + # Returns the value of attribute source_decls. + # + # source://rbs//lib/rbs/prototype/rb.rb#42 + def source_decls; end + + # Returns the value of attribute toplevel_members. + # + # source://rbs//lib/rbs/prototype/rb.rb#43 + def toplevel_members; end + + # source://rbs//lib/rbs/prototype/rb.rb#688 + def types_to_union_type(types); end +end + +# source://rbs//lib/rbs/prototype/rb.rb#8 +class RBS::Prototype::RB::Context < ::Struct + # source://rbs//lib/rbs/prototype/rb.rb#25 + def attribute_kind; end + + # source://rbs//lib/rbs/prototype/rb.rb#33 + def enter_namespace(namespace); end + + # source://rbs//lib/rbs/prototype/rb.rb#15 + def method_kind; end + + # source://rbs//lib/rbs/prototype/rb.rb#37 + def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end + + class << self + # source://rbs//lib/rbs/prototype/rb.rb#11 + def initial(namespace: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/prototype/rbi.rb#5 +class RBS::Prototype::RBI + include ::RBS::Prototype::Helpers + + # @return [RBI] a new instance of RBI + # + # source://rbs//lib/rbs/prototype/rbi.rb#12 + def initialize; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rbi.rb#564 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rbi.rb#568 + def const_to_name(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#90 + def current_module; end + + # source://rbs//lib/rbs/prototype/rbi.rb#94 + def current_module!; end + + # source://rbs//lib/rbs/prototype/rbi.rb#46 + def current_namespace; end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/prototype/rbi.rb#8 + def decls; end + + # source://rbs//lib/rbs/prototype/rbi.rb#604 + def each_arg(array, &block); end + + # source://rbs//lib/rbs/prototype/rbi.rb#618 + def each_child(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#112 + def join_comments(nodes, comments); end + + # Returns the value of attribute last_sig. + # + # source://rbs//lib/rbs/prototype/rbi.rb#10 + def last_sig; end + + # source://rbs//lib/rbs/prototype/rbi.rb#281 + def method_type(args_node, type_node, variables:, overloads:); end + + # Returns the value of attribute modules. + # + # source://rbs//lib/rbs/prototype/rbi.rb#9 + def modules; end + + # source://rbs//lib/rbs/prototype/rbi.rb#42 + def nested_name(name); end + + # source://rbs//lib/rbs/prototype/rbi.rb#626 + def node_to_hash(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#18 + def parse(string); end + + # source://rbs//lib/rbs/prototype/rbi.rb#354 + def parse_params(args_node, args, method_type, variables:, overloads:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#106 + def pop_sig; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rbi.rb#556 + def proc_type?(type_node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#117 + def process(node, comments:, outer: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rbi.rb#52 + def push_class(name, super_class, comment:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#71 + def push_module(name, comment:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#98 + def push_sig(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#479 + def type_of(type_node, variables:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#492 + def type_of0(type_node, variables:); end +end + +# source://rbs//lib/rbs/prototype/runtime/helpers.rb#5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + include ::RBS::Prototype::Runtime::Helpers + + # @return [Runtime] a new instance of Runtime + # + # source://rbs//lib/rbs/prototype/runtime.rb#79 + def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#662 + def block_from_ast_of(method); end + + # source://rbs//lib/rbs/prototype/runtime.rb#109 + def builder; end + + # source://rbs//lib/rbs/prototype/runtime.rb#117 + def decls; end + + # Generate/find outer module declarations + # This is broken down into another method to comply with `DRY` + # This generates/finds declarations in nested form & returns the last array of declarations + # + # source://rbs//lib/rbs/prototype/runtime.rb#591 + def ensure_outer_module_declarations(mod); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/prototype/runtime.rb#73 + def env; end + + # source://rbs//lib/rbs/prototype/runtime.rb#496 + def generate_class(mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#433 + def generate_constants(mod, decls); end + + # source://rbs//lib/rbs/prototype/runtime.rb#309 + def generate_methods(mod, module_name, members); end + + # source://rbs//lib/rbs/prototype/runtime.rb#573 + def generate_mixin(mod, decl, type_name, type_name_absolute); end + + # source://rbs//lib/rbs/prototype/runtime.rb#535 + def generate_module(mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#481 + def generate_super_class(mod); end + + # Returns the value of attribute merge. + # + # source://rbs//lib/rbs/prototype/runtime.rb#74 + def merge; end + + # source://rbs//lib/rbs/prototype/runtime.rb#248 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#179 + def method_type(method); end + + # Returns the value of attribute outline. + # + # source://rbs//lib/rbs/prototype/runtime.rb#77 + def outline; end + + # Sets the attribute outline + # + # @param value the value to set the attribute outline to. + # + # source://rbs//lib/rbs/prototype/runtime.rb#77 + def outline=(_arg0); end + + # Returns the value of attribute owners_included. + # + # source://rbs//lib/rbs/prototype/runtime.rb#76 + def owners_included; end + + # source://rbs//lib/rbs/prototype/runtime.rb#113 + def parse(file); end + + # Returns the value of attribute patterns. + # + # source://rbs//lib/rbs/prototype/runtime.rb#72 + def patterns; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#92 + def target?(const); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#296 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # Returns the value of attribute todo. + # + # source://rbs//lib/rbs/prototype/runtime.rb#75 + def todo; end + + # source://rbs//lib/rbs/prototype/runtime.rb#105 + def todo_object; end + + # source://rbs//lib/rbs/prototype/runtime.rb#645 + def type_args(type_name); end + + # source://rbs//lib/rbs/prototype/runtime.rb#653 + def type_params(mod); end + + private + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#423 + def can_alias?(mod, method); end + + # source://rbs//lib/rbs/prototype/runtime.rb#137 + def each_mixined_module(type_name, mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#146 + def each_mixined_module_one(type_name, mod); end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#213 +class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#229 + def add_decl_members(decl); end + + # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#237 + def build_s_new; end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#225 + def build_super_class; end + + class << self + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#214 + def generatable?(target); end + end +end + +# source://rbs//lib/rbs/prototype/runtime/helpers.rb#6 +module RBS::Prototype::Runtime::Helpers + private + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#19 + def const_name(const); end + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#15 + def const_name!(const); end + + # Returns the exact name & not compactly declared name + # + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#10 + def only_name(mod); end + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#37 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#53 + def untyped; end +end + +# source://rbs//lib/rbs/prototype/runtime/reflection.rb#6 +module RBS::Prototype::Runtime::Reflection + class << self + # source://rbs//lib/rbs/prototype/runtime/reflection.rb#12 + def constants_of(mod, inherit = T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime/reflection.rb#7 + def object_class(value); end + end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#91 +class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#108 + def add_decl_members(decl); end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#165 + def build_overload_for_keyword_arguments; end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#151 + def build_overload_for_positional_arguments; end + + # def self.keyword_init?: () -> bool? + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#180 + def build_s_keyword_init_p; end + + # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#117 + def build_s_new; end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#104 + def build_super_class; end + + class << self + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#92 + def generatable?(target); end + end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#102 +RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) + +# source://rbs//lib/rbs/prototype/runtime.rb#10 +class RBS::Prototype::Runtime::Todo + # @return [Todo] a new instance of Todo + # + # source://rbs//lib/rbs/prototype/runtime.rb#11 + def initialize(builder:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#50 + def skip_constant?(module_name:, name:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#37 + def skip_instance_method?(module_name:, method:, accessibility:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#15 + def skip_mixin?(type_name:, module_name:, mixin_class:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#24 + def skip_singleton_method?(module_name:, method:, accessibility:); end + + private + + # source://rbs//lib/rbs/prototype/runtime.rb#57 + def mixin_decls(type_name); end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#8 +class RBS::Prototype::Runtime::ValueObjectBase + include ::RBS::Prototype::Runtime::Helpers + + # @return [ValueObjectBase] a new instance of ValueObjectBase + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#11 + def initialize(target_class); end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#15 + def build_decl; end + + private + + # attr_accessor foo: untyped + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#74 + def build_member_accessors(ast_members_class); end + + # def self.members: () -> [ :foo, :bar ] + # def members: () -> [ :foo, :bar ] + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#35 + def build_s_members; end +end + +# source://rbs//lib/rbs/errors.rb#448 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError + # + # source://rbs//lib/rbs/errors.rb#454 + def initialize(type:, defs:); end + + # Returns the value of attribute defs. + # + # source://rbs//lib/rbs/errors.rb#452 + def defs; end + + # source://rbs//lib/rbs/errors.rb#461 + def location; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#451 + def type; end +end + +# source://rbs//lib/rbs/errors.rb#110 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # @return [RecursiveAncestorError] a new instance of RecursiveAncestorError + # + # source://rbs//lib/rbs/errors.rb#114 + def initialize(ancestors:, location:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/errors.rb#111 + def ancestors; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#112 + def location; end + + class << self + # source://rbs//lib/rbs/errors.rb#134 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#527 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError + # + # source://rbs//lib/rbs/errors.rb#533 + def initialize(alias_names:, location:); end + + # Returns the value of attribute alias_names. + # + # source://rbs//lib/rbs/errors.rb#530 + def alias_names; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#531 + def location; end + + # source://rbs//lib/rbs/errors.rb#540 + def name; end +end + +# source://rbs//lib/rbs/repository.rb#4 +class RBS::Repository + # @return [Repository] a new instance of Repository + # + # source://rbs//lib/rbs/repository.rb#74 + def initialize(no_stdlib: T.unsafe(nil)); end + + # source://rbs//lib/rbs/repository.rb#98 + def add(dir); end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/repository.rb#71 + def dirs; end + + # Returns the value of attribute gems. + # + # source://rbs//lib/rbs/repository.rb#72 + def gems; end + + # source://rbs//lib/rbs/repository.rb#108 + def lookup(gem, version); end + + # source://rbs//lib/rbs/repository.rb#113 + def lookup_path(gem, version); end + + class << self + # source://rbs//lib/rbs/repository.rb#83 + def default; end + + # source://rbs//lib/rbs/repository.rb#87 + def find_best_version(version, candidates); end + end +end + +# source://rbs//lib/rbs/repository.rb#5 +RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/repository.rb#7 +class RBS::Repository::GemRBS + # @return [GemRBS] a new instance of GemRBS + # + # source://rbs//lib/rbs/repository.rb#11 + def initialize(name:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/repository.rb#64 + def empty?; end + + # source://rbs//lib/rbs/repository.rb#59 + def find_best_version(version); end + + # source://rbs//lib/rbs/repository.rb#54 + def latest_version; end + + # source://rbs//lib/rbs/repository.rb#22 + def load!; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/repository.rb#8 + def name; end + + # source://rbs//lib/rbs/repository.rb#49 + def oldest_version; end + + # Returns the value of attribute paths. + # + # source://rbs//lib/rbs/repository.rb#9 + def paths; end + + # source://rbs//lib/rbs/repository.rb#45 + def version_names; end + + # source://rbs//lib/rbs/repository.rb#17 + def versions; end +end + +# source://rbs//lib/rbs/repository.rb#69 +class RBS::Repository::VersionPath < ::Struct + # source://rbs//lib/rbs/repository.rb#69 + def gem; end + + # source://rbs//lib/rbs/repository.rb#69 + def gem=(_); end + + # source://rbs//lib/rbs/repository.rb#69 + def path; end + + # source://rbs//lib/rbs/repository.rb#69 + def path=(_); end + + # source://rbs//lib/rbs/repository.rb#69 + def version; end + + # source://rbs//lib/rbs/repository.rb#69 + def version=(_); end + + class << self + # source://rbs//lib/rbs/repository.rb#69 + def [](*_arg0); end + + # source://rbs//lib/rbs/repository.rb#69 + def inspect; end + + # source://rbs//lib/rbs/repository.rb#69 + def keyword_init?; end + + # source://rbs//lib/rbs/repository.rb#69 + def members; end + + # source://rbs//lib/rbs/repository.rb#69 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/resolver/constant_resolver.rb#4 +module RBS::Resolver; end + +# source://rbs//lib/rbs/resolver/constant_resolver.rb#5 +class RBS::Resolver::ConstantResolver + # @return [ConstantResolver] a new instance of ConstantResolver + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#88 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#85 + def builder; end + + # Returns the value of attribute child_constants_cache. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#86 + def child_constants_cache; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#112 + def children(module_name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#100 + def constants(context); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#178 + def constants_from_ancestors(module_name, constants:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#163 + def constants_from_context(context, constants:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#201 + def constants_itself(context, constants:); end + + # Returns the value of attribute context_constants_cache. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#86 + def context_constants_cache; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#138 + def load_child_constants(name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#122 + def load_context_constants(context); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#95 + def resolve(name, context:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#108 + def resolve_child(module_name, name); end + + # Returns the value of attribute table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#85 + def table; end +end + +# source://rbs//lib/rbs/resolver/constant_resolver.rb#6 +class RBS::Resolver::ConstantResolver::Table + # @return [Table] a new instance of Table + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#10 + def initialize(environment); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#63 + def children(name); end + + # Returns the value of attribute children_table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#7 + def children_table; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#67 + def constant(name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#80 + def constant_of_constant(name, entry); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#71 + def constant_of_module(name, entry); end + + # Returns the value of attribute constants_table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#8 + def constants_table; end + + # Returns the value of attribute toplevel. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#7 + def toplevel; end +end + +# source://rbs//lib/rbs/resolver/type_name_resolver.rb#5 +class RBS::Resolver::TypeNameResolver + # @return [TypeNameResolver] a new instance of TypeNameResolver + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#10 + def initialize(all_names, aliases); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#82 + def aliased_name?(type_name); end + + # Returns the value of attribute aliases. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#8 + def aliases; end + + # Returns the value of attribute all_names. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#6 + def all_names; end + + # Returns the value of attribute cache. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#7 + def cache; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#76 + def has_type_name?(full_name); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#121 + def normalize_namespace(type_name, rhs, context, visited); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#39 + def resolve(type_name, context:); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#104 + def resolve_head_namespace(head, context); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#62 + def resolve_namespace(type_name, context:); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#136 + def resolve_namespace0(type_name, context, visited); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#88 + def resolve_type_name(type_name, context); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#32 + def try_cache(query); end + + class << self + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#16 + def build(env); end + end +end + +# source://rbs//lib/rbs/source.rb#4 +module RBS::Source; end + +# source://rbs//lib/rbs/source.rb#5 +class RBS::Source::RBS + # @return [RBS] a new instance of RBS + # + # source://rbs//lib/rbs/source.rb#8 + def initialize(buffer, directives, decls); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/source.rb#6 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/source.rb#6 + def declarations; end + + # Returns the value of attribute directives. + # + # source://rbs//lib/rbs/source.rb#6 + def directives; end + + # source://rbs//lib/rbs/source.rb#25 + def each_declaration_type_name(names, decl, &block); end + + # source://rbs//lib/rbs/source.rb#14 + def each_type_name(&block); end +end + +# source://rbs//lib/rbs/source.rb#52 +class RBS::Source::Ruby + # @return [Ruby] a new instance of Ruby + # + # source://rbs//lib/rbs/source.rb#58 + def initialize(buffer, prism, declarations, diagnostics); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/source.rb#53 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/source.rb#55 + def declarations; end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/source.rb#56 + def diagnostics; end + + # source://rbs//lib/rbs/source.rb#76 + def each_declaration_type_name(names, decl, &block); end + + # source://rbs//lib/rbs/source.rb#65 + def each_type_name(&block); end + + # Returns the value of attribute prism_result. + # + # source://rbs//lib/rbs/source.rb#54 + def prism_result; end +end + +# source://rbs//lib/rbs/substitution.rb#4 +class RBS::Substitution + # @return [Substitution] a new instance of Substitution + # + # source://rbs//lib/rbs/substitution.rb#12 + def initialize; end + + # source://rbs//lib/rbs/substitution.rb#66 + def +(other); end + + # source://rbs//lib/rbs/substitution.rb#53 + def [](ty); end + + # source://rbs//lib/rbs/substitution.rb#16 + def add(from:, to:); end + + # source://rbs//lib/rbs/substitution.rb#37 + def apply(ty); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/substitution.rb#8 + def empty?; end + + # Returns the value of attribute instance_type. + # + # source://rbs//lib/rbs/substitution.rb#6 + def instance_type; end + + # Sets the attribute instance_type + # + # @param value the value to set the attribute instance_type to. + # + # source://rbs//lib/rbs/substitution.rb#6 + def instance_type=(_arg0); end + + # Returns the value of attribute mapping. + # + # source://rbs//lib/rbs/substitution.rb#5 + def mapping; end + + # source://rbs//lib/rbs/substitution.rb#55 + def without(*vars); end + + class << self + # source://rbs//lib/rbs/substitution.rb#20 + def build(variables, types, instance_type: T.unsafe(nil), &block); end + end +end + +# source://rbs//lib/rbs/subtractor.rb#4 +class RBS::Subtractor + # @return [Subtractor] a new instance of Subtractor + # + # source://rbs//lib/rbs/subtractor.rb#5 + def initialize(minuend, subtrahend); end + + # source://rbs//lib/rbs/subtractor.rb#10 + def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # source://rbs//lib/rbs/subtractor.rb#180 + def absolute_typename(name, context:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#163 + def access_modifier?(decl); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#120 + def cvar_exist?(owner, name); end + + # source://rbs//lib/rbs/subtractor.rb#129 + def each_member(owner, &block); end + + # source://rbs//lib/rbs/subtractor.rb#48 + def filter_members(decl, context:); end + + # source://rbs//lib/rbs/subtractor.rb#151 + def filter_redundant_access_modifiers(decls); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#106 + def ivar_exist?(owner, name, kind); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#60 + def member_exist?(owner, member, context:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#89 + def method_exist?(owner, method_name, kind); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#140 + def mixin_exist?(owner, mixin, context:); end + + # source://rbs//lib/rbs/subtractor.rb#189 + def typename_candidates(name, context:); end + + # source://rbs//lib/rbs/subtractor.rb#167 + def update_decl(decl, members:); end +end + +# source://rbs//lib/rbs/errors.rb#367 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # @return [SuperclassMismatchError] a new instance of SuperclassMismatchError + # + # source://rbs//lib/rbs/errors.rb#371 + def initialize(name:, entry:); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/errors.rb#369 + def entry; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#368 + def name; end +end + +# source://rbs//lib/rbs/type_alias_dependency.rb#4 +class RBS::TypeAliasDependency + # @return [TypeAliasDependency] a new instance of TypeAliasDependency + # + # source://rbs//lib/rbs/type_alias_dependency.rb#14 + def initialize(env:); end + + # source://rbs//lib/rbs/type_alias_dependency.rb#27 + def build_dependencies; end + + # Check if an alias type definition is circular & prohibited + # + # @return [Boolean] + # + # source://rbs//lib/rbs/type_alias_dependency.rb#19 + def circular_definition?(alias_name); end + + # A hash which stores the transitive closure + # of the directed graph + # + # source://rbs//lib/rbs/type_alias_dependency.rb#12 + def dependencies; end + + # source://rbs//lib/rbs/type_alias_dependency.rb#57 + def dependencies_of(name); end + + # Direct dependencies corresponds to a directed graph + # with vertices as types and directions based on assignment of types + # + # source://rbs//lib/rbs/type_alias_dependency.rb#9 + def direct_dependencies; end + + # source://rbs//lib/rbs/type_alias_dependency.rb#52 + def direct_dependencies_of(name); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/type_alias_dependency.rb#5 + def env; end + + # source://rbs//lib/rbs/type_alias_dependency.rb#43 + def transitive_closure; end + + private + + # Recursive function to construct transitive closure + # + # source://rbs//lib/rbs/type_alias_dependency.rb#81 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # source://rbs//lib/rbs/type_alias_dependency.rb#65 + def direct_dependency(type, result = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/type_alias_regularity.rb#4 +class RBS::TypeAliasRegularity + # @return [TypeAliasRegularity] a new instance of TypeAliasRegularity + # + # source://rbs//lib/rbs/type_alias_regularity.rb#16 + def initialize(env:); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#61 + def build_alias_type(name); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#14 + def builder; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_alias_regularity.rb#69 + def compatible_args?(args1, args2); end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#14 + def diagnostics; end + + # source://rbs//lib/rbs/type_alias_regularity.rb#110 + def each_alias_type(type, &block); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#83 + def each_mutual_alias_defs(&block); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#14 + def env; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_alias_regularity.rb#79 + def nonregular?(type_name); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#22 + def validate; end + + # source://rbs//lib/rbs/type_alias_regularity.rb#39 + def validate_alias_type(alias_type, names, types); end + + class << self + # source://rbs//lib/rbs/type_alias_regularity.rb#120 + def validate(env:); end + end +end + +# source://rbs//lib/rbs/type_alias_regularity.rb#5 +class RBS::TypeAliasRegularity::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://rbs//lib/rbs/type_alias_regularity.rb#8 + def initialize(type_name:, nonregular_type:); end + + # Returns the value of attribute nonregular_type. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#6 + def nonregular_type; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#6 + def type_name; end +end + +# source://rbs//lib/rbs/type_name.rb#4 +class RBS::TypeName + # @return [TypeName] a new instance of TypeName + # + # source://rbs//lib/rbs/type_name.rb#9 + def initialize(namespace:, name:); end + + # source://rbs//lib/rbs/type_name.rb#79 + def +(other); end + + # source://rbs//lib/rbs/type_name.rb#25 + def ==(other); end + + # source://rbs//lib/rbs/type_name.rb#55 + def absolute!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#59 + def absolute?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#51 + def alias?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#47 + def class?; end + + # source://rbs//lib/rbs/type_name.rb#29 + def eql?(other); end + + # source://rbs//lib/rbs/type_name.rb#31 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#67 + def interface?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/type_name.rb#7 + def kind; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/type_name.rb#6 + def name; end + + # Returns the value of attribute namespace. + # + # source://rbs//lib/rbs/type_name.rb#5 + def namespace; end + + # source://rbs//lib/rbs/type_name.rb#63 + def relative!; end + + # source://rbs//lib/rbs/type_name.rb#75 + def split; end + + # source://rbs//lib/rbs/type_name.rb#39 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/type_name.rb#43 + def to_namespace; end + + # source://rbs//lib/rbs/type_name.rb#35 + def to_s; end + + # source://rbs//lib/rbs/type_name.rb#71 + def with_prefix(namespace); end + + class << self + # source://rbs//lib/rbs/type_name.rb#90 + def parse(string); end + end +end + +# source://rbs//lib/rbs/errors.rb#625 +class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [TypeParamDefaultReferenceError] a new instance of TypeParamDefaultReferenceError + # + # source://rbs//lib/rbs/errors.rb#631 + def initialize(type_param, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#629 + def location; end + + # Returns the value of attribute type_param. + # + # source://rbs//lib/rbs/errors.rb#628 + def type_param; end + + class << self + # source://rbs//lib/rbs/errors.rb#637 + def check!(type_params); end + end +end + +# source://rbs//lib/rbs/types.rb#4 +module RBS::Types; end + +# source://rbs//lib/rbs/types.rb#400 +class RBS::Types::Alias + include ::RBS::Types::Application + + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/types.rb#405 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#401 + def location; end + + # source://rbs//lib/rbs/types.rb#429 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#421 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#415 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#411 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#254 +module RBS::Types::Application + # source://rbs//lib/rbs/types.rb#258 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/types.rb#256 + def args; end + + # source://rbs//lib/rbs/types.rb#284 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#262 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#268 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#296 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#292 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#264 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#255 + def name; end + + # source://rbs//lib/rbs/types.rb#276 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#300 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#41 +module RBS::Types::Bases; end + +# source://rbs//lib/rbs/types.rb#109 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # @return [Any] a new instance of Any + # + # source://rbs//lib/rbs/types.rb#110 + def initialize(location:, todo: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#117 + def to_s(level = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#42 +class RBS::Types::Bases::Base + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/types.rb#45 + def initialize(location:); end + + # source://rbs//lib/rbs/types.rb#49 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#57 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#98 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#94 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#53 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#43 + def location; end + + # source://rbs//lib/rbs/types.rb#64 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#69 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#102 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#107 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#123 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#130 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#125 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # source://rbs//lib/rbs/types.rb#126 + def sub(s); end +end + +# source://rbs//lib/rbs/types.rb#121 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#124 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#122 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#108 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#1338 +class RBS::Types::Block + # @return [Block] a new instance of Block + # + # source://rbs//lib/rbs/types.rb#1344 + def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1351 + def ==(other); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1342 + def location; end + + # source://rbs//lib/rbs/types.rb#1376 + def map_type(&block); end + + # Returns the value of attribute required. + # + # source://rbs//lib/rbs/types.rb#1340 + def required; end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/types.rb#1341 + def self_type; end + + # source://rbs//lib/rbs/types.rb#1366 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1358 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#1339 + def type; end +end + +# source://rbs//lib/rbs/types.rb#356 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # @return [ClassInstance] a new instance of ClassInstance + # + # source://rbs//lib/rbs/types.rb#361 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#357 + def location; end + + # source://rbs//lib/rbs/types.rb#387 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#379 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#371 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#367 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#202 +class RBS::Types::ClassSingleton + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + + # @return [ClassSingleton] a new instance of ClassSingleton + # + # source://rbs//lib/rbs/types.rb#206 + def initialize(name:, location:); end + + # source://rbs//lib/rbs/types.rb#211 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#215 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#245 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#241 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#217 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#204 + def location; end + + # source://rbs//lib/rbs/types.rb#234 + def map_type_name(&_arg0); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#203 + def name; end + + # source://rbs//lib/rbs/types.rb#224 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#228 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#249 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#23 +module RBS::Types::EmptyEachType + # source://rbs//lib/rbs/types.rb#24 + def each_type; end + + # source://rbs//lib/rbs/types.rb#32 + def map_type(&block); end +end + +# source://rbs//lib/rbs/types.rb#905 +class RBS::Types::Function + # @return [Function] a new instance of Function + # + # source://rbs//lib/rbs/types.rb#961 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end + + # source://rbs//lib/rbs/types.rb#972 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1043 + def amap(array, &block); end + + # source://rbs//lib/rbs/types.rb#1182 + def drop_head; end + + # source://rbs//lib/rbs/types.rb#1199 + def drop_tail; end + + # source://rbs//lib/rbs/types.rb#1080 + def each_param(&block); end + + # source://rbs//lib/rbs/types.rb#1065 + def each_type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1153 + def empty?; end + + # source://rbs//lib/rbs/types.rb#984 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#998 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1224 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1212 + def has_keyword?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1220 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#986 + def hash; end + + # source://rbs//lib/rbs/types.rb#1051 + def hmapv(hash, &block); end + + # source://rbs//lib/rbs/types.rb#1026 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#1059 + def map_type_name(&block); end + + # Returns the value of attribute optional_keywords. + # + # source://rbs//lib/rbs/types.rb#957 + def optional_keywords; end + + # Returns the value of attribute optional_positionals. + # + # source://rbs//lib/rbs/types.rb#953 + def optional_positionals; end + + # source://rbs//lib/rbs/types.rb#1163 + def param_to_s; end + + # Returns the value of attribute required_keywords. + # + # source://rbs//lib/rbs/types.rb#956 + def required_keywords; end + + # Returns the value of attribute required_positionals. + # + # source://rbs//lib/rbs/types.rb#952 + def required_positionals; end + + # Returns the value of attribute rest_keywords. + # + # source://rbs//lib/rbs/types.rb#958 + def rest_keywords; end + + # Returns the value of attribute rest_positionals. + # + # source://rbs//lib/rbs/types.rb#954 + def rest_positionals; end + + # source://rbs//lib/rbs/types.rb#1178 + def return_to_s; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/types.rb#959 + def return_type; end + + # source://rbs//lib/rbs/types.rb#1107 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1094 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute trailing_positionals. + # + # source://rbs//lib/rbs/types.rb#955 + def trailing_positionals; end + + # source://rbs//lib/rbs/types.rb#1139 + def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1228 + def with_nonreturn_void?; end + + # source://rbs//lib/rbs/types.rb#1126 + def with_return_type(type); end + + class << self + # source://rbs//lib/rbs/types.rb#1113 + def empty(return_type); end + end +end + +# source://rbs//lib/rbs/types.rb#906 +class RBS::Types::Function::Param + # @return [Param] a new instance of Param + # + # source://rbs//lib/rbs/types.rb#911 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#917 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#921 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#923 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#909 + def location; end + + # source://rbs//lib/rbs/types.rb#927 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#908 + def name; end + + # source://rbs//lib/rbs/types.rb#935 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#939 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#907 + def type; end +end + +# source://rbs//lib/rbs/types.rb#312 +class RBS::Types::Interface + include ::RBS::Types::Application + + # @return [Interface] a new instance of Interface + # + # source://rbs//lib/rbs/types.rb#317 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#313 + def location; end + + # source://rbs//lib/rbs/types.rb#343 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#335 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#327 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#323 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#822 +class RBS::Types::Intersection + # @return [Intersection] a new instance of Intersection + # + # source://rbs//lib/rbs/types.rb#826 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#831 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#869 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#835 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#841 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#896 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#892 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#837 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#824 + def location; end + + # source://rbs//lib/rbs/types.rb#877 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#885 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#853 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#849 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#860 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#823 + def types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#900 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1520 +class RBS::Types::Literal + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # @return [Literal] a new instance of Literal + # + # source://rbs//lib/rbs/types.rb#1524 + def initialize(literal:, location:); end + + # source://rbs//lib/rbs/types.rb#1529 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1533 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1556 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1552 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#1535 + def hash; end + + # Returns the value of attribute literal. + # + # source://rbs//lib/rbs/types.rb#1521 + def literal; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1522 + def location; end + + # source://rbs//lib/rbs/types.rb#1544 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1548 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1560 + def with_nonreturn_void?; end + + class << self + # source://rbs//lib/rbs/types.rb#1580 + def unescape_string(string, is_double_quote); end + end +end + +# source://rbs//lib/rbs/types.rb#1564 +RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) + +# source://rbs//lib/rbs/types.rb#5 +module RBS::Types::NoFreeVariables + # source://rbs//lib/rbs/types.rb#6 + def free_variables(set = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#11 +module RBS::Types::NoSubst + # source://rbs//lib/rbs/types.rb#12 + def sub(s); end +end + +# source://rbs//lib/rbs/types.rb#17 +module RBS::Types::NoTypeName + # source://rbs//lib/rbs/types.rb#18 + def map_type_name(&_arg0); end +end + +# source://rbs//lib/rbs/types.rb#645 +class RBS::Types::Optional + # @return [Optional] a new instance of Optional + # + # source://rbs//lib/rbs/types.rb#649 + def initialize(type:, location:); end + + # source://rbs//lib/rbs/types.rb#654 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#692 + def each_type; end + + # source://rbs//lib/rbs/types.rb#658 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#664 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#722 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#718 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#660 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#647 + def location; end + + # source://rbs//lib/rbs/types.rb#707 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#700 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#672 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#668 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#678 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#646 + def type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#726 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1397 +class RBS::Types::Proc + # @return [Proc] a new instance of Proc + # + # source://rbs//lib/rbs/types.rb#1403 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1410 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/types.rb#1399 + def block; end + + # source://rbs//lib/rbs/types.rb#1464 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#1414 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#1420 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1503 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1499 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#1416 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1401 + def location; end + + # source://rbs//lib/rbs/types.rb#1486 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#1477 + def map_type_name(&block); end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/types.rb#1400 + def self_type; end + + # source://rbs//lib/rbs/types.rb#1437 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1427 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1448 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#1398 + def type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1507 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#527 +class RBS::Types::Record + # @return [Record] a new instance of Record + # + # source://rbs//lib/rbs/types.rb#531 + def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#555 + def ==(other); end + + # Returns the value of attribute all_fields. + # + # source://rbs//lib/rbs/types.rb#528 + def all_fields; end + + # source://rbs//lib/rbs/types.rb#605 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#559 + def eql?(other); end + + # Returns the value of attribute fields. + # + # source://rbs//lib/rbs/types.rb#528 + def fields; end + + # source://rbs//lib/rbs/types.rb#565 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#636 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#632 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#561 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#529 + def location; end + + # source://rbs//lib/rbs/types.rb#621 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#614 + def map_type_name(&block); end + + # Returns the value of attribute optional_fields. + # + # source://rbs//lib/rbs/types.rb#528 + def optional_fields; end + + # source://rbs//lib/rbs/types.rb#580 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#576 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#589 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#640 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1385 +module RBS::Types::SelfTypeBindingHelper + private + + # source://rbs//lib/rbs/types.rb#1388 + def self_type_binding_to_s(t); end + + class << self + # source://rbs//lib/rbs/types.rb#1388 + def self_type_binding_to_s(t); end + end +end + +# source://rbs//lib/rbs/types.rb#442 +class RBS::Types::Tuple + # @return [Tuple] a new instance of Tuple + # + # source://rbs//lib/rbs/types.rb#446 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#451 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#488 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#455 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#461 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#518 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#514 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#457 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#444 + def location; end + + # source://rbs//lib/rbs/types.rb#503 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#496 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#473 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#469 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#480 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#443 + def types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#522 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#731 +class RBS::Types::Union + # @return [Union] a new instance of Union + # + # source://rbs//lib/rbs/types.rb#735 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#740 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#786 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#744 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#750 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#813 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#809 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#746 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#733 + def location; end + + # source://rbs//lib/rbs/types.rb#794 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#802 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#762 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#758 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#769 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#732 + def types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#817 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1241 +class RBS::Types::UntypedFunction + # @return [UntypedFunction] a new instance of UntypedFunction + # + # source://rbs//lib/rbs/types.rb#1244 + def initialize(return_type:); end + + # source://rbs//lib/rbs/types.rb#1326 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1274 + def each_param(&block); end + + # source://rbs//lib/rbs/types.rb#1266 + def each_type(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1302 + def empty?; end + + # source://rbs//lib/rbs/types.rb#1330 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#1248 + def free_variables(acc = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1310 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1306 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#1332 + def hash; end + + # source://rbs//lib/rbs/types.rb#1252 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#1260 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#1318 + def param_to_s; end + + # source://rbs//lib/rbs/types.rb#1322 + def return_to_s; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/types.rb#1242 + def return_type; end + + # source://rbs//lib/rbs/types.rb#1288 + def sub(subst); end + + # source://rbs//lib/rbs/types.rb#1282 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1298 + def update(return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1314 + def with_nonreturn_void?; end + + # source://rbs//lib/rbs/types.rb#1294 + def with_return_type(ty); end +end + +# source://rbs//lib/rbs/types.rb#133 +class RBS::Types::Variable + include ::RBS::Types::NoTypeName + include ::RBS::Types::EmptyEachType + + # @return [Variable] a new instance of Variable + # + # source://rbs//lib/rbs/types.rb#139 + def initialize(name:, location:); end + + # source://rbs//lib/rbs/types.rb#144 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#148 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#154 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#193 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#189 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#150 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#135 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#134 + def name; end + + # source://rbs//lib/rbs/types.rb#164 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#160 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#183 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#197 + def with_nonreturn_void?; end + + class << self + # source://rbs//lib/rbs/types.rb#168 + def build(v); end + + # source://rbs//lib/rbs/types.rb#178 + def fresh(v = T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/errors.rb#349 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [UnknownMethodAliasError] a new instance of UnknownMethodAliasError + # + # source://rbs//lib/rbs/errors.rb#357 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # Returns the value of attribute aliased_name. + # + # source://rbs//lib/rbs/errors.rb#354 + def aliased_name; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#355 + def location; end + + # Returns the value of attribute original_name. + # + # source://rbs//lib/rbs/errors.rb#353 + def original_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#352 + def type_name; end +end + +# source://rbs//lib/rbs/version.rb#4 +RBS::VERSION = T.let(T.unsafe(nil), String) + +# source://rbs//lib/rbs/validator.rb#4 +class RBS::Validator + # @return [Validator] a new instance of Validator + # + # source://rbs//lib/rbs/validator.rb#9 + def initialize(env:, resolver: T.unsafe(nil)); end + + # source://rbs//lib/rbs/validator.rb#15 + def absolute_type(type, context:, &block); end + + # Returns the value of attribute definition_builder. + # + # source://rbs//lib/rbs/validator.rb#7 + def definition_builder; end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/validator.rb#5 + def env; end + + # Returns the value of attribute resolver. + # + # source://rbs//lib/rbs/validator.rb#6 + def resolver; end + + # source://rbs//lib/rbs/validator.rb#178 + def type_alias_dependency; end + + # source://rbs//lib/rbs/validator.rb#182 + def type_alias_regularity; end + + # source://rbs//lib/rbs/validator.rb#158 + def validate_class_alias(entry:); end + + # source://rbs//lib/rbs/validator.rb#104 + def validate_method_definition(method_def, type_name:); end + + # Validates presence of the relative type, and application arity match. + # + # source://rbs//lib/rbs/validator.rb#24 + def validate_type(type, context:); end + + # source://rbs//lib/rbs/validator.rb#63 + def validate_type_alias(entry:); end + + # source://rbs//lib/rbs/validator.rb#120 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end + + # source://rbs//lib/rbs/validator.rb#154 + def validate_variable(var); end +end + +# source://rbs//lib/rbs/errors.rb#325 +class RBS::VariableDuplicationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [VariableDuplicationError] a new instance of VariableDuplicationError + # + # source://rbs//lib/rbs/errors.rb#332 + def initialize(type_name:, variable_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#330 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#328 + def type_name; end + + # Returns the value of attribute variable_name. + # + # source://rbs//lib/rbs/errors.rb#329 + def variable_name; end +end + +# source://rbs//lib/rbs/variance_calculator.rb#4 +class RBS::VarianceCalculator + # @return [VarianceCalculator] a new instance of VarianceCalculator + # + # source://rbs//lib/rbs/variance_calculator.rb#78 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/variance_calculator.rb#76 + def builder; end + + # source://rbs//lib/rbs/variance_calculator.rb#82 + def env; end + + # source://rbs//lib/rbs/variance_calculator.rb#169 + def function(type, result:, context:); end + + # source://rbs//lib/rbs/variance_calculator.rb#98 + def in_inherit(name:, args:, variables:); end + + # source://rbs//lib/rbs/variance_calculator.rb#86 + def in_method_type(method_type:, variables:); end + + # source://rbs//lib/rbs/variance_calculator.rb#110 + def in_type_alias(name:); end + + # source://rbs//lib/rbs/variance_calculator.rb#176 + def negate(variance); end + + # source://rbs//lib/rbs/variance_calculator.rb#121 + def type(type, result:, context:); end +end + +# source://rbs//lib/rbs/variance_calculator.rb#5 +class RBS::VarianceCalculator::Result + # @return [Result] a new instance of Result + # + # source://rbs//lib/rbs/variance_calculator.rb#8 + def initialize(variables:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/variance_calculator.rb#45 + def compatible?(var, with_annotation:); end + + # source://rbs//lib/rbs/variance_calculator.rb#24 + def contravariant(x); end + + # source://rbs//lib/rbs/variance_calculator.rb#15 + def covariant(x); end + + # source://rbs//lib/rbs/variance_calculator.rb#37 + def each(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/variance_calculator.rb#41 + def include?(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/variance_calculator.rb#60 + def incompatible?(params); end + + # source://rbs//lib/rbs/variance_calculator.rb#33 + def invariant(x); end + + # Returns the value of attribute result. + # + # source://rbs//lib/rbs/variance_calculator.rb#6 + def result; end +end + +# source://rbs//lib/rbs/vendorer.rb#4 +class RBS::Vendorer + # @return [Vendorer] a new instance of Vendorer + # + # source://rbs//lib/rbs/vendorer.rb#8 + def initialize(vendor_dir:, loader:); end + + # source://rbs//lib/rbs/vendorer.rb#21 + def clean!; end + + # source://rbs//lib/rbs/vendorer.rb#28 + def copy!; end + + # source://rbs//lib/rbs/vendorer.rb#13 + def ensure_dir; end + + # Returns the value of attribute loader. + # + # source://rbs//lib/rbs/vendorer.rb#6 + def loader; end + + # Returns the value of attribute vendor_dir. + # + # source://rbs//lib/rbs/vendorer.rb#5 + def vendor_dir; end +end + +# source://rbs//lib/rbs/errors.rb#614 +class RBS::WillSyntaxError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [WillSyntaxError] a new instance of WillSyntaxError + # + # source://rbs//lib/rbs/errors.rb#619 + def initialize(message, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#617 + def location; end +end + +# source://rbs//lib/rbs/writer.rb#4 +class RBS::Writer + # @return [Writer] a new instance of Writer + # + # source://rbs//lib/rbs/writer.rb#8 + def initialize(out:); end + + # source://rbs//lib/rbs/writer.rb#366 + def attribute(kind, attr); end + + # source://rbs//lib/rbs/writer.rb#42 + def format_annotation(annotation); end + + # source://rbs//lib/rbs/writer.rb#23 + def indent(size = T.unsafe(nil)); end + + # Returns the value of attribute indentation. + # + # source://rbs//lib/rbs/writer.rb#6 + def indentation; end + + # source://rbs//lib/rbs/writer.rb#293 + def method_name(name); end + + # source://rbs//lib/rbs/writer.rb#219 + def name_and_args(name, args); end + + # source://rbs//lib/rbs/writer.rb#207 + def name_and_params(name, params); end + + # Returns the value of attribute out. + # + # source://rbs//lib/rbs/writer.rb#5 + def out; end + + # source://rbs//lib/rbs/writer.rb#30 + def prefix; end + + # source://rbs//lib/rbs/writer.rb#18 + def preserve!(preserve: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/writer.rb#14 + def preserve?; end + + # source://rbs//lib/rbs/writer.rb#396 + def preserve_empty_line(prev, decl); end + + # source://rbs//lib/rbs/writer.rb#229 + def put_lines(lines, leading_spaces:); end + + # source://rbs//lib/rbs/writer.rb#34 + def puts(string = T.unsafe(nil)); end + + # source://rbs//lib/rbs/writer.rb#79 + def write(contents); end + + # source://rbs//lib/rbs/writer.rb#60 + def write_annotation(annotations); end + + # source://rbs//lib/rbs/writer.rb#66 + def write_comment(comment); end + + # source://rbs//lib/rbs/writer.rb#119 + def write_decl(decl); end + + # source://rbs//lib/rbs/writer.rb#314 + def write_def(member); end + + # source://rbs//lib/rbs/writer.rb#306 + def write_loc_source(located); end + + # source://rbs//lib/rbs/writer.rb#239 + def write_member(member); end + + # source://rbs//lib/rbs/writer.rb#102 + def write_use_directive(dir); end +end diff --git a/sorbet/rbi/gems/regexp_parser@2.11.3.rbi b/sorbet/rbi/gems/regexp_parser@2.11.3.rbi new file mode 100644 index 0000000..ff116f2 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.11.3.rbi @@ -0,0 +1,3883 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + + +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#3 +module Regexp::Expression; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#7 +class Regexp::Expression::Alternation < ::Regexp::Expression::SequenceOperation + # source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#10 + def alternatives; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#11 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#132 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#8 +Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative + +# A sequence of expressions, used by Alternation as one of its alternatives. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#5 +class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#12 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#4 +module Regexp::Expression::Anchor; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#20 +Regexp::Expression::Anchor::BOL = Regexp::Expression::Anchor::BeginningOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#22 +Regexp::Expression::Anchor::BOS = Regexp::Expression::Anchor::BeginningOfString + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#5 +class Regexp::Expression::Anchor::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#149 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#7 +class Regexp::Expression::Anchor::BeginningOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#13 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#10 +class Regexp::Expression::Anchor::BeginningOfString < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#14 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#21 +Regexp::Expression::Anchor::EOL = Regexp::Expression::Anchor::EndOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#23 +Regexp::Expression::Anchor::EOS = Regexp::Expression::Anchor::EndOfString + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#24 +Regexp::Expression::Anchor::EOSobEOL = Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#8 +class Regexp::Expression::Anchor::EndOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#15 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#11 +class Regexp::Expression::Anchor::EndOfString < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#16 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#13 +class Regexp::Expression::Anchor::EndOfStringOrBeforeEndOfLine < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#17 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#18 +class Regexp::Expression::Anchor::MatchStart < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#18 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#16 +class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#19 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#15 + def negative?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#15 +class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#20 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#66 +module Regexp::Expression::Assertion; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#67 +class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#149 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#69 +class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#21 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#72 +class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#22 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#70 +class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#23 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#16 + def negative?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#73 +class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#24 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#17 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#57 +Regexp::Expression::Backref = Regexp::Expression::Backreference + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 +module Regexp::Expression::Backreference; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#5 +class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#157 + def match_length; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#142 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#17 +class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base + # @return [Name] a new instance of Name + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#21 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#25 + def human_name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#18 + def name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#19 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#33 +class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#26 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 +class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name + # @return [NameRecursionLevel] a new instance of NameRecursionLevel + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#48 + def initialize(token, options = T.unsafe(nil)); end + + # Returns the value of attribute recursion_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#46 + def recursion_level; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#7 +class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base + # @return [Number] a new instance of Number + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#11 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#27 + def human_name; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#8 + def number; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#9 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#32 +class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#29 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#34 +class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#30 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#36 +class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative + # @return [NumberRecursionLevel] a new instance of NumberRecursionLevel + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#39 + def initialize(token, options = T.unsafe(nil)); end + + # Returns the value of attribute recursion_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#37 + def recursion_level; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#27 +class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number + # Returns the value of attribute effective_number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#28 + def effective_number; end + + # Sets the attribute effective_number + # + # @param value the value to set the attribute effective_number to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#28 + def effective_number=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#28 + def human_name; end + + # Returns the value of attribute effective_number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#29 + def reference; end +end + +# source://regexp_parser//lib/regexp_parser/expression/base.rb#4 +class Regexp::Expression::Base + include ::Regexp::Expression::Shared + include ::Regexp::Expression::ReferencedExpressions + extend ::Regexp::Expression::Shared::ClassMethods + + # @return [Base] a new instance of Base + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#7 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#13 + def =~(string, offset = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 + def a?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#27 + def ascii_classes?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#76 + def attributes; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#10 + def case_insensitive?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def conditional_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def custom_to_s_handling=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 + def d?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#22 + def default_classes?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 + def extended?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#16 + def free_spacing?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#49 + def greedy?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#13 + def i?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 + def ignore_case?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#56 + def lazy?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def level; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def level=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#8 + def m?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#10 + def match(string, offset = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#5 + def match?(string); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match.rb#8 + def matches?(string); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#5 + def multiline?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def nesting_level; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def options; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def parent=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#58 + def possessive?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def quantifier; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#19 + def quantify(*args); end + + # Deprecated. Prefer `#repetitions` which has a more uniform interface. + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#28 + def quantity; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/base.rb#53 + def reluctant?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#33 + def repetitions; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def set_level=(_arg0); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#100 + def strfre(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # %l Level (depth) of the expression. Returns 'root' for the root + # expression, returns zero or higher for all others. + # + # %> Indentation at expression's level. + # + # %x Index of the expression at its depth. Available when using + # the sprintf_tree method only. + # + # %s Start offset within the whole expression. + # %e End offset within the whole expression. + # %S Length of expression. + # + # %o Coded offset and length, same as '@%s+%S' + # + # %y Type of expression. + # %k Token of expression. + # %i ID, same as '%y:%k' + # %c Class name + # + # %q Quantifier info, as {m[,M]} + # %Q Quantifier text + # + # %z Quantifier min + # %Z Quantifier max + # + # %t Base text of the expression (excludes quantifier, if any) + # %~t Full text if the expression is terminal, otherwise %i + # %T Full text of the expression (includes quantifier, if any) + # + # %b Basic info, same as '%o %i' + # %m Most info, same as '%b %q' + # %a All info, same as '%m %t' + # + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#39 + def strfregexp(format = T.unsafe(nil), indent_offset = T.unsafe(nil), index = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def te=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def text; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def text=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#62 + def to_h; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#11 + def to_re(format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def token; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def token=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def ts; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def ts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def type; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#5 + def type=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#35 + def u?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#32 + def unicode_classes?; end + + # source://regexp_parser//lib/regexp_parser/expression/base.rb#23 + def unquantified_clone; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#19 + def x?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#4 +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + # @return [CharacterSet] a new instance of CharacterSet + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#8 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#18 + def close; end + + # Returns the value of attribute closed. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#5 + def closed; end + + # Sets the attribute closed + # + # @param value the value to set the attribute closed to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#5 + def closed=(_arg0); end + + # Returns the value of attribute closed. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#6 + def closed?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#14 + def negate; end + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#5 + def negative; end + + # Sets the attribute negative + # + # @param value the value to set the attribute negative to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#5 + def negative=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#18 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#17 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#5 +class Regexp::Expression::CharacterSet::IntersectedSequence < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#31 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#7 +class Regexp::Expression::CharacterSet::Intersection < ::Regexp::Expression::SequenceOperation + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#32 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/intersection.rb#8 +Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::CharacterSet::IntersectedSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#5 +class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#10 + def <<(exp); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#16 + def complete?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#33 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#18 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#6 + def ts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#4 +module Regexp::Expression::CharacterType; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#7 +class Regexp::Expression::CharacterType::Any < ::Regexp::Expression::CharacterType::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#34 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#5 +class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#19 + def negative?; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#8 +class Regexp::Expression::CharacterType::Digit < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#17 +class Regexp::Expression::CharacterType::ExtendedGrapheme < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#10 +class Regexp::Expression::CharacterType::Hex < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#16 +class Regexp::Expression::CharacterType::Linebreak < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#9 +class Regexp::Expression::CharacterType::NonDigit < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#11 +class Regexp::Expression::CharacterType::NonHex < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#15 +class Regexp::Expression::CharacterType::NonSpace < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#13 +class Regexp::Expression::CharacterType::NonWord < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#14 +class Regexp::Expression::CharacterType::Space < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#12 +class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterType::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#10 +class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#35 + def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#132 + def comment?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#4 +module Regexp::Expression::Conditional; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#20 +class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#36 + def human_name; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#11 +class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#37 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#149 + def match_length; end + + # Name or number of the referenced capturing group that determines state. + # Returns a String if reference is by name, Integer if by number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#14 + def reference; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#143 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#22 +class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#23 + def <<(exp); end + + # @raise [TooManyBranches] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#27 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # @raise [TooManyBranches] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#32 + def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#43 + def branches; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#39 + def condition; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def condition=(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#38 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#132 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#19 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#47 + def reference; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#144 + def referential?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#5 +class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error + # @return [TooManyBranches] a new instance of TooManyBranches + # + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#6 + def initialize; end +end + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#32 +Regexp::Expression::Escape = Regexp::Expression::EscapeSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#4 +module Regexp::Expression::EscapeSequence; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#25 +class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base + private + + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#48 + def control_sequence_to_s(control_sequence); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#53 + def meta_char_to_codepoint(meta_char); end +end + +# \e +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#7 +class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#4 + def codepoint; end +end + +# \b +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#8 +class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#5 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#5 +class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_char.rb#4 + def char; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end +end + +# \a +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 +class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#6 + def codepoint; end +end + +# e.g. \u000A +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#20 +class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#18 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 +class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#28 + def char; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#36 + def chars; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#32 + def codepoint; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#40 + def codepoints; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#166 + def match_length; end +end + +# e.g. \cB +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#26 +class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#60 + def codepoint; end +end + +# \f +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#10 +class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#7 + def codepoint; end +end + +# e.g. \x0A +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#19 +class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#17 + def codepoint; end +end + +# e.g. \j, \@, \😀 (ineffectual escapes) +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#16 +class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#13 + def codepoint; end +end + +# e.g. \M-Z +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#27 +class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#66 + def codepoint; end +end + +# e.g. \M-\cX +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#28 +class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#72 + def codepoint; end +end + +# \n +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#11 +class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#8 + def codepoint; end +end + +# e.g. \012 +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#18 +class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#15 + def codepoint; end +end + +# \r +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#12 +class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#9 + def codepoint; end +end + +# \t +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#13 +class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#10 + def codepoint; end +end + +# e.g. \xE2\x82\xAC +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#23 +class Regexp::Expression::EscapeSequence::UTF8Hex < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#21 + def codepoint; end +end + +# \v +# +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#14 +class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/escape_sequence_codepoint.rb#11 + def codepoint; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#4 +class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#149 + def match_length; end + + # @raise [Regexp::Parser::Error] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#5 + def quantify(*_args); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#137 + def decorative?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#4 +module Regexp::Expression::Group; end + +# Special case. Absence group can match 0.. chars, irrespective of content. +# TODO: in theory, they *can* exclude match lengths with `.`: `(?~.{3})` +# +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#21 +class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#174 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#22 +class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#5 +class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#20 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#42 +class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#39 + def human_name; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#44 + def identifier; end + + # Returns the value of attribute number. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#43 + def number; end + + # Sets the attribute number + # + # @param value the value to set the attribute number to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#43 + def number=(_arg0); end + + # Returns the value of attribute number_at_level. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#43 + def number_at_level; end + + # Sets the attribute number_at_level + # + # @param value the value to set the attribute number_at_level to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#43 + def number_at_level=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#128 + def capturing?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#62 +class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#22 + def parts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#133 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#138 + def decorative?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#47 +class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture + # @return [Named] a new instance of Named + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#51 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#40 + def human_name; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#49 + def identifier; end + + # Returns the value of attribute name. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#48 + def name; end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#56 + def initialize_copy(orig); end +end + +# TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no +# longer inherit from Group because it is effectively a terminal expression. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#25 +class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base + # Returns the value of attribute option_changes. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#26 + def option_changes; end + + # Sets the attribute option_changes + # + # @param value the value to set the attribute option_changes to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#26 + def option_changes=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#33 + def quantify(*args); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#28 + def initialize_copy(orig); end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#8 +class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base + # @return [Passive] a new instance of Passive + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#11 + def initialize(*_arg0); end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#9 + def implicit=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#16 + def implicit?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#21 + def parts; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#4 +module Regexp::Expression::Keep; end + +# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression +# that contains all expressions to its left. +# +# source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#7 +class Regexp::Expression::Keep::Mark < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#41 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#149 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/literal.rb#4 +class Regexp::Expression::Literal < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#42 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#107 + def match_length; end +end + +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#87 +Regexp::Expression::MatchLength = Regexp::MatchLength + +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#12 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#120 +Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#4 +class Regexp::Expression::PosixClass < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#5 + def name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#20 + def negative?; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#11 +Regexp::Expression::Posixclass = Regexp::Expression::PosixClass + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#119 +Regexp::Expression::Property = Regexp::Expression::UnicodeProperty + +# TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and +# call super in #initialize, but raise in #quantifier= and #quantify, +# or introduce an Expression::Quantifiable intermediate class. +# Or actually allow chaining as a more concise but tricky solution than PR#69. +# +# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#8 +class Regexp::Expression::Quantifier + include ::Regexp::Expression::Shared + extend ::Regexp::Expression::Shared::ClassMethods + + # @return [Quantifier] a new instance of Quantifier + # + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#13 + def initialize(*args); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def conditional_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def custom_to_s_handling=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#32 + def greedy?; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#38 + def lazy?; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def level; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#44 + def max; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#40 + def min; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#48 + def mode; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def nesting_level; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def options; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def parent=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#32 + def possessive?; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def quantifier; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#32 + def reluctant?; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def set_level=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def te=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def text; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def text=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#21 + def to_h; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def token; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def token=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def ts; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def ts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def type; end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 + def type=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#54 + def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#66 + def derived_data; end +end + +# source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 +Regexp::Expression::Quantifier::MODES = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#4 +module Regexp::Expression::ReferencedExpressions + # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#7 + def referenced_expression; end + + # Returns the value of attribute referenced_expressions. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#5 + def referenced_expressions; end + + # Sets the attribute referenced_expressions + # + # @param value the value to set the attribute referenced_expressions to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#5 + def referenced_expressions=(_arg0); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/methods/referenced_expressions.rb#11 + def initialize_copy(orig); end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#4 +class Regexp::Expression::Root < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#43 + def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/classes/root.rb#5 + def build(options = T.unsafe(nil)); end + end +end + +# A sequence of expressions. Differs from a Subexpressions by how it handles +# quantifiers, as it applies them to its last element instead of itself as +# a whole subexpression. +# +# Used as the base class for the Alternation alternatives, Conditional +# branches, and CharacterSet::Intersection intersected sequences. +# +# source://regexp_parser//lib/regexp_parser/expression/sequence.rb#10 +class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#29 + def quantify(token, *args); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#25 + def ts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#12 + def add_to(exp, params = T.unsafe(nil), active_opts = T.unsafe(nil)); end + end +end + +# abstract class +# +# source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#5 +class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#14 + def <<(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#18 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#7 + def operands; end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#8 + def operator; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#24 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#6 + def sequences; end + + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#10 + def ts; end +end + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#24 +Regexp::Expression::Set = Regexp::Expression::CharacterSet + +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#4 +module Regexp::Expression::Shared + mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#103 + def ==(other); end + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#110 + def ===(other); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#53 + def base_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#126 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#99 + def coded_offset; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#130 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#135 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#49 + def ends_at(include_quantifier = T.unsafe(nil)); end + + # Deep-compare two expressions for equality. + # + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#111 + def eql?(other); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#57 + def full_length; end + + # default implementation, e.g. "atomic group", "hex escape", "word type", .. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#6 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#5 + def inspect; end + + # Test if this expression has the given test_token, and optionally a given + # test_type. + # + # # Any expressions + # exp.is? :* # always returns true + # + # # is it a :capture + # exp.is? :capture + # + # # is it a :character and a :set + # exp.is? :character, :set + # + # # is it a :meta :dot + # exp.is? :dot, :meta + # + # # is it a :meta or :escape :dot + # exp.is? :dot, [:meta, :escape] + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#38 + def is?(test_token, test_type = T.unsafe(nil)); end + + # not an alias so as to respect overrides of #negative? + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#10 + def negated?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#5 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#103 + def nesting_level=(lvl); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#95 + def offset; end + + # Test if this expression matches an entry in the given scope spec. + # + # A scope spec can be one of: + # + # . An array: Interpreted as a set of tokens, tested for inclusion + # of the expression's token. + # + # . A hash: Where the key is interpreted as the expression type + # and the value is either a symbol or an array. In this + # case, when the scope is a hash, one_of? calls itself to + # evaluate the key's value. + # + # . A symbol: matches the expression's token or type, depending on + # the level of the call. If one_of? is called directly with + # a symbol then it will always be checked against the + # type of the expression. If it's being called for a value + # from a hash, it will be checked against the token of the + # expression. + # + # # any expression + # exp.one_of?(:*) # always true + # + # # like exp.type?(:group) + # exp.one_of?(:group) + # + # # any expression of type meta + # exp.one_of?(:meta => :*) + # + # # meta dots and alternations + # exp.one_of?(:meta => [:dot, :alternation]) + # + # # meta dots and any set tokens + # exp.one_of?({meta: [:dot], set: :*}) + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#77 + def one_of?(scope, top = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#113 + def optional?; end + + # default implementation + # + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#6 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#87 + def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end + + # Make pretty-print work despite #inspect implementation. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#14 + def pretty_print(q); end + + # Called by pretty_print (ruby/pp) and #inspect. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#19 + def pretty_print_instance_variables; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#117 + def quantified?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#109 + def quantifier=(qtf); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#91 + def quantifier_affix(expression_format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#140 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#45 + def starts_at; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#122 + def terminal?; end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#74 + def to_s(format = T.unsafe(nil)); end + + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#85 + def to_str(format = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#39 + def token_class; end + + # Test if this expression has the given test_type, which can be either + # a symbol or an array of symbols to check against the expression's type. + # + # # is it a :group expression + # exp.type? :group + # + # # is it a :set, or :meta + # exp.type? [:set, :meta] + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#15 + def type?(test_type); end + + private + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#20 + def init_from_token_and_options(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#34 + def initialize_copy(orig); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#12 + def intersperse(expressions, separator); end + + class << self + # @private + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#7 + def included(mod); end + end +end + +# filled in ./methods/*.rb +# +# source://regexp_parser//lib/regexp_parser/expression/shared.rb#5 +module Regexp::Expression::Shared::ClassMethods + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#127 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#131 + def comment?; end + + # Convenience method to init a valid Expression without a Regexp::Token + # + # @raise [ArgumentError] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#7 + def construct(params = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#17 + def construct_defaults; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#136 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#141 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#123 + def terminal?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#27 + def token_class; end +end + +# source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#4 +class Regexp::Expression::Subexpression < ::Regexp::Expression::Base + include ::Enumerable + + # @return [Subexpression] a new instance of Subexpression + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#9 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#22 + def <<(exp); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def [](*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def at(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#35 + def dig(*indices); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def each(*args, &block); end + + # Traverses the expression, passing each recursive child to the + # given block. + # If the block takes two arguments, the indices of the children within + # their parents are also passed to it. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#10 + def each_expression(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def empty?(*args, &block); end + + # Returns the value of attribute expressions. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#7 + def expressions; end + + # Sets the attribute expressions + # + # @param value the value to set the attribute expressions to. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#7 + def expressions=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#52 + def extract_quantifier_target(quantifier_description); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def fetch(*args, &block); end + + # Returns a new array with the results of calling the given block once + # for every expression. If a block is not given, returns an array with + # each expression and its level index as an array. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#58 + def flat_map(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def index(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#120 + def inner_match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def join(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def last(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def length(*args, &block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#113 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#23 + def parts; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#114 + def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#104 + def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#41 + def te; end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#45 + def to_h; end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#34 + def traverse(include_self = T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + def values_at(*args, &block); end + + # Traverses the subexpression (depth-first, pre-order) and calls the given + # block for each expression with three arguments; the traversal event, + # the expression, and the index of the expression within its parent. + # + # The event argument is passed as follows: + # + # - For subexpressions, :enter upon entering the subexpression, and + # :exit upon exiting it. + # + # - For terminal expressions, :visit is called once. + # + # Returns self. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#53 + def walk(include_self = T.unsafe(nil), &block); end + + protected + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#68 + def each_expression_with_index(&block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#75 + def each_expression_without_index(&block); end + + private + + # Override base method to clone the expressions as well. + # + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#15 + def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#124 + def terminal?; end + end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 +module Regexp::Expression::UnicodeProperty; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#110 +class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#15 +class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#16 +class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#33 +class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 +class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#34 +class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#5 +class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#99 + def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#6 + def name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#21 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#10 + def shortcut; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 +class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#111 +class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 +class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#99 +module Regexp::Expression::UnicodeProperty::Codepoint; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 +class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#100 +class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#103 +class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 +class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#106 +class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 +class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#107 +class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 +class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 +class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 +class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#114 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 +class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#36 +module Regexp::Expression::UnicodeProperty::Letter; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 +class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#37 +class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#40 +class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 +class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#44 +class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#45 +class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 +class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 +class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 +class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#48 +module Regexp::Expression::UnicodeProperty::Mark; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 +class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#49 +class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#52 +class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#55 +class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 +class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#54 +class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 +class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#58 +module Regexp::Expression::UnicodeProperty::Number; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 +class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#59 +class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#62 +class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#63 +class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#64 +class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 +class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 +class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#67 +module Regexp::Expression::UnicodeProperty::Punctuation; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 +class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#68 +class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 +class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#71 +class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 +class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#76 +class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 +class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 +class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#77 +class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#115 +class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#80 +module Regexp::Expression::UnicodeProperty::Separator; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 +class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#81 +class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#85 +class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#86 +class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#84 +class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 +class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#89 +module Regexp::Expression::UnicodeProperty::Symbol; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 +class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#90 +class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 +class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#93 +class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#95 +class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#96 +class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 +class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 +class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 +class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#28 +class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#13 +class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace + # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#44 + def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#14 + def merge(exp); end +end + +# A very thin wrapper around the scanner that breaks quantified literal runs, +# collects emitted tokens into an array, calculates their nesting depth, and +# normalizes tokens for the parser, and checks if they are implemented by the +# given syntax flavor. +# +# source://regexp_parser//lib/regexp_parser/lexer.rb#7 +class Regexp::Lexer + # source://regexp_parser//lib/regexp_parser/lexer.rb#73 + def emit(token); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#22 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # source://regexp_parser//lib/regexp_parser/lexer.rb#93 + def ascend(type, token); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def block=(_arg0); end + + # if a codepoint list is followed by a quantifier, that quantifier applies + # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' + # c.f. #break_literal. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#145 + def break_codepoint_list(token); end + + # called by scan to break a literal run that is longer than one character + # into two separate tokens when it is followed by a quantifier + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#125 + def break_literal(token); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def collect_tokens; end + + # Sets the attribute collect_tokens + # + # @param value the value to set the attribute collect_tokens to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def conditional_nesting; end + + # Sets the attribute conditional_nesting + # + # @param value the value to set the attribute conditional_nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def conditional_nesting=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#108 + def descend(type, token); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#164 + def merge_condition(current, last); end + + # Returns the value of attribute nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def nesting; end + + # Sets the attribute nesting + # + # @param value the value to set the attribute nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def nesting=(_arg0); end + + # Returns the value of attribute preprev_token. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def preprev_token; end + + # Sets the attribute preprev_token + # + # @param value the value to set the attribute preprev_token to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def preprev_token=(_arg0); end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def prev_token; end + + # Sets the attribute prev_token + # + # @param value the value to set the attribute prev_token to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def prev_token=(_arg0); end + + # Returns the value of attribute set_nesting. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def set_nesting; end + + # Sets the attribute set_nesting + # + # @param value the value to set the attribute set_nesting to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def set_nesting=(_arg0); end + + # Returns the value of attribute shift. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def shift; end + + # Sets the attribute shift + # + # @param value the value to set the attribute shift to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def shift=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://regexp_parser//lib/regexp_parser/lexer.rb#89 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/lexer.rb#18 + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # source://regexp_parser//lib/regexp_parser/lexer.rb#84 + def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + end +end + +# source://regexp_parser//lib/regexp_parser/lexer.rb#14 +Regexp::Lexer::CLOSING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/lexer.rb#16 +Regexp::Lexer::CONDITION_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/lexer.rb#9 +Regexp::Lexer::OPENING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#3 +class Regexp::MatchLength + include ::Enumerable + + # @return [MatchLength] a new instance of MatchLength + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#11 + def initialize(exp, opts = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#26 + def each(opts = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#37 + def endless_each; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#46 + def fixed?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#42 + def include?(length); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#62 + def inspect; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#54 + def max; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#50 + def min; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#58 + def minmax; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#67 + def to_re; end + + private + + # Returns the value of attribute base_max. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def base_max; end + + # Sets the attribute base_max + # + # @param value the value to set the attribute base_max to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def base_max=(_arg0); end + + # Returns the value of attribute base_min. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def base_min; end + + # Sets the attribute base_min + # + # @param value the value to set the attribute base_min to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def base_min=(_arg0); end + + # Returns the value of attribute exp_class. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def exp_class; end + + # Sets the attribute exp_class + # + # @param value the value to set the attribute exp_class to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def exp_class=(_arg0); end + + # Returns the value of attribute max_rep. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def max_rep; end + + # Sets the attribute max_rep + # + # @param value the value to set the attribute max_rep to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def max_rep=(_arg0); end + + # Returns the value of attribute min_rep. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def min_rep; end + + # Sets the attribute min_rep + # + # @param value the value to set the attribute min_rep to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def min_rep=(_arg0); end + + # Returns the value of attribute reify. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def reify; end + + # Sets the attribute reify + # + # @param value the value to set the attribute reify to. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#73 + def reify=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#76 + def test_regexp; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#6 + def of(obj); end + end +end + +# source://regexp_parser//lib/regexp_parser/version.rb#4 +class Regexp::Parser + include ::Regexp::Expression + + # source://regexp_parser//lib/regexp_parser/parser.rb#27 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + + private + + # source://regexp_parser//lib/regexp_parser/parser.rb#577 + def active_opts; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#101 + def anchor(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#264 + def assign_effective_number(exp); end + + # Assigns referenced expressions to referring expressions, e.g. if there is + # an instance of Backreference::Number, its #referenced_expression is set to + # the instance of Group::Capture that it refers to via its number. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#584 + def assign_referenced_expressions; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#229 + def backref(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#204 + def captured_group_count_at_level; end + + # Returns the value of attribute captured_group_counts. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def captured_group_counts; end + + # Sets the attribute captured_group_counts + # + # @param value the value to set the attribute captured_group_counts to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def captured_group_counts=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#573 + def close_completed_character_set_range; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#212 + def close_group; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#541 + def close_set; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#271 + def conditional(token); end + + # Returns the value of attribute conditional_nesting. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def conditional_nesting; end + + # Sets the attribute conditional_nesting + # + # @param value the value to set the attribute conditional_nesting to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def conditional_nesting=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#208 + def count_captured_group; end + + # @yield [node] + # + # source://regexp_parser//lib/regexp_parser/parser.rb#218 + def decrease_nesting; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#307 + def escape(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#62 + def extract_options(input, options); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#352 + def free_space(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#116 + def group(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#512 + def increase_group_level(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#552 + def intersection(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#363 + def keep(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#367 + def literal(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#371 + def meta(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#537 + def negate_set; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#301 + def nest(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#296 + def nest_conditional(exp); end + + # Returns the value of attribute nesting. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def nesting; end + + # Sets the attribute nesting + # + # @param value the value to set the attribute nesting to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def nesting=(_arg0); end + + # Returns the value of attribute node. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def node; end + + # Sets the attribute node + # + # @param value the value to set the attribute node to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def node=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#167 + def open_group(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#530 + def open_set(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#132 + def options_group(token); end + + # Returns the value of attribute options_stack. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def options_stack; end + + # Sets the attribute options_stack + # + # @param value the value to set the attribute options_stack to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def options_stack=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#78 + def parse_token(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#393 + def posixclass(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#400 + def property(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#482 + def quantifier(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#545 + def range(token); end + + # Returns the value of attribute root. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def root; end + + # Sets the attribute root + # + # @param value the value to set the attribute root to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def root=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#382 + def sequence_operation(klass, token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#518 + def set(token); end + + # Returns the value of attribute switching_options. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def switching_options; end + + # Sets the attribute switching_options + # + # @param value the value to set the attribute switching_options to. + # + # source://regexp_parser//lib/regexp_parser/parser.rb#58 + def switching_options=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#200 + def total_captured_group_count; end + + # source://regexp_parser//lib/regexp_parser/parser.rb#556 + def type(token); end + + class << self + # source://regexp_parser//lib/regexp_parser/parser.rb#23 + def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + end +end + +# source://regexp_parser//lib/regexp_parser/parser.rb#130 +Regexp::Parser::ENC_FLAGS = T.let(T.unsafe(nil), Array) + +# base class for all gem-specific errors +# +# source://regexp_parser//lib/regexp_parser/error.rb#5 +class Regexp::Parser::Error < ::StandardError; end + +# source://regexp_parser//lib/regexp_parser/parser.rb#129 +Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/parser.rb#9 +class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end + +# source://regexp_parser//lib/regexp_parser/parser.rb#397 +Regexp::Parser::UP = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#398 +Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#17 +class Regexp::Parser::UnknownTokenError < ::Regexp::Parser::ParserError + # @return [UnknownTokenError] a new instance of UnknownTokenError + # + # source://regexp_parser//lib/regexp_parser/parser.rb#18 + def initialize(type, token); end +end + +# source://regexp_parser//lib/regexp_parser/parser.rb#11 +class Regexp::Parser::UnknownTokenTypeError < ::Regexp::Parser::ParserError + # @return [UnknownTokenTypeError] a new instance of UnknownTokenTypeError + # + # source://regexp_parser//lib/regexp_parser/parser.rb#12 + def initialize(type, token); end +end + +# source://regexp_parser//lib/regexp_parser/version.rb#5 +Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) + +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#5 +class Regexp::Scanner + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2509 + def capturing_group_count; end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2509 + def capturing_group_count=(_arg0); end + + # Emits an array with the details of the scanned pattern + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2484 + def emit(type, token, text); end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2509 + def literal_run; end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2509 + def literal_run=(_arg0); end + + # @raise [PrematureEndError] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#24 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + private + + # Appends one or more characters to the literal buffer, to be emitted later + # by a call to emit_literal. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2555 + def append_literal(data, ts, te); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def block=(_arg0); end + + # Returns the value of attribute char_pos. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def char_pos; end + + # Sets the attribute char_pos + # + # @param value the value to set the attribute char_pos to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def char_pos=(_arg0); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def collect_tokens; end + + # Sets the attribute collect_tokens + # + # @param value the value to set the attribute collect_tokens to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def conditional_stack; end + + # Sets the attribute conditional_stack + # + # @param value the value to set the attribute conditional_stack to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def conditional_stack=(_arg0); end + + # Copy from ts to te from data as text + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2549 + def copy(data, ts, te); end + + # Emits the literal run collected by calls to the append_literal method. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2560 + def emit_literal; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2595 + def emit_meta_control_sequence(data, ts, te, token); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2566 + def emit_options(text); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2520 + def extract_encoding(input_object, options); end + + # Returns the value of attribute free_spacing. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def free_spacing; end + + # Sets the attribute free_spacing + # + # @param value the value to set the attribute free_spacing to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def free_spacing=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2528 + def free_spacing?(input_object, options); end + + # Returns the value of attribute group_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def group_depth; end + + # Sets the attribute group_depth + # + # @param value the value to set the attribute group_depth to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def group_depth=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2540 + def in_group?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2544 + def in_set?; end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def prev_token; end + + # Sets the attribute prev_token + # + # @param value the value to set the attribute prev_token to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def prev_token=(_arg0); end + + # Returns the value of attribute regexp_encoding. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def regexp_encoding; end + + # Sets the attribute regexp_encoding + # + # @param value the value to set the attribute regexp_encoding to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def regexp_encoding=(_arg0); end + + # Returns the value of attribute set_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def set_depth; end + + # Sets the attribute set_depth + # + # @param value the value to set the attribute set_depth to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def set_depth=(_arg0); end + + # Returns the value of attribute spacing_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def spacing_stack; end + + # Sets the attribute spacing_stack + # + # @param value the value to set the attribute spacing_stack to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def spacing_stack=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2513 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/scanner.rb#2469 + def long_prop_map; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2473 + def parse_prop_map(name); end + + # Scans the given regular expression text, or Regexp object and collects the + # emitted token into an array that gets returned at the end. If a block is + # given, it gets called for each emitted token. + # + # This method may raise errors if a syntax error is encountered. + # -------------------------------------------------------------------------- + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#20 + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + + # lazy-load property maps when first needed + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2465 + def short_prop_map; end + end +end + +# Invalid back reference. Used for name a number refs/calls. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#46 +class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError + # @return [InvalidBackrefError] a new instance of InvalidBackrefError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#47 + def initialize(what, reason); end +end + +# Invalid group. Used for named groups. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#31 +class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError + # @return [InvalidGroupError] a new instance of InvalidGroupError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#32 + def initialize(what, reason); end +end + +# Invalid groupOption. Used for inline options. +# TODO: should become InvalidGroupOptionError in v3.0.0 for consistency +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#39 +class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError + # @return [InvalidGroupOption] a new instance of InvalidGroupOption + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#40 + def initialize(option, text); end +end + +# Invalid sequence format. Used for escape sequences, mainly. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#24 +class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError + # @return [InvalidSequenceError] a new instance of InvalidSequenceError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#25 + def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end +end + +# Use each_with_object for required_ruby_version >= 2.2,or #to_h for >= 2.6 +# +# source://regexp_parser//lib/regexp_parser/scanner.rb#2478 +Regexp::Scanner::POSIX_CLASSES = T.let(T.unsafe(nil), Hash) + +# Unexpected end of pattern +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#5 +class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError + # @return [PrematureEndError] a new instance of PrematureEndError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#6 + def initialize(where = T.unsafe(nil)); end +end + +# General scanner error (catch all) +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#7 +class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end + +# The POSIX class name was not recognized by the scanner. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#60 +class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError + # @return [UnknownPosixClassError] a new instance of UnknownPosixClassError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#61 + def initialize(text, _); end +end + +# The property name was not recognized by the scanner. +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#53 +class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError + # @return [UnknownUnicodePropertyError] a new instance of UnknownUnicodePropertyError + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#54 + def initialize(name, _); end +end + +# Base for all scanner validation errors +# +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#5 +class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError + class << self + # Centralizes and unifies the handling of validation related errors. + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#7 + def for(type, problem, reason = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#11 + def types; end + end +end + +# After loading all the tokens the map is full. Extract all tokens and types +# into the All and Types constants. +# +# source://regexp_parser//lib/regexp_parser/syntax.rb#5 +module Regexp::Syntax + private + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#63 + def comparable(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#46 + def const_missing(const_name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#53 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#24 + def for(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#28 + def new(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#59 + def specified_versions; end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#34 + def supported?(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#38 + def version_class(version); end + + class << self + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#63 + def comparable(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#46 + def const_missing(const_name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#53 + def fallback_version_class(version); end + + # Returns the syntax specification class for the given syntax + # version name. The special names 'any' and '*' return Syntax::Any. + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#24 + def for(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#28 + def new(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#59 + def specified_versions; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#34 + def supported?(name); end + + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#38 + def version_class(version); end + end +end + +# A syntax that always returns true, passing all tokens as implemented. This +# is useful during development, testing, and should be useful for some types +# of transformations as well. +# +# source://regexp_parser//lib/regexp_parser/syntax/any.rb#7 +class Regexp::Syntax::Any < ::Regexp::Syntax::Base + class << self + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/any.rb#10 + def implements?(_type, _token); end + end +end + +# A lookup map of supported types and tokens in a given syntax +# +# source://regexp_parser//lib/regexp_parser/syntax/base.rb#11 +class Regexp::Syntax::Base + include ::Regexp::Syntax::Token + + # TODO: drop this backwards compatibility code in v3.0.0, do `private :new` + # + # @return [Base] a new instance of Base + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#101 + def initialize; end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#106 + def method_missing(name, *args); end + + private + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#117 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#48 + def added_features; end + + # @raise [NotImplementedError] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#46 + def check!(type, token); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#36 + def check?(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#28 + def excludes(type, tokens); end + + # Returns the value of attribute features. + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#15 + def features; end + + # Sets the attribute features + # + # @param value the value to set the attribute features to. + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#15 + def features=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#38 + def implementations(type); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#23 + def implements(type, tokens); end + + # @raise [NotImplementedError] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#42 + def implements!(type, token); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#33 + def implements?(type, token); end + + # automatically inherit features through the syntax class hierarchy + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#18 + def inherited(subclass); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#56 + def normalize(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#76 + def normalize_backref(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#67 + def normalize_group(type, token); end + + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#52 + def removed_features; end + end +end + +# source://regexp_parser//lib/regexp_parser/syntax/versions.rb#10 +Regexp::Syntax::CURRENT = Regexp::Syntax::V3_2_0 + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#8 +class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError + # @return [InvalidVersionNameError] a new instance of InvalidVersionNameError + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#9 + def initialize(name); end +end + +# source://regexp_parser//lib/regexp_parser/syntax/base.rb#4 +class Regexp::Syntax::NotImplementedError < ::Regexp::Syntax::SyntaxError + # @return [NotImplementedError] a new instance of NotImplementedError + # + # source://regexp_parser//lib/regexp_parser/syntax/base.rb#5 + def initialize(syntax, type, token); end +end + +# source://regexp_parser//lib/regexp_parser/syntax.rb#6 +class Regexp::Syntax::SyntaxError < ::Regexp::Parser::Error; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#5 +module Regexp::Syntax::Token; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#44 +Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#17 +module Regexp::Syntax::Token::Alternation; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#18 +Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#19 +Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#5 +module Regexp::Syntax::Token::Anchor; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#11 +Regexp::Syntax::Token::Anchor::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#6 +Regexp::Syntax::Token::Anchor::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#7 +Regexp::Syntax::Token::Anchor::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#9 +Regexp::Syntax::Token::Anchor::MatchStart = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#8 +Regexp::Syntax::Token::Anchor::String = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#12 +Regexp::Syntax::Token::Anchor::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#5 +module Regexp::Syntax::Token::Assertion; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#9 +Regexp::Syntax::Token::Assertion::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#6 +Regexp::Syntax::Token::Assertion::Lookahead = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#7 +Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#10 +Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#33 +Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#5 +module Regexp::Syntax::Token::Backreference; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#17 +Regexp::Syntax::Token::Backreference::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#9 +Regexp::Syntax::Token::Backreference::Name = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#8 +Regexp::Syntax::Token::Backreference::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#7 +Regexp::Syntax::Token::Backreference::NumberRef = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#6 +Regexp::Syntax::Token::Backreference::Plain = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#11 +Regexp::Syntax::Token::Backreference::RecursionLevel = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#18 +Regexp::Syntax::Token::Backreference::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#13 +Regexp::Syntax::Token::Backreference::V1_8_6 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#15 +Regexp::Syntax::Token::Backreference::V1_9_1 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#5 +module Regexp::Syntax::Token::CharacterSet; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#9 +Regexp::Syntax::Token::CharacterSet::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#6 +Regexp::Syntax::Token::CharacterSet::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#7 +Regexp::Syntax::Token::CharacterSet::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#10 +Regexp::Syntax::Token::CharacterSet::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#5 +module Regexp::Syntax::Token::CharacterType; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#12 +Regexp::Syntax::Token::CharacterType::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#6 +Regexp::Syntax::Token::CharacterType::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#10 +Regexp::Syntax::Token::CharacterType::Clustered = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#7 +Regexp::Syntax::Token::CharacterType::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#8 +Regexp::Syntax::Token::CharacterType::Hex = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/character_type.rb#13 +Regexp::Syntax::Token::CharacterType::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#5 +module Regexp::Syntax::Token::Conditional; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#11 +Regexp::Syntax::Token::Conditional::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#8 +Regexp::Syntax::Token::Conditional::Condition = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#6 +Regexp::Syntax::Token::Conditional::Delimiters = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#9 +Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#13 +Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#5 +module Regexp::Syntax::Token::Escape; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#10 +Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#26 +Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#6 +Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#8 +Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#22 +Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#15 +Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#24 +Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#27 +Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#13 +Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) + +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#33 +Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#13 +module Regexp::Syntax::Token::FreeSpace; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#14 +Regexp::Syntax::Token::FreeSpace::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#15 +Regexp::Syntax::Token::FreeSpace::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#5 +module Regexp::Syntax::Token::Group; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#19 +Regexp::Syntax::Token::Group::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#10 +Regexp::Syntax::Token::Group::Atomic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#6 +Regexp::Syntax::Token::Group::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#12 +Regexp::Syntax::Token::Group::Comment = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#7 +Regexp::Syntax::Token::Group::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#9 +Regexp::Syntax::Token::Group::Named = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#11 +Regexp::Syntax::Token::Group::Passive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#20 +Regexp::Syntax::Token::Group::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#14 +Regexp::Syntax::Token::Group::V1_8_6 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/group.rb#17 +Regexp::Syntax::Token::Group::V2_4_1 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#5 +module Regexp::Syntax::Token::Keep; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#8 +Regexp::Syntax::Token::Keep::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#6 +Regexp::Syntax::Token::Keep::Mark = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/keep.rb#9 +Regexp::Syntax::Token::Keep::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#8 +module Regexp::Syntax::Token::Literal; end + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#9 +Regexp::Syntax::Token::Literal::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#10 +Regexp::Syntax::Token::Literal::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#6 +Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#5 +module Regexp::Syntax::Token::Meta; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#10 +Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#7 +Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#6 +Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#8 +Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#11 +Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#5 +module Regexp::Syntax::Token::PosixClass; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#11 +Regexp::Syntax::Token::PosixClass::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#9 +Regexp::Syntax::Token::PosixClass::Extensions = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#13 +Regexp::Syntax::Token::PosixClass::NonType = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#6 +Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#12 +Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) + +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#764 +Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#5 +module Regexp::Syntax::Token::Quantifier; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#31 +Regexp::Syntax::Token::Quantifier::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#6 +Regexp::Syntax::Token::Quantifier::Greedy = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#24 +Regexp::Syntax::Token::Quantifier::Interval = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#28 +Regexp::Syntax::Token::Quantifier::IntervalAll = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#26 +Regexp::Syntax::Token::Quantifier::IntervalPossessive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#25 +Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#18 +Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#12 +Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#32 +Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#30 +Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) + +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#16 +Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet + +# Type is the same as Backreference so keeping it here, for now. +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#22 +module Regexp::Syntax::Token::SubexpressionCall; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#26 +Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#23 +Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#24 +Regexp::Syntax::Token::SubexpressionCall::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token.rb#45 +Regexp::Syntax::Token::Types = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#5 +module Regexp::Syntax::Token::UnicodeProperty; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#68 +Regexp::Syntax::Token::UnicodeProperty::Age = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#42 +Regexp::Syntax::Token::UnicodeProperty::Age_V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#46 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#48 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#50 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#52 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#54 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#56 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#58 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#60 +Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#62 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#64 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#66 +Regexp::Syntax::Token::UnicodeProperty::Age_V3_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#754 +Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#15 +module Regexp::Syntax::Token::UnicodeProperty::Category; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#38 +Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#35 +Regexp::Syntax::Token::UnicodeProperty::Category::Codepoint = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#16 +Regexp::Syntax::Token::UnicodeProperty::Category::Letter = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#19 +Regexp::Syntax::Token::UnicodeProperty::Category::Mark = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#22 +Regexp::Syntax::Token::UnicodeProperty::Category::Number = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#25 +Regexp::Syntax::Token::UnicodeProperty::Category::Punctuation = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#32 +Regexp::Syntax::Token::UnicodeProperty::Category::Separator = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#29 +Regexp::Syntax::Token::UnicodeProperty::Category::Symbol = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#8 +Regexp::Syntax::Token::UnicodeProperty::CharType_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#11 +Regexp::Syntax::Token::UnicodeProperty::CharType_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#143 +Regexp::Syntax::Token::UnicodeProperty::Derived = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#70 +Regexp::Syntax::Token::UnicodeProperty::Derived_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#124 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#129 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#133 +Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#137 +Regexp::Syntax::Token::UnicodeProperty::Derived_V3_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#738 +Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#708 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#716 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#736 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#720 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#757 +Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 +Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#342 +Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#145 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#241 +Regexp::Syntax::Token::UnicodeProperty::Script_V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#247 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#257 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#283 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#292 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#301 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#308 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#318 +Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#325 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#332 +Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#756 +Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#344 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#443 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#571 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#606 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#619 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#633 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#643 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#657 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#669 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#680 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 +Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#740 +Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#741 +Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#742 +Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#743 +Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#744 +Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#745 +Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#746 +Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#747 +Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#748 +Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#749 +Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#750 +Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#751 +Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#752 +Regexp::Syntax::Token::UnicodeProperty::V3_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#14 +class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError + # @return [UnknownSyntaxNameError] a new instance of UnknownSyntaxNameError + # + # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#15 + def initialize(name); end +end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.8.6.rb#3 +class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.1.rb#3 +class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/1.9.3.rb#3 +class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.0.0.rb#3 +class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.2.0.rb#3 +class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.3.0.rb#3 +class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.0.rb#3 +class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.4.1.rb#3 +class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.5.0.rb#3 +class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.0.rb#3 +class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.2.rb#3 +class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/2.6.3.rb#3 +class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.1.0.rb#3 +class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.2.0.rb#3 +class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/versions/3.5.0.rb#1 +class Regexp::Syntax::V3_5_0 < ::Regexp::Syntax::V3_2_0; end + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#6 +Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#4 +Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String) + +# source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#5 +Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://regexp_parser//lib/regexp_parser/token.rb#4 +Regexp::TOKEN_KEYS = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/token.rb#15 +class Regexp::Token < ::Struct + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def conditional_level; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def conditional_level=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#22 + def length; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def level; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def level=(_); end + + # Returns the value of attribute next. + # + # source://regexp_parser//lib/regexp_parser/token.rb#16 + def next; end + + # Sets the attribute next + # + # @param value the value to set the attribute next to. + # + # source://regexp_parser//lib/regexp_parser/token.rb#16 + def next=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/token.rb#18 + def offset; end + + # Returns the value of attribute previous. + # + # source://regexp_parser//lib/regexp_parser/token.rb#16 + def previous; end + + # Sets the attribute previous + # + # @param value the value to set the attribute previous to. + # + # source://regexp_parser//lib/regexp_parser/token.rb#16 + def previous=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def set_level; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def set_level=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def te; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def te=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def text; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def text=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def token; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def token=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def ts; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def ts=(_); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def type; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def type=(_); end + + class << self + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def [](*_arg0); end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def inspect; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def keyword_init?; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def members; end + + # source://regexp_parser//lib/regexp_parser/token.rb#15 + def new(*_arg0); end + end +end diff --git a/sorbet/rbi/gems/require-hooks@0.2.3.rbi b/sorbet/rbi/gems/require-hooks@0.2.3.rbi new file mode 100644 index 0000000..a1b3d28 --- /dev/null +++ b/sorbet/rbi/gems/require-hooks@0.2.3.rbi @@ -0,0 +1,110 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `require-hooks` gem. +# Please instead update this file by running `bin/tapioca gem require-hooks`. + + +# source://require-hooks//lib/require-hooks/api.rb#3 +module RequireHooks + class << self + # Define a block to wrap the code loading. + # The return value MUST be a result of calling the passed block. + # For example, you can use such hooks for instrumentation, debugging purposes. + # + # RequireHooks.around_load do |path, &block| + # puts "Loading #{path}" + # block.call.tap { puts "Loaded #{path}" } + # end + # + # source://require-hooks//lib/require-hooks/api.rb#71 + def around_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # source://require-hooks//lib/require-hooks/api.rb#107 + def context_for(path); end + + # This hook should be used to manually compile byte code to be loaded by the VM. + # The arguments are (path, source = nil), where source is only defined if transformations took place. + # Otherwise, you MUST read the source code from the file yourself. + # + # The return value MUST be either nil (continue to the next hook or default behavior) or a platform-specific bytecode object (e.g., RubyVM::InstructionSequence). + # + # RequireHooks.hijack_load do |path, source| + # source ||= File.read(path) + # if defined?(RubyVM::InstructionSequence) + # RubyVM::InstructionSequence.compile(source) + # elsif defined?(JRUBY_VERSION) + # JRuby.compile(source) + # end + # end + # + # source://require-hooks//lib/require-hooks/api.rb#103 + def hijack_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # Returns the value of attribute print_warnings. + # + # source://require-hooks//lib/require-hooks/api.rb#61 + def print_warnings; end + + # Sets the attribute print_warnings + # + # @param value the value to set the attribute print_warnings to. + # + # source://require-hooks//lib/require-hooks/api.rb#61 + def print_warnings=(_arg0); end + + # Define hooks to perform source-to-source transformations. + # The return value MUST be either String (new source code) or nil (indicating that no transformations were performed). + # + # NOTE: The second argument (`source`) MAY be nil, indicating that no transformer tried to transform the source code. + # + # + # RequireHooks.source_transform do |path, source| + # end + # + # source://require-hooks//lib/require-hooks/api.rb#85 + def source_transform(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + end +end + +# source://require-hooks//lib/require-hooks/api.rb#8 +class RequireHooks::Context + # @return [Context] a new instance of Context + # + # source://require-hooks//lib/require-hooks/api.rb#9 + def initialize(around_load, source_transform, hijack_load); end + + # @return [Boolean] + # + # source://require-hooks//lib/require-hooks/api.rb#15 + def empty?; end + + # @return [Boolean] + # + # source://require-hooks//lib/require-hooks/api.rb#23 + def hijack?; end + + # source://require-hooks//lib/require-hooks/api.rb#37 + def perform_source_transform(path); end + + # source://require-hooks//lib/require-hooks/api.rb#27 + def run_around_load_callbacks(path); end + + # @return [Boolean] + # + # source://require-hooks//lib/require-hooks/api.rb#19 + def source_transform?; end + + # source://require-hooks//lib/require-hooks/api.rb#49 + def try_hijack_load(path, source); end +end + +# source://require-hooks//lib/require-hooks/mode/load_iseq.rb#4 +module RequireHooks::LoadIseq + # source://require-hooks//lib/require-hooks/mode/load_iseq.rb#5 + def load_iseq(path); end +end + +class RubyVM::InstructionSequence + extend ::RequireHooks::LoadIseq +end diff --git a/sorbet/rbi/gems/rspec-core@3.10.1.rbi b/sorbet/rbi/gems/rspec-core@3.10.1.rbi deleted file mode 100644 index 9455991..0000000 --- a/sorbet/rbi/gems/rspec-core@3.10.1.rbi +++ /dev/null @@ -1,2455 +0,0 @@ -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rspec-core` gem. -# Please instead update this file by running `bin/tapioca gem rspec-core`. - -# typed: true - -module RSpec - extend ::RSpec::Support::Warnings - extend ::RSpec::Core::Warnings - - class << self - def clear_examples; end - def configuration; end - def configuration=(_arg0); end - def configure; end - def const_missing(name); end - def context(*args, &example_group_block); end - def current_example; end - def current_example=(example); end - def describe(*args, &example_group_block); end - def example_group(*args, &example_group_block); end - def fcontext(*args, &example_group_block); end - def fdescribe(*args, &example_group_block); end - def reset; end - def shared_context(name, *args, &block); end - def shared_examples(name, *args, &block); end - def shared_examples_for(name, *args, &block); end - def world; end - def world=(_arg0); end - def xcontext(*args, &example_group_block); end - def xdescribe(*args, &example_group_block); end - end -end - -module RSpec::Core - class << self - def path_to_executable; end - end -end - -class RSpec::Core::AnonymousExampleGroup < ::RSpec::Core::ExampleGroup - class << self - def metadata; end - end -end - -class RSpec::Core::BacktraceFormatter - def initialize; end - - def backtrace_line(line); end - def exclude?(line); end - def exclusion_patterns; end - def exclusion_patterns=(_arg0); end - def filter_gem(gem_name); end - def format_backtrace(backtrace, options = T.unsafe(nil)); end - def full_backtrace=(_arg0); end - def full_backtrace?; end - def inclusion_patterns; end - def inclusion_patterns=(_arg0); end - - private - - def matches?(patterns, line); end -end - -module RSpec::Core::Bisect; end - -class RSpec::Core::Bisect::BisectFailedError < ::StandardError - class << self - def for_failed_spec_run(spec_output); end - end -end - -class RSpec::Core::Bisect::Channel - def initialize; end - - def close; end - def receive; end - def send(message); end -end - -class RSpec::Core::Bisect::ExampleSetDescriptor < ::Struct - def all_example_ids; end - def all_example_ids=(_); end - def failed_example_ids; end - def failed_example_ids=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Bisect::Notifier - def initialize(formatter); end - - def publish(event, *args); end -end - -class RSpec::Core::Configuration - include ::RSpec::Core::Hooks - include ::RSpec::Core::Configuration::Readers - - def initialize; end - - def add_formatter(formatter, output = T.unsafe(nil)); end - def add_setting(name, opts = T.unsafe(nil)); end - def after(scope = T.unsafe(nil), *meta, &block); end - def alias_example_group_to(new_name, *args); end - def alias_example_to(name, *args); end - def alias_it_behaves_like_to(new_name, report_label = T.unsafe(nil)); end - def alias_it_should_behave_like_to(new_name, report_label = T.unsafe(nil)); end - def append_after(scope = T.unsafe(nil), *meta, &block); end - def append_before(scope = T.unsafe(nil), *meta, &block); end - def apply_derived_metadata_to(metadata); end - def around(scope = T.unsafe(nil), *meta, &block); end - def backtrace_exclusion_patterns; end - def backtrace_exclusion_patterns=(patterns); end - def backtrace_formatter; end - def backtrace_inclusion_patterns; end - def backtrace_inclusion_patterns=(patterns); end - def before(scope = T.unsafe(nil), *meta, &block); end - def bisect_runner; end - def bisect_runner=(value); end - def bisect_runner_class; end - def color; end - def color=(_arg0); end - def color_enabled?(output = T.unsafe(nil)); end - def color_mode; end - def color_mode=(_arg0); end - def configure_example(example, example_hooks); end - def configure_expectation_framework; end - def configure_group(group); end - def configure_mock_framework; end - def default_color; end - def default_color=(_arg0); end - def default_color?; end - def default_formatter; end - def default_formatter=(value); end - def default_path; end - def default_path=(path); end - def default_path?; end - def define_derived_metadata(*filters, &block); end - def deprecation_stream; end - def deprecation_stream=(value); end - def detail_color; end - def detail_color=(_arg0); end - def detail_color?; end - def disable_monkey_patching; end - def disable_monkey_patching!; end - def disable_monkey_patching=(_arg0); end - def drb; end - def drb=(_arg0); end - def drb?; end - def drb_port; end - def drb_port=(_arg0); end - def drb_port?; end - def dry_run; end - def dry_run=(_arg0); end - def dry_run?; end - def error_exit_code; end - def error_exit_code=(_arg0); end - def error_exit_code?; end - def error_stream; end - def error_stream=(_arg0); end - def error_stream?; end - def example_status_persistence_file_path; end - def example_status_persistence_file_path=(value); end - def exclude_pattern; end - def exclude_pattern=(value); end - def exclusion_filter; end - def exclusion_filter=(filter); end - def expect_with(*frameworks); end - def expectation_framework=(framework); end - def expectation_frameworks; end - def expose_current_running_example_as(method_name); end - def expose_dsl_globally=(value); end - def expose_dsl_globally?; end - def extend(mod, *filters); end - def fail_fast; end - def fail_fast=(value); end - def fail_if_no_examples; end - def fail_if_no_examples=(_arg0); end - def fail_if_no_examples?; end - def failure_color; end - def failure_color=(_arg0); end - def failure_color?; end - def failure_exit_code; end - def failure_exit_code=(_arg0); end - def failure_exit_code?; end - def files_or_directories_to_run=(*files); end - def files_to_run; end - def files_to_run=(_arg0); end - def filter; end - def filter=(filter); end - def filter_gems_from_backtrace(*gem_names); end - def filter_manager; end - def filter_manager=(_arg0); end - def filter_run(*args); end - def filter_run_excluding(*args); end - def filter_run_including(*args); end - def filter_run_when_matching(*args); end - def fixed_color; end - def fixed_color=(_arg0); end - def fixed_color?; end - def force(hash); end - def format_docstrings(&block); end - def format_docstrings_block; end - def formatter=(formatter, output = T.unsafe(nil)); end - def formatter_loader; end - def formatters; end - def full_backtrace=(true_or_false); end - def full_backtrace?; end - def full_description; end - def full_description=(description); end - def hooks; end - def in_project_source_dir_regex; end - def include(mod, *filters); end - def include_context(shared_group_name, *filters); end - def inclusion_filter; end - def inclusion_filter=(filter); end - def last_run_statuses; end - def libs; end - def libs=(libs); end - def load_spec_files; end - def loaded_spec_files; end - def max_displayed_failure_line_count; end - def max_displayed_failure_line_count=(_arg0); end - def max_displayed_failure_line_count?; end - def mock_framework; end - def mock_framework=(framework); end - def mock_with(framework); end - def on_example_group_definition(&block); end - def on_example_group_definition_callbacks; end - def only_failures; end - def only_failures?; end - def only_failures_but_not_configured?; end - def order=(*args, &block); end - def ordering_manager; end - def ordering_registry(*args, &block); end - def output_stream; end - def output_stream=(value); end - def pattern; end - def pattern=(value); end - def pending_color; end - def pending_color=(_arg0); end - def pending_color?; end - def prepend(mod, *filters); end - def prepend_after(scope = T.unsafe(nil), *meta, &block); end - def prepend_before(scope = T.unsafe(nil), *meta, &block); end - def profile_examples; end - def profile_examples=(_arg0); end - def profile_examples?; end - def project_source_dirs; end - def project_source_dirs=(_arg0); end - def project_source_dirs?; end - def raise_errors_for_deprecations!; end - def raise_on_warning=(value); end - def register_ordering(*args, &block); end - def reporter; end - def requires; end - def requires=(paths); end - def reset; end - def reset_filters; end - def reset_reporter; end - def run_all_when_everything_filtered; end - def run_all_when_everything_filtered=(_arg0); end - def run_all_when_everything_filtered?; end - def seed(*args, &block); end - def seed=(*args, &block); end - def seed_used?(*args, &block); end - def shared_context_metadata_behavior; end - def shared_context_metadata_behavior=(value); end - def silence_filter_announcements; end - def silence_filter_announcements=(_arg0); end - def silence_filter_announcements?; end - def spec_files_with_failures; end - def start_time; end - def start_time=(_arg0); end - def start_time?; end - def static_config_filter_manager; end - def static_config_filter_manager=(_arg0); end - def success_color; end - def success_color=(_arg0); end - def success_color?; end - def threadsafe; end - def threadsafe=(_arg0); end - def threadsafe?; end - def treat_symbols_as_metadata_keys_with_true_values=(_value); end - def tty; end - def tty=(_arg0); end - def tty?; end - def warnings=(value); end - def warnings?; end - def when_first_matching_example_defined(*filters); end - def with_suite_hooks; end - def world; end - def world=(_arg0); end - - private - - def absolute_pattern?(pattern); end - def add_hook_to_existing_matching_groups(meta, scope, &block); end - def assert_no_example_groups_defined(config_option); end - def clear_values_derived_from_example_status_persistence_file_path; end - def command; end - def conditionally_disable_expectations_monkey_patching; end - def conditionally_disable_mocks_monkey_patching; end - def configure_group_with(group, module_list, application_method); end - def define_built_in_hooks; end - def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end - def extract_location(path); end - def file_glob_from(path, pattern); end - def gather_directories(path); end - def get_files_to_run(paths); end - def get_matching_files(path, pattern); end - def handle_suite_hook(scope, meta); end - def load_file_handling_errors(method, file); end - def metadata_applies_to_group?(meta, group); end - def on_existing_matching_groups(meta); end - def output_to_tty?(output = T.unsafe(nil)); end - def output_wrapper; end - def paths_to_check(paths); end - def pattern_might_load_specs_from_vendored_dirs?; end - def rspec_expectations_loaded?; end - def rspec_mocks_loaded?; end - def run_suite_hooks(hook_description, hooks); end - def safe_extend(mod, host); end - def safe_include(mod, host); end - def safe_prepend(mod, host); end - def update_pattern_attr(name, value); end - def value_for(key); end - - class << self - def add_read_only_setting(name, opts = T.unsafe(nil)); end - def add_setting(name, opts = T.unsafe(nil)); end - def define_alias(name, alias_name); end - def define_predicate(name); end - def define_reader(name); end - def delegate_to_ordering_manager(*methods); end - end -end - -RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) - -class RSpec::Core::Configuration::DeprecationReporterBuffer - def initialize; end - - def deprecation(*args); end - def play_onto(reporter); end -end - -module RSpec::Core::Configuration::ExposeCurrentExample; end -RSpec::Core::Configuration::FAILED_STATUS = T.let(T.unsafe(nil), String) -RSpec::Core::Configuration::MOCKING_ADAPTERS = T.let(T.unsafe(nil), Hash) -class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < ::StandardError; end -RSpec::Core::Configuration::PASSED_STATUS = T.let(T.unsafe(nil), String) -RSpec::Core::Configuration::PENDING_STATUS = T.let(T.unsafe(nil), String) -RSpec::Core::Configuration::RAISE_ERROR_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) - -module RSpec::Core::Configuration::Readers - def default_color; end - def default_path; end - def deprecation_stream; end - def detail_color; end - def drb; end - def drb_port; end - def dry_run; end - def error_exit_code; end - def error_stream; end - def example_status_persistence_file_path; end - def exclude_pattern; end - def fail_fast; end - def fail_if_no_examples; end - def failure_color; end - def failure_exit_code; end - def fixed_color; end - def libs; end - def max_displayed_failure_line_count; end - def only_failures; end - def output_stream; end - def pattern; end - def pending_color; end - def project_source_dirs; end - def requires; end - def run_all_when_everything_filtered; end - def shared_context_metadata_behavior; end - def silence_filter_announcements; end - def start_time; end - def success_color; end - def threadsafe; end - def tty; end -end - -RSpec::Core::Configuration::UNKNOWN_STATUS = T.let(T.unsafe(nil), String) -RSpec::Core::Configuration::VALID_STATUSES = T.let(T.unsafe(nil), Array) - -class RSpec::Core::ConfigurationOptions - def initialize(args); end - - def args; end - def configure(config); end - def configure_filter_manager(filter_manager); end - def options; end - - private - - def args_from_options_file(path); end - def command_line_options; end - def custom_options; end - def custom_options_file; end - def env_options; end - def file_options; end - def force?(key); end - def global_options; end - def global_options_file; end - def home_options_file_path; end - def load_formatters_into(config); end - def local_options; end - def local_options_file; end - def options_file_as_erb_string(path); end - def options_from(path); end - def order(keys); end - def organize_options; end - def parse_args_ignoring_files_or_dirs_to_run(args, source); end - def process_options_into(config); end - def project_options; end - def project_options_file; end - def resolve_xdg_config_home; end - def xdg_options_file_if_exists; end - def xdg_options_file_path; end -end - -RSpec::Core::ConfigurationOptions::OPTIONS_ORDER = T.let(T.unsafe(nil), Array) -RSpec::Core::ConfigurationOptions::UNFORCED_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) -RSpec::Core::ConfigurationOptions::UNPROCESSABLE_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) - -module RSpec::Core::DSL - class << self - def change_global_dsl(&changes); end - def example_group_aliases; end - def expose_example_group_alias(name); end - def expose_example_group_alias_globally(method_name); end - def expose_globally!; end - def exposed_globally?; end - def remove_globally!; end - def top_level; end - def top_level=(_arg0); end - end -end - -class RSpec::Core::DeprecationError < ::StandardError; end - -class RSpec::Core::DidYouMean - def initialize(relative_file_name); end - - def call; end - def relative_file_name; end - - private - - def formats(probables); end - def red_font(mytext); end - def top_and_tail(rspec_format); end -end - -class RSpec::Core::Example - def initialize(example_group_class, description, user_metadata, example_block = T.unsafe(nil)); end - - def clock; end - def clock=(_arg0); end - def description; end - def display_exception; end - def display_exception=(ex); end - def duplicate_with(metadata_overrides = T.unsafe(nil)); end - def example_group; end - def example_group_instance; end - def exception; end - def execution_result; end - def fail_with_exception(reporter, exception); end - def file_path; end - def full_description; end - def id; end - def inspect; end - def inspect_output; end - def instance_exec(*args, &block); end - def location; end - def location_rerun_argument; end - def metadata; end - def pending; end - def pending?; end - def reporter; end - def rerun_argument; end - def run(example_group_instance, reporter); end - def set_aggregate_failures_exception(exception); end - def set_exception(exception); end - def skip; end - def skip_with_exception(reporter, exception); end - def skipped?; end - def to_s; end - def update_inherited_metadata(updates); end - - private - - def assign_generated_description; end - def finish(reporter); end - def generate_description; end - def hooks; end - def location_description; end - def mocks_need_verification?; end - def record_finished(status, reporter); end - def run_after_example; end - def run_before_example; end - def start(reporter); end - def verify_mocks; end - def with_around_and_singleton_context_hooks; end - def with_around_example_hooks; end - - class << self - def delegate_to_metadata(key); end - def parse_id(id); end - end -end - -RSpec::Core::Example::AllExceptionsExcludingDangerousOnesOnRubiesThatAllowIt = RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue - -class RSpec::Core::Example::ExecutionResult - include ::RSpec::Core::HashImitatable - extend ::RSpec::Core::HashImitatable::ClassMethods - - def ensure_timing_set(clock); end - def example_skipped?; end - def exception; end - def exception=(_arg0); end - def finished_at; end - def finished_at=(_arg0); end - def pending_exception; end - def pending_exception=(_arg0); end - def pending_fixed; end - def pending_fixed=(_arg0); end - def pending_fixed?; end - def pending_message; end - def pending_message=(_arg0); end - def record_finished(status, finished_at); end - def run_time; end - def run_time=(_arg0); end - def started_at; end - def started_at=(_arg0); end - def status; end - def status=(_arg0); end - - private - - def calculate_run_time(finished_at); end - def get_value(name); end - def hash_for_delegation; end - def issue_deprecation(_method_name, *_args); end - def set_value(name, value); end -end - -class RSpec::Core::Example::Procsy - def initialize(example, &block); end - - def <<(*a, &b); end - def ===(*a, &b); end - def >>(*a, &b); end - def [](*a, &b); end - def arity(*a, &b); end - def binding(*a, &b); end - def call(*args, &block); end - def clock(*a, &b); end - def clock=(*a, &b); end - def clone(*a, &b); end - def curry(*a, &b); end - def description(*a, &b); end - def dup(*a, &b); end - def duplicate_with(*a, &b); end - def example; end - def example_group(*a, &b); end - def example_group_instance(*a, &b); end - def exception(*a, &b); end - def executed?; end - def execution_result(*a, &b); end - def file_path(*a, &b); end - def full_description(*a, &b); end - def hash(*a, &b); end - def id(*a, &b); end - def inspect; end - def inspect_output(*a, &b); end - def lambda?(*a, &b); end - def location(*a, &b); end - def location_rerun_argument(*a, &b); end - def metadata(*a, &b); end - def parameters(*a, &b); end - def pending(*a, &b); end - def pending?(*a, &b); end - def reporter(*a, &b); end - def rerun_argument(*a, &b); end - def ruby2_keywords(*a, &b); end - def run(*args, &block); end - def skip(*a, &b); end - def skipped?(*a, &b); end - def source_location(*a, &b); end - def to_proc; end - def update_inherited_metadata(*a, &b); end - def wrap(&block); end - def yield(*a, &b); end -end - -class RSpec::Core::ExampleGroup - include ::RSpec::Core::MemoizedHelpers - include ::RSpec::Core::Pending - extend ::RSpec::Core::Hooks - extend ::RSpec::Core::MemoizedHelpers::ClassMethods - extend ::RSpec::Core::SharedExampleGroup - - def initialize(inspect_output = T.unsafe(nil)); end - - def described_class; end - def inspect; end - - private - - def method_missing(name, *args); end - - class << self - def add_example(example); end - def before_context_ivars; end - def children; end - def context(*args, &example_group_block); end - def currently_executing_a_context_hook?; end - def declaration_locations; end - def define_example_group_method(name, metadata = T.unsafe(nil)); end - def define_example_method(name, extra_options = T.unsafe(nil)); end - def define_nested_shared_group_method(new_name, report_label = T.unsafe(nil)); end - def delegate_to_metadata(*names); end - def descendant_filtered_examples; end - def descendants; end - def describe(*args, &example_group_block); end - def described_class; end - def description; end - def each_instance_variable_for_example(group); end - def ensure_example_groups_are_configured; end - def example(*all_args, &block); end - def example_group(*args, &example_group_block); end - def examples; end - def fcontext(*args, &example_group_block); end - def fdescribe(*args, &example_group_block); end - def fexample(*all_args, &block); end - def file_path; end - def filtered_examples; end - def find_and_eval_shared(label, name, inclusion_location, *args, &customization_block); end - def fit(*all_args, &block); end - def focus(*all_args, &block); end - def for_filtered_examples(reporter, &block); end - def fspecify(*all_args, &block); end - def id; end - def idempotently_define_singleton_method(name, &definition); end - def include_context(name, *args, &block); end - def include_examples(name, *args, &block); end - def it(*all_args, &block); end - def it_behaves_like(name, *args, &customization_block); end - def it_should_behave_like(name, *args, &customization_block); end - def location; end - def metadata; end - def next_runnable_index_for(file); end - def ordering_strategy; end - def parent_groups; end - def pending(*all_args, &block); end - def remove_example(example); end - def reset_memoized; end - def run(reporter = T.unsafe(nil)); end - def run_after_context_hooks(example_group_instance); end - def run_before_context_hooks(example_group_instance); end - def run_examples(reporter); end - def set_it_up(description, args, registration_collection, &example_group_block); end - def set_ivars(instance, ivars); end - def skip(*all_args, &block); end - def specify(*all_args, &block); end - def store_before_context_ivars(example_group_instance); end - def subclass(parent, description, args, registration_collection, &example_group_block); end - def superclass_before_context_ivars; end - def superclass_metadata; end - def top_level?; end - def top_level_description; end - def traverse_tree_until(&block); end - def update_inherited_metadata(updates); end - def with_replaced_metadata(meta); end - def xcontext(*args, &example_group_block); end - def xdescribe(*args, &example_group_block); end - def xexample(*all_args, &block); end - def xit(*all_args, &block); end - def xspecify(*all_args, &block); end - - private - - def method_missing(name, *args); end - end -end - -RSpec::Core::ExampleGroup::INSTANCE_VARIABLE_TO_IGNORE = T.let(T.unsafe(nil), Symbol) -class RSpec::Core::ExampleGroup::WrongScopeError < ::NoMethodError; end - -class RSpec::Core::ExampleStatusDumper - def initialize(examples); end - - def dump; end - - private - - def column_widths; end - def formatted_header_rows; end - def formatted_row_from(row_values); end - def formatted_value_rows; end - def headers; end - def rows; end - - class << self - def dump(examples); end - end -end - -class RSpec::Core::ExampleStatusMerger - def initialize(this_run, from_previous_runs); end - - def merge; end - - private - - def delete_previous_examples_that_no_longer_exist; end - def example_must_no_longer_exist?(ex_id); end - def hash_from(example_list); end - def loaded_spec_files; end - def sort_value_from(example); end - def spec_file_from(ex_id); end - - class << self - def merge(this_run, from_previous_runs); end - end -end - -class RSpec::Core::ExampleStatusParser - def initialize(string); end - - def parse; end - - private - - def headers; end - def parse_row(line); end - def split_line(line); end - - class << self - def parse(string); end - end -end - -class RSpec::Core::ExampleStatusPersister - def initialize(examples, file_name); end - - def persist; end - - private - - def dump_statuses(unparsed_previous_runs); end - def statuses_from_this_run; end - - class << self - def load_from(file_name); end - def persist(examples, file_name); end - end -end - -RSpec::Core::ExclusionRules = RSpec::Core::FilterRules - -class RSpec::Core::FilterManager - def initialize; end - - def add_ids(rerun_path, scoped_ids); end - def add_location(file_path, line_numbers); end - def empty?; end - def exclude(*args); end - def exclude_only(*args); end - def exclude_with_low_priority(*args); end - def exclusions; end - def include(*args); end - def include_only(*args); end - def include_with_low_priority(*args); end - def inclusions; end - def prune(examples); end - - private - - def add_path_to_arrays_filter(filter_key, path, values); end - def file_scoped_include?(ex_metadata, ids, locations); end - def prune_conditionally_filtered_examples(examples); end -end - -class RSpec::Core::FilterRules - def initialize(rules = T.unsafe(nil)); end - - def [](key); end - def add(updated); end - def add_with_low_priority(updated); end - def clear; end - def delete(key); end - def description; end - def each_pair(&block); end - def empty?; end - def fetch(*args, &block); end - def include_example?(example); end - def opposite; end - def opposite=(_arg0); end - def rules; end - def use_only(updated); end - - class << self - def build; end - end -end - -RSpec::Core::FilterRules::PROC_HEX_NUMBER = T.let(T.unsafe(nil), Regexp) -RSpec::Core::FilterRules::PROJECT_DIR = T.let(T.unsafe(nil), String) -module RSpec::Core::FilterableItemRepository; end - -class RSpec::Core::FilterableItemRepository::QueryOptimized < ::RSpec::Core::FilterableItemRepository::UpdateOptimized - def initialize(applies_predicate); end - - def append(item, metadata); end - def delete(item, metadata); end - def items_for(metadata); end - def prepend(item, metadata); end - - private - - def applicable_metadata_from(metadata); end - def find_items_for(request_meta); end - def handle_mutation(metadata); end - def proc_keys_from(metadata); end - def reconstruct_caches; end -end - -class RSpec::Core::FilterableItemRepository::UpdateOptimized - def initialize(applies_predicate); end - - def append(item, metadata); end - def delete(item, metadata); end - def items_and_filters; end - def items_for(request_meta); end - def prepend(item, metadata); end -end - -module RSpec::Core::FlatMap - private - - def flat_map(array, &block); end - - class << self - def flat_map(array, &block); end - end -end - -module RSpec::Core::Formatters - class << self - def register(formatter_class, *notifications); end - end -end - -class RSpec::Core::Formatters::BaseBisectFormatter - def initialize(expected_failures); end - - def example_failed(notification); end - def example_finished(notification); end - def start_dump(_notification); end - - class << self - def inherited(formatter); end - end -end - -class RSpec::Core::Formatters::BaseFormatter - def initialize(output); end - - def close(_notification); end - def example_group; end - def example_group=(_arg0); end - def example_group_started(notification); end - def output; end - def start(notification); end - - private - - def output_supports_sync; end - def restore_sync_output; end - def start_sync_output; end -end - -class RSpec::Core::Formatters::BaseTextFormatter < ::RSpec::Core::Formatters::BaseFormatter - def close(_notification); end - def dump_failures(notification); end - def dump_pending(notification); end - def dump_summary(summary); end - def message(notification); end - def seed(notification); end -end - -class RSpec::Core::Formatters::BisectDRbFormatter < ::RSpec::Core::Formatters::BaseBisectFormatter - def initialize(_output); end - - def notify_results(results); end -end - -module RSpec::Core::Formatters::ConsoleCodes - private - - def config_colors_to_methods; end - def console_code_for(code_or_symbol); end - def wrap(text, code_or_symbol); end - - class << self - def config_colors_to_methods; end - def console_code_for(code_or_symbol); end - def wrap(text, code_or_symbol); end - end -end - -RSpec::Core::Formatters::ConsoleCodes::VT100_CODES = T.let(T.unsafe(nil), Hash) -RSpec::Core::Formatters::ConsoleCodes::VT100_CODE_VALUES = T.let(T.unsafe(nil), Hash) - -class RSpec::Core::Formatters::DeprecationFormatter - def initialize(deprecation_stream, summary_stream); end - - def count; end - def deprecation(notification); end - def deprecation_message_for(data); end - def deprecation_stream; end - def deprecation_summary(_notification); end - def output; end - def printer; end - def summary_stream; end -end - -RSpec::Core::Formatters::DeprecationFormatter::DEPRECATION_STREAM_NOTICE = T.let(T.unsafe(nil), String) - -class RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter - def initialize(deprecation_stream, summary_stream, deprecation_formatter); end - - def deprecation_formatter; end - def deprecation_stream; end - def deprecation_summary; end - def print_deferred_deprecation_warnings; end - def print_deprecation_message(data); end - def stash_deprecation_message(deprecation_message); end - def summary_stream; end -end - -RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter::TOO_MANY_USES_LIMIT = T.let(T.unsafe(nil), Integer) - -class RSpec::Core::Formatters::DeprecationFormatter::FileStream - def initialize(file); end - - def puts(*args); end - def summarize(summary_stream, deprecation_count); end -end - -class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage < ::Struct - def initialize(data); end - - def to_s; end - def too_many_warnings_message; end - def type; end - def type=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter - def initialize(deprecation_stream, summary_stream, deprecation_formatter); end - - def deprecation_formatter; end - def deprecation_stream; end - def deprecation_summary; end - def print_deprecation_message(data); end - def summary_stream; end -end - -RSpec::Core::Formatters::DeprecationFormatter::RAISE_ERROR_CONFIG_NOTICE = T.let(T.unsafe(nil), String) - -class RSpec::Core::Formatters::DeprecationFormatter::RaiseErrorStream - def puts(message); end - def summarize(summary_stream, deprecation_count); end -end - -class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage < ::Struct - def initialize(data); end - - def to_s; end - def too_many_warnings_message; end - def type; end - def type=(_); end - - private - - def deprecation_type_for(data); end - def output_formatted(str); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RSpec::Core::Formatters::DeprecationFormatter::TOO_MANY_WARNINGS_NOTICE = T.let(T.unsafe(nil), String) - -class RSpec::Core::Formatters::DocumentationFormatter < ::RSpec::Core::Formatters::BaseTextFormatter - def initialize(output); end - - def example_failed(failure); end - def example_group_finished(_notification); end - def example_group_started(notification); end - def example_passed(passed); end - def example_pending(pending); end - def example_started(_notification); end - def message(notification); end - - private - - def current_indentation(offset = T.unsafe(nil)); end - def failure_output(example); end - def flush_messages; end - def next_failure_index; end - def passed_output(example); end - def pending_output(example, message); end -end - -class RSpec::Core::Formatters::ExceptionPresenter - def initialize(exception, example, options = T.unsafe(nil)); end - - def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end - def colorized_message_lines(colorizer = T.unsafe(nil)); end - def description; end - def example; end - def exception; end - def formatted_backtrace(exception = T.unsafe(nil)); end - def formatted_cause(exception); end - def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end - def fully_formatted_lines(failure_number, colorizer); end - def message_lines; end - - private - - def add_shared_group_lines(lines, colorizer); end - def backtrace_formatter; end - def detail_formatter; end - def encoded_description(description); end - def encoded_string(string); end - def encoding_of(string); end - def exception_backtrace; end - def exception_class_name(exception = T.unsafe(nil)); end - def exception_lines; end - def exception_message_string(exception); end - def extra_detail_formatter; end - def extra_failure_lines; end - def failure_lines; end - def failure_slash_error_lines; end - def final_exception(exception, previous = T.unsafe(nil)); end - def find_failed_line; end - def formatted_message_and_backtrace(colorizer); end - def indent_lines(lines, failure_number); end - def message_color; end - def read_failed_lines; end -end - -class RSpec::Core::Formatters::ExceptionPresenter::Factory - def initialize(example); end - - def build; end - - private - - def multiple_exception_summarizer(exception, prior_detail_formatter, color); end - def multiple_exceptions_error?(exception); end - def options; end - def pending_options; end - def sub_failure_list_formatter(exception, message_color); end - def with_multiple_error_options_as_needed(exception, options); end -end - -class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater - def initialize(parent); end - - def with_truncated_backtrace(child); end -end - -module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter - class << self - def format_backtrace(*_arg0); end - end -end - -RSpec::Core::Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER = T.let(T.unsafe(nil), Proc) - -class RSpec::Core::Formatters::FailureListFormatter < ::RSpec::Core::Formatters::BaseFormatter - def dump_profile(_profile); end - def example_failed(failure); end - def message(_message); end -end - -class RSpec::Core::Formatters::FallbackMessageFormatter - def initialize(output); end - - def message(notification); end - def output; end -end - -module RSpec::Core::Formatters::Helpers - class << self - def format_duration(duration); end - def format_seconds(float, precision = T.unsafe(nil)); end - def organize_ids(ids); end - def pluralize(count, string); end - - private - - def strip_trailing_zeroes(string); end - end -end - -RSpec::Core::Formatters::Helpers::DEFAULT_PRECISION = T.let(T.unsafe(nil), Integer) -RSpec::Core::Formatters::Helpers::SUB_SECOND_PRECISION = T.let(T.unsafe(nil), Integer) - -class RSpec::Core::Formatters::HtmlFormatter < ::RSpec::Core::Formatters::BaseFormatter - def initialize(output); end - - def dump_summary(summary); end - def example_failed(failure); end - def example_group_started(notification); end - def example_passed(passed); end - def example_pending(pending); end - def example_started(_notification); end - def start(notification); end - def start_dump(_notification); end - - private - - def example_group_number; end - def example_number; end - def extra_failure_content(failure); end - def percent_done; end -end - -class RSpec::Core::Formatters::HtmlPrinter - include ::ERB::Util - - def initialize(output); end - - def flush; end - def make_example_group_header_red(group_id); end - def make_example_group_header_yellow(group_id); end - def make_header_red; end - def make_header_yellow; end - def move_progress(percent_done); end - def print_example_failed(pending_fixed, description, run_time, failure_id, exception, extra_content); end - def print_example_group_end; end - def print_example_group_start(group_id, description, number_of_parents); end - def print_example_passed(description, run_time); end - def print_example_pending(description, pending_message); end - def print_html_start; end - def print_summary(duration, example_count, failure_count, pending_count); end - - private - - def indentation_style(number_of_parents); end -end - -RSpec::Core::Formatters::HtmlPrinter::GLOBAL_SCRIPTS = T.let(T.unsafe(nil), String) -RSpec::Core::Formatters::HtmlPrinter::GLOBAL_STYLES = T.let(T.unsafe(nil), String) -RSpec::Core::Formatters::HtmlPrinter::HTML_HEADER = T.let(T.unsafe(nil), String) -RSpec::Core::Formatters::HtmlPrinter::REPORT_HEADER = T.let(T.unsafe(nil), String) - -class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFormatter - def initialize(output); end - - def close(_notification); end - def dump_profile(profile); end - def dump_profile_slowest_example_groups(profile); end - def dump_profile_slowest_examples(profile); end - def dump_summary(summary); end - def message(notification); end - def output_hash; end - def seed(notification); end - def stop(notification); end - - private - - def format_example(example); end -end - -class RSpec::Core::Formatters::Loader - def initialize(reporter); end - - def add(formatter_to_use, *paths); end - def default_formatter; end - def default_formatter=(_arg0); end - def formatters; end - def prepare_default(output_stream, deprecation_stream); end - def reporter; end - def setup_default(output_stream, deprecation_stream); end - - private - - def built_in_formatter(key); end - def custom_formatter(formatter_ref); end - def duplicate_formatter_exists?(new_formatter); end - def existing_formatter_implements?(notification); end - def find_formatter(formatter_to_use); end - def notifications_for(formatter_class); end - def open_stream(path_or_wrapper); end - def path_for(const_ref); end - def register(formatter, notifications); end - def string_const?(str); end - def underscore(camel_cased_word); end - def underscore_with_fix_for_non_standard_rspec_naming(string); end - - class << self - def formatters; end - end -end - -class RSpec::Core::Formatters::ProfileFormatter - def initialize(output); end - - def dump_profile(profile); end - def output; end - - private - - def bold(text); end - def dump_profile_slowest_example_groups(profile); end - def dump_profile_slowest_examples(profile); end - def format_caller(caller_info); end -end - -class RSpec::Core::Formatters::ProgressFormatter < ::RSpec::Core::Formatters::BaseTextFormatter - def example_failed(_notification); end - def example_passed(_notification); end - def example_pending(_notification); end - def start_dump(_notification); end -end - -class RSpec::Core::Formatters::SnippetExtractor - def initialize(source, beginning_line_number, max_line_count = T.unsafe(nil)); end - - def beginning_line_number; end - def expression_lines; end - def max_line_count; end - def source; end - - private - - def expression_node; end - def expression_outmost_node?(node); end - def line_range_of_expression; end - def line_range_of_location_nodes_in_expression; end - def location_nodes_at_beginning_line; end - def unclosed_tokens_in_line_range(line_range); end - - class << self - def extract_expression_lines_at(file_path, beginning_line_number, max_line_count = T.unsafe(nil)); end - def extract_line_at(file_path, line_number); end - def least_indentation_from(lines); end - def source_from_file(path); end - end -end - -class RSpec::Core::Formatters::SnippetExtractor::NoExpressionAtLineError < ::StandardError; end -class RSpec::Core::Formatters::SnippetExtractor::NoSuchFileError < ::StandardError; end -class RSpec::Core::Formatters::SnippetExtractor::NoSuchLineError < ::StandardError; end - -class RSpec::Core::Formatters::SyntaxHighlighter - def initialize(configuration); end - - def highlight(lines); end - - private - - def color_enabled_implementation; end - def implementation; end - - class << self - def attempt_to_add_rspec_terms_to_coderay_keywords; end - end -end - -module RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation - class << self - def highlight_syntax(lines); end - end -end - -RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation::RESET_CODE = T.let(T.unsafe(nil), String) - -module RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation - class << self - def highlight_syntax(lines); end - end -end - -RSpec::Core::Formatters::SyntaxHighlighter::WindowsImplementation = RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation - -module RSpec::Core::HashImitatable - mixes_in_class_methods ::RSpec::Core::HashImitatable::ClassMethods - - def <(*args, &block); end - def <=(*args, &block); end - def >(*args, &block); end - def >=(*args, &block); end - def [](key); end - def []=(key, value); end - def all?(*args, &block); end - def any?(*args, &block); end - def assoc(*args, &block); end - def chain(*args, &block); end - def chunk(*args, &block); end - def chunk_while(*args, &block); end - def clear(*args, &block); end - def collect(*args, &block); end - def collect_concat(*args, &block); end - def compact(*args, &block); end - def compact!(*args, &block); end - def compare_by_identity(*args, &block); end - def compare_by_identity?(*args, &block); end - def count(*args, &block); end - def cycle(*args, &block); end - def deconstruct_keys(*args, &block); end - def default(*args, &block); end - def default=(*args, &block); end - def default_proc(*args, &block); end - def default_proc=(*args, &block); end - def delete(*args, &block); end - def delete_if(*args, &block); end - def detect(*args, &block); end - def dig(*args, &block); end - def drop(*args, &block); end - def drop_while(*args, &block); end - def each(*args, &block); end - def each_cons(*args, &block); end - def each_entry(*args, &block); end - def each_key(*args, &block); end - def each_pair(*args, &block); end - def each_slice(*args, &block); end - def each_value(*args, &block); end - def each_with_index(*args, &block); end - def each_with_object(*args, &block); end - def empty?(*args, &block); end - def entries(*args, &block); end - def fetch(*args, &block); end - def fetch_values(*args, &block); end - def filter(*args, &block); end - def filter!(*args, &block); end - def filter_map(*args, &block); end - def find(*args, &block); end - def find_all(*args, &block); end - def find_index(*args, &block); end - def first(*args, &block); end - def flat_map(*args, &block); end - def flatten(*args, &block); end - def grep(*args, &block); end - def grep_v(*args, &block); end - def group_by(*args, &block); end - def has_key?(*args, &block); end - def has_value?(*args, &block); end - def include?(*args, &block); end - def index(*args, &block); end - def inject(*args, &block); end - def invert(*args, &block); end - def keep_if(*args, &block); end - def key(*args, &block); end - def key?(*args, &block); end - def keys(*args, &block); end - def lazy(*args, &block); end - def length(*args, &block); end - def map(*args, &block); end - def max(*args, &block); end - def max_by(*args, &block); end - def member?(*args, &block); end - def merge(*args, &block); end - def merge!(*args, &block); end - def min(*args, &block); end - def min_by(*args, &block); end - def minmax(*args, &block); end - def minmax_by(*args, &block); end - def none?(*args, &block); end - def one?(*args, &block); end - def partition(*args, &block); end - def rassoc(*args, &block); end - def reduce(*args, &block); end - def rehash(*args, &block); end - def reject(*args, &block); end - def reject!(*args, &block); end - def replace(*args, &block); end - def reverse_each(*args, &block); end - def select(*args, &block); end - def select!(*args, &block); end - def shift(*args, &block); end - def size(*args, &block); end - def slice(*args, &block); end - def slice_after(*args, &block); end - def slice_before(*args, &block); end - def slice_when(*args, &block); end - def sort(*args, &block); end - def sort_by(*args, &block); end - def store(*args, &block); end - def sum(*args, &block); end - def take(*args, &block); end - def take_while(*args, &block); end - def tally(*args, &block); end - def to_a(*args, &block); end - def to_h; end - def to_hash(*args, &block); end - def to_proc(*args, &block); end - def to_set(*args, &block); end - def transform_keys(*args, &block); end - def transform_keys!(*args, &block); end - def transform_values(*args, &block); end - def transform_values!(*args, &block); end - def uniq(*args, &block); end - def update(*args, &block); end - def value?(*args, &block); end - def values(*args, &block); end - def values_at(*args, &block); end - def zip(*args, &block); end - - private - - def directly_supports_attribute?(name); end - def extra_hash_attributes; end - def get_value(name); end - def hash_for_delegation; end - def issue_deprecation(_method_name, *_args); end - def set_value(name, value); end - - class << self - def included(klass); end - end -end - -module RSpec::Core::HashImitatable::ClassMethods - def attr_accessor(*names); end - def hash_attribute_names; end -end - -module RSpec::Core::Hooks - def after(*args, &block); end - def append_after(*args, &block); end - def append_before(*args, &block); end - def around(*args, &block); end - def before(*args, &block); end - def hooks; end - def prepend_after(*args, &block); end - def prepend_before(*args, &block); end -end - -class RSpec::Core::Hooks::AfterContextHook < ::RSpec::Core::Hooks::Hook - def run(example); end -end - -class RSpec::Core::Hooks::AfterHook < ::RSpec::Core::Hooks::Hook - def run(example); end -end - -class RSpec::Core::Hooks::AroundHook < ::RSpec::Core::Hooks::Hook - def execute_with(example, procsy); end - def hook_description; end -end - -class RSpec::Core::Hooks::BeforeHook < ::RSpec::Core::Hooks::Hook - def run(example); end -end - -class RSpec::Core::Hooks::Hook < ::Struct - def block; end - def block=(_); end - def options; end - def options=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Hooks::HookCollections - def initialize(owner, filterable_item_repo_class); end - - def register(prepend_or_append, position, *args, &block); end - def register_global_singleton_context_hooks(example, globals); end - def register_globals(host, globals); end - def run(position, scope, example_or_group); end - - protected - - def all_hooks_for(position, scope); end - def matching_hooks_for(position, scope, example_or_group); end - def processable_hooks_for(position, scope, host); end - def run_owned_hooks_for(position, scope, example_or_group); end - - private - - def ensure_hooks_initialized_for(position, scope); end - def extract_scope_from(args); end - def hooks_for(position, scope); end - def known_scope?(scope); end - def normalized_scope_for(scope); end - def owner_parent_groups; end - def process(host, parent_groups, globals, position, scope); end - def run_around_example_hooks_for(example); end - def run_example_hooks_for(example, position, each_method); end - def scope_and_options_from(*args); end -end - -RSpec::Core::Hooks::HookCollections::EMPTY_HOOK_ARRAY = T.let(T.unsafe(nil), Array) -RSpec::Core::Hooks::HookCollections::HOOK_TYPES = T.let(T.unsafe(nil), Hash) -RSpec::Core::Hooks::HookCollections::SCOPES = T.let(T.unsafe(nil), Array) -RSpec::Core::Hooks::HookCollections::SCOPE_ALIASES = T.let(T.unsafe(nil), Hash) - -class RSpec::Core::InclusionRules < ::RSpec::Core::FilterRules - def add(*args); end - def add_with_low_priority(*args); end - def include_example?(example); end - def split_file_scoped_rules; end - def standalone?; end - - private - - def apply_standalone_filter(updated); end - def is_standalone_filter?(rules); end - def replace_filters(new_rules); end -end - -module RSpec::Core::Invocations; end - -class RSpec::Core::Invocations::Bisect - def call(options, err, out); end - - private - - def bisect_formatter_klass_for(argument); end -end - -class RSpec::Core::Invocations::DRbWithFallback - def call(options, err, out); end -end - -class RSpec::Core::Invocations::InitializeProject - def call(*_args); end -end - -class RSpec::Core::Invocations::PrintHelp < ::Struct - def call(_options, _err, out); end - def hidden_options; end - def hidden_options=(_); end - def parser; end - def parser=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Invocations::PrintVersion - def call(_options, _err, out); end -end - -class RSpec::Core::LegacyExampleGroupHash - include ::RSpec::Core::HashImitatable - extend ::RSpec::Core::HashImitatable::ClassMethods - - def initialize(metadata); end - - def to_h; end - - private - - def directly_supports_attribute?(name); end - def get_value(name); end - def set_value(name, value); end -end - -module RSpec::Core::MemoizedHelpers - def initialize(*_arg0); end - - def is_expected; end - def should(matcher = T.unsafe(nil), message = T.unsafe(nil)); end - def should_not(matcher = T.unsafe(nil), message = T.unsafe(nil)); end - def subject; end - - private - - def __init_memoized; end - def __memoized; end - - class << self - def define_helpers_on(example_group); end - def get_constant_or_yield(example_group, name); end - def module_for(example_group); end - end -end - -module RSpec::Core::MemoizedHelpers::ClassMethods - def let(name, &block); end - def let!(name, &block); end - def subject(name = T.unsafe(nil), &block); end - def subject!(name = T.unsafe(nil), &block); end -end - -class RSpec::Core::MemoizedHelpers::ContextHookMemoized - class << self - def fetch_or_store(key, &_block); end - def isolate_for_context_hook(example_group_instance); end - end -end - -class RSpec::Core::MemoizedHelpers::ContextHookMemoized::After < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized - class << self - def article; end - def hook_expression; end - def hook_intention; end - end -end - -class RSpec::Core::MemoizedHelpers::ContextHookMemoized::Before < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized - class << self - def article; end - def hook_expression; end - def hook_intention; end - end -end - -class RSpec::Core::MemoizedHelpers::NonThreadSafeMemoized - def initialize; end - - def fetch_or_store(key); end -end - -class RSpec::Core::MemoizedHelpers::ThreadsafeMemoized - def initialize; end - - def fetch_or_store(key); end -end - -module RSpec::Core::Metadata - class << self - def ascend(metadata); end - def ascending(metadata); end - def build_hash_from(args, warn_about_example_group_filtering = T.unsafe(nil)); end - def deep_hash_dup(object); end - def id_from(metadata); end - def location_tuple_from(metadata); end - def relative_path(line); end - def relative_path_regex; end - end -end - -class RSpec::Core::Metadata::ExampleGroupHash < ::RSpec::Core::Metadata::HashPopulator - private - - def described_class; end - def full_description; end - - class << self - def backwards_compatibility_default_proc(&example_group_selector); end - def create(parent_group_metadata, user_metadata, example_group_index, *args, &block); end - def hash_with_backwards_compatibility_default_proc; end - end -end - -class RSpec::Core::Metadata::ExampleHash < ::RSpec::Core::Metadata::HashPopulator - private - - def described_class; end - def full_description; end - - class << self - def create(group_metadata, user_metadata, index_provider, description, block); end - end -end - -class RSpec::Core::Metadata::HashPopulator - def initialize(metadata, user_metadata, index_provider, description_args, block); end - - def block; end - def description_args; end - def metadata; end - def populate; end - def user_metadata; end - - private - - def build_description_from(parent_description = T.unsafe(nil), my_description = T.unsafe(nil)); end - def build_scoped_id_for(file_path); end - def description_separator(parent_part, child_part); end - def ensure_valid_user_keys; end - def file_path_and_line_number_from(backtrace); end - def populate_location_attributes; end -end - -RSpec::Core::Metadata::RESERVED_KEYS = T.let(T.unsafe(nil), Array) - -module RSpec::Core::MetadataFilter - class << self - def apply?(predicate, filters, metadata); end - def filter_applies?(key, filter_value, metadata); end - def silence_metadata_example_group_deprecations; end - - private - - def filter_applies_to_any_value?(key, value, metadata); end - def filters_apply?(key, value, metadata); end - def id_filter_applies?(rerun_paths_to_scoped_ids, metadata); end - def location_filter_applies?(locations, metadata); end - def proc_filter_applies?(key, proc, metadata); end - end -end - -class RSpec::Core::MultipleExceptionError < ::StandardError - include ::RSpec::Core::MultipleExceptionError::InterfaceTag - - def initialize(*exceptions); end - - def aggregation_block_label; end - def aggregation_metadata; end - def all_exceptions; end - def exception_count_description; end - def failures; end - def message; end - def other_errors; end - def summary; end -end - -module RSpec::Core::MultipleExceptionError::InterfaceTag - def add(exception); end - - class << self - def for(ex); end - end -end - -module RSpec::Core::Notifications; end - -class RSpec::Core::Notifications::CustomNotification < ::Struct - class << self - def for(options = T.unsafe(nil)); end - end -end - -class RSpec::Core::Notifications::DeprecationNotification < ::Struct - def call_site; end - def call_site=(_); end - def deprecated; end - def deprecated=(_); end - def message; end - def message=(_); end - def replacement; end - def replacement=(_); end - - class << self - def [](*_arg0); end - def from_hash(data); end - def inspect; end - def members; end - - private - - def new(*_arg0); end - end -end - -class RSpec::Core::Notifications::ExampleNotification < ::Struct - def example; end - def example=(_); end - - class << self - def [](*_arg0); end - def for(example); end - def inspect; end - def members; end - - private - - def new(*_arg0); end - end -end - -class RSpec::Core::Notifications::ExamplesNotification - def initialize(reporter); end - - def examples; end - def failed_examples; end - def failure_notifications; end - def fully_formatted_failed_examples(colorizer = T.unsafe(nil)); end - def fully_formatted_pending_examples(colorizer = T.unsafe(nil)); end - def notifications; end - def pending_examples; end - def pending_notifications; end - - private - - def format_examples(examples); end -end - -class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification - def initialize(example, exception_presenter = T.unsafe(nil)); end - - def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end - def colorized_message_lines(colorizer = T.unsafe(nil)); end - def description; end - def exception; end - def formatted_backtrace; end - def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end - def fully_formatted_lines(failure_number, colorizer = T.unsafe(nil)); end - def message_lines; end -end - -class RSpec::Core::Notifications::GroupNotification < ::Struct - def group; end - def group=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Notifications::MessageNotification < ::Struct - def message; end - def message=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module RSpec::Core::Notifications::NullColorizer - private - - def wrap(line, _code_or_symbol); end - - class << self - def wrap(line, _code_or_symbol); end - end -end - -class RSpec::Core::Notifications::NullNotification; end -class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end -class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end - -class RSpec::Core::Notifications::ProfileNotification - def initialize(duration, examples, number_of_examples, example_groups); end - - def duration; end - def examples; end - def number_of_examples; end - def percentage; end - def slow_duration; end - def slowest_examples; end - def slowest_groups; end - - private - - def calculate_slowest_groups; end -end - -class RSpec::Core::Notifications::SeedNotification < ::Struct - def fully_formatted; end - def seed; end - def seed=(_); end - def seed_used?; end - def used=(_); end - - private - - def used; end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Notifications::SkippedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification - def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end -end - -class RSpec::Core::Notifications::StartNotification < ::Struct - def count; end - def count=(_); end - def load_time; end - def load_time=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::Notifications::SummaryNotification < ::Struct - include ::RSpec::Core::ShellEscape - - def colorized_rerun_commands(colorizer = T.unsafe(nil)); end - def colorized_totals_line(colorizer = T.unsafe(nil)); end - def duration; end - def duration=(_); end - def errors_outside_of_examples_count; end - def errors_outside_of_examples_count=(_); end - def example_count; end - def examples; end - def examples=(_); end - def failed_examples; end - def failed_examples=(_); end - def failure_count; end - def formatted_duration; end - def formatted_load_time; end - def fully_formatted(colorizer = T.unsafe(nil)); end - def load_time; end - def load_time=(_); end - def pending_count; end - def pending_examples; end - def pending_examples=(_); end - def totals_line; end - - private - - def duplicate_rerun_locations; end - def rerun_argument_for(example); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Core::NullReporter - class << self - private - - def method_missing(*_arg0); end - end -end - -module RSpec::Core::Ordering; end - -class RSpec::Core::Ordering::ConfigurationManager - def initialize; end - - def force(hash); end - def order=(type); end - def ordering_registry; end - def register_ordering(name, strategy = T.unsafe(nil)); end - def seed; end - def seed=(seed); end - def seed_used?; end -end - -class RSpec::Core::Ordering::Custom - def initialize(callable); end - - def order(list); end -end - -class RSpec::Core::Ordering::Identity - def order(items); end -end - -class RSpec::Core::Ordering::Random - def initialize(configuration); end - - def order(items); end - def used?; end - - private - - def jenkins_hash_digest(string); end -end - -RSpec::Core::Ordering::Random::MAX_32_BIT = T.let(T.unsafe(nil), Integer) - -class RSpec::Core::Ordering::Registry - def initialize(configuration); end - - def fetch(name, &fallback); end - def register(sym, strategy); end - def used_random_seed?; end -end - -class RSpec::Core::OutputWrapper - def initialize(output); end - - def <<(*args, &block); end - def advise(*args, &block); end - def autoclose=(*args, &block); end - def autoclose?(*args, &block); end - def binmode(*args, &block); end - def binmode?(*args, &block); end - def bytes(*args, &block); end - def chars(*args, &block); end - def close(*args, &block); end - def close_on_exec=(*args, &block); end - def close_on_exec?(*args, &block); end - def close_read(*args, &block); end - def close_write(*args, &block); end - def closed?(*args, &block); end - def codepoints(*args, &block); end - def each(*args, &block); end - def each_byte(*args, &block); end - def each_char(*args, &block); end - def each_codepoint(*args, &block); end - def each_line(*args, &block); end - def eof(*args, &block); end - def eof?(*args, &block); end - def external_encoding(*args, &block); end - def fcntl(*args, &block); end - def fdatasync(*args, &block); end - def fileno(*args, &block); end - def flush(*args, &block); end - def fsync(*args, &block); end - def getbyte(*args, &block); end - def getc(*args, &block); end - def gets(*args, &block); end - def inspect(*args, &block); end - def internal_encoding(*args, &block); end - def ioctl(*args, &block); end - def isatty(*args, &block); end - def lineno(*args, &block); end - def lineno=(*args, &block); end - def lines(*args, &block); end - def method_missing(name, *args, &block); end - def output; end - def output=(_arg0); end - def pathconf(*args, &block); end - def pid(*args, &block); end - def pos(*args, &block); end - def pos=(*args, &block); end - def pread(*args, &block); end - def print(*args, &block); end - def printf(*args, &block); end - def putc(*args, &block); end - def puts(*args, &block); end - def pwrite(*args, &block); end - def read(*args, &block); end - def read_nonblock(*args, &block); end - def readbyte(*args, &block); end - def readchar(*args, &block); end - def readline(*args, &block); end - def readlines(*args, &block); end - def readpartial(*args, &block); end - def reopen(*args, &block); end - def respond_to?(name, priv = T.unsafe(nil)); end - def rewind(*args, &block); end - def seek(*args, &block); end - def set_encoding(*args, &block); end - def set_encoding_by_bom(*args, &block); end - def stat(*args, &block); end - def sync(*args, &block); end - def sync=(*args, &block); end - def sysread(*args, &block); end - def sysseek(*args, &block); end - def syswrite(*args, &block); end - def tell(*args, &block); end - def to_i(*args, &block); end - def to_io(*args, &block); end - def tty?(*args, &block); end - def ungetbyte(*args, &block); end - def ungetc(*args, &block); end - def write(*args, &block); end - def write_nonblock(*args, &block); end -end - -class RSpec::Core::Parser - def initialize(original_args); end - - def original_args; end - def parse(source = T.unsafe(nil)); end - - private - - def add_tag_filter(options, filter_type, tag_name, value = T.unsafe(nil)); end - def configure_only_failures(options); end - def parser(options); end - def set_fail_fast(options, value); end - - class << self - def parse(args, source = T.unsafe(nil)); end - end -end - -module RSpec::Core::Pending - def pending(message = T.unsafe(nil)); end - def skip(message = T.unsafe(nil)); end - - class << self - def mark_fixed!(example); end - def mark_pending!(example, message_or_bool); end - def mark_skipped!(example, message_or_bool); end - end -end - -RSpec::Core::Pending::NOT_YET_IMPLEMENTED = T.let(T.unsafe(nil), String) -RSpec::Core::Pending::NO_REASON_GIVEN = T.let(T.unsafe(nil), String) -class RSpec::Core::Pending::PendingExampleFixedError < ::StandardError; end - -class RSpec::Core::Pending::SkipDeclaredInExample < ::StandardError - def initialize(argument); end - - def argument; end -end - -class RSpec::Core::Profiler - def initialize; end - - def example_group_finished(notification); end - def example_group_started(notification); end - def example_groups; end - def example_started(notification); end -end - -RSpec::Core::Profiler::NOTIFICATIONS = T.let(T.unsafe(nil), Array) - -class RSpec::Core::Reporter - def initialize(configuration); end - - def abort_with(msg, exit_status); end - def close_after; end - def deprecation(hash); end - def example_failed(example); end - def example_finished(example); end - def example_group_finished(group); end - def example_group_started(group); end - def example_passed(example); end - def example_pending(example); end - def example_started(example); end - def examples; end - def exit_early(exit_code); end - def fail_fast_limit_met?; end - def failed_examples; end - def finish; end - def message(message); end - def notify(event, notification); end - def notify_non_example_exception(exception, context_description); end - def pending_examples; end - def prepare_default(loader, output_stream, deprecation_stream); end - def publish(event, options = T.unsafe(nil)); end - def register_listener(listener, *notifications); end - def registered_listeners(notification); end - def report(expected_example_count); end - def start(expected_example_count, time = T.unsafe(nil)); end - def stop; end - - private - - def close; end - def ensure_listeners_ready; end - def mute_profile_output?; end - def seed_used?; end -end - -RSpec::Core::Reporter::RSPEC_NOTIFICATIONS = T.let(T.unsafe(nil), RSpec::Core::Set) - -module RSpec::Core::RubyProject - private - - def add_dir_to_load_path(dir); end - def add_to_load_path(*dirs); end - def ascend_until; end - def determine_root; end - def find_first_parent_containing(dir); end - def root; end - - class << self - def add_dir_to_load_path(dir); end - def add_to_load_path(*dirs); end - def ascend_until; end - def determine_root; end - def find_first_parent_containing(dir); end - def root; end - end -end - -class RSpec::Core::Runner - def initialize(options, configuration = T.unsafe(nil), world = T.unsafe(nil)); end - - def configuration; end - def configure(err, out); end - def exit_code(examples_passed = T.unsafe(nil)); end - def options; end - def run(err, out); end - def run_specs(example_groups); end - def setup(err, out); end - def world; end - - private - - def persist_example_statuses; end - - class << self - def autorun; end - def autorun_disabled?; end - def disable_autorun!; end - def handle_interrupt; end - def installed_at_exit?; end - def invoke; end - def perform_at_exit; end - def run(args, err = T.unsafe(nil), out = T.unsafe(nil)); end - def running_in_drb?; end - def trap_interrupt; end - end -end - -class RSpec::Core::Set - include ::Enumerable - - def initialize(array = T.unsafe(nil)); end - - def <<(key); end - def clear; end - def delete(key); end - def each(&block); end - def empty?; end - def include?(key); end - def merge(values); end -end - -module RSpec::Core::SharedContext - def __shared_context_recordings; end - def after(*args, &block); end - def append_after(*args, &block); end - def append_before(*args, &block); end - def around(*args, &block); end - def before(*args, &block); end - def context(*args, &block); end - def describe(*args, &block); end - def hooks(*args, &block); end - def included(group); end - def let(*args, &block); end - def let!(*args, &block); end - def prepend_after(*args, &block); end - def prepend_before(*args, &block); end - def subject(*args, &block); end - def subject!(*args, &block); end - - class << self - def record(methods); end - end -end - -class RSpec::Core::SharedContext::Recording < ::Struct - def args; end - def args=(_); end - def block; end - def block=(_); end - def method_name; end - def method_name=(_); end - def playback_onto(group); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module RSpec::Core::SharedExampleGroup - def shared_context(name, *args, &block); end - def shared_examples(name, *args, &block); end - def shared_examples_for(name, *args, &block); end -end - -class RSpec::Core::SharedExampleGroup::Registry - def add(context, name, *metadata_args, &block); end - def find(lookup_contexts, name); end - - private - - def ensure_block_has_source_location(_block); end - def formatted_location(block); end - def legacy_add(context, name, *metadata_args, &block); end - def shared_example_groups; end - def valid_name?(candidate); end - def warn_if_key_taken(context, key, new_block); end -end - -module RSpec::Core::SharedExampleGroup::TopLevelDSL - class << self - def definitions; end - def expose_globally!; end - def exposed_globally?; end - def remove_globally!; end - end -end - -class RSpec::Core::SharedExampleGroupInclusionStackFrame - def initialize(shared_group_name, inclusion_location); end - - def description; end - def formatted_inclusion_location; end - def inclusion_location; end - def shared_group_name; end - - class << self - def current_backtrace; end - def shared_example_group_inclusions; end - def with_frame(name, location); end - end -end - -class RSpec::Core::SharedExampleGroupModule < ::Module - def initialize(description, definition, metadata); end - - def definition; end - def include_in(klass, inclusion_line, args, customization_block); end - def included(klass); end - def inspect; end - def to_s; end -end - -module RSpec::Core::ShellEscape - private - - def conditionally_quote(id); end - def escape(shell_command); end - def quote(argument); end - def shell_allows_unquoted_ids?; end - - class << self - def conditionally_quote(id); end - def escape(shell_command); end - def quote(argument); end - def shell_allows_unquoted_ids?; end - end -end - -RSpec::Core::ShellEscape::SHELLS_ALLOWING_UNQUOTED_IDS = T.let(T.unsafe(nil), Array) - -class RSpec::Core::SuiteHookContext < ::RSpec::Core::Example - def initialize(hook_description, reporter); end - - def set_exception(exception); end -end - -class RSpec::Core::Time - class << self - def now(*_arg0); end - end -end - -module RSpec::Core::Version; end -RSpec::Core::Version::STRING = T.let(T.unsafe(nil), String) - -module RSpec::Core::Warnings - def deprecate(deprecated, data = T.unsafe(nil)); end - def warn_deprecation(message, opts = T.unsafe(nil)); end - def warn_with(message, options = T.unsafe(nil)); end -end - -class RSpec::Core::World - def initialize(configuration = T.unsafe(nil)); end - - def all_example_groups; end - def all_examples; end - def announce_exclusion_filter(announcements); end - def announce_filters; end - def announce_inclusion_filter(announcements); end - def everything_filtered_message; end - def example_count(groups = T.unsafe(nil)); end - def example_group_counts_by_spec_file; end - def example_groups; end - def exclusion_filter; end - def filter_manager; end - def filtered_examples; end - def inclusion_filter; end - def non_example_failure; end - def non_example_failure=(_arg0); end - def num_example_groups_defined_in(file); end - def ordered_example_groups; end - def preceding_declaration_line(absolute_file_name, filter_line); end - def prepare_example_filtering; end - def record(example_group); end - def registered_example_group_files; end - def report_filter_message(message); end - def reporter; end - def reset; end - def shared_example_group_registry; end - def source_from_file(path); end - def syntax_highlighter; end - def traverse_example_group_trees_until(&block); end - def wants_to_quit; end - def wants_to_quit=(_arg0); end - - private - - def descending_declaration_line_numbers_by_file; end - def fail_if_config_and_cli_options_invalid; end -end - -module RSpec::Core::World::Null - class << self - def all_example_groups; end - def example_groups; end - def non_example_failure; end - def non_example_failure=(_); end - def registered_example_group_files; end - def traverse_example_group_trees_until; end - end -end - -module RSpec::ExampleGroups - extend ::RSpec::Support::RecursiveConstMethods - - class << self - def assign_const(group); end - def base_name_for(group); end - def constant_scope_for(group); end - def disambiguate(name, const_scope); end - def remove_all_constants; end - end -end - -RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash) -RSpec::SharedContext = RSpec::Core::SharedContext diff --git a/sorbet/rbi/gems/rspec-core@3.13.6.rbi b/sorbet/rbi/gems/rspec-core@3.13.6.rbi new file mode 100644 index 0000000..837a7a6 --- /dev/null +++ b/sorbet/rbi/gems/rspec-core@3.13.6.rbi @@ -0,0 +1,11471 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-core` gem. +# Please instead update this file by running `bin/tapioca gem rspec-core`. + + +module ERB::Escape + private + + def html_escape(_arg0); end + + class << self + def html_escape(_arg0); end + end +end + +# Namespace for all core RSpec code. +# +# source://rspec-core//lib/rspec/core/version.rb#1 +module RSpec + extend ::RSpec::Core::Warnings + + class << self + # Used to ensure examples get reloaded between multiple runs in the same + # process and ensures user configuration is persisted. + # + # Users must invoke this if they want to clear all examples but preserve + # current configuration when they use the runner multiple times within the + # same process. + # + # source://rspec-core//lib/rspec/core.rb#70 + def clear_examples; end + + # Returns the global [Configuration](RSpec/Core/Configuration) object. While + # you _can_ use this method to access the configuration, the more common + # convention is to use [RSpec.configure](RSpec#configure-class_method). + # + # @example + # RSpec.configuration.drb_port = 1234 + # @see Core::Configuration + # @see RSpec.configure + # + # source://rspec-core//lib/rspec/core.rb#85 + def configuration; end + + # Setters for shared global objects + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # Yields the global configuration to a block. + # + # @example + # RSpec.configure do |config| + # config.add_formatter 'documentation' + # end + # @see Core::Configuration + # @yield [Configuration] global configuration + # + # source://rspec-core//lib/rspec/core.rb#97 + def configure; end + + # @private + # + # source://rspec-core//lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def context(*args, &example_group_block); end + + # The example being executed. + # + # The primary audience for this method is library authors who need access + # to the example currently being executed and also want to support all + # versions of RSpec 2 and 3. + # + # @example + # + # RSpec.configure do |c| + # # context.example is deprecated, but RSpec.current_example is not + # # available until RSpec 3.0. + # fetch_current_example = RSpec.respond_to?(:current_example) ? + # proc { RSpec.current_example } : proc { |context| context.example } + # + # c.before(:example) do + # example = fetch_current_example.call(self) + # + # # ... + # end + # end + # + # source://rspec-core//lib/rspec/core.rb#122 + def current_example; end + + # Set the current example being executed. + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#128 + def current_example=(example); end + + # Get the current RSpec execution scope + # + # Returns (in order of lifecycle): + # * `:suite` as an initial value, this is outside of the test lifecycle. + # * `:before_suite_hook` during `before(:suite)` hooks. + # * `:before_context_hook` during `before(:context)` hooks. + # * `:before_example_hook` during `before(:example)` hooks and `around(:example)` before `example.run`. + # * `:example` within the example run. + # * `:after_example_hook` during `after(:example)` hooks and `around(:example)` after `example.run`. + # * `:after_context_hook` during `after(:context)` hooks. + # * `:after_suite_hook` during `after(:suite)` hooks. + # * `:suite` as a final value, again this is outside of the test lifecycle. + # + # Reminder, `:context` hooks have `:all` alias and `:example` hooks have `:each` alias. + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core.rb#154 + def current_scope; end + + # Set the current scope rspec is executing in + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def describe(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def example_group(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def fcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def fdescribe(*args, &example_group_block); end + + # Used to ensure examples get reloaded and user configuration gets reset to + # defaults between multiple runs in the same process. + # + # Users must invoke this if they want to have the configuration reset when + # they use the runner multiple times within the same process. Users must deal + # themselves with re-configuration of RSpec before run. + # + # source://rspec-core//lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#113 + def shared_context(name, *args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#114 + def shared_examples_for(name, *args, &block); end + + # Internal container for global non-configuration data. + # + # @private + # + # source://rspec-core//lib/rspec/core.rb#160 + def world; end + + # Setters for shared global objects + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def xcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#279 + def xdescribe(*args, &example_group_block); end + end +end + +# Namespace for the rspec-core code. +# +# source://rspec-core//lib/rspec/core/version.rb#2 +module RSpec::Core + class << self + # @private path to executable file. + # + # source://rspec-core//lib/rspec/core.rb#181 + def path_to_executable; end + end +end + +# Unnamed example group used by `SuiteHookContext`. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#782 +class RSpec::Core::AnonymousExampleGroup < ::RSpec::Core::ExampleGroup + class << self + # source://rspec-core//lib/rspec/core/example_group.rb#783 + def metadata; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/backtrace_formatter.rb#4 +class RSpec::Core::BacktraceFormatter + # @return [BacktraceFormatter] a new instance of BacktraceFormatter + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#8 + def initialize; end + + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#49 + def backtrace_line(line); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#53 + def exclude?(line); end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def exclusion_patterns; end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def exclusion_patterns=(_arg0); end + + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#28 + def filter_gem(gem_name); end + + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#33 + def format_backtrace(backtrace, options = T.unsafe(nil)); end + + # Sets the attribute full_backtrace + # + # @param value the value to set the attribute full_backtrace to. + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#22 + def full_backtrace=(_arg0); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#24 + def full_backtrace?; end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def inclusion_patterns; end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def inclusion_patterns=(_arg0); end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#60 + def matches?(patterns, line); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#3 +module RSpec::Core::Bisect; end + +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#8 +class RSpec::Core::Bisect::BisectFailedError < ::StandardError + class << self + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#9 + def for_failed_spec_run(spec_output); end + end +end + +# Wraps a pipe to support sending objects between a child and +# parent process. Where supported, encoding is explicitly +# set to ensure binary data is able to pass from child to +# parent. +# +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#36 +class RSpec::Core::Bisect::Channel + # @return [Channel] a new instance of Channel + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#41 + def initialize; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#62 + def close; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#56 + def receive; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#50 + def send(message); end +end + +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#38 +RSpec::Core::Bisect::Channel::MARSHAL_DUMP_ENCODING = T.let(T.unsafe(nil), Encoding) + +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 +class RSpec::Core::Bisect::ExampleSetDescriptor < ::Struct + # Returns the value of attribute all_example_ids + # + # @return [Object] the current value of all_example_ids + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def all_example_ids; end + + # Sets the attribute all_example_ids + # + # @param value [Object] the value to set the attribute all_example_ids to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def all_example_ids=(_); end + + # Returns the value of attribute failed_example_ids + # + # @return [Object] the current value of failed_example_ids + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def failed_example_ids; end + + # Sets the attribute failed_example_ids + # + # @param value [Object] the value to set the attribute failed_example_ids to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def failed_example_ids=(_); end + + class << self + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def inspect; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def members; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 + def new(*_arg0); end + end +end + +# Wraps a `formatter` providing a simple means to notify it in place +# of an `RSpec::Core::Reporter`, without involving configuration in +# any way. +# +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#19 +class RSpec::Core::Bisect::Notifier + # @return [Notifier] a new instance of Notifier + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#20 + def initialize(formatter); end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#24 + def publish(event, *args); end +end + +# Stores runtime configuration information. +# +# Configuration options are loaded from multiple files and joined together +# with command-line switches and the `SPEC_OPTS` environment variable. +# +# Precedence order (where later entries overwrite earlier entries on +# conflicts): +# +# * Global (`$XDG_CONFIG_HOME/rspec/options`, or `~/.rspec` if it does +# not exist) +# * Project-specific (`./.rspec`) +# * Local (`./.rspec-local`) +# * Command-line options +# * `SPEC_OPTS` +# +# For example, an option set in the local file will override an option set +# in your global file. +# +# The global, project-specific and local files can all be overridden with a +# separate custom file using the --options command-line parameter. +# +# @example Hooks +# RSpec.configure do |c| +# c.before(:suite) { establish_connection } +# c.before(:example) { log_in_as :authorized } +# c.around(:example) { |ex| Database.transaction(&ex) } +# end +# @example Standard settings +# RSpec.configure do |c| +# c.drb = true +# c.drb_port = 1234 +# c.default_path = 'behavior' +# end +# @see Hooks +# @see RSpec.configure +# +# source://rspec-core//lib/rspec/core/configuration.rb#47 +class RSpec::Core::Configuration + include ::RSpec::Core::Hooks + include ::RSpec::Core::Configuration::Readers + + # Build an object to store runtime configuration options and set defaults + # + # @return [Configuration] a new instance of Configuration + # + # source://rspec-core//lib/rspec/core/configuration.rb#528 + def initialize; end + + # Adds a formatter to the set RSpec will use for this run. + # + # @overload add_formatter + # @overload add_formatter + # @param formatter [Class, String, Object] formatter to use. Can be any of the + # string values supported from the CLI (`p`/`progress`, + # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any + # class that implements the formatter protocol and has registered + # itself with RSpec as a formatter, or a formatter instance. + # @param output [String, IO] where the formatter will write its output. + # Can be an IO object or a string path to a file. If not provided, + # the configured `output_stream` (`$stdout`, by default) will be used. + # @see RSpec::Core::Formatters::Protocol + # + # source://rspec-core//lib/rspec/core/configuration.rb#996 + def add_formatter(formatter, output = T.unsafe(nil)); end + + # Adds a custom setting to the RSpec.configuration object. + # + # RSpec.configuration.add_setting :foo + # + # Used internally and by extension frameworks like rspec-rails, so they + # can add config settings that are domain specific. For example: + # + # RSpec.configure do |c| + # c.add_setting :use_transactional_fixtures, + # :default => true, + # :alias_with => :use_transactional_examples + # end + # + # `add_setting` creates three methods on the configuration object, a + # setter, a getter, and a predicate: + # + # RSpec.configuration.foo=(value) + # RSpec.configuration.foo + # RSpec.configuration.foo? # Returns true if foo returns anything but nil or false. + # + # @option opts + # @option opts + # @overload add_setting + # @overload add_setting + # @param opts [Hash] a customizable set of options + # + # source://rspec-core//lib/rspec/core/configuration.rb#659 + def add_setting(name, opts = T.unsafe(nil)); end + + # Defines a `after` hook. See {Hooks#after} for full docs. + # + # This method differs from {Hooks#after} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once after + # the last example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #append_after + # @see #before + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2031 + def after(scope = T.unsafe(nil), *meta, &block); end + + # Creates a method that defines an example group with the provided + # metadata. Can be used to define example group/metadata shortcuts. + # + # @example + # RSpec.configure do |config| + # config.alias_example_group_to :describe_model, :type => :model + # end + # + # shared_context_for "model tests", :type => :model do + # # define common model test helper methods, `let` declarations, etc + # end + # + # # This lets you do this: + # + # RSpec.describe_model User do + # end + # + # # ... which is the equivalent of + # + # RSpec.describe User, :type => :model do + # end + # @note The defined aliased will also be added to the top level + # (e.g. `main` and from within modules) if + # `expose_dsl_globally` is set to true. + # @see #alias_example_to + # @see #expose_dsl_globally= + # + # source://rspec-core//lib/rspec/core/configuration.rb#1209 + def alias_example_group_to(new_name, *args); end + + # Creates a method that delegates to `example` including the submitted + # `args`. Used internally to add variants of `example` like `pending`: + # + # @example + # RSpec.configure do |config| + # config.alias_example_to :pending, :pending => true + # end + # + # # This lets you do this: + # + # RSpec.describe Thing do + # pending "does something" do + # thing = Thing.new + # end + # end + # + # # ... which is the equivalent of + # + # RSpec.describe Thing do + # it "does something", :pending => true do + # thing = Thing.new + # end + # end + # @note The specific example alias below (`pending`) is already + # defined for you. + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define methods like `focus` and `xit`, but we also add + # docs for those methods. + # @param args [Array, Hash] metadata for the generated example + # @param name [String] example name alias + # + # source://rspec-core//lib/rspec/core/configuration.rb#1177 + def alias_example_to(name, *args); end + + # Define an alias for it_should_behave_like that allows different + # language (like "it_has_behavior" or "it_behaves_like") to be + # employed when including shared examples. + # + # @example + # RSpec.configure do |config| + # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') + # end + # + # # allows the user to include a shared example group like: + # + # RSpec.describe Entity do + # it_has_behavior 'sortability' do + # let(:sortable) { Entity.new } + # end + # end + # + # # which is reported in the output as: + # # Entity + # # has behavior: sortability + # # ...sortability examples here + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define `it_should_behave_like` (for backward + # compatibility), but we also add docs for that method. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1240 + def alias_it_behaves_like_to(new_name, report_label = T.unsafe(nil)); end + + # Define an alias for it_should_behave_like that allows different + # language (like "it_has_behavior" or "it_behaves_like") to be + # employed when including shared examples. + # + # @example + # RSpec.configure do |config| + # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') + # end + # + # # allows the user to include a shared example group like: + # + # RSpec.describe Entity do + # it_has_behavior 'sortability' do + # let(:sortable) { Entity.new } + # end + # end + # + # # which is reported in the output as: + # # Entity + # # has behavior: sortability + # # ...sortability examples here + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define `it_should_behave_like` (for backward + # compatibility), but we also add docs for that method. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1243 + def alias_it_should_behave_like_to(new_name, report_label = T.unsafe(nil)); end + + # Adds `block` to the end of the list of `after` blocks in the same + # scope (`:example`, `:context`, or `:suite`), in contrast to {#after}, + # which adds the hook to the start of the list. + # + # See {Hooks#after} for full `after` hook docs. + # + # This method differs from {Hooks#append_after} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once after + # the last example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #append_after + # @see #before + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2061 + def append_after(scope = T.unsafe(nil), *meta, &block); end + + # Defines a `before` hook. See {Hooks#before} for full docs. + # + # This method differs from {Hooks#before} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once before + # the first example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #after + # @see #append_after + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#1990 + def append_before(scope = T.unsafe(nil), *meta, &block); end + + # @private + # @raise [SystemStackError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#1941 + def apply_derived_metadata_to(metadata); end + + # Registers `block` as an `around` hook. + # + # See {Hooks#around} for full `around` hook docs. + # + # source://rspec-core//lib/rspec/core/configuration.rb#2079 + def around(scope = T.unsafe(nil), *meta, &block); end + + # Regexps used to exclude lines from backtraces. + # + # Excludes lines from ruby (and jruby) source, installed gems, anything + # in any "bin" directory, and any of the RSpec libs (outside gem + # installs) by default. + # + # You can modify the list via the getter, or replace it with the setter. + # + # To override this behaviour and display a full backtrace, use + # `--backtrace` on the command line, in a `.rspec` file, or in the + # `rspec_options` attribute of RSpec's rake task. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#697 + def backtrace_exclusion_patterns; end + + # Set regular expressions used to exclude lines in backtrace. + # + # @param patterns [Array] set backtrace_formatter exclusion_patterns + # + # source://rspec-core//lib/rspec/core/configuration.rb#703 + def backtrace_exclusion_patterns=(patterns); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#522 + def backtrace_formatter; end + + # Regexps used to include lines in backtraces. + # + # Defaults to [Regexp.new Dir.getwd]. + # + # Lines that match an exclusion _and_ an inclusion pattern + # will be included. + # + # You can modify the list via the getter, or replace it with the setter. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#716 + def backtrace_inclusion_patterns; end + + # Set regular expressions used to include lines in backtrace. + # + # @attr patterns [Array] set backtrace_formatter inclusion_patterns + # + # source://rspec-core//lib/rspec/core/configuration.rb#722 + def backtrace_inclusion_patterns=(patterns); end + + # Defines a `before` hook. See {Hooks#before} for full docs. + # + # This method differs from {Hooks#before} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once before + # the first example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #after + # @see #append_after + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#1976 + def before(scope = T.unsafe(nil), *meta, &block); end + + # Determines which bisect runner implementation gets used to run subsets + # of the suite during a bisection. Your choices are: + # + # - `:shell`: Performs a spec run by shelling out, booting RSpec and your + # application environment each time. This runner is the most widely + # compatible runner, but is not as fast. On platforms that do not + # support forking, this is the default. + # - `:fork`: Pre-boots RSpec and your application environment in a parent + # process, and then forks a child process for each spec run. This runner + # tends to be significantly faster than the `:shell` runner but cannot + # be used in some situations. On platforms that support forking, this + # is the default. If you use this runner, you should ensure that all + # of your one-time setup logic goes in a `before(:suite)` hook instead + # of getting run at the top-level of a file loaded by `--require`. + # + # @note This option will only be used by `--bisect` if you set it in a file + # loaded via `--require`. + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def bisect_runner; end + + # source://rspec-core//lib/rspec/core/configuration.rb#500 + def bisect_runner=(value); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2125 + def bisect_runner_class; end + + # Enables color output if the output is a TTY. As of RSpec 3.6, this is + # the default behavior and this option is retained only for backwards + # compatibility. + # + # @deprecated No longer recommended because of complex behavior. Instead, + # rely on the fact that TTYs will display color by default, or set + # {#color_mode} to :on to display color on a non-TTY output. + # @return [Boolean] + # @see color_enabled? + # @see color_mode + # + # source://rspec-core//lib/rspec/core/configuration.rb#922 + def color; end + + # Toggle output color. + # + # @deprecated No longer recommended because of complex behavior. Instead, + # rely on the fact that TTYs will display color by default, or set + # {:color_mode} to :on to display color on a non-TTY output. + # + # source://rspec-core//lib/rspec/core/configuration.rb#960 + def color=(_arg0); end + + # Check if color is enabled for a particular output. + # + # @param output [IO] an output stream to use, defaults to the current + # `output_stream` + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#943 + def color_enabled?(output = T.unsafe(nil)); end + + # The mode for determining whether to display output in color. One of: + # + # - :automatic - the output will be in color if the output is a TTY (the + # default) + # - :on - the output will be in color, whether or not the output is a TTY + # - :off - the output will not be in color + # + # @return [Boolean] + # @see color_enabled? + # + # source://rspec-core//lib/rspec/core/configuration.rb#935 + def color_mode; end + + # Set the color mode. + # + # source://rspec-core//lib/rspec/core/configuration.rb#953 + def color_mode=(_arg0); end + + # Used internally to extend the singleton class of a single example's + # example group instance with modules using `include` and/or `extend`. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1580 + def configure_example(example, example_hooks); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1622 + def configure_expectation_framework; end + + # Used internally to extend a group with modules using `include`, `prepend` and/or + # `extend`. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1568 + def configure_group(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1616 + def configure_mock_framework; end + + # The default output color. Defaults to `:white` but can be set to one of + # the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def default_color; end + + # The default output color. Defaults to `:white` but can be set to one of + # the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def default_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def default_color?; end + + # The formatter that will be used if no formatter has been set. + # Defaults to 'progress'. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1003 + def default_formatter; end + + # Sets a fallback formatter to use if none other has been set. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.default_formatter = 'doc' + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1014 + def default_formatter=(value); end + + # Path to use if no path is provided to the `rspec` command (default: + # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to + # run all the examples in the `spec` directory. + # + # @note Other scripts invoking `rspec` indirectly will ignore this + # setting. + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def default_path; end + + # Path to use if no path is provided to the `rspec` command (default: + # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to + # run all the examples in the `spec` directory. + # + # @note Other scripts invoking `rspec` indirectly will ignore this + # setting. + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#121 + def default_path=(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def default_path?; end + + # Defines a callback that can assign derived metadata values. + # + # @example + # RSpec.configure do |config| + # # Tag all groups and examples in the spec/unit directory with + # # :type => :unit + # config.define_derived_metadata(:file_path => %r{/spec/unit/}) do |metadata| + # metadata[:type] = :unit + # end + # end + # @param filters [Array, Hash] metadata filters that determine + # which example or group metadata hashes the callback will be triggered + # for. If none are given, the callback will be run against the metadata + # hashes of all groups and examples. + # @yieldparam metadata [Hash] original metadata hash from an example or + # group. Mutate this in your block as needed. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1900 + def define_derived_metadata(*filters, &block); end + + # Determines where deprecation warnings are printed. + # Defaults to `$stderr`. + # + # @return [IO, String] IO or filename to write to + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def deprecation_stream; end + + # Determines where deprecation warnings are printed. + # + # @param value [IO, String] IO to write to or filename to write to + # + # source://rspec-core//lib/rspec/core/configuration.rb#168 + def deprecation_stream=(value); end + + # Color used to print details. Defaults to `:cyan` but can be set to one + # of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def detail_color; end + + # Color used to print details. Defaults to `:cyan` but can be set to one + # of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def detail_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def detail_color?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1881 + def disable_monkey_patching; end + + # Enables zero monkey patching mode for RSpec. It removes monkey + # patching of the top-level DSL methods (`describe`, + # `shared_examples_for`, etc) onto `main` and `Module`, instead + # requiring you to prefix these methods with `RSpec.`. It enables + # expect-only syntax for rspec-mocks and rspec-expectations. It + # simply disables monkey patching on whatever pieces of RSpec + # the user is using. + # + # @example + # + # # It disables all monkey patching. + # RSpec.configure do |config| + # config.disable_monkey_patching! + # end + # + # # Is an equivalent to + # RSpec.configure do |config| + # config.expose_dsl_globally = false + # + # config.mock_with :rspec do |mocks| + # mocks.syntax = :expect + # mocks.patch_marshal_to_support_partial_doubles = false + # end + # + # config.expect_with :rspec do |expectations| + # expectations.syntax = :expect + # end + # end + # @note It configures rspec-mocks and rspec-expectations only + # if the user is using those (either explicitly or implicitly + # by not setting `mock_with` or `expect_with` to anything else). + # @note If the user uses this options with `mock_with :mocha` + # (or similar) they will still have monkey patching active + # in their test environment from mocha. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1873 + def disable_monkey_patching!; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1881 + def disable_monkey_patching=(_arg0); end + + # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb + # server, but you can use tools like spork. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def drb; end + + # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb + # server, but you can use tools like spork. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def drb=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def drb?; end + + # The drb_port (default: nil). + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def drb_port; end + + # The drb_port (default: nil). + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def drb_port=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def drb_port?; end + + # Prints the formatter output of your suite without running any + # examples or hooks. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def dry_run; end + + # Prints the formatter output of your suite without running any + # examples or hooks. + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def dry_run=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def dry_run?; end + + # The exit code to return if there are any errors outside examples (default: failure_exit_code) + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def error_exit_code; end + + # The exit code to return if there are any errors outside examples (default: failure_exit_code) + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def error_exit_code=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def error_exit_code?; end + + # Default: `$stderr`. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def error_stream; end + + # Default: `$stderr`. + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def error_stream=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def error_stream?; end + + # The file path to use for persisting example statuses. Necessary for the + # `--only-failures` and `--next-failure` CLI options. + # + # @overload example_status_persistence_file_path + # @overload example_status_persistence_file_path= + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def example_status_persistence_file_path; end + + # Sets the file path to use for persisting example statuses. Necessary for the + # `--only-failures` and `--next-failure` CLI options. + # + # source://rspec-core//lib/rspec/core/configuration.rb#192 + def example_status_persistence_file_path=(value); end + + # Exclude files matching this pattern. + # + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def exclude_pattern; end + + # Set pattern to match files to exclude. + # + # @attr value [String] the filename pattern to exclude spec files by + # + # source://rspec-core//lib/rspec/core/configuration.rb#304 + def exclude_pattern=(value); end + + # Returns the `exclusion_filter`. If none has been set, returns an empty + # hash. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1369 + def exclusion_filter; end + + # Clears and reassigns the `exclusion_filter`. Set to `nil` if you don't + # want any exclusion filter at all. + # + # ### Warning + # + # This overrides any exclusion filters/tags set on the command line or in + # configuration files. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1362 + def exclusion_filter=(filter); end + + # Sets the expectation framework module(s) to be included in each example + # group. + # + # `frameworks` can be `:rspec`, `:test_unit`, `:minitest`, a custom + # module, or any combination thereof: + # + # config.expect_with :rspec + # config.expect_with :test_unit + # config.expect_with :minitest + # config.expect_with :rspec, :minitest + # config.expect_with OtherExpectationFramework + # + # RSpec will translate `:rspec`, `:minitest`, and `:test_unit` into the + # appropriate modules. + # + # ## Configuration + # + # If the module responds to `configuration`, `expect_with` will + # yield the `configuration` object if given a block: + # + # config.expect_with OtherExpectationFramework do |custom_config| + # custom_config.custom_setting = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#858 + def expect_with(*frameworks); end + + # Delegates to expect_with(framework). + # + # source://rspec-core//lib/rspec/core/configuration.rb#831 + def expectation_framework=(framework); end + + # Returns the configured expectation framework adapter module(s) + # + # source://rspec-core//lib/rspec/core/configuration.rb#819 + def expectation_frameworks; end + + # Exposes the current running example via the named + # helper method. RSpec 2.x exposed this via `example`, + # but in RSpec 3.0, the example is instead exposed via + # an arg yielded to `it`, `before`, `let`, etc. However, + # some extension gems (such as Capybara) depend on the + # RSpec 2.x's `example` method, so this config option + # can be used to maintain compatibility. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.expose_current_running_example_as :example + # end + # + # RSpec.describe MyClass do + # before do + # # `example` can be used here because of the above config. + # do_something if example.metadata[:type] == "foo" + # end + # end + # @param method_name [Symbol] the name of the helper method + # + # source://rspec-core//lib/rspec/core/configuration.rb#1811 + def expose_current_running_example_as(method_name); end + + # Use this to expose the core RSpec DSL via `Module` and the `main` + # object. It will be set automatically but you can override it to + # remove the DSL. + # Default: true + # + # source://rspec-core//lib/rspec/core/configuration.rb#151 + def expose_dsl_globally=(value); end + + # Indicates if the DSL has been exposed off of modules and `main`. + # Default: true + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#143 + def expose_dsl_globally?; end + + # Tells RSpec to extend example groups with `mod`. Methods defined in + # `mod` are exposed to example groups (not examples). Use `filters` to + # constrain the groups to extend. + # + # Similar to `include`, but behavior is added to example groups, which + # are classes, rather than the examples, which are instances of those + # classes. + # + # @example + # + # module UiHelpers + # def run_in_browser + # # ... + # end + # end + # + # module PermissionHelpers + # def define_permissions + # # ... + # end + # end + # + # RSpec.configure do |config| + # config.extend(UiHelpers, :type => :request) + # config.extend(PermissionHelpers, :with_permissions, :type => :request) + # end + # + # describe "edit profile", :with_permissions, :type => :request do + # run_in_browser + # define_permissions + # + # it "does stuff in the client" do + # # ... + # end + # end + # @see #include + # @see #prepend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1518 + def extend(mod, *filters); end + + # If specified, indicates the number of failures required before cleaning + # up and exit (default: `nil`). Can also be `true` to fail and exit on first + # failure + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def fail_fast; end + + # @see fail_fast + # + # source://rspec-core//lib/rspec/core/configuration.rb#214 + def fail_fast=(value); end + + # Whether or not to fail when there are no RSpec examples (default: false). + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def fail_if_no_examples; end + + # Whether or not to fail when there are no RSpec examples (default: false). + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def fail_if_no_examples=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def fail_if_no_examples?; end + + # Color to use to indicate failure. Defaults to `:red` but can be set to + # one of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def failure_color; end + + # Color to use to indicate failure. Defaults to `:red` but can be set to + # one of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def failure_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def failure_color?; end + + # The exit code to return if there are any failures (default: 1). + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def failure_exit_code; end + + # The exit code to return if there are any failures (default: 1). + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def failure_exit_code=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def failure_exit_code?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1083 + def files_or_directories_to_run=(*files); end + + # The spec files RSpec will run. + # + # @return [Array] specified files about to run + # + # source://rspec-core//lib/rspec/core/configuration.rb#1096 + def files_to_run; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#516 + def files_to_run=(_arg0); end + + # Returns the `inclusion_filter`. If none has been set, returns an empty + # hash. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1317 + def filter; end + + # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't + # want any inclusion filter at all. + # + # ### Warning + # + # This overrides any inclusion filters/tags set on the command line or in + # configuration files. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1309 + def filter=(filter); end + + # Adds {#backtrace_exclusion_patterns} that will filter lines from + # the named gems from backtraces. + # + # @example + # RSpec.configure do |config| + # config.filter_gems_from_backtrace "rack", "rake" + # end + # @note The patterns this adds will match the named gems in their common + # locations (e.g. system gems, vendored with bundler, installed as a + # :git dependency with bundler, etc) but is not guaranteed to work for + # all possible gem locations. For example, if you have the gem source + # in a directory with a completely unrelated name, and use bundler's + # :path option, this will not filter it. + # @param gem_names [Array] Names of the gems to filter + # + # source://rspec-core//lib/rspec/core/configuration.rb#742 + def filter_gems_from_backtrace(*gem_names); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#518 + def filter_manager; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#518 + def filter_manager=(_arg0); end + + # Adds key/value pairs to the `inclusion_filter`. If `args` + # includes any symbols that are not part of the hash, each symbol + # is treated as a key in the hash with the value `true`. + # + # ### Note + # + # Filters set using this method can be overridden from the command line + # or config files (e.g. `.rspec`). + # + # @example + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end + # + # # Any of the following will include that group. + # config.filter_run_including :foo => 'bar' + # config.filter_run_including :foo => /^ba/ + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # filter_run_including :foo # same as filter_run_including :foo => true + # + # source://rspec-core//lib/rspec/core/configuration.rb#1280 + def filter_run(*args); end + + # Adds key/value pairs to the `exclusion_filter`. If `args` + # includes any symbols that are not part of the hash, each symbol + # is treated as a key in the hash with the value `true`. + # + # ### Note + # + # Filters set using this method can be overridden from the command line + # or config files (e.g. `.rspec`). + # + # @example + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end + # + # # Any of the following will exclude that group. + # config.filter_run_excluding :foo => 'bar' + # config.filter_run_excluding :foo => /^ba/ + # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} + # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} + # + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # filter_run_excluding :foo # same as filter_run_excluding :foo => true + # + # source://rspec-core//lib/rspec/core/configuration.rb#1349 + def filter_run_excluding(*args); end + + # Adds key/value pairs to the `inclusion_filter`. If `args` + # includes any symbols that are not part of the hash, each symbol + # is treated as a key in the hash with the value `true`. + # + # ### Note + # + # Filters set using this method can be overridden from the command line + # or config files (e.g. `.rspec`). + # + # @example + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end + # + # # Any of the following will include that group. + # config.filter_run_including :foo => 'bar' + # config.filter_run_including :foo => /^ba/ + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # filter_run_including :foo # same as filter_run_including :foo => true + # + # source://rspec-core//lib/rspec/core/configuration.rb#1275 + def filter_run_including(*args); end + + # Applies the provided filter only if any of examples match, in constrast + # to {#filter_run}, which always applies even if no examples match, in + # which case no examples will be run. This allows you to leave configured + # filters in place that are intended only for temporary use. The most common + # example is focus filtering: `config.filter_run_when_matching :focus`. + # With that configured, you can temporarily focus an example or group + # by tagging it with `:focus` metadata, or prefixing it with an `f` + # (as in `fdescribe`, `fcontext` and `fit`) since those are aliases for + # `describe`/`context`/`it` with `:focus` metadata. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1291 + def filter_run_when_matching(*args); end + + # Color used when a pending example is fixed. Defaults to `:blue` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def fixed_color; end + + # Color used when a pending example is fixed. Defaults to `:blue` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def fixed_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def fixed_color?; end + + # Used to set higher priority option values from the command line. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#592 + def force(hash); end + + # Formats the docstring output using the block provided. + # + # @example + # # This will strip the descriptions of both examples and example + # # groups. + # RSpec.configure do |config| + # config.format_docstrings { |s| s.strip } + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1661 + def format_docstrings(&block); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1666 + def format_docstrings_block; end + + # Adds a formatter to the set RSpec will use for this run. + # + # @overload add_formatter + # @overload add_formatter + # @param formatter [Class, String, Object] formatter to use. Can be any of the + # string values supported from the CLI (`p`/`progress`, + # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any + # class that implements the formatter protocol and has registered + # itself with RSpec as a formatter, or a formatter instance. + # @param output [String, IO] where the formatter will write its output. + # Can be an IO object or a string path to a file. If not provided, + # the configured `output_stream` (`$stdout`, by default) will be used. + # @see RSpec::Core::Formatters::Protocol + # + # source://rspec-core//lib/rspec/core/configuration.rb#999 + def formatter=(formatter, output = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1029 + def formatter_loader; end + + # Returns a duplicate of the formatters currently loaded in + # the `FormatterLoader` for introspection. + # + # Note as this is a duplicate, any mutations will be disregarded. + # + # @return [Array] the formatters currently loaded + # + # source://rspec-core//lib/rspec/core/configuration.rb#1024 + def formatters; end + + # Toggle full backtrace. + # + # @attr true_or_false [Boolean] toggle full backtrace display + # + # source://rspec-core//lib/rspec/core/configuration.rb#908 + def full_backtrace=(true_or_false); end + + # Check if full backtrace is enabled. + # + # @return [Boolean] is full backtrace enabled + # + # source://rspec-core//lib/rspec/core/configuration.rb#902 + def full_backtrace?; end + + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def full_cause_backtrace; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def full_cause_backtrace=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def full_cause_backtrace?; end + + # @return [Array] full description filter + # + # source://rspec-core//lib/rspec/core/configuration.rb#977 + def full_description; end + + # Run examples matching on `description` in all files to run. + # + # @param description [String, Regexp] the pattern to filter on + # + # source://rspec-core//lib/rspec/core/configuration.rb#972 + def full_description=(description); end + + # Holds the various registered hooks. Here we use a FilterableItemRepository + # implementation that is specifically optimized for the read/write patterns + # of the config object. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2109 + def hooks; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1607 + def in_project_source_dir_regex; end + + # Tells RSpec to include `mod` in example groups. Methods defined in + # `mod` are exposed to examples (not example groups). Use `filters` to + # constrain the groups or examples in which to include the module. + # + # @example + # + # module AuthenticationHelpers + # def login_as(user) + # # ... + # end + # end + # + # module PreferencesHelpers + # def preferences(user, preferences = {}) + # # ... + # end + # end + # + # module UserHelpers + # def users(username) + # # ... + # end + # end + # + # RSpec.configure do |config| + # config.include(UserHelpers) # included in all groups + # + # # included in examples with `:preferences` metadata + # config.include(PreferenceHelpers, :preferences) + # + # # included in examples with `:type => :request` metadata + # config.include(AuthenticationHelpers, :type => :request) + # + # # included in examples where the `:type` metadata matches a proc condition + # config.include(AuthenticationHelpers, :type => proc { |type, _metadata| [:request, :controller].include?(type) }) + # end + # + # describe "edit profile", :preferences, :type => :request do + # it "can be viewed by owning user" do + # login_as preferences(users(:jdoe), :lang => 'es') + # get "/profiles/jdoe" + # assert_select ".username", :text => 'jdoe' + # end + # end + # @note Filtered module inclusions can also be applied to + # individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # @see #extend + # @see #include_context + # @see #prepend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1428 + def include(mod, *filters); end + + # Tells RSpec to include the named shared example group in example groups. + # Use `filters` to constrain the groups or examples in which to include + # the example group. + # + # @example + # + # RSpec.shared_context "example admin user" do + # let(:admin_user) { create_user(:admin) } + # end + # + # RSpec.shared_context "example guest user" do + # let(:guest_user) { create_user(:guest) } + # end + # + # RSpec.configure do |config| + # config.include_context "example guest user", :type => :request + # config.include_context "example admin user", :admin, :type => :request + # end + # + # RSpec.describe "The admin page", :type => :request do + # it "can be viewed by admins", :admin do + # login_with admin_user + # get "/admin" + # expect(response).to be_ok + # end + # + # it "cannot be viewed by guests" do + # login_with guest_user + # get "/admin" + # expect(response).to be_forbidden + # end + # end + # @note Filtered context inclusions can also be applied to + # individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # @see #include + # + # source://rspec-core//lib/rspec/core/configuration.rb#1475 + def include_context(shared_group_name, *filters); end + + # Returns the `inclusion_filter`. If none has been set, returns an empty + # hash. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1313 + def inclusion_filter; end + + # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't + # want any inclusion filter at all. + # + # ### Warning + # + # This overrides any inclusion filters/tags set on the command line or in + # configuration files. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1304 + def inclusion_filter=(filter); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1101 + def last_run_statuses; end + + # Returns dirs that have been prepended to the load path by the `-I` + # command line option. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def libs; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#963 + def libs=(libs); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1630 + def load_spec_files; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#522 + def loaded_spec_files; end + + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). + # return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def max_displayed_failure_line_count; end + + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). + # return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def max_displayed_failure_line_count=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def max_displayed_failure_line_count?; end + + # Returns the configured mock framework adapter module. + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#669 + def mock_framework; end + + # Delegates to mock_framework=(framework). + # + # source://rspec-core//lib/rspec/core/configuration.rb#681 + def mock_framework=(framework); end + + # Sets the mock framework adapter module. + # + # `framework` can be a Symbol or a Module. + # + # Given any of `:rspec`, `:mocha`, `:flexmock`, or `:rr`, configures the + # named framework. + # + # Given `:nothing`, configures no framework. Use this if you don't use + # any mocking framework to save a little bit of overhead. + # + # Given a Module, includes that module in every example group. The module + # should adhere to RSpec's mock framework adapter API: + # + # setup_mocks_for_rspec + # - called before each example + # + # verify_mocks_for_rspec + # - called after each example if the example hasn't yet failed. + # Framework should raise an exception when expectations fail + # + # teardown_mocks_for_rspec + # - called after verify_mocks_for_rspec (even if there are errors) + # + # If the module responds to `configuration` and `mock_with` receives a + # block, it will yield the configuration object to the block e.g. + # + # config.mock_with OtherMockFrameworkAdapter do |mod_config| + # mod_config.custom_setting = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#786 + def mock_with(framework); end + + # Invokes block before defining an example group + # + # source://rspec-core//lib/rspec/core/configuration.rb#2114 + def on_example_group_definition(&block); end + + # Returns an array of blocks to call before defining an example group + # + # @api private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2120 + def on_example_group_definition_callbacks; end + + # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def only_failures; end + + # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. + # + # source://rspec-core//lib/rspec/core/configuration.rb#200 + def only_failures?; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#203 + def only_failures_but_not_configured?; end + + # Sets the default global ordering strategy. By default this can be one + # of `:defined`, `:random`, but is customizable through the + # `register_ordering` API. If order is set to `'rand:'`, + # the seed will also be set. + # + # @see #register_ordering + # + # source://rspec-core//lib/rspec/core/configuration.rb#1673 + def order=(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#522 + def ordering_manager; end + + # source://rspec-core//lib/rspec/core/configuration.rb#1673 + def ordering_registry(*args, &block); end + + # Determines where RSpec will send its output. + # Default: `$stdout`. + # + # @return [IO, String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def output_stream; end + + # Set the output stream for reporter. + # + # @attr value [IO, String] IO to write to or filename to write to, defaults to $stdout + # + # source://rspec-core//lib/rspec/core/configuration.rb#274 + def output_stream=(value); end + + # Load files matching this pattern (default: `'**{,/*/**}/*_spec.rb'`). + # + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pattern; end + + # Set pattern to match files to load. + # + # @attr value [String] the filename pattern to filter spec files by + # + # source://rspec-core//lib/rspec/core/configuration.rb#293 + def pattern=(value); end + + # Color to use to print pending examples. Defaults to `:yellow` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pending_color; end + + # Color to use to print pending examples. Defaults to `:yellow` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def pending_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def pending_color?; end + + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + # + # @raise [ArgumentError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pending_failure_output; end + + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + # + # @raise [ArgumentError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#473 + def pending_failure_output=(mode); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def pending_failure_output?; end + + # Tells RSpec to prepend example groups with `mod`. Methods defined in + # `mod` are exposed to examples (not example groups). Use `filters` to + # constrain the groups in which to prepend the module. + # + # Similar to `include`, but module is included before the example group's class + # in the ancestor chain. + # + # @example + # + # module OverrideMod + # def override_me + # "overridden" + # end + # end + # + # RSpec.configure do |config| + # config.prepend(OverrideMod, :method => :prepend) + # end + # + # describe "overriding example's class", :method => :prepend do + # it "finds the user" do + # self.class.class_eval do + # def override_me + # end + # end + # override_me # => "overridden" + # # ... + # end + # end + # @see #extend + # @see #include + # + # source://rspec-core//lib/rspec/core/configuration.rb#1557 + def prepend(mod, *filters); end + + # Defines a `after` hook. See {Hooks#after} for full docs. + # + # This method differs from {Hooks#after} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once after + # the last example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #append_after + # @see #before + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2045 + def prepend_after(scope = T.unsafe(nil), *meta, &block); end + + # Adds `block` to the start of the list of `before` blocks in the same + # scope (`:example`, `:context`, or `:suite`), in contrast to {#before}, + # which adds the hook to the end of the list. + # + # See {Hooks#before} for full `before` hook docs. + # + # This method differs from {Hooks#prepend_before} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once before + # the first example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #after + # @see #append_after + # @see #before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2006 + def prepend_before(scope = T.unsafe(nil), *meta, &block); end + + # Defaults `profile_examples` to 10 examples when `@profile_examples` is + # `true`. + # + # @api private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1073 + def profile_examples; end + + # Report the times for the slowest examples (default: `false`). + # Use this to specify the number of examples to include in the profile. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#322 + def profile_examples=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def profile_examples?; end + + # Specifies which directories contain the source code for your project. + # When a failure occurs, RSpec looks through the backtrace to find a + # a line of source to print. It first looks for a line coming from + # one of the project source directories so that, for example, it prints + # the expectation or assertion call rather than the source code from + # the expectation or assertion framework. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def project_source_dirs; end + + # Specifies which directories contain the source code for your project. + # When a failure occurs, RSpec looks through the backtrace to find a + # a line of source to print. It first looks for a line coming from + # one of the project source directories so that, for example, it prints + # the expectation or assertion call rather than the source code from + # the expectation or assertion framework. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def project_source_dirs=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def project_source_dirs?; end + + # Turns deprecation warnings into errors, in order to surface + # the full backtrace of the call site. This can be useful when + # you need more context to address a deprecation than the + # single-line call site normally provided. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.raise_errors_for_deprecations! + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1833 + def raise_errors_for_deprecations!; end + + # Turns RSpec warnings into errors. This can be useful when + # you want RSpec to run in a 'strict' no warning situation. + # (Note this does not capture or raise on Ruby warnings). + # + # @example + # + # RSpec.configure do |rspec| + # rspec.raise_on_warning = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1781 + def raise_on_warning=(value); end + + # Registers a named ordering strategy that can later be + # used to order an example group's subgroups by adding + # `:order => ` metadata to the example group. + # + # @example + # RSpec.configure do |rspec| + # rspec.register_ordering :reverse do |list| + # list.reverse + # end + # end + # + # RSpec.describe 'MyClass', :order => :reverse do + # # ... + # end + # @example + # RSpec.configure do |rspec| + # rspec.register_ordering :global do |examples| + # acceptance, other = examples.partition do |example| + # example.metadata[:type] == :acceptance + # end + # other + acceptance + # end + # end + # + # RSpec.describe 'MyClass', :type => :acceptance do + # # will run last + # end + # + # RSpec.describe 'MyClass' do + # # will run first + # end + # @note Pass the symbol `:global` to set the ordering strategy that + # will be used to order the top-level example groups and any example + # groups that do not have declared `:order` metadata. + # @param name [Symbol] The name of the ordering. + # @yield Block that will order the given examples or example groups + # @yieldparam list [Array, Array] The examples or groups to order + # @yieldreturn [Array, Array] The re-ordered examples or groups + # + # source://rspec-core//lib/rspec/core/configuration.rb#1673 + def register_ordering(*args, &block); end + + # @return [RSpec::Core::Reporter] the currently configured reporter + # + # source://rspec-core//lib/rspec/core/configuration.rb#1056 + def reporter; end + + # Indicates files configured to be required. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def requires; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1597 + def requires=(paths); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#601 + def reset; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#614 + def reset_filters; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#607 + def reset_reporter; end + + # Run all examples if none match the configured filters + # (default: `false`). + # + # @deprecated Use {#filter_run_when_matching} instead for the specific + # filters that you want to be ignored if none match. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def run_all_when_everything_filtered; end + + # Run all examples if none match the configured filters + # (default: `false`). + # + # @deprecated Use {#filter_run_when_matching} instead for the specific + # filters that you want to be ignored if none match. + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def run_all_when_everything_filtered=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def run_all_when_everything_filtered?; end + + # Seed for random ordering (default: generated randomly each run). + # + # When you run specs with `--order random`, RSpec generates a random seed + # for the randomization and prints it to the `output_stream` (assuming + # you're using RSpec's built-in formatters). If you discover an ordering + # dependency (i.e. examples fail intermittently depending on order), set + # this (on Configuration or on the command line with `--seed`) to run + # using the same seed while you debug the issue. + # + # We recommend, actually, that you use the command line approach so you + # don't accidentally leave the seed encoded. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1673 + def seed(*args, &block); end + + # Sets the seed value and sets the default global ordering to random. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1673 + def seed=(*args, &block); end + + # source://rspec-core//lib/rspec/core/configuration.rb#1673 + def seed_used?(*args, &block); end + + # Configures how RSpec treats metadata passed as part of a shared example + # group definition. For example, given this shared example group definition: + # + # RSpec.shared_context "uses DB", :db => true do + # around(:example) do |ex| + # MyORM.transaction(:rollback => true, &ex) + # end + # end + # + # ...there are two ways RSpec can treat the `:db => true` metadata, each + # of which has a corresponding config option: + # + # 1. `:trigger_inclusion`: this shared context will be implicitly included + # in any groups (or examples) that have `:db => true` metadata. + # 2. `:apply_to_host_groups`: the metadata will be inherited by the metadata + # hash of all host groups and examples. + # + # `:trigger_inclusion` is the legacy behavior from before RSpec 3.5 but should + # be considered deprecated. Instead, you can explicitly include a group with + # `include_context`: + # + # RSpec.describe "My model" do + # include_context "uses DB" + # end + # + # ...or you can configure RSpec to include the context based on matching metadata + # using an API that mirrors configured module inclusion: + # + # RSpec.configure do |rspec| + # rspec.include_context "uses DB", :db => true + # end + # + # `:apply_to_host_groups` is a new feature of RSpec 3.5 and will be the only + # supported behavior in RSpec 4. + # + # @overload shared_context_metadata_behavior + # @overload shared_context_metadata_behavior= + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def shared_context_metadata_behavior; end + + # @see shared_context_metadata_behavior + # + # source://rspec-core//lib/rspec/core/configuration.rb#434 + def shared_context_metadata_behavior=(value); end + + # Don't print filter info i.e. "Run options: include {:focus=>true}" + # (default `false`). + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def silence_filter_announcements; end + + # Don't print filter info i.e. "Run options: include {:focus=>true}" + # (default `false`). + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def silence_filter_announcements=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def silence_filter_announcements?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1138 + def spec_files_with_failures; end + + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def start_time; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def start_time=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def start_time?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#520 + def static_config_filter_manager; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#520 + def static_config_filter_manager=(_arg0); end + + # Color to use to indicate success. Defaults to `:green` but can be set + # to one of the following: `[:black, :white, :red, :green, :yellow, + # :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def success_color; end + + # Color to use to indicate success. Defaults to `:green` but can be set + # to one of the following: `[:black, :white, :red, :green, :yellow, + # :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def success_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def success_color?; end + + # Use threadsafe options where available. + # Currently this will place a mutex around memoized values such as let blocks. + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def threadsafe; end + + # Use threadsafe options where available. + # Currently this will place a mutex around memoized values such as let blocks. + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def threadsafe=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def threadsafe?; end + + # @deprecated This config option was added in RSpec 2 to pave the way + # for this being the default behavior in RSpec 3. Now this option is + # a no-op. + # + # source://rspec-core//lib/rspec/core/configuration.rb#383 + def treat_symbols_as_metadata_keys_with_true_values=(_value); end + + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def tty; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def tty=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def tty?; end + + # Set Ruby warnings on or off. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1760 + def warnings=(value); end + + # @return [Boolean] Whether or not ruby warnings are enabled. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1765 + def warnings?; end + + # Defines a callback that runs after the first example with matching + # metadata is defined. If no examples are defined with matching metadata, + # it will not get called at all. + # + # This can be used to ensure some setup is performed (such as bootstrapping + # a DB or loading a specific file that adds significantly to the boot time) + # if needed (as indicated by the presence of an example with matching metadata) + # but avoided otherwise. + # + # @example + # RSpec.configure do |config| + # config.when_first_matching_example_defined(:db) do + # # Load a support file that does some heavyweight setup, + # # including bootstrapping the DB, but only if we have loaded + # # any examples tagged with `:db`. + # require 'support/db' + # end + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1923 + def when_first_matching_example_defined(*filters); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2091 + def with_suite_hooks; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#518 + def world; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#518 + def world=(_arg0); end + + private + + # :nocov: + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2254 + def absolute_pattern?(pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2355 + def add_hook_to_existing_matching_groups(meta, scope, &block); end + + # @raise [MustBeConfiguredBeforeExampleGroupsError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2294 + def assert_no_example_groups_defined(config_option); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2344 + def clear_values_derived_from_example_status_persistence_file_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2276 + def command; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2320 + def conditionally_disable_expectations_monkey_patching; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2311 + def conditionally_disable_mocks_monkey_patching; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2349 + def configure_group_with(group, module_list, application_method); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2284 + def define_built_in_hooks; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2407 + def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2259 + def extract_location(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2236 + def file_glob_from(path, pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2225 + def gather_directories(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2204 + def get_files_to_run(paths); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2231 + def get_matching_files(path, pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2171 + def handle_suite_hook(scope, meta); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2143 + def load_file_handling_errors(method, file); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2377 + def metadata_applies_to_group?(meta, group); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2369 + def on_existing_matching_groups(meta); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2307 + def output_to_tty?(output = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2303 + def output_wrapper; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2216 + def paths_to_check(paths); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2221 + def pattern_might_load_specs_from_vendored_dirs?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2330 + def rspec_expectations_loaded?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2326 + def rspec_mocks_loaded?; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2186 + def run_suite_hooks(hook_description, hooks); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2392 + def safe_extend(mod, host); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/configuration.rb#2388 + def safe_include(mod, host); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2382 + def safe_prepend(mod, host); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2334 + def update_pattern_attr(name, value); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2280 + def value_for(key); end + + class << self + # As `add_setting` but only add the reader. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#100 + def add_read_only_setting(name, opts = T.unsafe(nil)); end + + # Invoked by the `add_setting` instance method. Use that method on a + # `Configuration` instance rather than this class method. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#87 + def add_setting(name, opts = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#70 + def define_alias(name, alias_name); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#77 + def define_predicate(name); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#60 + def define_reader(name); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1671 + def delegate_to_ordering_manager(*methods); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1651 +RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) + +# This buffer is used to capture all messages sent to the reporter during +# reporter initialization. It can then replay those messages after the +# formatter is correctly initialized. Otherwise, deprecation warnings +# during formatter initialization can cause an infinite loop. +# +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1039 +class RSpec::Core::Configuration::DeprecationReporterBuffer + # @return [DeprecationReporterBuffer] a new instance of DeprecationReporterBuffer + # + # source://rspec-core//lib/rspec/core/configuration.rb#1040 + def initialize; end + + # source://rspec-core//lib/rspec/core/configuration.rb#1044 + def deprecation(*args); end + + # source://rspec-core//lib/rspec/core/configuration.rb#1048 + def play_onto(reporter); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1821 +module RSpec::Core::Configuration::ExposeCurrentExample; end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1126 +RSpec::Core::Configuration::FAILED_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#749 +RSpec::Core::Configuration::MOCKING_ADAPTERS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#57 +class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < ::StandardError; end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1129 +RSpec::Core::Configuration::PASSED_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1132 +RSpec::Core::Configuration::PENDING_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1770 +RSpec::Core::Configuration::RAISE_ERROR_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# Module that holds `attr_reader` declarations. It's in a separate +# module to allow us to override those methods and use `super`. +# +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#53 +module RSpec::Core::Configuration::Readers + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def default_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def default_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def detail_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def drb; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def drb_port; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def dry_run; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def error_exit_code; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def error_stream; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def example_status_persistence_file_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def exclude_pattern; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def fail_fast; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def fail_if_no_examples; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def failure_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def failure_exit_code; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def fixed_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def full_cause_backtrace; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def libs; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def max_displayed_failure_line_count; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def only_failures; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def output_stream; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pattern; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pending_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pending_failure_output; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def project_source_dirs; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def requires; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def run_all_when_everything_filtered; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def shared_context_metadata_behavior; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def silence_filter_announcements; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def start_time; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def success_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def threadsafe; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def tty; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1123 +RSpec::Core::Configuration::UNKNOWN_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1135 +RSpec::Core::Configuration::VALID_STATUSES = T.let(T.unsafe(nil), Array) + +# Responsible for utilizing externally provided configuration options, +# whether via the command line, `.rspec`, `~/.rspec`, +# `$XDG_CONFIG_HOME/rspec/options`, `.rspec-local` or a custom options +# file. +# +# source://rspec-core//lib/rspec/core/configuration_options.rb#10 +class RSpec::Core::ConfigurationOptions + # @param args [Array] command line arguments + # @return [ConfigurationOptions] a new instance of ConfigurationOptions + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#12 + def initialize(args); end + + # @return [Array] the original command-line arguments + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#40 + def args; end + + # Updates the provided {Configuration} instance based on the provided + # external configuration options. + # + # @param config [Configuration] the configuration instance to update + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#21 + def configure(config); end + + # Updates the provided {FilterManager} based on the filter options. + # + # @api private + # @param filter_manager [FilterManager] instance to update + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#30 + def configure_filter_manager(filter_manager); end + + # @return [Hash] the final merged options, drawn from all external sources + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#37 + def options; end + + private + + # source://rspec-core//lib/rspec/core/configuration_options.rb#173 + def args_from_options_file(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#142 + def command_line_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#146 + def custom_options; end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#190 + def custom_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#133 + def env_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#125 + def file_options; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#66 + def force?(key); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#158 + def global_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#202 + def global_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#213 + def home_options_file_path; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#121 + def load_formatters_into(config); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#150 + def local_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#198 + def local_options_file; end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#181 + def options_file_as_erb_string(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#162 + def options_from(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#70 + def order(keys); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#44 + def organize_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#167 + def parse_args_ignoring_files_or_dirs_to_run(args, source); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#113 + def process_options_into(config); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#154 + def project_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#194 + def project_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#229 + def resolve_xdg_config_home; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#206 + def xdg_options_file_if_exists; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#222 + def xdg_options_file_path; end +end + +# source://rspec-core//lib/rspec/core/configuration_options.rb#77 +RSpec::Core::ConfigurationOptions::OPTIONS_ORDER = T.let(T.unsafe(nil), Array) + +# source://rspec-core//lib/rspec/core/configuration_options.rb#59 +RSpec::Core::ConfigurationOptions::UNFORCED_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) + +# source://rspec-core//lib/rspec/core/configuration_options.rb#64 +RSpec::Core::ConfigurationOptions::UNPROCESSABLE_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) + +# DSL defines methods to group examples, most notably `describe`, +# and exposes them as class methods of {RSpec}. They can also be +# exposed globally (on `main` and instances of `Module`) through +# the {Configuration} option `expose_dsl_globally`. +# +# By default the methods `describe`, `context` and `example_group` +# are exposed. These methods define a named context for one or +# more examples. The given block is evaluated in the context of +# a generated subclass of {RSpec::Core::ExampleGroup}. +# +# ## Examples: +# +# RSpec.describe "something" do +# context "when something is a certain way" do +# it "does something" do +# # example code goes here +# end +# end +# end +# +# @see ExampleGroup +# @see ExampleGroup.example_group +# +# source://rspec-core//lib/rspec/core/dsl.rb#25 +module RSpec::Core::DSL + class << self + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#89 + def change_global_dsl(&changes); end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#27 + def example_group_aliases; end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#37 + def expose_example_group_alias(name); end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#81 + def expose_example_group_alias_globally(method_name); end + + # Adds the describe method to Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/dsl.rb#58 + def expose_globally!; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/dsl.rb#32 + def exposed_globally?; end + + # Removes the describe method from Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/dsl.rb#70 + def remove_globally!; end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#53 + def top_level; end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#53 + def top_level=(_arg0); end + end +end + +# Deprecation Error. +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#221 +class RSpec::Core::DeprecationError < ::StandardError; end + +# Wrapper around Ruby's `DidYouMean::SpellChecker` when available to provide file name suggestions. +# +# @private +# +# source://rspec-core//lib/rspec/core/did_you_mean.rb#5 +class RSpec::Core::DidYouMean + # @return [DidYouMean] a new instance of DidYouMean + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#8 + def initialize(relative_file_name); end + + # return a hint if API for ::DidYouMean::SpellChecker not supported + # :nocov: + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#15 + def call; end + + # Returns the value of attribute relative_file_name. + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#6 + def relative_file_name; end + + private + + # :nocov: + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#35 + def formats(probables); end + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#45 + def red_font(mytext); end + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#40 + def top_and_tail(rspec_format); end +end + +# Wrapper for an instance of a subclass of {ExampleGroup}. An instance of +# `RSpec::Core::Example` is returned by example definition methods +# such as {ExampleGroup.it it} and is yielded to the {ExampleGroup.it it}, +# {Hooks#before before}, {Hooks#after after}, {Hooks#around around}, +# {MemoizedHelpers::ClassMethods#let let} and +# {MemoizedHelpers::ClassMethods#subject subject} blocks. +# +# This allows us to provide rich metadata about each individual +# example without adding tons of methods directly to the ExampleGroup +# that users may inadvertently redefine. +# +# Useful for configuring logging and/or taking some action based +# on the state of an example's metadata. +# +# @example +# +# RSpec.configure do |config| +# config.before do |example| +# log example.description +# end +# +# config.after do |example| +# log example.description +# end +# +# config.around do |example| +# log example.description +# example.run +# end +# end +# +# shared_examples "auditable" do +# it "does something" do +# log "#{example.full_description}: #{auditable.inspect}" +# auditable.should do_something +# end +# end +# @note Example blocks are evaluated in the context of an instance +# of an `ExampleGroup`, not in the context of an instance of `Example`. +# @see ExampleGroup +# +# source://rspec-core//lib/rspec/core/example.rb#44 +class RSpec::Core::Example + # Creates a new instance of Example. + # + # @api private + # @param description [String] the String passed to the `it` method (or + # alias) + # @param example_block [Proc] the block of code that represents the + # example + # @param example_group_class [Class] the subclass of ExampleGroup in which + # this Example is declared + # @param user_metadata [Hash] additional args passed to `it` to be used as + # metadata + # @return [Example] a new instance of Example + # + # source://rspec-core//lib/rspec/core/example.rb#186 + def initialize(example_group_class, description, user_metadata, example_block = T.unsafe(nil)); end + + # @attr + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#174 + def clock; end + + # @attr + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#174 + def clock=(_arg0); end + + # Returns the string submitted to `example` or its aliases (e.g. + # `specify`, `it`, etc). If no string is submitted (e.g. + # `it { is_expected.to do_something }`) it returns the message generated + # by the matcher if there is one, otherwise returns a message including + # the location of the example. + # + # source://rspec-core//lib/rspec/core/example.rb#76 + def description; end + + # The exception that will be displayed to the user -- either the failure of + # the example or the `pending_exception` if the example is pending. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#388 + def display_exception; end + + # Assigns the exception that will be displayed to the user -- either the failure of + # the example or the `pending_exception` if the example is pending. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#396 + def display_exception=(ex); end + + # Duplicates the example and overrides metadata with the provided + # hash. + # + # @param metadata_overrides [Hash] the hash to override the example metadata + # @return [Example] a duplicate of the example with modified metadata + # + # source://rspec-core//lib/rspec/core/example.rb#132 + def duplicate_with(metadata_overrides = T.unsafe(nil)); end + + # Returns the example group class that provides the context for running + # this example. + # + # source://rspec-core//lib/rspec/core/example.rb#230 + def example_group; end + + # Returns the example_group_instance that provides the context for + # running this example. + # + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#170 + def example_group_instance; end + + # Returns the first exception raised in the context of running this + # example (nil if no exception is raised). + # + # @attr_reader + # + # source://rspec-core//lib/rspec/core/example.rb#158 + def exception; end + + # @return [ExecutionResult] represents the result of running this example. + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def execution_result; end + + # Used internally to set an exception and fail without actually executing + # the example when an exception is raised in before(:context). + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#439 + def fail_with_exception(reporter, exception); end + + # @return [String] the relative path to the file where this example was + # defined. + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def file_path; end + + # @return [String] the full description (including the docstrings of + # all parent example groups). + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def full_description; end + + # @return [String] the unique id of this example. Pass + # this at the command line to re-run this exact example. + # + # source://rspec-core//lib/rspec/core/example.rb#117 + def id; end + + # Provide a human-readable representation of this class + # + # source://rspec-core//lib/rspec/core/example.rb#220 + def inspect; end + + # Returns a description of the example that always includes the location. + # + # source://rspec-core//lib/rspec/core/example.rb#87 + def inspect_output; end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#456 + def instance_exec(*args, &block); end + + # @return [String] the exact source location of this example in a form + # like `./path/to/spec.rb:17` + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def location; end + + # Returns the location-based argument that can be passed to the `rspec` command to rerun this example. + # + # source://rspec-core//lib/rspec/core/example.rb#96 + def location_rerun_argument; end + + # Returns the metadata object associated with this example. + # + # @attr_reader + # + # source://rspec-core//lib/rspec/core/example.rb#163 + def metadata; end + + # @return [Boolean] flag that indicates that the example is not expected + # to pass. It will be run and will either have a pending result (if a + # failure occurs) or a failed result (if no failure occurs). + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def pending; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#234 + def pending?; end + + # @return [RSpec::Core::Reporter] the current reporter for the example + # + # source://rspec-core//lib/rspec/core/example.rb#226 + def reporter; end + + # Returns the location-based argument that can be passed to the `rspec` command to rerun this example. + # + # @deprecated Use {#location_rerun_argument} instead. + # @note If there are multiple examples identified by this location, they will use {#id} + # to rerun instead, but this method will still return the location (that's why it is deprecated!). + # + # source://rspec-core//lib/rspec/core/example.rb#111 + def rerun_argument; end + + # instance_execs the block passed to the constructor in the context of + # the instance of {ExampleGroup}. + # + # @api private + # @param example_group_instance the instance of an ExampleGroup subclass + # + # source://rspec-core//lib/rspec/core/example.rb#246 + def run(example_group_instance, reporter); end + + # Used to set the exception when `aggregate_failures` fails. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#425 + def set_aggregate_failures_exception(exception); end + + # Used internally to set an exception in an after hook, which + # captures the exception but doesn't raise it. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#412 + def set_exception(exception); end + + # @return [Boolean] flag that will cause the example to not run. + # The {ExecutionResult} status will be `:pending`. + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def skip; end + + # Used internally to skip without actually executing the example when + # skip is used in before(:context). + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#449 + def skip_with_exception(reporter, exception); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#238 + def skipped?; end + + # Provide a human-readable representation of this class + # + # source://rspec-core//lib/rspec/core/example.rb#223 + def to_s; end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#148 + def update_inherited_metadata(updates); end + + private + + # source://rspec-core//lib/rspec/core/example.rb#534 + def assign_generated_description; end + + # source://rspec-core//lib/rspec/core/example.rb#478 + def finish(reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#543 + def generate_description; end + + # source://rspec-core//lib/rspec/core/example.rb#462 + def hooks; end + + # source://rspec-core//lib/rspec/core/example.rb#550 + def location_description; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#530 + def mocks_need_verification?; end + + # source://rspec-core//lib/rspec/core/example.rb#498 + def record_finished(status, reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#516 + def run_after_example; end + + # source://rspec-core//lib/rspec/core/example.rb#503 + def run_before_example; end + + # source://rspec-core//lib/rspec/core/example.rb#473 + def start(reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#524 + def verify_mocks; end + + # source://rspec-core//lib/rspec/core/example.rb#508 + def with_around_and_singleton_context_hooks; end + + # source://rspec-core//lib/rspec/core/example.rb#466 + def with_around_example_hooks; end + + class << self + # Used to define methods that delegate to this example's metadata. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#48 + def delegate_to_metadata(key); end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#122 + def parse_id(id); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/example.rb#310 +RSpec::Core::Example::AllExceptionsExcludingDangerousOnesOnRubiesThatAllowIt = RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue + +# Represents the result of executing an example. +# Behaves like a hash for backwards compatibility. +# +# source://rspec-core//lib/rspec/core/example.rb#556 +class RSpec::Core::Example::ExecutionResult + include ::RSpec::Core::HashImitatable + extend ::RSpec::Core::HashImitatable::ClassMethods + + # Populates finished_at and run_time if it has not yet been set + # + # @api private + # + # source://rspec-core//lib/rspec/core/example.rb#610 + def ensure_timing_set(clock); end + + # @return [Boolean] Indicates if the example was completely skipped + # (typically done via `:skip` metadata or the `skip` method). Skipped examples + # will have a `:pending` result. A `:pending` result can also come from examples + # that were marked as `:pending`, which causes them to be run, and produces a + # `:failed` result if the example passes. + # + # source://rspec-core//lib/rspec/core/example.rb#597 + def example_skipped?; end + + # @return [Exception, nil] The failure, if there was one. + # + # source://rspec-core//lib/rspec/core/example.rb#563 + def exception; end + + # @return [Exception, nil] The failure, if there was one. + # + # source://rspec-core//lib/rspec/core/example.rb#563 + def exception=(_arg0); end + + # @return [Time] When the example finished. + # + # source://rspec-core//lib/rspec/core/example.rb#569 + def finished_at; end + + # @return [Time] When the example finished. + # + # source://rspec-core//lib/rspec/core/example.rb#569 + def finished_at=(_arg0); end + + # @return [Exception, nil] The exception triggered while + # executing the pending example. If no exception was triggered + # it would no longer get a status of `:pending` unless it was + # tagged with `:skip`. + # + # source://rspec-core//lib/rspec/core/example.rb#582 + def pending_exception; end + + # @return [Exception, nil] The exception triggered while + # executing the pending example. If no exception was triggered + # it would no longer get a status of `:pending` unless it was + # tagged with `:skip`. + # + # source://rspec-core//lib/rspec/core/example.rb#582 + def pending_exception=(_arg0); end + + # @return [Boolean] For examples tagged with `:pending`, + # this indicates whether or not it now passes. + # + # source://rspec-core//lib/rspec/core/example.rb#586 + def pending_fixed; end + + # @return [Boolean] For examples tagged with `:pending`, + # this indicates whether or not it now passes. + # + # source://rspec-core//lib/rspec/core/example.rb#586 + def pending_fixed=(_arg0); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#588 + def pending_fixed?; end + + # @return [String, nil] The reason the example was pending, + # or nil if the example was not pending. + # + # source://rspec-core//lib/rspec/core/example.rb#576 + def pending_message; end + + # @return [String, nil] The reason the example was pending, + # or nil if the example was not pending. + # + # source://rspec-core//lib/rspec/core/example.rb#576 + def pending_message=(_arg0); end + + # Records the finished status of the example. + # + # @api private + # + # source://rspec-core//lib/rspec/core/example.rb#603 + def record_finished(status, finished_at); end + + # @return [Float] How long the example took in seconds. + # + # source://rspec-core//lib/rspec/core/example.rb#572 + def run_time; end + + # @return [Float] How long the example took in seconds. + # + # source://rspec-core//lib/rspec/core/example.rb#572 + def run_time=(_arg0); end + + # @return [Time] When the example started. + # + # source://rspec-core//lib/rspec/core/example.rb#566 + def started_at; end + + # @return [Time] When the example started. + # + # source://rspec-core//lib/rspec/core/example.rb#566 + def started_at=(_arg0); end + + # @return [Symbol] `:passed`, `:failed` or `:pending`. + # + # source://rspec-core//lib/rspec/core/example.rb#560 + def status; end + + # @return [Symbol] `:passed`, `:failed` or `:pending`. + # + # source://rspec-core//lib/rspec/core/example.rb#560 + def status=(_arg0); end + + private + + # source://rspec-core//lib/rspec/core/example.rb#616 + def calculate_run_time(finished_at); end + + # source://rspec-core//lib/rspec/core/example.rb#634 + def get_value(name); end + + # For backwards compatibility we present `status` as a string + # when presenting the legacy hash interface. + # + # source://rspec-core//lib/rspec/core/example.rb#623 + def hash_for_delegation; end + + # source://rspec-core//lib/rspec/core/example.rb#642 + def issue_deprecation(_method_name, *_args); end + + # source://rspec-core//lib/rspec/core/example.rb#629 + def set_value(name, value); end +end + +# Wraps both a `Proc` and an {Example} for use in {Hooks#around +# around} hooks. In around hooks we need to yield this special +# kind of object (rather than the raw {Example}) because when +# there are multiple `around` hooks we have to wrap them recursively. +# +# @example +# +# RSpec.configure do |c| +# c.around do |ex| # Procsy which wraps the example +# if ex.metadata[:key] == :some_value && some_global_condition +# raise "some message" +# end +# ex.run # run delegates to ex.call. +# end +# end +# @note This class also exposes the instance methods of {Example}, +# proxying them through to the wrapped {Example} instance. +# +# source://rspec-core//lib/rspec/core/example.rb#331 +class RSpec::Core::Example::Procsy + # @return [Procsy] a new instance of Procsy + # + # source://rspec-core//lib/rspec/core/example.rb#362 + def initialize(example, &block); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def <<(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def ==(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def ===(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def >>(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def [](*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def arity(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def binding(*a, &b); end + + # Calls the proc and notes that the example has been executed. + # + # source://rspec-core//lib/rspec/core/example.rb#350 + def call(*args, &block); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def clock(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def clock=(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def clone(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def curry(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def description(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def dup(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def duplicate_with(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def eql?(*a, &b); end + + # The {Example} instance. + # + # source://rspec-core//lib/rspec/core/example.rb#333 + def example; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def example_group(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def example_group_instance(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def exception(*a, &b); end + + # Indicates whether or not the around hook has executed the example. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#374 + def executed?; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def execution_result(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def file_path(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def full_description(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def hash(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def id(*a, &b); end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#379 + def inspect; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def inspect_output(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def lambda?(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def location(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def location_rerun_argument(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def metadata(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def parameters(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def pending(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def pending?(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def reporter(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def rerun_argument(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def ruby2_keywords(*a, &b); end + + # Calls the proc and notes that the example has been executed. + # + # source://rspec-core//lib/rspec/core/example.rb#354 + def run(*args, &block); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def skip(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def skipped?(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def source_location(*a, &b); end + + # Provides a wrapped proc that will update our `executed?` state when + # executed. + # + # source://rspec-core//lib/rspec/core/example.rb#358 + def to_proc; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def update_inherited_metadata(*a, &b); end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#369 + def wrap(&block); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def yield(*a, &b); end +end + +# ExampleGroup and {Example} are the main structural elements of +# rspec-core. Consider this example: +# +# RSpec.describe Thing do +# it "does something" do +# end +# end +# +# The object returned by `describe Thing` is a subclass of ExampleGroup. +# The object returned by `it "does something"` is an instance of Example, +# which serves as a wrapper for an instance of the ExampleGroup in which it +# is declared. +# +# Example group bodies (e.g. `describe` or `context` blocks) are evaluated +# in the context of a new subclass of ExampleGroup. Individual examples are +# evaluated in the context of an instance of the specific ExampleGroup +# subclass to which they belong. +# +# Besides the class methods defined here, there are other interesting macros +# defined in {Hooks}, {MemoizedHelpers::ClassMethods} and +# {SharedExampleGroup}. There are additional instance methods available to +# your examples defined in {MemoizedHelpers} and {Pending}. +# +# source://rspec-core//lib/rspec/core/example_group.rb#29 +class RSpec::Core::ExampleGroup + include ::RSpec::Core::MemoizedHelpers + include ::RSpec::Core::Pending + extend ::RSpec::Core::Hooks + extend ::RSpec::Core::MemoizedHelpers::ClassMethods + extend ::RSpec::Core::SharedExampleGroup + + # source://rspec-core//lib/rspec/core/example_group.rb#714 + def initialize(inspect_output = T.unsafe(nil)); end + + # Returns the class or module passed to the `describe` method (or alias). + # Returns nil if the subject is not a class or module. + # + # @example + # RSpec.describe Thing do + # it "does something" do + # described_class == Thing + # end + # end + # + # source://rspec-core//lib/rspec/core/example_group.rb#99 + def described_class; end + + # source://rspec-core//lib/rspec/core/example_group.rb#720 + def inspect; end + + private + + # source://rspec-core//lib/rspec/core/example_group.rb#765 + def method_missing(name, *args, **_arg2); end + + class << self + # Adds an example to the example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#374 + def add_example(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#536 + def before_context_ivars; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#473 + def children; end + + # An alias of `example_group`. Generally used when grouping examples + # contextually (e.g. "with xyz", "when xyz" or "if xyz"). + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # context "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # context "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload context + # @overload context + # @overload context + # @return [RSpec::Core::ExampleGroup] + # @see example_group + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def context(*args, &example_group_block); end + + # Returns true if a `before(:context)` or `after(:context)` + # hook is currently executing. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example_group.rb#549 + def currently_executing_a_context_hook?; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#674 + def declaration_locations; end + + # @private + # @see DSL#describe + # + # source://rspec-core//lib/rspec/core/example_group.rb#248 + def define_example_group_method(name, metadata = T.unsafe(nil)); end + + # @example + # $1 "does something", :slow, :load_factor => 100 do + # end + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#145 + def define_example_method(name, extra_options = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#324 + def define_nested_shared_group_method(new_name, report_label = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#76 + def delegate_to_metadata(*names); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#467 + def descendant_filtered_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#510 + def descendants; end + + # An alias of `example_group`. Generally used when grouping examples by a + # thing you are describing (e.g. an object, class or method). + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # describe "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # describe "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload describe + # @overload describe + # @overload describe + # @return [RSpec::Core::ExampleGroup] + # @see example_group + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def describe(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def described_class; end + + # @return [String] the current example group description + # + # source://rspec-core//lib/rspec/core/example_group.rb#85 + def description; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#707 + def each_instance_variable_for_example(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#525 + def ensure_example_groups_are_configured; end + + # Defines an example within a group. + # + # @example + # example do + # end + # + # example "does something" do + # end + # + # example "does something", :slow, :uses_js do + # end + # + # example "does something", :with => 'additional metadata' do + # end + # + # example "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload example + # @overload example + # @overload example + # @overload example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def example(*all_args, &block); end + + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # example_group "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # example_group "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload example_group + # @overload example_group + # @overload example_group + # @return [RSpec::Core::ExampleGroup] + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def example_group(*args, &example_group_block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#457 + def examples; end + + # Shortcut to define an example group with `:focus => true`. + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # fcontext "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # fcontext "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload fcontext + # @overload fcontext + # @overload fcontext + # @return [RSpec::Core::ExampleGroup] + # @see example_group + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def fcontext(*args, &example_group_block); end + + # Shortcut to define an example group with `:focus => true`. + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # fdescribe "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # fdescribe "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload fdescribe + # @overload fdescribe + # @overload fdescribe + # @return [RSpec::Core::ExampleGroup] + # @see example_group + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def fdescribe(*args, &example_group_block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # fexample do + # end + # + # fexample "does something" do + # end + # + # fexample "does something", :slow, :uses_js do + # end + # + # fexample "does something", :with => 'additional metadata' do + # end + # + # fexample "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload fexample + # @overload fexample + # @overload fexample + # @overload fexample + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def fexample(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def file_path; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#462 + def filtered_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#386 + def find_and_eval_shared(label, name, inclusion_location, *args, &customization_block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # fit do + # end + # + # fit "does something" do + # end + # + # fit "does something", :slow, :uses_js do + # end + # + # fit "does something", :with => 'additional metadata' do + # end + # + # fit "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload fit + # @overload fit + # @overload fit + # @overload fit + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def fit(*all_args, &block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # focus do + # end + # + # focus "does something" do + # end + # + # focus "does something", :slow, :uses_js do + # end + # + # focus "does something", :with => 'additional metadata' do + # end + # + # focus "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload focus + # @overload focus + # @overload focus + # @overload focus + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def focus(*all_args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#662 + def for_filtered_examples(reporter, &block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # fspecify do + # end + # + # fspecify "does something" do + # end + # + # fspecify "does something", :slow, :uses_js do + # end + # + # fspecify "does something", :with => 'additional metadata' do + # end + # + # fspecify "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload fspecify + # @overload fspecify + # @overload fspecify + # @overload fspecify + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def fspecify(*all_args, &block); end + + # @return [String] the unique id of this example group. Pass + # this at the command line to re-run this exact example group. + # + # source://rspec-core//lib/rspec/core/example_group.rb#682 + def id; end + + # Define a singleton method for the singleton class (remove the method if + # it's already been defined). + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#40 + def idempotently_define_singleton_method(name, &definition); end + + # Includes shared content mapped to `name` directly in the group in which + # it is declared, as opposed to `it_behaves_like`, which creates a nested + # group. If given a block, that block is also eval'd in the current + # context. + # + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/example_group.rb#350 + def include_context(name, *args, &block); end + + # Includes shared content mapped to `name` directly in the group in which + # it is declared, as opposed to `it_behaves_like`, which creates a nested + # group. If given a block, that block is also eval'd in the current + # context. + # + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/example_group.rb#360 + def include_examples(name, *args, &block); end + + # Defines an example within a group. + # This is the primary API to define a code example. + # + # @example + # it do + # end + # + # it "does something" do + # end + # + # it "does something", :slow, :uses_js do + # end + # + # it "does something", :with => 'additional metadata' do + # end + # + # it "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload it + # @overload it + # @overload it + # @overload it + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def it(*all_args, &block); end + + # @param args [Array] Pass parameters to a shared example group + # @param block [Block] Additional context to pass to the shared group. + # @param name [String, Symbol] The name of the shared group to include. + # @return [RSpec::Core::ExampleGroup] + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def it_behaves_like(name, *args, &customization_block); end + + # @param args [Array] Pass parameters to a shared example group + # @param block [Block] Additional context to pass to the shared group. + # @param name [String, Symbol] The name of the shared group to include. + # @return [RSpec::Core::ExampleGroup] + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def it_should_behave_like(name, *args, &customization_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def location; end + + # The [Metadata](Metadata) object associated with this group. + # + # @see Metadata + # + # source://rspec-core//lib/rspec/core/example_group.rb#51 + def metadata; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#492 + def next_runnable_index_for(file); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#632 + def ordering_strategy; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#515 + def parent_groups; end + + # Shortcut to define an example with `:pending => true` + # + # @example + # pending do + # end + # + # pending "does something" do + # end + # + # pending "does something", :slow, :uses_js do + # end + # + # pending "does something", :with => 'additional metadata' do + # end + # + # pending "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload pending + # @overload pending + # @overload pending + # @overload pending + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def pending(*all_args, &block); end + + # Removes an example from the example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#380 + def remove_example(example); end + + # Clear memoized values when adding/removing examples + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#366 + def reset_memoized; end + + # Runs all the examples in this group. + # + # source://rspec-core//lib/rspec/core/example_group.rb#606 + def run(reporter = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#592 + def run_after_context_hooks(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#554 + def run_before_context_hooks(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#648 + def run_examples(reporter); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#417 + def set_it_up(description, args, registration_collection, &example_group_block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#692 + def set_ivars(instance, ivars); end + + # Shortcut to define an example with `:skip => true` + # + # @example + # skip do + # end + # + # skip "does something" do + # end + # + # skip "does something", :slow, :uses_js do + # end + # + # skip "does something", :with => 'additional metadata' do + # end + # + # skip "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload skip + # @overload skip + # @overload skip + # @overload skip + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def skip(*all_args, &block); end + + # Defines an example within a group. + # Useful for when your docstring does not read well off of `it`. + # + # @example + # RSpec.describe MyClass do + # specify "#do_something is deprecated" do + # # ... + # end + # end + # @example + # specify do + # end + # + # specify "does something" do + # end + # + # specify "does something", :slow, :uses_js do + # end + # + # specify "does something", :with => 'additional metadata' do + # end + # + # specify "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload specify + # @overload specify + # @overload specify + # @overload specify + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def specify(*all_args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#541 + def store_before_context_ivars(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#402 + def subclass(parent, description, args, registration_collection, &example_group_block); end + + # :nocov: + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#569 + def superclass_before_context_ivars; end + + # @private + # @return [Metadata] belonging to the parent of a nested {ExampleGroup} + # + # source://rspec-core//lib/rspec/core/example_group.rb#71 + def superclass_metadata; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example_group.rb#520 + def top_level?; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#687 + def top_level_description; end + + # Traverses the tree of groups, starting with `self`, then the children, recursively. + # Halts the traversal of a branch of the tree as soon as the passed block returns true. + # Note that siblings groups and their sub-trees will continue to be explored. + # This is intended to make it easy to find the top-most group that satisfies some + # condition. + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#483 + def traverse_tree_until(&block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#734 + def update_inherited_metadata(updates); end + + # Temporarily replace the provided metadata. + # Intended primarily to allow an example group's singleton class + # to return the metadata of the example that it exists for. This + # is necessary for shared example group inclusion to work properly + # with singleton example groups. + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#61 + def with_replaced_metadata(meta); end + + # Shortcut to temporarily make an example group skipped. + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # xcontext "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # xcontext "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload xcontext + # @overload xcontext + # @overload xcontext + # @return [RSpec::Core::ExampleGroup] + # @see example_group + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def xcontext(*args, &example_group_block); end + + # Shortcut to temporarily make an example group skipped. + # Generates a subclass of this example group which inherits + # everything except the examples themselves. + # + # @example + # + # RSpec.describe "something" do # << This describe method is defined in + # # << RSpec::Core::DSL, included in the + # # << global namespace (optional) + # before do + # do_something_before + # end + # + # before(:example, :clean_env) do + # env.clear! + # end + # + # let(:thing) { Thing.new } + # + # xdescribe "attribute (of something)" do + # # examples in the group get the before hook + # # declared above, and can access `thing` + # end + # + # xdescribe "needs additional setup", :clean_env, :implementation => JSON do + # # specifies that hooks with matching metadata + # # should be be run additionally + # end + # end + # @overload xdescribe + # @overload xdescribe + # @overload xdescribe + # @return [RSpec::Core::ExampleGroup] + # @see example_group + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def xdescribe(*args, &example_group_block); end + + # Shortcut to define an example with `:skip => 'Temporarily skipped with xexample'`. + # + # @example + # xexample do + # end + # + # xexample "does something" do + # end + # + # xexample "does something", :slow, :uses_js do + # end + # + # xexample "does something", :with => 'additional metadata' do + # end + # + # xexample "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload xexample + # @overload xexample + # @overload xexample + # @overload xexample + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def xexample(*all_args, &block); end + + # Shortcut to define an example with `:skip => 'Temporarily skipped with xit'`. + # + # @example + # xit do + # end + # + # xit "does something" do + # end + # + # xit "does something", :slow, :uses_js do + # end + # + # xit "does something", :with => 'additional metadata' do + # end + # + # xit "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload xit + # @overload xit + # @overload xit + # @overload xit + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def xit(*all_args, &block); end + + # Shortcut to define an example with `:skip => 'Temporarily skipped with xspecify'`. + # + # @example + # xspecify do + # end + # + # xspecify "does something" do + # end + # + # xspecify "does something", :slow, :uses_js do + # end + # + # xspecify "does something", :with => 'additional metadata' do + # end + # + # xspecify "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload xspecify + # @overload xspecify + # @overload xspecify + # @overload xspecify + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#43 + def xspecify(*all_args, &block); end + + private + + # source://rspec-core//lib/rspec/core/example_group.rb#749 + def method_missing(name, *args); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#703 +RSpec::Core::ExampleGroup::INSTANCE_VARIABLE_TO_IGNORE = T.let(T.unsafe(nil), Symbol) + +# Raised when an RSpec API is called in the wrong scope, such as `before` +# being called from within an example rather than from within an example +# group block. +# +# source://rspec-core//lib/rspec/core/example_group.rb#747 +class RSpec::Core::ExampleGroup::WrongScopeError < ::NoMethodError; end + +# Dumps a list of hashes in a pretty, human readable format +# for later parsing. The hashes are expected to have symbol +# keys and string values, and each hash should have the same +# set of keys. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#143 +class RSpec::Core::ExampleStatusDumper + # @return [ExampleStatusDumper] a new instance of ExampleStatusDumper + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#148 + def initialize(examples); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#152 + def dump; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#188 + def column_widths; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#159 + def formatted_header_rows; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#176 + def formatted_row_from(row_values); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#166 + def formatted_value_rows; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#184 + def headers; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#172 + def rows; end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#144 + def dump(examples); end + end +end + +# Merges together a list of example statuses from this run +# and a list from previous runs (presumably loaded from disk). +# Each example status object is expected to be a hash with +# at least an `:example_id` and a `:status` key. Examples that +# were loaded but not executed (due to filtering, `--fail-fast` +# or whatever) should have a `:status` of `UNKNOWN_STATUS`. +# +# This will produce a new list that: +# - Will be missing examples from previous runs that we know for sure +# no longer exist. +# - Will have the latest known status for any examples that either +# definitively do exist or may still exist. +# - Is sorted by file name and example definition order, so that +# the saved file is easily scannable if users want to inspect it. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#74 +class RSpec::Core::ExampleStatusMerger + # @return [ExampleStatusMerger] a new instance of ExampleStatusMerger + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#79 + def initialize(this_run, from_previous_runs); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#85 + def merge; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#102 + def delete_previous_examples_that_no_longer_exist; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#108 + def example_must_no_longer_exist?(ex_id); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#95 + def hash_from(example_list); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#124 + def loaded_spec_files; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#132 + def sort_value_from(example); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#128 + def spec_file_from(ex_id); end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#75 + def merge(this_run, from_previous_runs); end + end +end + +# Parses a string that has been previously dumped by ExampleStatusDumper. +# Note that this parser is a bit naive in that it does a simple split on +# "\n" and " | ", with no concern for handling escaping. For now, that's +# OK because the values we plan to persist (example id, status, and perhaps +# example duration) are highly unlikely to contain "\n" or " | " -- after +# all, who puts those in file names? +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#207 +class RSpec::Core::ExampleStatusParser + # @return [ExampleStatusParser] a new instance of ExampleStatusParser + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#212 + def initialize(string); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#216 + def parse; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#226 + def headers; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#222 + def parse_row(line); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#230 + def split_line(line); end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#208 + def parse(string); end + end +end + +# Persists example ids and their statuses so that we can filter +# to just the ones that failed the last time they ran. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#8 +class RSpec::Core::ExampleStatusPersister + # @return [ExampleStatusPersister] a new instance of ExampleStatusPersister + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#18 + def initialize(examples, file_name); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#23 + def persist; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#40 + def dump_statuses(unparsed_previous_runs); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#46 + def statuses_from_this_run; end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#9 + def load_from(file_name); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#14 + def persist(examples, file_name); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#183 +RSpec::Core::ExclusionRules = RSpec::Core::FilterRules + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#4 +class RSpec::Core::FilterManager + # @return [FilterManager] a new instance of FilterManager + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#7 + def initialize; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#22 + def add_ids(rerun_path, scoped_ids); end + + # @api private + # @param file_path [String] + # @param line_numbers [Array] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#15 + def add_location(file_path, line_numbers); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#30 + def empty?; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#57 + def exclude(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#61 + def exclude_only(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#65 + def exclude_with_low_priority(*args); end + + # Returns the value of attribute exclusions. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#5 + def exclusions; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#69 + def include(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#73 + def include_only(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#77 + def include_with_low_priority(*args); end + + # Returns the value of attribute inclusions. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#5 + def inclusions; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#34 + def prune(examples); end + + private + + # source://rspec-core//lib/rspec/core/filter_manager.rb#83 + def add_path_to_arrays_filter(filter_key, path, values); end + + # When a user specifies a particular spec location, that takes priority + # over any exclusion filters (such as if the spec is tagged with `:slow` + # and there is a `:slow => true` exclusion filter), but only for specs + # defined in the same file as the location filters. Excluded specs in + # other files should still be excluded. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#101 + def file_scoped_include?(ex_metadata, ids, locations); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#89 + def prune_conditionally_filtered_examples(examples); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#115 +class RSpec::Core::FilterRules + # @return [FilterRules] a new instance of FilterRules + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#130 + def initialize(rules = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#161 + def [](key); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#134 + def add(updated); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#138 + def add_with_low_priority(updated); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#149 + def clear; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#153 + def delete(key); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#173 + def description; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#169 + def each_pair(&block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#165 + def empty?; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#157 + def fetch(*args, &block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#177 + def include_example?(example); end + + # Returns the value of attribute opposite. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#119 + def opposite; end + + # Sets the attribute opposite + # + # @param value the value to set the attribute opposite to. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#119 + def opposite=(_arg0); end + + # Returns the value of attribute rules. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#120 + def rules; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#144 + def use_only(updated); end + + class << self + # source://rspec-core//lib/rspec/core/filter_manager.rb#122 + def build; end + end +end + +# source://rspec-core//lib/rspec/core/filter_manager.rb#116 +RSpec::Core::FilterRules::PROC_HEX_NUMBER = T.let(T.unsafe(nil), Regexp) + +# source://rspec-core//lib/rspec/core/filter_manager.rb#117 +RSpec::Core::FilterRules::PROJECT_DIR = T.let(T.unsafe(nil), String) + +# Tracks a collection of filterable items (e.g. modules, hooks, etc) +# and provides an optimized API to get the applicable items for the +# metadata of an example or example group. +# +# There are two implementations, optimized for different uses. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#87 +module RSpec::Core::FilterableItemRepository; end + +# This implementation is much more complex, and is optimized for +# rare (or hopefully no) updates once the queries start. Updates +# incur a cost as it has to clear the memoization and keep track +# of applicable keys. Queries will be O(N) the first time an item +# is provided with a given set of applicable metadata; subsequent +# queries with items with the same set of applicable metadata will +# be O(1) due to internal memoization. +# +# This is ideal for use by config, where filterable items (e.g. hooks) +# are typically added at the start of the process (e.g. in `spec_helper`) +# and then repeatedly queried as example groups and examples are defined. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#151 +class RSpec::Core::FilterableItemRepository::QueryOptimized < ::RSpec::Core::FilterableItemRepository::UpdateOptimized + # @return [QueryOptimized] a new instance of QueryOptimized + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#155 + def initialize(applies_predicate); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#164 + def append(item, metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#174 + def delete(item, metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#179 + def items_for(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#169 + def prepend(item, metadata); end + + private + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#217 + def applicable_metadata_from(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#152 + def find_items_for(request_meta); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#211 + def handle_mutation(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#235 + def proc_keys_from(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#203 + def reconstruct_caches; end +end + +# This implementation is simple, and is optimized for frequent +# updates but rare queries. `append` and `prepend` do no extra +# processing, and no internal memoization is done, since this +# is not optimized for queries. +# +# This is ideal for use by a example or example group, which may +# be updated multiple times with globally configured hooks, etc, +# but will not be queried frequently by other examples or example +# groups. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#98 +class RSpec::Core::FilterableItemRepository::UpdateOptimized + # @return [UpdateOptimized] a new instance of UpdateOptimized + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#101 + def initialize(applies_predicate); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#106 + def append(item, metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#114 + def delete(item, metadata); end + + # Returns the value of attribute items_and_filters. + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#99 + def items_and_filters; end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#118 + def items_for(request_meta); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#110 + def prepend(item, metadata); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/flat_map.rb#4 +module RSpec::Core::FlatMap + private + + # :nocov: + # + # source://rspec-core//lib/rspec/core/flat_map.rb#6 + def flat_map(array, &block); end + + class << self + # :nocov: + # + # source://rspec-core//lib/rspec/core/flat_map.rb#17 + def flat_map(array, &block); end + end +end + +# ## Built-in Formatters +# +# * progress (default) - Prints dots for passing examples, `F` for failures, `*` +# for pending. +# * documentation - Prints the docstrings passed to `describe` and `it` methods +# (and their aliases). +# * html +# * json - Useful for archiving data for subsequent analysis. +# +# The progress formatter is the default, but you can choose any one or more of +# the other formatters by passing with the `--format` (or `-f` for short) +# command-line option, e.g. +# +# rspec --format documentation +# +# You can also send the output of multiple formatters to different streams, e.g. +# +# rspec --format documentation --format html --out results.html +# +# This example sends the output of the documentation formatter to `$stdout`, and +# the output of the html formatter to results.html. +# +# ## Custom Formatters +# +# You can tell RSpec to use a custom formatter by passing its path and name to +# the `rspec` command. For example, if you define MyCustomFormatter in +# path/to/my_custom_formatter.rb, you would type this command: +# +# rspec --require path/to/my_custom_formatter.rb --format MyCustomFormatter +# +# The reporter calls every formatter with this protocol: +# +# * To start +# * `start(StartNotification)` +# * Once per example group +# * `example_group_started(GroupNotification)` +# * Once per example +# * `example_started(ExampleNotification)` +# * One of these per example, depending on outcome +# * `example_passed(ExampleNotification)` +# * `example_failed(FailedExampleNotification)` +# * `example_pending(ExampleNotification)` +# * Optionally at any time +# * `message(MessageNotification)` +# * At the end of the suite +# * `stop(ExamplesNotification)` +# * `start_dump(NullNotification)` +# * `dump_pending(ExamplesNotification)` +# * `dump_failures(ExamplesNotification)` +# * `dump_summary(SummaryNotification)` +# * `seed(SeedNotification)` +# * `close(NullNotification)` +# +# Only the notifications to which you subscribe your formatter will be called +# on your formatter. To subscribe your formatter use: +# `RSpec::Core::Formatters#register` e.g. +# +# `RSpec::Core::Formatters.register FormatterClassName, :example_passed, :example_failed` +# +# We recommend you implement the methods yourself; for simplicity we provide the +# default formatter output via our notification objects but if you prefer you +# can subclass `RSpec::Core::Formatters::BaseTextFormatter` and override the +# methods you wish to enhance. +# +# @see RSpec::Core::Formatters::BaseTextFormatter +# @see RSpec::Core::Reporter +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#3 +module RSpec::Core::Formatters + class << self + # Register the formatter class + # + # @param formatter_class [Class] formatter class to register + # @param notifications [Array] one or more notifications to be + # registered to the specified formatter + # @see RSpec::Core::Formatters::BaseFormatter + # + # source://rspec-core//lib/rspec/core/formatters.rb#86 + def register(formatter_class, *notifications); end + end +end + +# Contains common logic for formatters used by `--bisect` to communicate results +# back to the bisect runner. +# +# Subclasses must define a `notify_results(all_example_ids, failed_example_ids)` +# method. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#12 +class RSpec::Core::Formatters::BaseBisectFormatter + # @return [BaseBisectFormatter] a new instance of BaseBisectFormatter + # + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#17 + def initialize(expected_failures); end + + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#23 + def example_failed(notification); end + + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#27 + def example_finished(notification); end + + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#37 + def start_dump(_notification); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#13 + def inherited(formatter); end + end +end + +# RSpec's built-in formatters are all subclasses of +# RSpec::Core::Formatters::BaseFormatter. +# +# @see RSpec::Core::Formatters::BaseTextFormatter +# @see RSpec::Core::Formatters::Protocol +# @see RSpec::Core::Reporter +# +# source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#13 +class RSpec::Core::Formatters::BaseFormatter + # @api public + # @param output [IO] the formatter output + # @return [BaseFormatter] a new instance of BaseFormatter + # @see RSpec::Core::Formatters::Protocol#initialize + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#23 + def initialize(output); end + + # @api public + # @param _notification [NullNotification] (Ignored) + # @see RSpec::Core::Formatters::Protocol#close + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#50 + def close(_notification); end + + # Returns the value of attribute example_group. + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#17 + def example_group; end + + # Sets the attribute example_group + # + # @param value the value to set the attribute example_group to. + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#17 + def example_group=(_arg0); end + + # @api public + # @param notification [GroupNotification] containing example_group + # subclass of `RSpec::Core::ExampleGroup` + # @see RSpec::Core::Formatters::Protocol#example_group_started + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#42 + def example_group_started(notification); end + + # Returns the value of attribute output. + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#18 + def output; end + + # @api public + # @param notification [StartNotification] + # @see RSpec::Core::Formatters::Protocol#start + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#32 + def start(notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#64 + def output_supports_sync; end + + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#60 + def restore_sync_output; end + + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#56 + def start_sync_output; end +end + +# Base for all of RSpec's built-in formatters. See +# RSpec::Core::Formatters::BaseFormatter to learn more about all of the +# methods called by the reporter. +# +# @see RSpec::Core::Formatters::BaseFormatter +# @see RSpec::Core::Reporter +# +# source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#12 +class RSpec::Core::Formatters::BaseTextFormatter < ::RSpec::Core::Formatters::BaseFormatter + # Invoked at the end of a suite run. Allows the formatter to do any + # tidying up, but be aware that formatter output streams may be used + # elsewhere so don't actually close them. + # + # @api public + # @param _notification [NullNotification] (Ignored) + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#65 + def close(_notification); end + + # Dumps detailed information about each example failure. + # + # @api public + # @param notification [NullNotification] + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#30 + def dump_failures(notification); end + + # @private + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#47 + def dump_pending(notification); end + + # This method is invoked after the dumping of examples and failures. + # Each parameter is assigned to a corresponding attribute. + # + # @api public + # @param summary [SummaryNotification] containing duration, + # example_count, failure_count and pending_count + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#42 + def dump_summary(summary); end + + # Used by the reporter to send messages to the output stream. + # + # @api public + # @param notification [MessageNotification] containing message + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#21 + def message(notification); end + + # @private + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#53 + def seed(notification); end +end + +# Used by `--bisect`. When it shells out and runs a portion of the suite, it uses +# this formatter as a means to have the status reported back to it, via DRb. +# +# Note that since DRb calls carry considerable overhead compared to normal +# method calls, we try to minimize the number of DRb calls for perf reasons, +# opting to communicate only at the start and the end of the run, rather than +# after each example. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#15 +class RSpec::Core::Formatters::BisectDRbFormatter < ::RSpec::Core::Formatters::BaseBisectFormatter + # @return [BisectDRbFormatter] a new instance of BisectDRbFormatter + # + # source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#16 + def initialize(_output); end + + # source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#23 + def notify_results(results); end +end + +# ConsoleCodes provides helpers for formatting console output +# with ANSI codes, e.g. color's and bold. +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#6 +module RSpec::Core::Formatters::ConsoleCodes + private + + # @private + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#34 + def config_colors_to_methods; end + + # Fetches the correct code for the supplied symbol, or checks + # that a code is valid. Defaults to white (37). + # + # @param code_or_symbol [Symbol, Fixnum] Symbol or code to check + # @return [Fixnum] a console code + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#47 + def console_code_for(code_or_symbol); end + + # Wraps a piece of text in ANSI codes with the supplied code. Will + # only apply the control code if `RSpec.configuration.color_enabled?` + # returns true. + # + # @param code_or_symbol [Symbol, Fixnum] the desired control code + # @param text [String] the text to wrap + # @return [String] the wrapped text + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#66 + def wrap(text, code_or_symbol); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#34 + def config_colors_to_methods; end + + # Fetches the correct code for the supplied symbol, or checks + # that a code is valid. Defaults to white (37). + # + # @param code_or_symbol [Symbol, Fixnum] Symbol or code to check + # @return [Fixnum] a console code + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#47 + def console_code_for(code_or_symbol); end + + # Wraps a piece of text in ANSI codes with the supplied code. Will + # only apply the control code if `RSpec.configuration.color_enabled?` + # returns true. + # + # @param code_or_symbol [Symbol, Fixnum] the desired control code + # @param text [String] the text to wrap + # @return [String] the wrapped text + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#66 + def wrap(text, code_or_symbol); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#8 +RSpec::Core::Formatters::ConsoleCodes::VT100_CODES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#29 +RSpec::Core::Formatters::ConsoleCodes::VT100_CODE_VALUES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#7 +class RSpec::Core::Formatters::DeprecationFormatter + # @return [DeprecationFormatter] a new instance of DeprecationFormatter + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#12 + def initialize(deprecation_stream, summary_stream); end + + # Returns the value of attribute count. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def count; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#32 + def deprecation(notification); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#44 + def deprecation_message_for(data); end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#40 + def deprecation_summary(_notification); end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#18 + def output; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#20 + def printer; end + + # Returns the value of attribute summary_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def summary_stream; end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#60 +RSpec::Core::Formatters::DeprecationFormatter::DEPRECATION_STREAM_NOTICE = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#135 +class RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter + # @return [DelayedPrinter] a new instance of DelayedPrinter + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#140 + def initialize(deprecation_stream, summary_stream, deprecation_formatter); end + + # Returns the value of attribute deprecation_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + def deprecation_formatter; end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#163 + def deprecation_summary; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#172 + def print_deferred_deprecation_warnings; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#148 + def print_deprecation_message(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#155 + def stash_deprecation_message(deprecation_message); end + + # Returns the value of attribute summary_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + def summary_stream; end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#136 +RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter::TOO_MANY_USES_LIMIT = T.let(T.unsafe(nil), Integer) + +# Wraps a File object and provides file-specific operations. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#196 +class RSpec::Core::Formatters::DeprecationFormatter::FileStream + # @return [FileStream] a new instance of FileStream + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#197 + def initialize(file); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#207 + def puts(*args); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#211 + def summarize(summary_stream, deprecation_count); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 +class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage < ::Struct + # @return [GeneratedDeprecationMessage] a new instance of GeneratedDeprecationMessage + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#95 + def initialize(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#100 + def to_s; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#107 + def too_many_warnings_message; end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def type=(_); end + + class << self + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def inspect; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def members; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#113 +class RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter + # @return [ImmediatePrinter] a new instance of ImmediatePrinter + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#116 + def initialize(deprecation_stream, summary_stream, deprecation_formatter); end + + # Returns the value of attribute deprecation_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + def deprecation_formatter; end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#128 + def deprecation_summary; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#123 + def print_deprecation_message(data); end + + # Returns the value of attribute summary_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + def summary_stream; end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#52 +RSpec::Core::Formatters::DeprecationFormatter::RAISE_ERROR_CONFIG_NOTICE = T.let(T.unsafe(nil), String) + +# Not really a stream, but is usable in place of one. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#184 +class RSpec::Core::Formatters::DeprecationFormatter::RaiseErrorStream + # @raise [DeprecationError] + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#185 + def puts(message); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#189 + def summarize(summary_stream, deprecation_count); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 +class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage < ::Struct + # @return [SpecifiedDeprecationMessage] a new instance of SpecifiedDeprecationMessage + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#67 + def initialize(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#72 + def to_s; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#76 + def too_many_warnings_message; end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def type=(_); end + + private + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#88 + def deprecation_type_for(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#82 + def output_formatted(str); end + + class << self + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def inspect; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def members; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 + def new(*_arg0); end + end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#62 +RSpec::Core::Formatters::DeprecationFormatter::TOO_MANY_WARNINGS_NOTICE = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#8 +class RSpec::Core::Formatters::DocumentationFormatter < ::RSpec::Core::Formatters::BaseTextFormatter + # @return [DocumentationFormatter] a new instance of DocumentationFormatter + # + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#12 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#50 + def example_failed(failure); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#31 + def example_group_finished(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#24 + def example_group_started(notification); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#35 + def example_passed(passed); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#42 + def example_pending(pending); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#20 + def example_started(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#57 + def message(notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#96 + def current_indentation(offset = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#85 + def failure_output(example); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#67 + def flush_messages; end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#91 + def next_failure_index; end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#75 + def passed_output(example); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#79 + def pending_output(example, message); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#11 +class RSpec::Core::Formatters::ExceptionPresenter + # @return [ExceptionPresenter] a new instance of ExceptionPresenter + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#16 + def initialize(exception, example, options = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#78 + def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#33 + def colorized_message_lines(colorizer = T.unsafe(nil)); end + + # Returns the value of attribute description. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def description; end + + # Returns the value of attribute example. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def example; end + + # Returns the value of attribute exception. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def exception; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#39 + def formatted_backtrace(exception = T.unsafe(nil)); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#45 + def formatted_cause(exception); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 + def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#89 + def fully_formatted_lines(failure_number, colorizer); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#29 + def message_lines; end + + private + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#226 + def add_shared_group_lines(lines, colorizer); end + + # Returns the value of attribute backtrace_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def backtrace_formatter; end + + # Returns the value of attribute detail_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def detail_formatter; end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#287 + def encoded_description(description); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#120 + def encoded_string(string); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#116 + def encoding_of(string); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#299 + def exception_backtrace; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#150 + def exception_class_name(exception = T.unsafe(nil)); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#204 + def exception_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#185 + def exception_message_string(exception); end + + # Returns the value of attribute extra_detail_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def extra_detail_formatter; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#215 + def extra_failure_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#156 + def failure_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#170 + def failure_slash_error_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#104 + def final_exception(exception, previous = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#262 + def find_failed_line; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#278 + def formatted_message_and_backtrace(colorizer); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#134 + def indent_lines(lines, failure_number); end + + # Returns the value of attribute message_color. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def message_color; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#236 + def read_failed_lines; end +end + +# Configuring the `ExceptionPresenter` with the right set of options to handle +# pending vs failed vs skipped and aggregated (or not) failures is not simple. +# This class takes care of building an appropriate `ExceptionPresenter` for the +# provided example. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#308 +class RSpec::Core::Formatters::ExceptionPresenter::Factory + # @return [Factory] a new instance of Factory + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#315 + def initialize(example); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#309 + def build; end + + private + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#370 + def multiple_exception_summarizer(exception, prior_detail_formatter, color); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#366 + def multiple_exceptions_error?(exception); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#325 + def options; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#329 + def pending_options; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#391 + def sub_failure_list_formatter(exception, message_color); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#350 + def with_multiple_error_options_as_needed(exception, options); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#424 +class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater + # @return [CommonBacktraceTruncater] a new instance of CommonBacktraceTruncater + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#425 + def initialize(parent); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#429 + def with_truncated_backtrace(child); end +end + +# Used to prevent a confusing backtrace from showing up from the `aggregate_failures` +# block declared for `:aggregate_failures` metadata. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#417 +module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter + class << self + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#418 + def format_backtrace(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#449 +RSpec::Core::Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER = T.let(T.unsafe(nil), Proc) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#7 +class RSpec::Core::Formatters::FailureListFormatter < ::RSpec::Core::Formatters::BaseFormatter + # Discard profile and messages + # + # These outputs are not really relevant in the context of this failure + # list formatter. + # + # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#18 + def dump_profile(_profile); end + + # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#10 + def example_failed(failure); end + + # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#19 + def message(_message); end +end + +# Formatter for providing message output as a fallback when no other +# profiler implements #message +# +# @api private +# +# source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#7 +class RSpec::Core::Formatters::FallbackMessageFormatter + # @api private + # @return [FallbackMessageFormatter] a new instance of FallbackMessageFormatter + # + # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#10 + def initialize(output); end + + # Used by the reporter to send messages to the output stream. + # + # @api public + # @param notification [MessageNotification] containing message + # + # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#22 + def message(notification); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#15 + def output; end +end + +# Formatters helpers. +# +# source://rspec-core//lib/rspec/core/formatters/helpers.rb#7 +module RSpec::Core::Formatters::Helpers + class << self + # Formats seconds into a human-readable string. + # + # @api private + # @example + # format_duration(1) #=> "1 minute 1 second" + # format_duration(135.14) #=> "2 minutes 15.14 seconds" + # @param duration [Float, Fixnum] in seconds + # @return [String] human-readable time + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#24 + def format_duration(duration); end + + # Formats seconds to have 5 digits of precision with trailing zeros + # removed if the number is less than 1 or with 2 digits of precision if + # the number is greater than zero. + # + # The precision used is set in {Helpers::SUB_SECOND_PRECISION} and + # {Helpers::DEFAULT_PRECISION}. + # + # @api private + # @example + # format_seconds(0.000006) #=> "0.00001" + # format_seconds(0.020000) #=> "0.02" + # format_seconds(1.00000000001) #=> "1" + # @param float [Float] + # @return [String] formatted float + # @see #strip_trailing_zeroes + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#60 + def format_seconds(float, precision = T.unsafe(nil)); end + + # Given a list of example ids, organizes them into a compact, ordered list. + # + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#102 + def organize_ids(ids); end + + # Pluralize a word based on a count. + # + # @api private + # @param count [Fixnum] number of objects + # @param string [String] word to be pluralized + # @return [String] pluralized word + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#88 + def pluralize(count, string); end + + private + + # Remove trailing zeros from a string. + # + # Only remove trailing zeros after a decimal place. + # see: http://rubular.com/r/ojtTydOgpn + # + # @api private + # @param string [String] string with trailing zeros + # @return [String] string with trailing zeros removed + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#76 + def strip_trailing_zeroes(string); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/helpers.rb#12 +RSpec::Core::Formatters::Helpers::DEFAULT_PRECISION = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/helpers.rb#9 +RSpec::Core::Formatters::Helpers::SUB_SECOND_PRECISION = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#8 +class RSpec::Core::Formatters::HtmlFormatter < ::RSpec::Core::Formatters::BaseFormatter + # @return [HtmlFormatter] a new instance of HtmlFormatter + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#13 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#103 + def dump_summary(summary); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#55 + def example_failed(failure); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#28 + def example_group_started(notification); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#49 + def example_passed(passed); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#93 + def example_pending(pending); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#45 + def example_started(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#22 + def start(notification); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#40 + def start_dump(_notification); end + + private + + # The number of the currently running example_group. + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#120 + def example_group_number; end + + # The number of the currently running example (a global counter). + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#125 + def example_number; end + + # Override this method if you wish to output extra HTML for a failed + # spec. For example, you could output links to images or other files + # produced during the specs. + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#141 + def extra_failure_content(failure); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#130 + def percent_done; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#7 +class RSpec::Core::Formatters::HtmlPrinter + include ::ERB::Escape + include ::ERB::Util + include ::ActiveSupport::CoreExt::ERBUtil + include ::ActiveSupport::CoreExt::ERBUtilPrivate + + # @return [HtmlPrinter] a new instance of HtmlPrinter + # + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#9 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#79 + def flush; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#96 + def make_example_group_header_red(group_id); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#103 + def make_example_group_header_yellow(group_id); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#88 + def make_header_red; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#92 + def make_header_yellow; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#83 + def move_progress(percent_done); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#36 + def print_example_failed(pending_fixed, description, run_time, failure_id, exception, extra_content); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#18 + def print_example_group_end; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#23 + def print_example_group_start(group_id, description, number_of_parents); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#29 + def print_example_passed(description, run_time); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#53 + def print_example_pending(description, pending_message); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#13 + def print_html_start; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#59 + def print_summary(duration, example_count, failure_count, pending_count); end + + private + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#112 + def indentation_style(number_of_parents); end +end + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#140 +RSpec::Core::Formatters::HtmlPrinter::GLOBAL_SCRIPTS = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#218 +RSpec::Core::Formatters::HtmlPrinter::GLOBAL_STYLES = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#382 +RSpec::Core::Formatters::HtmlPrinter::HTML_HEADER = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#116 +RSpec::Core::Formatters::HtmlPrinter::REPORT_HEADER = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#8 +class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFormatter + # @return [JsonFormatter] a new instance of JsonFormatter + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#13 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#56 + def close(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#60 + def dump_profile(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#79 + def dump_profile_slowest_example_groups(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#67 + def dump_profile_slowest_examples(profile); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#24 + def dump_summary(summary); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#20 + def message(notification); end + + # Returns the value of attribute output_hash. + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#11 + def output_hash; end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#51 + def seed(notification); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#35 + def stop(group_notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#88 + def format_example(example); end +end + +# `RSpec::Core::Formatters::Loader` is an internal class for +# managing formatters used by a particular configuration. It is +# not expected to be used directly, but only through the configuration +# interface. +# +# @api private +# +# source://rspec-core//lib/rspec/core/formatters.rb#96 +class RSpec::Core::Formatters::Loader + # @api private + # @return [Loader] a new instance of Loader + # + # source://rspec-core//lib/rspec/core/formatters.rb#105 + def initialize(reporter); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters.rb#144 + def add(formatter_to_use, *paths); end + + # @api private + # @return [String] the default formatter to setup, defaults to `progress` + # + # source://rspec-core//lib/rspec/core/formatters.rb#118 + def default_formatter; end + + # @api private + # @return [String] the default formatter to setup, defaults to `progress` + # + # source://rspec-core//lib/rspec/core/formatters.rb#118 + def default_formatter=(_arg0); end + + # @api private + # @return [Array] the loaded formatters + # + # source://rspec-core//lib/rspec/core/formatters.rb#112 + def formatters; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters.rb#121 + def prepare_default(output_stream, deprecation_stream); end + + # @api private + # @return [Reporter] the reporter + # + # source://rspec-core//lib/rspec/core/formatters.rb#115 + def reporter; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters.rb#126 + def setup_default(output_stream, deprecation_stream); end + + private + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#211 + def built_in_formatter(key); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#234 + def custom_formatter(formatter_ref); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#195 + def duplicate_formatter_exists?(new_formatter); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#207 + def existing_formatter_implements?(notification); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#181 + def find_formatter(formatter_to_use); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#202 + def has_matching_output?(formatter, new_formatter); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#228 + def notifications_for(formatter_class); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#269 + def open_stream(path_or_wrapper); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#250 + def path_for(const_ref); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#188 + def register(formatter, notifications); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#246 + def string_const?(str); end + + # activesupport/lib/active_support/inflector/methods.rb, line 48 + # + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#259 + def underscore(camel_cased_word); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#254 + def underscore_with_fix_for_non_standard_rspec_naming(string); end + + class << self + # Internal formatters are stored here when loaded. + # + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#100 + def formatters; end + end +end + +# Formatter for providing profile output. +# +# @api private +# +# source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#8 +class RSpec::Core::Formatters::ProfileFormatter + # @api private + # @return [ProfileFormatter] a new instance of ProfileFormatter + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#11 + def initialize(output); end + + # This method is invoked after the dumping the summary if profiling is + # enabled. + # + # @api public + # @param profile [ProfileNotification] containing duration, + # slowest_examples and slowest_example_groups + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#25 + def dump_profile(profile); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#16 + def output; end + + private + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#62 + def bold(text); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#44 + def dump_profile_slowest_example_groups(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#32 + def dump_profile_slowest_examples(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#57 + def format_caller(caller_info); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#8 +class RSpec::Core::Formatters::ProgressFormatter < ::RSpec::Core::Formatters::BaseTextFormatter + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#19 + def example_failed(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#11 + def example_passed(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#15 + def example_pending(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#23 + def start_dump(_notification); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#5 +class RSpec::Core::Formatters::SnippetExtractor + # @return [SnippetExtractor] a new instance of SnippetExtractor + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#35 + def initialize(source, beginning_line_number, max_line_count = T.unsafe(nil)); end + + # Returns the value of attribute beginning_line_number. + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + def beginning_line_number; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#41 + def expression_lines; end + + # Returns the value of attribute max_line_count. + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + def max_line_count; end + + # Returns the value of attribute source. + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + def source; end + + private + + # @raise [NoExpressionAtLineError] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#95 + def expression_node; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#107 + def expression_outmost_node?(node); end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#55 + def line_range_of_expression; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#87 + def line_range_of_location_nodes_in_expression; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#117 + def location_nodes_at_beginning_line; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#70 + def unclosed_tokens_in_line_range(line_range); end + + class << self + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#26 + def extract_expression_lines_at(file_path, beginning_line_number, max_line_count = T.unsafe(nil)); end + + # @raise [NoSuchLineError] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#9 + def extract_line_at(file_path, line_number); end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#128 + def least_indentation_from(lines); end + + # @raise [NoSuchFileError] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#16 + def source_from_file(path); end + end +end + +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#22 +class RSpec::Core::Formatters::SnippetExtractor::NoExpressionAtLineError < ::StandardError; end + +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#6 +class RSpec::Core::Formatters::SnippetExtractor::NoSuchFileError < ::StandardError; end + +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#7 +class RSpec::Core::Formatters::SnippetExtractor::NoSuchLineError < ::StandardError; end + +# Provides terminal syntax highlighting of code snippets +# when coderay is available. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#7 +class RSpec::Core::Formatters::SyntaxHighlighter + # @return [SyntaxHighlighter] a new instance of SyntaxHighlighter + # + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#8 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#12 + def highlight(lines); end + + private + + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#50 + def color_enabled_implementation; end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#44 + def implementation; end + + class << self + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#18 + def attempt_to_add_rspec_terms_to_coderay_keywords; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#61 +module RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation + class << self + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#64 + def highlight_syntax(lines); end + end +end + +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#62 +RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation::RESET_CODE = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#78 +module RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation + class << self + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#79 + def highlight_syntax(lines); end + end +end + +# Not sure why, but our code above (and/or coderay itself) does not work +# on Windows, so we disable the feature on Windows. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#87 +RSpec::Core::Formatters::SyntaxHighlighter::WindowsImplementation = RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation + +# Mixin that makes the including class imitate a hash for backwards +# compatibility. The including class should use `attr_accessor` to +# declare attributes. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#349 +module RSpec::Core::HashImitatable + mixes_in_class_methods ::RSpec::Core::HashImitatable::ClassMethods + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def <(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def <=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def >(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def >=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#388 + def [](key); end + + # source://rspec-core//lib/rspec/core/metadata.rb#398 + def []=(key, value); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def all?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def any?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def assoc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def chain(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def chunk(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def chunk_while(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def clear(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def collect(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def collect_concat(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compact(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compact!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compare_by_identity(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compare_by_identity?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def count(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def cycle(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def deconstruct_keys(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default_proc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default_proc=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def delete(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def delete_if(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def detect(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def dig(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def drop(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def drop_while(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_cons(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_entry(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_key(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_pair(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_slice(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_value(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_with_index(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_with_object(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def empty?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def entries(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def except(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def fetch(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def fetch_values(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def filter(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def filter!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def filter_map(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def find(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def find_all(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def find_index(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def first(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def flat_map(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def flatten(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def grep(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def grep_v(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def group_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def has_key?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def has_value?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def include?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def inject(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def invert(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def keep_if(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def key(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def key?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def keys(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def lazy(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def length(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def map(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def max(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def max_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def member?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def merge(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def merge!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def min(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def min_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def minmax(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def minmax_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def none?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def one?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def partition(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def rassoc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reduce(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def rehash(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reject(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reject!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def replace(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reverse_each(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def select(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def select!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def shift(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def size(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice_after(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice_before(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice_when(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def sort(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def sort_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def store(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def sum(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def take(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def take_while(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def tally(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_a(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#354 + def to_h; end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_hash(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_proc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_set(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_keys(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_keys!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_values(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_values!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def uniq(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def update(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def value?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def values(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def values_at(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def zip(*args, &block); end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata.rb#414 + def directly_supports_attribute?(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#410 + def extra_hash_attributes; end + + # source://rspec-core//lib/rspec/core/metadata.rb#418 + def get_value(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#426 + def hash_for_delegation; end + + # source://rspec-core//lib/rspec/core/metadata.rb#430 + def issue_deprecation(_method_name, *_args); end + + # source://rspec-core//lib/rspec/core/metadata.rb#422 + def set_value(name, value); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#350 + def included(klass); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#435 +module RSpec::Core::HashImitatable::ClassMethods + # source://rspec-core//lib/rspec/core/metadata.rb#440 + def attr_accessor(*names); end + + # source://rspec-core//lib/rspec/core/metadata.rb#436 + def hash_attribute_names; end +end + +# Provides `before`, `after` and `around` hooks as a means of +# supporting common setup and teardown. This module is extended +# onto {ExampleGroup}, making the methods available from any `describe` +# or `context` block and included in {Configuration}, making them +# available off of the configuration object to define global setup +# or teardown logic. +# +# source://rspec-core//lib/rspec/core/hooks.rb#9 +module RSpec::Core::Hooks + # Declare a block of code to be run after each example (using `:example`) + # or once after all examples n the context (using `:context`). See + # {#before} for more information about ordering. + # + # ### Exceptions + # + # `after` hooks are guaranteed to run even when there are exceptions in + # `before` hooks or examples. When an exception is raised in an after + # block, the exception is captured for later reporting, and subsequent + # `after` blocks are run. + # + # ### Order + # + # `after` hooks are stored in three scopes, which are run in order: + # `:example`, `:context`, and `:suite`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # after(:example) # Declared in the current group. + # after(:example) # Declared in a parent group. + # after(:example) # Declared in RSpec.configure. + # after(:context) # Declared in the current group. + # after(:context) # Declared in a parent group. + # after(:context) # Declared in RSpec.configure. + # after(:suite) # Declared in RSpec.configure. + # + # This is the reverse of the order in which `before` hooks are run. + # Similarly, if more than one `after` is declared within any example + # group, they are run in reverse order of that in which they are declared. + # Also `around` hooks will run after any `after` example hooks are + # invoked but before any `after` context hooks. + # + # @api public + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @overload after + # @overload after + # @overload after + # @overload after + # @see #around + # @see #before + # @see Configuration + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/hooks.rb#277 + def after(*args, &block); end + + # Adds `block` to the back of the list of `after` blocks in the same + # scope (`:example`, `:context`, or `:suite`). + # + # See {#after} for scoping semantics. + # + # source://rspec-core//lib/rspec/core/hooks.rb#287 + def append_after(*args, &block); end + + # Declare a block of code to be run before each example (using `:example`) + # or once before any example (using `:context`). These are usually + # declared directly in the {ExampleGroup} to which they apply, but they + # can also be shared across multiple groups. + # + # You can also use `before(:suite)` to run a block of code before any + # example groups are run. This should be declared in {RSpec.configure}. + # + # Instance variables declared in `before(:example)` or `before(:context)` + # are accessible within each example. + # + # ### Order + # + # `before` hooks are stored in three scopes, which are run in order: + # `:suite`, `:context`, and `:example`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # before(:suite) # Declared in RSpec.configure. + # before(:context) # Declared in RSpec.configure. + # before(:context) # Declared in a parent group. + # before(:context) # Declared in the current group. + # before(:example) # Declared in RSpec.configure. + # before(:example) # Declared in a parent group. + # before(:example) # Declared in the current group. + # + # If more than one `before` is declared within any one example group, they + # are run in the order in which they are declared. Any `around` hooks will + # execute after `before` context hooks but before any `before` example + # hook regardless of where they are declared. + # + # ### Conditions + # + # When you add a conditions hash to `before(:example)` or + # `before(:context)`, RSpec will only apply that hook to groups or + # examples that match the conditions. e.g. + # + # RSpec.configure do |config| + # config.before(:example, :authorized => true) do + # log_in_as :authorized_user + # end + # end + # + # RSpec.describe Something, :authorized => true do + # # The before hook will run in before each example in this group. + # end + # + # RSpec.describe SomethingElse do + # it "does something", :authorized => true do + # # The before hook will run before this example. + # end + # + # it "does something else" do + # # The hook will not run before this example. + # end + # end + # + # Note that filtered config `:context` hooks can still be applied + # to individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # + # ### Warning: `before(:suite, :with => :conditions)` + # + # The conditions hash is used to match against specific examples. Since + # `before(:suite)` is not run in relation to any specific example or + # group, conditions passed along with `:suite` are effectively ignored. + # + # ### Exceptions + # + # When an exception is raised in a `before` block, RSpec skips any + # subsequent `before` blocks and the example, but runs all of the + # `after(:example)` and `after(:context)` hooks. + # + # ### Warning: implicit before blocks + # + # `before` hooks can also be declared in shared contexts which get + # included implicitly either by you or by extension libraries. Since + # RSpec runs these in the order in which they are declared within each + # scope, load order matters, and can lead to confusing results when one + # before block depends on state that is prepared in another before block + # that gets run later. + # + # ### Warning: `before(:context)` + # + # It is very tempting to use `before(:context)` to speed things up, but we + # recommend that you avoid this as there are a number of gotchas, as well + # as things that simply don't work. + # + # #### Context + # + # `before(:context)` is run in an example that is generated to provide + # group context for the block. + # + # #### Instance variables + # + # Instance variables declared in `before(:context)` are shared across all + # the examples in the group. This means that each example can change the + # state of a shared object, resulting in an ordering dependency that can + # make it difficult to reason about failures. + # + # #### Unsupported RSpec constructs + # + # RSpec has several constructs that reset state between each example + # automatically. These are not intended for use from within + # `before(:context)`: + # + # * `let` declarations + # * `subject` declarations + # * Any mocking, stubbing or test double declaration + # + # ### other frameworks + # + # Mock object frameworks and database transaction managers (like + # ActiveRecord) are typically designed around the idea of setting up + # before an example, running that one example, and then tearing down. This + # means that mocks and stubs can (sometimes) be declared in + # `before(:context)`, but get torn down before the first real example is + # ever run. + # + # You _can_ create database-backed model objects in a `before(:context)` + # in rspec-rails, but it will not be wrapped in a transaction for you, so + # you are on your own to clean up in an `after(:context)` block. + # + # @api public + # @example before(:context) declared in an {ExampleGroup} + # RSpec.describe Parser do + # before(:context) do + # File.open(file_to_parse, 'w') do |f| + # f.write <<-CONTENT + # stuff in the file + # CONTENT + # end + # end + # + # it "parses the file" do + # Parser.parse(file_to_parse) + # end + # + # after(:context) do + # File.delete(file_to_parse) + # end + # end + # @example before(:example) declared in an {ExampleGroup} + # RSpec.describe Thing do + # before(:example) do + # @thing = Thing.new + # end + # + # it "does something" do + # # Here you can access @thing. + # end + # end + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @overload before + # @overload before + # @overload before + # @overload before + # @see #after + # @see #around + # @see Configuration + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/hooks.rb#204 + def append_before(*args, &block); end + + # Declare a block of code, parts of which will be run before and parts + # after the example. It is your responsibility to run the example: + # + # around(:example) do |ex| + # # Do some stuff before. + # ex.run + # # Do some stuff after. + # end + # + # The yielded example aliases `run` with `call`, which lets you treat it + # like a `Proc`. This is especially handy when working with libraries + # that manage their own setup and teardown using a block or proc syntax, + # e.g. + # + # around(:example) {|ex| Database.transaction(&ex)} + # around(:example) {|ex| FakeFS(&ex)} + # + # ### Order + # + # The `around` hooks execute surrounding an example and its hooks. + # + # This means after any `before` context hooks, but before any `before` + # example hooks, and similarly after any `after` example hooks but before + # any `after` context hooks. + # + # They are not a synonym for `before`/`after`. + # + # @api public + # @note `:example`/`:each` is the only supported scope. + # @note the syntax of `around` is similar to that of `before` and `after` + # but the semantics are quite different. `before` and `after` hooks are + # run in the context of the examples with which they are associated, + # whereas `around` hooks are actually responsible for running the + # examples. Consequently, `around` hooks do not have direct access to + # resources that are made available within the examples and their + # associated `before` and `after` hooks. + # @overload around + # @overload around + # @overload around + # @overload around + # @yield [Example] the example to run + # + # source://rspec-core//lib/rspec/core/hooks.rb#349 + def around(*args, &block); end + + # Declare a block of code to be run before each example (using `:example`) + # or once before any example (using `:context`). These are usually + # declared directly in the {ExampleGroup} to which they apply, but they + # can also be shared across multiple groups. + # + # You can also use `before(:suite)` to run a block of code before any + # example groups are run. This should be declared in {RSpec.configure}. + # + # Instance variables declared in `before(:example)` or `before(:context)` + # are accessible within each example. + # + # ### Order + # + # `before` hooks are stored in three scopes, which are run in order: + # `:suite`, `:context`, and `:example`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # before(:suite) # Declared in RSpec.configure. + # before(:context) # Declared in RSpec.configure. + # before(:context) # Declared in a parent group. + # before(:context) # Declared in the current group. + # before(:example) # Declared in RSpec.configure. + # before(:example) # Declared in a parent group. + # before(:example) # Declared in the current group. + # + # If more than one `before` is declared within any one example group, they + # are run in the order in which they are declared. Any `around` hooks will + # execute after `before` context hooks but before any `before` example + # hook regardless of where they are declared. + # + # ### Conditions + # + # When you add a conditions hash to `before(:example)` or + # `before(:context)`, RSpec will only apply that hook to groups or + # examples that match the conditions. e.g. + # + # RSpec.configure do |config| + # config.before(:example, :authorized => true) do + # log_in_as :authorized_user + # end + # end + # + # RSpec.describe Something, :authorized => true do + # # The before hook will run in before each example in this group. + # end + # + # RSpec.describe SomethingElse do + # it "does something", :authorized => true do + # # The before hook will run before this example. + # end + # + # it "does something else" do + # # The hook will not run before this example. + # end + # end + # + # Note that filtered config `:context` hooks can still be applied + # to individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # + # ### Warning: `before(:suite, :with => :conditions)` + # + # The conditions hash is used to match against specific examples. Since + # `before(:suite)` is not run in relation to any specific example or + # group, conditions passed along with `:suite` are effectively ignored. + # + # ### Exceptions + # + # When an exception is raised in a `before` block, RSpec skips any + # subsequent `before` blocks and the example, but runs all of the + # `after(:example)` and `after(:context)` hooks. + # + # ### Warning: implicit before blocks + # + # `before` hooks can also be declared in shared contexts which get + # included implicitly either by you or by extension libraries. Since + # RSpec runs these in the order in which they are declared within each + # scope, load order matters, and can lead to confusing results when one + # before block depends on state that is prepared in another before block + # that gets run later. + # + # ### Warning: `before(:context)` + # + # It is very tempting to use `before(:context)` to speed things up, but we + # recommend that you avoid this as there are a number of gotchas, as well + # as things that simply don't work. + # + # #### Context + # + # `before(:context)` is run in an example that is generated to provide + # group context for the block. + # + # #### Instance variables + # + # Instance variables declared in `before(:context)` are shared across all + # the examples in the group. This means that each example can change the + # state of a shared object, resulting in an ordering dependency that can + # make it difficult to reason about failures. + # + # #### Unsupported RSpec constructs + # + # RSpec has several constructs that reset state between each example + # automatically. These are not intended for use from within + # `before(:context)`: + # + # * `let` declarations + # * `subject` declarations + # * Any mocking, stubbing or test double declaration + # + # ### other frameworks + # + # Mock object frameworks and database transaction managers (like + # ActiveRecord) are typically designed around the idea of setting up + # before an example, running that one example, and then tearing down. This + # means that mocks and stubs can (sometimes) be declared in + # `before(:context)`, but get torn down before the first real example is + # ever run. + # + # You _can_ create database-backed model objects in a `before(:context)` + # in rspec-rails, but it will not be wrapped in a transaction for you, so + # you are on your own to clean up in an `after(:context)` block. + # + # @api public + # @example before(:context) declared in an {ExampleGroup} + # + # RSpec.describe Parser do + # before(:context) do + # File.open(file_to_parse, 'w') do |f| + # f.write <<-CONTENT + # stuff in the file + # CONTENT + # end + # end + # + # it "parses the file" do + # Parser.parse(file_to_parse) + # end + # + # after(:context) do + # File.delete(file_to_parse) + # end + # end + # @example before(:example) declared in an {ExampleGroup} + # + # RSpec.describe Thing do + # before(:example) do + # @thing = Thing.new + # end + # + # it "does something" do + # # Here you can access @thing. + # end + # end + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @overload before + # @overload before + # @overload before + # @overload before + # @see #after + # @see #around + # @see Configuration + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/hooks.rb#200 + def before(*args, &block); end + + # Holds the various registered hooks. + # + # @private + # + # source://rspec-core//lib/rspec/core/hooks.rb#355 + def hooks; end + + # Declare a block of code to be run after each example (using `:example`) + # or once after all examples n the context (using `:context`). See + # {#before} for more information about ordering. + # + # ### Exceptions + # + # `after` hooks are guaranteed to run even when there are exceptions in + # `before` hooks or examples. When an exception is raised in an after + # block, the exception is captured for later reporting, and subsequent + # `after` blocks are run. + # + # ### Order + # + # `after` hooks are stored in three scopes, which are run in order: + # `:example`, `:context`, and `:suite`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # after(:example) # Declared in the current group. + # after(:example) # Declared in a parent group. + # after(:example) # Declared in RSpec.configure. + # after(:context) # Declared in the current group. + # after(:context) # Declared in a parent group. + # after(:context) # Declared in RSpec.configure. + # after(:suite) # Declared in RSpec.configure. + # + # This is the reverse of the order in which `before` hooks are run. + # Similarly, if more than one `after` is declared within any example + # group, they are run in reverse order of that in which they are declared. + # Also `around` hooks will run after any `after` example hooks are + # invoked but before any `after` context hooks. + # + # @api public + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @overload after + # @overload after + # @overload after + # @overload after + # @see #around + # @see #before + # @see Configuration + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/hooks.rb#281 + def prepend_after(*args, &block); end + + # Adds `block` to the front of the list of `before` blocks in the same + # scope (`:example`, `:context`, or `:suite`). + # + # See {#before} for scoping semantics. + # + # source://rspec-core//lib/rspec/core/hooks.rb#210 + def prepend_before(*args, &block); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#379 +class RSpec::Core::Hooks::AfterContextHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#380 + def run(example); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#370 +class RSpec::Core::Hooks::AfterHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#371 + def run(example); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#388 +class RSpec::Core::Hooks::AroundHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#389 + def execute_with(example, procsy); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/hooks.rb#397 + def hook_description; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#363 +class RSpec::Core::Hooks::BeforeHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#364 + def run(example); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#360 +class RSpec::Core::Hooks::Hook < ::Struct + # Returns the value of attribute block + # + # @return [Object] the current value of block + # + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def block=(_); end + + # Returns the value of attribute options + # + # @return [Object] the current value of options + # + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def options; end + + # Sets the attribute options + # + # @param value [Object] the value to set the attribute options to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def options=(_); end + + class << self + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def inspect; end + + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def members; end + + # source://rspec-core//lib/rspec/core/hooks.rb#360 + def new(*_arg0); end + end +end + +# This provides the primary API used by other parts of rspec-core. By hiding all +# implementation details behind this facade, it's allowed us to heavily optimize +# this, so that, for example, hook collection objects are only instantiated when +# a hook is added. This allows us to avoid many object allocations for the common +# case of a group having no hooks. +# +# This is only possible because this interface provides a "tell, don't ask"-style +# API, so that callers _tell_ this class what to do with the hooks, rather than +# asking this class for a list of hooks, and then doing something with them. +# +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#420 +class RSpec::Core::Hooks::HookCollections + # @return [HookCollections] a new instance of HookCollections + # + # source://rspec-core//lib/rspec/core/hooks.rb#421 + def initialize(owner, filterable_item_repo_class); end + + # source://rspec-core//lib/rspec/core/hooks.rb#449 + def register(prepend_or_append, position, *args, &block); end + + # source://rspec-core//lib/rspec/core/hooks.rb#442 + def register_global_singleton_context_hooks(example, globals); end + + # source://rspec-core//lib/rspec/core/hooks.rb#431 + def register_globals(host, globals); end + + # Runs all of the blocks stored with the hook in the context of the + # example. If no example is provided, just calls the hook directly. + # + # @private + # + # source://rspec-core//lib/rspec/core/hooks.rb#475 + def run(position, scope, example_or_group); end + + protected + + # source://rspec-core//lib/rspec/core/hooks.rb#523 + def all_hooks_for(position, scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#507 + def matching_hooks_for(position, scope, example_or_group); end + + # source://rspec-core//lib/rspec/core/hooks.rb#533 + def processable_hooks_for(position, scope, host); end + + # source://rspec-core//lib/rspec/core/hooks.rb#527 + def run_owned_hooks_for(position, scope, example_or_group); end + + private + + # source://rspec-core//lib/rspec/core/hooks.rb#553 + def ensure_hooks_initialized_for(position, scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#591 + def extract_scope_from(args); end + + # source://rspec-core//lib/rspec/core/hooks.rb#543 + def hooks_for(position, scope); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/hooks.rb#605 + def known_scope?(scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#609 + def normalized_scope_for(scope); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/hooks.rb#633 + def owner_parent_groups; end + + # source://rspec-core//lib/rspec/core/hooks.rb#571 + def process(host, parent_groups, globals, position, scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#619 + def run_around_example_hooks_for(example); end + + # source://rspec-core//lib/rspec/core/hooks.rb#613 + def run_example_hooks_for(example, position, each_method); end + + # source://rspec-core//lib/rspec/core/hooks.rb#584 + def scope_and_options_from(*args); end +end + +# source://rspec-core//lib/rspec/core/hooks.rb#505 +RSpec::Core::Hooks::HookCollections::EMPTY_HOOK_ARRAY = T.let(T.unsafe(nil), Array) + +# source://rspec-core//lib/rspec/core/hooks.rb#495 +RSpec::Core::Hooks::HookCollections::HOOK_TYPES = T.let(T.unsafe(nil), Hash) + +# source://rspec-core//lib/rspec/core/hooks.rb#491 +RSpec::Core::Hooks::HookCollections::SCOPES = T.let(T.unsafe(nil), Array) + +# source://rspec-core//lib/rspec/core/hooks.rb#493 +RSpec::Core::Hooks::HookCollections::SCOPE_ALIASES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#186 +class RSpec::Core::InclusionRules < ::RSpec::Core::FilterRules + # source://rspec-core//lib/rspec/core/filter_manager.rb#187 + def add(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#191 + def add_with_low_priority(*args); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#195 + def include_example?(example); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#203 + def split_file_scoped_rules; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#199 + def standalone?; end + + private + + # source://rspec-core//lib/rspec/core/filter_manager.rb#213 + def apply_standalone_filter(updated); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#226 + def is_standalone_filter?(rules); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#221 + def replace_filters(new_rules); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#4 +module RSpec::Core::Invocations; end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#28 +class RSpec::Core::Invocations::Bisect + # source://rspec-core//lib/rspec/core/invocations.rb#29 + def call(options, err, out); end + + private + + # source://rspec-core//lib/rspec/core/invocations.rb#45 + def bisect_formatter_klass_for(argument); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#15 +class RSpec::Core::Invocations::DRbWithFallback + # source://rspec-core//lib/rspec/core/invocations.rb#16 + def call(options, err, out); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#6 +class RSpec::Core::Invocations::InitializeProject + # source://rspec-core//lib/rspec/core/invocations.rb#7 + def call(*_args); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#78 +class RSpec::Core::Invocations::PrintHelp < ::Struct + # source://rspec-core//lib/rspec/core/invocations.rb#79 + def call(_options, _err, out); end + + # Returns the value of attribute hidden_options + # + # @return [Object] the current value of hidden_options + # + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def hidden_options; end + + # Sets the attribute hidden_options + # + # @param value [Object] the value to set the attribute hidden_options to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def hidden_options=(_); end + + # Returns the value of attribute parser + # + # @return [Object] the current value of parser + # + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def parser; end + + # Sets the attribute parser + # + # @param value [Object] the value to set the attribute parser to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def parser=(_); end + + class << self + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def inspect; end + + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def members; end + + # source://rspec-core//lib/rspec/core/invocations.rb#78 + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#52 +class RSpec::Core::Invocations::PrintVersion + # source://rspec-core//lib/rspec/core/invocations.rb#53 + def call(_options, _err, out); end +end + +# Together with the example group metadata hash default block, +# provides backwards compatibility for the old `:example_group` +# key. In RSpec 2.x, the computed keys of a group's metadata +# were exposed from a nested subhash keyed by `[:example_group]`, and +# then the parent group's metadata was exposed by sub-subhash +# keyed by `[:example_group][:example_group]`. +# +# In RSpec 3, we reorganized this to that the computed keys are +# exposed directly of the group metadata hash (no nesting), and +# `:parent_example_group` returns the parent group's metadata. +# +# Maintaining backwards compatibility was difficult: we wanted +# `:example_group` to return an object that: +# +# * Exposes the top-level metadata keys that used to be nested +# under `:example_group`. +# * Supports mutation (rspec-rails, for example, assigns +# `metadata[:example_group][:described_class]` when you use +# anonymous controller specs) such that changes are written +# back to the top-level metadata hash. +# * Exposes the parent group metadata as +# `[:example_group][:example_group]`. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#470 +class RSpec::Core::LegacyExampleGroupHash + include ::RSpec::Core::HashImitatable + extend ::RSpec::Core::HashImitatable::ClassMethods + + # @return [LegacyExampleGroupHash] a new instance of LegacyExampleGroupHash + # + # source://rspec-core//lib/rspec/core/metadata.rb#473 + def initialize(metadata); end + + # source://rspec-core//lib/rspec/core/metadata.rb#479 + def to_h; end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata.rb#485 + def directly_supports_attribute?(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#489 + def get_value(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#493 + def set_value(name, value); end +end + +# This module is included in {ExampleGroup}, making the methods +# available to be called from within example blocks. +# +# @see ClassMethods +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#9 +module RSpec::Core::MemoizedHelpers + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#135 + def initialize(*_arg0); end + + # Wraps the `subject` in `expect` to make it the target of an expectation. + # Designed to read nicely for one-liners. + # + # @example + # + # describe [1, 2, 3] do + # it { is_expected.to be_an Array } + # it { is_expected.not_to include 4 } + # end + # @note This only works if you are using rspec-expectations. + # @see #should + # @see #should_not + # @see #subject + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#120 + def is_expected; end + + # When `should` is called with no explicit receiver, the call is + # delegated to the object returned by `subject`. Combined with an + # implicit subject this supports very concise expressions. + # + # @example + # + # RSpec.describe Person do + # it { should be_eligible_to_vote } + # end + # @note This only works if you are using rspec-expectations. + # @note If you are using RSpec's newer expect-based syntax you may + # want to use `is_expected.to` instead of `should`. + # @see #is_expected + # @see #subject + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#80 + def should(matcher = T.unsafe(nil), message = T.unsafe(nil)); end + + # Just like `should`, `should_not` delegates to the subject (implicit or + # explicit) of the example group. + # + # @example + # + # RSpec.describe Person do + # it { should_not be_eligible_to_vote } + # end + # @note This only works if you are using rspec-expectations. + # @note If you are using RSpec's newer expect-based syntax you may + # want to use `is_expected.to_not` instead of `should_not`. + # @see #is_expected + # @see #subject + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#100 + def should_not(matcher = T.unsafe(nil), message = T.unsafe(nil)); end + + # @example + # + # # Explicit declaration of subject. + # RSpec.describe Person do + # subject { Person.new(:birthdate => 19.years.ago) } + # it "should be eligible to vote" do + # subject.should be_eligible_to_vote + # # ^ ^ explicit reference to subject not recommended + # end + # end + # + # # Implicit subject => { Person.new }. + # RSpec.describe Person do + # it "should be eligible to vote" do + # subject.should be_eligible_to_vote + # # ^ ^ explicit reference to subject not recommended + # end + # end + # + # # One-liner syntax - expectation is set on the subject. + # RSpec.describe Person do + # it { is_expected.to be_eligible_to_vote } + # # or + # it { should be_eligible_to_vote } + # end + # @note `subject` was contributed by Joe Ferris to support the one-liner + # syntax embraced by shoulda matchers: + # + # RSpec.describe Widget do + # it { is_expected.to validate_presence_of(:name) } + # # or + # it { should validate_presence_of(:name) } + # end + # + # While the examples below demonstrate how to use `subject` + # explicitly in examples, we recommend that you define a method with + # an intention revealing name instead. + # @note Because `subject` is designed to create state that is reset + # between each example, and `before(:context)` is designed to setup + # state that is shared across _all_ examples in an example group, + # `subject` is _not_ intended to be used in a `before(:context)` hook. + # @see #is_expected + # @see #should + # @see #should_not + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#57 + def subject; end + + private + + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#141 + def __init_memoized; end + + # should just be placed in private section, + # but Ruby issues warnings on private attributes. + # and expanding it to the equivalent method upsets Rubocop, + # b/c it should obviously be a reader + # + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#129 + def __memoized; end + + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#150 + def enforce_value_expectation(matcher, method_name); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#163 + def matcher_supports_value_expectations?(matcher); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#542 + def define_helpers_on(example_group); end + + # Gets the named constant or yields. + # On 1.9, const_defined? / const_get take into account the + # the inheritance by default, and accept an argument to + # disable this behavior. It's important that we don't + # consider inheritance here; each example group level that + # uses a `let` should get its own `LetDefinitions` module. + # + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#570 + def get_constant_or_yield(example_group, name); end + + # Gets the LetDefinitions module. The module is mixed into + # the example group and is used to hold all let definitions. + # This is done so that the block passed to `let` can be + # forwarded directly on to `define_method`, so that all method + # constructs (including `super` and `return`) can be used in + # a `let` block. + # + # The memoization is provided by a method definition on the + # example group that supers to the LetDefinitions definition + # in order to get the value to memoize. + # + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#528 + def module_for(example_group); end + end +end + +# This module is extended onto {ExampleGroup}, making the methods +# available to be called from within example group blocks. +# You can think of them as being analagous to class macros. +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#274 +module RSpec::Core::MemoizedHelpers::ClassMethods + # Generates a method whose return value is memoized after the first + # call. Useful for reducing duplication between examples that assign + # values to the same local variable. + # + # @example + # + # RSpec.describe Thing do + # let(:thing) { Thing.new } + # + # it "does something" do + # # First invocation, executes block, memoizes and returns result. + # thing.do_something + # + # # Second invocation, returns the memoized value. + # thing.should be_something + # end + # end + # @note `let` _can_ enhance readability when used sparingly (1,2, or + # maybe 3 declarations) in any given example group, but that can + # quickly degrade with overuse. YMMV. + # @note `let` can be configured to be threadsafe or not. + # If it is threadsafe, it will take longer to access the value. + # If it is not threadsafe, it may behave in surprising ways in examples + # that spawn separate threads. Specify this on `RSpec.configure` + # @note Because `let` is designed to create state that is reset between + # each example, and `before(:context)` is designed to setup state that + # is shared across _all_ examples in an example group, `let` is _not_ + # intended to be used in a `before(:context)` hook. + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#306 + def let(name, &block); end + + # Just like `let`, except the block is invoked by an implicit `before` + # hook. This serves a dual purpose of setting up state and providing a + # memoized reference to that state. + # + # @example + # + # class Thing + # def self.count + # @count ||= 0 + # end + # + # def self.count=(val) + # @count += val + # end + # + # def self.reset_count + # @count = 0 + # end + # + # def initialize + # self.class.count += 1 + # end + # end + # + # RSpec.describe Thing do + # after(:example) { Thing.reset_count } + # + # context "using let" do + # let(:thing) { Thing.new } + # + # it "is not invoked implicitly" do + # Thing.count.should eq(0) + # end + # + # it "can be invoked explicitly" do + # thing + # Thing.count.should eq(1) + # end + # end + # + # context "using let!" do + # let!(:thing) { Thing.new } + # + # it "is invoked implicitly" do + # Thing.count.should eq(1) + # end + # + # it "returns memoized version on first invocation" do + # thing + # Thing.count.should eq(1) + # end + # end + # end + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#400 + def let!(name, &block); end + + # Declares a `subject` for an example group which can then be wrapped + # with `expect` using `is_expected` to make it the target of an + # expectation in a concise, one-line example. + # + # Given a `name`, defines a method with that name which returns the + # `subject`. This lets you declare the subject once and access it + # implicitly in one-liners and explicitly using an intention revealing + # name. + # + # When given a `name`, calling `super` in the block is not supported. + # + # @example + # + # RSpec.describe CheckingAccount, "with $50" do + # subject { CheckingAccount.new(Money.new(50, :USD)) } + # it { is_expected.to have_a_balance_of(Money.new(50, :USD)) } + # it { is_expected.not_to be_overdrawn } + # end + # + # RSpec.describe CheckingAccount, "with a non-zero starting balance" do + # subject(:account) { CheckingAccount.new(Money.new(50, :USD)) } + # it { is_expected.not_to be_overdrawn } + # it "has a balance equal to the starting balance" do + # account.balance.should eq(Money.new(50, :USD)) + # end + # end + # @note `subject` can be configured to be threadsafe or not. + # If it is threadsafe, it will take longer to access the value. + # If it is not threadsafe, it may behave in surprising ways in examples + # that spawn separate threads. Specify this on `RSpec.configure` + # @param block defines the value to be returned by `subject` in examples + # @param name [String, Symbol] used to define an accessor with an + # intention revealing name + # @see MemoizedHelpers#is_expected + # @see MemoizedHelpers#should + # @see MemoizedHelpers#should_not + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#444 + def subject(name = T.unsafe(nil), &block); end + + # Just like `subject`, except the block is invoked by an implicit + # `before` hook. This serves a dual purpose of setting up state and + # providing a memoized reference to that state. + # + # @example + # + # class Thing + # def self.count + # @count ||= 0 + # end + # + # def self.count=(val) + # @count += val + # end + # + # def self.reset_count + # @count = 0 + # end + # + # def initialize + # self.class.count += 1 + # end + # end + # + # RSpec.describe Thing do + # after(:example) { Thing.reset_count } + # + # context "using subject" do + # subject { Thing.new } + # + # it "is not invoked implicitly" do + # Thing.count.should eq(0) + # end + # + # it "can be invoked explicitly" do + # subject + # Thing.count.should eq(1) + # end + # end + # + # context "using subject!" do + # subject!(:thing) { Thing.new } + # + # it "is invoked implicitly" do + # Thing.count.should eq(1) + # end + # + # it "returns memoized version on first invocation" do + # subject + # Thing.count.should eq(1) + # end + # end + # end + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#510 + def subject!(name = T.unsafe(nil), &block); end +end + +# Used internally to customize the behavior of the +# memoized hash when used in a `before(:context)` hook. +# +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#200 +class RSpec::Core::MemoizedHelpers::ContextHookMemoized + class << self + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#222 + def fetch_or_store(key, &_block); end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#201 + def isolate_for_context_hook(example_group_instance); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#256 +class RSpec::Core::MemoizedHelpers::ContextHookMemoized::After < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized + class << self + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#261 + def article; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#257 + def hook_expression; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#265 + def hook_intention; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#241 +class RSpec::Core::MemoizedHelpers::ContextHookMemoized::Before < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized + class << self + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#246 + def article; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#242 + def hook_expression; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#250 + def hook_intention; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#186 +class RSpec::Core::MemoizedHelpers::NonThreadSafeMemoized + # @return [NonThreadSafeMemoized] a new instance of NonThreadSafeMemoized + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#187 + def initialize; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#191 + def fetch_or_store(key); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#170 +class RSpec::Core::MemoizedHelpers::ThreadsafeMemoized + # @return [ThreadsafeMemoized] a new instance of ThreadsafeMemoized + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#171 + def initialize; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#176 + def fetch_or_store(key); end +end + +# Each ExampleGroup class and Example instance owns an instance of +# Metadata, which is Hash extended to support lazy evaluation of values +# associated with keys that may or may not be used by any example or group. +# +# In addition to metadata that is used internally, this also stores +# user-supplied metadata, e.g. +# +# RSpec.describe Something, :type => :ui do +# it "does something", :slow => true do +# # ... +# end +# end +# +# `:type => :ui` is stored in the Metadata owned by the example group, and +# `:slow => true` is stored in the Metadata owned by the example. These can +# then be used to select which examples are run using the `--tag` option on +# the command line, or several methods on `Configuration` used to filter a +# run (e.g. `filter_run_including`, `filter_run_excluding`, etc). +# +# @see Configuration#filter_run_excluding +# @see Configuration#filter_run_including +# @see Example#metadata +# @see ExampleGroup.metadata +# @see FilterManager +# +# source://rspec-core//lib/rspec/core/metadata.rb#27 +module RSpec::Core::Metadata + class << self + # Returns an enumerator that iteratively walks up the given metadata through all + # example group ancestors, yielding each metadata hash along the way. + # + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#71 + def ascend(metadata); end + + # Iteratively walks up from the given metadata through all + # example group ancestors, yielding each metadata hash along the way. + # + # @private + # @yield [metadata] + # + # source://rspec-core//lib/rspec/core/metadata.rb#58 + def ascending(metadata); end + + # Used internally to build a hash from an args array. + # Symbols are converted into hash keys with a value of `true`. + # This is done to support simple tagging using a symbol, rather + # than needing to do `:symbol => true`. + # + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#80 + def build_hash_from(args, warn_about_example_group_filtering = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#94 + def deep_hash_dup(object); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#105 + def id_from(metadata); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#110 + def location_tuple_from(metadata); end + + # @api private + # @param line [String] current code line + # @return [String] relative path to line + # + # source://rspec-core//lib/rspec/core/metadata.rb#44 + def relative_path(line); end + + # Matches strings either at the beginning of the input or prefixed with a + # whitespace, containing the current path, either postfixed with the + # separator, or at the end of the string. Match groups are the character + # before and the character after the string if any. + # + # http://rubular.com/r/fT0gmX6VJX + # http://rubular.com/r/duOrD4i3wb + # http://rubular.com/r/sbAMHFrOx1 + # + # source://rspec-core//lib/rspec/core/metadata.rb#36 + def relative_path_regex; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#247 +class RSpec::Core::Metadata::ExampleGroupHash < ::RSpec::Core::Metadata::HashPopulator + private + + # source://rspec-core//lib/rspec/core/metadata.rb#304 + def described_class; end + + # source://rspec-core//lib/rspec/core/metadata.rb#311 + def full_description; end + + class << self + # source://rspec-core//lib/rspec/core/metadata.rb#265 + def backwards_compatibility_default_proc(&example_group_selector); end + + # source://rspec-core//lib/rspec/core/metadata.rb#248 + def create(parent_group_metadata, user_metadata, example_group_index, *args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#261 + def hash_with_backwards_compatibility_default_proc; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#213 +class RSpec::Core::Metadata::ExampleHash < ::RSpec::Core::Metadata::HashPopulator + private + + # source://rspec-core//lib/rspec/core/metadata.rb#234 + def described_class; end + + # source://rspec-core//lib/rspec/core/metadata.rb#238 + def full_description; end + + class << self + # source://rspec-core//lib/rspec/core/metadata.rb#214 + def create(group_metadata, user_metadata, index_provider, description, block); end + end +end + +# Used internally to populate metadata hashes with computed keys +# managed by RSpec. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#117 +class RSpec::Core::Metadata::HashPopulator + # @return [HashPopulator] a new instance of HashPopulator + # + # source://rspec-core//lib/rspec/core/metadata.rb#120 + def initialize(metadata, user_metadata, index_provider, description_args, block); end + + # Returns the value of attribute block. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def block; end + + # Returns the value of attribute description_args. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def description_args; end + + # Returns the value of attribute metadata. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def metadata; end + + # source://rspec-core//lib/rspec/core/metadata.rb#128 + def populate; end + + # Returns the value of attribute user_metadata. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def user_metadata; end + + private + + # source://rspec-core//lib/rspec/core/metadata.rb#178 + def build_description_from(parent_description = T.unsafe(nil), my_description = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/metadata.rb#185 + def build_scoped_id_for(file_path); end + + # source://rspec-core//lib/rspec/core/metadata.rb#170 + def description_separator(parent_part, child_part); end + + # source://rspec-core//lib/rspec/core/metadata.rb#191 + def ensure_valid_user_keys; end + + # source://rspec-core//lib/rspec/core/metadata.rb#164 + def file_path_and_line_number_from(backtrace); end + + # source://rspec-core//lib/rspec/core/metadata.rb#143 + def populate_location_attributes; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#325 +RSpec::Core::Metadata::RESERVED_KEYS = T.let(T.unsafe(nil), Array) + +# Contains metadata filtering logic. This has been extracted from +# the metadata classes because it operates ON a metadata hash but +# does not manage any of the state in the hash. We're moving towards +# having metadata be a raw hash (not a custom subclass), so externalizing +# this filtering logic helps us move in that direction. +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#8 +module RSpec::Core::MetadataFilter + class << self + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#11 + def apply?(predicate, filters, metadata); end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#16 + def filter_applies?(key, filter_value, metadata); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#33 + def silence_metadata_example_group_deprecations; end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#42 + def filter_applies_to_any_value?(key, value, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#73 + def filters_apply?(key, value, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#46 + def id_filter_applies?(rerun_paths_to_scoped_ids, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#54 + def location_filter_applies?(locations, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#65 + def proc_filter_applies?(key, proc, metadata); end + end +end + +# Provides a single exception instance that provides access to +# multiple sub-exceptions. This is used in situations where a single +# individual spec has multiple exceptions, such as one in the `it` block +# and one in an `after` block. +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#459 +class RSpec::Core::MultipleExceptionError < ::StandardError + include ::RSpec::Core::MultipleExceptionError::InterfaceTag + + # @param exceptions [Array] The initial list of exceptions. + # @return [MultipleExceptionError] a new instance of MultipleExceptionError + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#520 + def initialize(*exceptions); end + + # @return [nil] Provided only for interface compatibility with + # `RSpec::Expectations::MultipleExpectationsNotMetError`. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#517 + def aggregation_block_label; end + + # @return [Hash] Metadata used by RSpec for formatting purposes. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#513 + def aggregation_metadata; end + + # @return [Array] The list of failures and other exceptions, combined. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#510 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#545 + def exception_count_description; end + + # @return [Array] The list of failures. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#504 + def failures; end + + # @note RSpec does not actually use this -- instead it formats each exception + # individually. + # @return [String] Combines all the exception messages into a single string. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#535 + def message; end + + # @return [Array] The list of other errors. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#507 + def other_errors; end + + # @return [String] A summary of the failure, including the block label and a count of failures. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#540 + def summary; end +end + +# Used so there is a common module in the ancestor chain of this class +# and `RSpec::Expectations::MultipleExpectationsNotMetError`, which allows +# code to detect exceptions that are instances of either, without first +# checking to see if rspec-expectations is loaded. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#465 +module RSpec::Core::MultipleExceptionError::InterfaceTag + # Appends the provided exception to the list. + # + # @param exception [Exception] Exception to append to the list. + # @private + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#469 + def add(exception); end + + class << self + # Provides a way to force `ex` to be something that satisfies the multiple + # exception error interface. If it already satisfies it, it will be returned; + # otherwise it will wrap it in a `MultipleExceptionError`. + # + # @private + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#495 + def for(ex); end + end +end + +# Notifications are value objects passed to formatters to provide them +# with information about a particular event of interest. +# +# source://rspec-core//lib/rspec/core/notifications.rb#9 +module RSpec::Core::Notifications; end + +# `CustomNotification` is used when sending custom events to formatters / +# other registered listeners, it creates attributes based on supplied hash +# of options. +# +# source://rspec-core//lib/rspec/core/notifications.rb#512 +class RSpec::Core::Notifications::CustomNotification < ::Struct + class << self + # Build a custom notification based on the supplied option key / values. + # + # @param options [Hash] A hash of method / value pairs to create on this notification + # @return [CustomNotification] + # + # source://rspec-core//lib/rspec/core/notifications.rb#517 + def for(options = T.unsafe(nil)); end + end +end + +# The `DeprecationNotification` is issued by the reporter when a deprecated +# part of RSpec is encountered. It represents information about the +# deprecated call site. +# +# @attr call_site [String] An optional call site from which the deprecation +# was issued +# @attr deprecated [String] A custom message about the deprecation (alias of +# message) +# @attr message [String] A custom message about the deprecation +# @attr replacement [String] An optional replacement for the deprecation +# +# source://rspec-core//lib/rspec/core/notifications.rb#493 +class RSpec::Core::Notifications::DeprecationNotification < ::Struct + # An optional call site from which the deprecation + # was issued + # + # @return [String] the current value of call_site + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def call_site; end + + # An optional call site from which the deprecation + # was issued + # + # @param value [String] the value to set the attribute call_site to. + # @return [String] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def call_site=(_); end + + # A custom message about the deprecation (alias of + # message) + # + # @return [String] the current value of deprecated + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def deprecated; end + + # A custom message about the deprecation (alias of + # message) + # + # @param value [String] the value to set the attribute deprecated to. + # @return [String] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def deprecated=(_); end + + # A custom message about the deprecation + # + # @return [String] the current value of message + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def message; end + + # A custom message about the deprecation + # + # @param value [String] the value to set the attribute message to. + # @return [String] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def message=(_); end + + # An optional replacement for the deprecation + # + # @return [String] the current value of replacement + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def replacement; end + + # An optional replacement for the deprecation + # + # @param value [String] the value to set the attribute replacement to. + # @return [String] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def replacement=(_); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def [](*_arg0); end + + # Convenience way to initialize the notification + # + # @api + # + # source://rspec-core//lib/rspec/core/notifications.rb#499 + def from_hash(data); end + + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def members; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#493 + def new(*_arg0); end + end +end + +# The `ExampleNotification` represents notifications sent by the reporter +# which contain information about the current (or soon to be) example. +# It is used by formatters to access information about that example. +# +# @attr example [RSpec::Core::Example] the current example +# @example +# def example_started(notification) +# puts "Hey I started #{notification.example.description}" +# end +# +# source://rspec-core//lib/rspec/core/notifications.rb#38 +class RSpec::Core::Notifications::ExampleNotification < ::Struct + # the current example + # + # @return [RSpec::Core::Example] the current value of example + # + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def example; end + + # the current example + # + # @param value [RSpec::Core::Example] the value to set the attribute example to. + # @return [RSpec::Core::Example] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def example=(_); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def [](*_arg0); end + + # @private + # + # source://rspec-core//lib/rspec/core/notifications.rb#41 + def for(example); end + + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def members; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#38 + def new(*_arg0); end + end +end + +# The `ExamplesNotification` represents notifications sent by the reporter +# which contain information about the suites examples. +# +# @example +# def stop(notification) +# puts "Hey I ran #{notification.examples.size}" +# end +# +# source://rspec-core//lib/rspec/core/notifications.rb#69 +class RSpec::Core::Notifications::ExamplesNotification + # @return [ExamplesNotification] a new instance of ExamplesNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#70 + def initialize(reporter); end + + # @return [Array] list of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#75 + def examples; end + + # @return [Array] list of failed examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#80 + def failed_examples; end + + # @return [Array] returns failed examples as notifications + # + # source://rspec-core//lib/rspec/core/notifications.rb#97 + def failure_notifications; end + + # @return [String] The list of failed examples, fully formatted in the way + # that RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#110 + def fully_formatted_failed_examples(colorizer = T.unsafe(nil)); end + + # @return [String] The list of pending examples, fully formatted in the + # way that RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#122 + def fully_formatted_pending_examples(colorizer = T.unsafe(nil)); end + + # @return [Array] returns examples as notifications + # + # source://rspec-core//lib/rspec/core/notifications.rb#91 + def notifications; end + + # @return [Array] list of pending examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#85 + def pending_examples; end + + # returns pending examples as notifications + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/notifications.rb#104 + def pending_notifications; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#136 + def format_examples(examples); end +end + +# The `FailedExampleNotification` extends `ExampleNotification` with +# things useful for examples that have failure info -- typically a +# failed or pending spec. +# +# @attr example [RSpec::Core::Example] the current example +# @example +# def example_failed(notification) +# puts "Hey I failed :(" +# puts "Here's my stack trace" +# puts notification.exception.backtrace.join("\n") +# end +# @see ExampleNotification +# +# source://rspec-core//lib/rspec/core/notifications.rb#156 +class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification + # @return [FailedExampleNotification] a new instance of FailedExampleNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#213 + def initialize(example, exception_presenter = T.unsafe(nil)); end + + # Returns the failures colorized formatted backtrace. + # + # @param colorizer [#wrap] An object to colorize the message_lines by + # @return [Array] the examples colorized backtrace lines + # + # source://rspec-core//lib/rspec/core/notifications.rb#195 + def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end + + # Returns the message generated for this failure colorized line by line. + # + # @param colorizer [#wrap] An object to colorize the message_lines by + # @return [Array] The example failure message colorized + # + # source://rspec-core//lib/rspec/core/notifications.rb#180 + def colorized_message_lines(colorizer = T.unsafe(nil)); end + + # @return [String] The example description + # + # source://rspec-core//lib/rspec/core/notifications.rb#165 + def description; end + + # @return [Exception] The example failure + # + # source://rspec-core//lib/rspec/core/notifications.rb#160 + def exception; end + + # Returns the failures formatted backtrace. + # + # @return [Array] the examples backtrace lines + # + # source://rspec-core//lib/rspec/core/notifications.rb#187 + def formatted_backtrace; end + + # @return [String] The failure information fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#201 + def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end + + # @return [Array] The failure information fully formatted in the way that + # RSpec's built-in formatters emit, split by line. + # + # source://rspec-core//lib/rspec/core/notifications.rb#207 + def fully_formatted_lines(failure_number, colorizer = T.unsafe(nil)); end + + # Returns the message generated for this failure line by line. + # + # @return [Array] The example failure message + # + # source://rspec-core//lib/rspec/core/notifications.rb#172 + def message_lines; end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#157 + def new(*_arg0); end + end +end + +# The `GroupNotification` represents notifications sent by the reporter +# which contain information about the currently running (or soon to be) +# example group. It is used by formatters to access information about that +# group. +# +# @attr group [RSpec::Core::ExampleGroup] the current group +# @example +# def example_group_started(notification) +# puts "Hey I started #{notification.group.description}" +# end +# +# source://rspec-core//lib/rspec/core/notifications.rb#258 +class RSpec::Core::Notifications::GroupNotification < ::Struct + # the current group + # + # @return [RSpec::Core::ExampleGroup] the current value of group + # + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def group; end + + # the current group + # + # @param value [RSpec::Core::ExampleGroup] the value to set the attribute group to. + # @return [RSpec::Core::ExampleGroup] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def group=(_); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def members; end + + # source://rspec-core//lib/rspec/core/notifications.rb#258 + def new(*_arg0); end + end +end + +# The `MessageNotification` encapsulates generic messages that the reporter +# sends to formatters. +# +# @attr message [String] the message +# +# source://rspec-core//lib/rspec/core/notifications.rb#264 +class RSpec::Core::Notifications::MessageNotification < ::Struct + # the message + # + # @return [String] the current value of message + # + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def message; end + + # the message + # + # @param value [String] the value to set the attribute message to. + # @return [String] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def message=(_); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def members; end + + # source://rspec-core//lib/rspec/core/notifications.rb#264 + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/notifications.rb#11 +module RSpec::Core::Notifications::NullColorizer + private + + # source://rspec-core//lib/rspec/core/notifications.rb#14 + def wrap(line, _code_or_symbol); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#14 + def wrap(line, _code_or_symbol); end + end +end + +# `NullNotification` represents a placeholder value for notifications that +# currently require no information, but we may wish to extend in future. +# +# source://rspec-core//lib/rspec/core/notifications.rb#506 +class RSpec::Core::Notifications::NullNotification; end + +# @deprecated Use {FailedExampleNotification} instead. +# +# source://rspec-core//lib/rspec/core/notifications.rb#223 +class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end + +# @deprecated Use {FailedExampleNotification} instead. +# +# source://rspec-core//lib/rspec/core/notifications.rb#220 +class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end + +# The `ProfileNotification` holds information about the results of running a +# test suite when profiling is enabled. It is used by formatters to provide +# information at the end of the test run for profiling information. +# +# @attr duration [Float] the time taken (in seconds) to run the suite +# @attr example_groups [Array] example groups run +# @attr examples [Array] the examples run +# @attr number_of_examples [Fixnum] the number of examples to profile +# +# source://rspec-core//lib/rspec/core/notifications.rb#429 +class RSpec::Core::Notifications::ProfileNotification + # @return [ProfileNotification] a new instance of ProfileNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#430 + def initialize(duration, examples, number_of_examples, example_groups); end + + # the time taken (in seconds) to run the suite + # + # @return [Float] the current value of duration + # + # source://rspec-core//lib/rspec/core/notifications.rb#436 + def duration; end + + # the examples run + # + # @return [Array] the current value of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#436 + def examples; end + + # the number of examples to profile + # + # @return [Fixnum] the current value of number_of_examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#436 + def number_of_examples; end + + # @return [String] the percentage of total time taken + # + # source://rspec-core//lib/rspec/core/notifications.rb#455 + def percentage; end + + # @return [Float] the time taken (in seconds) to run the slowest examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#447 + def slow_duration; end + + # @return [Array] the slowest examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#439 + def slowest_examples; end + + # @return [Array] the slowest example groups + # + # source://rspec-core//lib/rspec/core/notifications.rb#464 + def slowest_groups; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#470 + def calculate_slowest_groups; end +end + +# The `SeedNotification` holds the seed used to randomize examples and +# whether that seed has been used or not. +# +# @attr seed [Fixnum] the seed used to randomize ordering +# @attr used [Boolean] whether the seed has been used or not +# +# source://rspec-core//lib/rspec/core/notifications.rb#271 +class RSpec::Core::Notifications::SeedNotification < ::Struct + # @return [String] The seed information fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#282 + def fully_formatted; end + + # the seed used to randomize ordering + # + # @return [Fixnum] the current value of seed + # + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def seed; end + + # the seed used to randomize ordering + # + # @param value [Fixnum] the value to set the attribute seed to. + # @return [Fixnum] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def seed=(_); end + + # @api + # @return [Boolean] has the seed been used? + # + # source://rspec-core//lib/rspec/core/notifications.rb#275 + def seed_used?; end + + # whether the seed has been used or not + # + # @param value [Boolean] the value to set the attribute used to. + # @return [Boolean] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def used=(_); end + + private + + # whether the seed has been used or not + # + # @return [Boolean] the current value of used + # + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def used; end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def members; end + + # source://rspec-core//lib/rspec/core/notifications.rb#271 + def new(*_arg0); end + end +end + +# The `SkippedExampleNotification` extends `ExampleNotification` with +# things useful for specs that are skipped. +# +# @attr example [RSpec::Core::Example] the current example +# @see ExampleNotification +# +# source://rspec-core//lib/rspec/core/notifications.rb#230 +class RSpec::Core::Notifications::SkippedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification + # @return [String] The pending detail fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#235 + def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#231 + def new(*_arg0); end + end +end + +# The `StartNotification` represents a notification sent by the reporter +# when the suite is started. It contains the expected amount of examples +# to be executed, and the load time of RSpec. +# +# @attr count [Fixnum] the number counted +# @attr load_time [Float] the number of seconds taken to boot RSpec +# and load the spec files +# +# source://rspec-core//lib/rspec/core/notifications.rb#26 +class RSpec::Core::Notifications::StartNotification < ::Struct + # the number counted + # + # @return [Fixnum] the current value of count + # + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def count; end + + # the number counted + # + # @param value [Fixnum] the value to set the attribute count to. + # @return [Fixnum] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def count=(_); end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @return [Float] the current value of load_time + # + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def load_time; end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @param value [Float] the value to set the attribute load_time to. + # @return [Float] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def load_time=(_); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def members; end + + # source://rspec-core//lib/rspec/core/notifications.rb#26 + def new(*_arg0); end + end +end + +# The `SummaryNotification` holds information about the results of running +# a test suite. It is used by formatters to provide information at the end +# of the test run. +# +# @attr duration [Float] the time taken (in seconds) to run the suite +# @attr errors_outside_of_examples_count [Integer] the number of errors that +# have occurred processing +# the spec suite +# @attr examples [Array] the examples run +# @attr failed_examples [Array] the failed examples +# @attr load_time [Float] the number of seconds taken to boot RSpec +# and load the spec files +# @attr pending_examples [Array] the pending examples +# +# source://rspec-core//lib/rspec/core/notifications.rb#300 +class RSpec::Core::Notifications::SummaryNotification < ::Struct + include ::RSpec::Core::ShellEscape + + # Formats failures into a rerunable command format. + # + # @api public + # @param colorizer [#wrap] An object which supports wrapping text with + # specific colors. + # @return [String] A colorized summary line. + # + # source://rspec-core//lib/rspec/core/notifications.rb#364 + def colorized_rerun_commands(colorizer = T.unsafe(nil)); end + + # Wraps the results line with colors based on the configured + # colors for failure, pending, and success. Defaults to red, + # yellow, green accordingly. + # + # @api public + # @param colorizer [#wrap] An object which supports wrapping text with + # specific colors. + # @return [String] A colorized results line. + # + # source://rspec-core//lib/rspec/core/notifications.rb#347 + def colorized_totals_line(colorizer = T.unsafe(nil)); end + + # the time taken (in seconds) to run the suite + # + # @return [Float] the current value of duration + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def duration; end + + # the time taken (in seconds) to run the suite + # + # @param value [Float] the value to set the attribute duration to. + # @return [Float] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def duration=(_); end + + # the number of errors that + # have occurred processing + # the spec suite + # + # @return [Integer] the current value of errors_outside_of_examples_count + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def errors_outside_of_examples_count; end + + # the number of errors that + # have occurred processing + # the spec suite + # + # @param value [Integer] the value to set the attribute errors_outside_of_examples_count to. + # @return [Integer] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def errors_outside_of_examples_count=(_); end + + # @api + # @return [Fixnum] the number of examples run + # + # source://rspec-core//lib/rspec/core/notifications.rb#306 + def example_count; end + + # the examples run + # + # @return [Array] the current value of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def examples; end + + # the examples run + # + # @param value [Array] the value to set the attribute examples to. + # @return [Array] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def examples=(_); end + + # the failed examples + # + # @return [Array] the current value of failed_examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def failed_examples; end + + # the failed examples + # + # @param value [Array] the value to set the attribute failed_examples to. + # @return [Array] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def failed_examples=(_); end + + # @api + # @return [Fixnum] the number of failed examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#312 + def failure_count; end + + # @return [String] a formatted version of the time it took to run the + # suite + # + # source://rspec-core//lib/rspec/core/notifications.rb#374 + def formatted_duration; end + + # @return [String] a formatted version of the time it took to boot RSpec + # and load the spec files + # + # source://rspec-core//lib/rspec/core/notifications.rb#380 + def formatted_load_time; end + + # @return [String] The summary information fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#386 + def fully_formatted(colorizer = T.unsafe(nil)); end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @return [Float] the current value of load_time + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def load_time; end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @param value [Float] the value to set the attribute load_time to. + # @return [Float] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def load_time=(_); end + + # @api + # @return [Fixnum] the number of pending examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#318 + def pending_count; end + + # the pending examples + # + # @return [Array] the current value of pending_examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def pending_examples; end + + # the pending examples + # + # @param value [Array] the value to set the attribute pending_examples to. + # @return [Array] the newly set value + # + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def pending_examples=(_); end + + # @api + # @return [String] A line summarising the result totals of the spec run. + # + # source://rspec-core//lib/rspec/core/notifications.rb#324 + def totals_line; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#408 + def duplicate_rerun_locations; end + + # source://rspec-core//lib/rspec/core/notifications.rb#402 + def rerun_argument_for(example); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def inspect; end + + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def members; end + + # source://rspec-core//lib/rspec/core/notifications.rb#300 + def new(*_arg0); end + end +end + +# # Used in place of a {Reporter} for situations where we don't want reporting output. +# +# @private +# +# source://rspec-core//lib/rspec/core/reporter.rb#260 +class RSpec::Core::NullReporter + class << self + private + + # source://rspec-core//lib/rspec/core/reporter.rb#261 + def method_missing(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#4 +module RSpec::Core::Ordering; end + +# Manages ordering configuration. +# +# @note This is not intended to be used externally. Use +# the APIs provided by `RSpec::Core::Configuration` instead. +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#144 +class RSpec::Core::Ordering::ConfigurationManager + # @return [ConfigurationManager] a new instance of ConfigurationManager + # + # source://rspec-core//lib/rspec/core/ordering.rb#147 + def initialize; end + + # source://rspec-core//lib/rspec/core/ordering.rb#190 + def force(hash); end + + # source://rspec-core//lib/rspec/core/ordering.rb#164 + def order=(type); end + + # Returns the value of attribute ordering_registry. + # + # source://rspec-core//lib/rspec/core/ordering.rb#145 + def ordering_registry; end + + # source://rspec-core//lib/rspec/core/ordering.rb#201 + def register_ordering(name, strategy = T.unsafe(nil)); end + + # Returns the value of attribute seed. + # + # source://rspec-core//lib/rspec/core/ordering.rb#145 + def seed; end + + # source://rspec-core//lib/rspec/core/ordering.rb#158 + def seed=(seed); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#154 + def seed_used?; end +end + +# Orders items based on a custom block. +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#71 +class RSpec::Core::Ordering::Custom + # @return [Custom] a new instance of Custom + # + # source://rspec-core//lib/rspec/core/ordering.rb#72 + def initialize(callable); end + + # source://rspec-core//lib/rspec/core/ordering.rb#76 + def order(list); end +end + +# A strategy which delays looking up the ordering until needed +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#83 +class RSpec::Core::Ordering::Delayed + # @return [Delayed] a new instance of Delayed + # + # source://rspec-core//lib/rspec/core/ordering.rb#84 + def initialize(registry, name); end + + # source://rspec-core//lib/rspec/core/ordering.rb#89 + def order(list); end + + private + + # source://rspec-core//lib/rspec/core/ordering.rb#99 + def lookup_strategy; end + + # source://rspec-core//lib/rspec/core/ordering.rb#95 + def strategy; end +end + +# The default global ordering (defined order). +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#7 +class RSpec::Core::Ordering::Identity + # source://rspec-core//lib/rspec/core/ordering.rb#8 + def order(items); end +end + +# Orders items randomly. +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#15 +class RSpec::Core::Ordering::Random + # @return [Random] a new instance of Random + # + # source://rspec-core//lib/rspec/core/ordering.rb#16 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/ordering.rb#25 + def order(items); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#21 + def used?; end + + private + + # http://en.wikipedia.org/wiki/Jenkins_hash_function + # Jenkins provides a good distribution and is simpler than MD5. + # It's a bit slower than MD5 (primarily because `Digest::MD5` is + # implemented in C) but has the advantage of not requiring us + # to load another part of stdlib, which we try to minimize. + # + # source://rspec-core//lib/rspec/core/ordering.rb#39 + def jenkins_hash_digest(string); end +end + +# source://rspec-core//lib/rspec/core/ordering.rb#58 +RSpec::Core::Ordering::Random::MAX_32_BIT = T.let(T.unsafe(nil), Integer) + +# Orders items by modification time (most recent modified first). +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#63 +class RSpec::Core::Ordering::RecentlyModified + # source://rspec-core//lib/rspec/core/ordering.rb#64 + def order(list); end +end + +# Stores the different ordering strategies. +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#107 +class RSpec::Core::Ordering::Registry + # @return [Registry] a new instance of Registry + # + # source://rspec-core//lib/rspec/core/ordering.rb#108 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/ordering.rb#122 + def fetch(name, &fallback); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#126 + def has_strategy?(name); end + + # source://rspec-core//lib/rspec/core/ordering.rb#130 + def register(sym, strategy); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#134 + def used_random_seed?; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/output_wrapper.rb#4 +class RSpec::Core::OutputWrapper + # @private + # @return [OutputWrapper] a new instance of OutputWrapper + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#9 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def <<(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def advise(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def autoclose=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def autoclose?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def beep(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def binmode(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def binmode?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def check_winsize_changed(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def clear_screen(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_on_exec=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_on_exec?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_read(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_write(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def closed?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def console_mode(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def console_mode=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cooked(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cooked!(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_down(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_left(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_right(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_up(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_byte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_char(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_codepoint(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_line(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def echo=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def echo?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def eof(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def eof?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def erase_line(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def erase_screen(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def external_encoding(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fcntl(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fdatasync(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fileno(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def flush(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fsync(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getbyte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getc(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getch(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getpass(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def gets(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def goto(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def goto_column(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def iflush(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def inspect(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def internal_encoding(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ioctl(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ioflush(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def isatty(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def lineno(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def lineno=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#17 + def method_missing(name, *args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def noecho(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nread(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def oflush(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#6 + def output; end + + # @private + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#6 + def output=(_arg0); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def path(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pathconf(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pid(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pos(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pos=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pread(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pressed?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def print(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def printf(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def putc(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def puts(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pwrite(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def raw(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def raw!(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def read(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def read_nonblock(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readbyte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readchar(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readline(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readlines(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readpartial(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ready?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def reopen(*args, &block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#13 + def respond_to?(name, priv = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def rewind(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def scroll_backward(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def scroll_forward(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def seek(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def set_encoding(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def set_encoding_by_bom(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def stat(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sync(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sync=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sysread(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sysseek(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def syswrite(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def tell(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def timeout(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def timeout=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def to_i(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def to_io(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def to_path(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def tty?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ttyname(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ungetbyte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ungetc(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait_priority(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait_readable(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait_writable(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def winsize(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def winsize=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def write(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def write_nonblock(*args, &block); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/option_parser.rb#6 +class RSpec::Core::Parser + # @return [Parser] a new instance of Parser + # + # source://rspec-core//lib/rspec/core/option_parser.rb#13 + def initialize(original_args); end + + # Returns the value of attribute original_args. + # + # source://rspec-core//lib/rspec/core/option_parser.rb#11 + def original_args; end + + # source://rspec-core//lib/rspec/core/option_parser.rb#17 + def parse(source = T.unsafe(nil)); end + + private + + # source://rspec-core//lib/rspec/core/option_parser.rb#312 + def add_tag_filter(options, filter_type, tag_name, value = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#320 + def configure_only_failures(options); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#39 + def parser(options); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#316 + def set_fail_fast(options, value); end + + class << self + # source://rspec-core//lib/rspec/core/option_parser.rb#7 + def parse(args, source = T.unsafe(nil)); end + end +end + +# Provides methods to mark examples as pending. These methods are available +# to be called from within any example or hook. +# +# source://rspec-core//lib/rspec/core/pending.rb#5 +module RSpec::Core::Pending + # Marks an example as pending. The rest of the example will still be + # executed, and if it passes the example will fail to indicate that the + # pending can be removed. + # + # @example + # describe "some behaviour" do + # # reported as "Pending: no reason given" + # it "is pending with no message" do + # pending + # raise "broken" + # end + # + # # reported as "Pending: something else getting finished" + # it "is pending with a custom message" do + # pending("something else getting finished") + # raise "broken" + # end + # end + # @note When using `pending` inside an example body using this method + # hooks, such as `before(:example)`, have already be run. This means that + # a failure from the code in the `before` hook will prevent the example + # from being considered pending, as the example body would not be + # executed. If you need to consider hooks as pending as well you can use + # the pending metadata as an alternative, e.g. + # `it "does something", pending: "message"`. + # @overload pending + # @overload pending + # @param message [String] optional message to add to the summary report. + # + # source://rspec-core//lib/rspec/core/pending.rb#62 + def pending(message = T.unsafe(nil), &_block); end + + # Marks an example as pending and skips execution. + # + # @example + # describe "an example" do + # # reported as "Pending: no reason given" + # it "is skipped with no message" do + # skip + # end + # + # # reported as "Pending: something else getting finished" + # it "is skipped with a custom message" do + # skip "something else getting finished" + # end + # end + # @overload skip + # @overload skip + # @param message [String] optional message to add to the summary report. + # @raise [SkipDeclaredInExample] + # + # source://rspec-core//lib/rspec/core/pending.rb#110 + def skip(message = T.unsafe(nil)); end + + class << self + # Mark example as fixed. + # + # @param example [RSpec::Core::Example] the example to mark as fixed + # @private + # + # source://rspec-core//lib/rspec/core/pending.rb#152 + def mark_fixed!(example); end + + # Mark example as pending. + # + # @param example [RSpec::Core::Example] the example to mark as pending + # @param message_or_bool [Boolean, String] the message to use, or true + # @private + # + # source://rspec-core//lib/rspec/core/pending.rb#135 + def mark_pending!(example, message_or_bool); end + + # Mark example as skipped. + # + # @param example [RSpec::Core::Example] the example to mark as skipped + # @param message_or_bool [Boolean, String] the message to use, or true + # @private + # + # source://rspec-core//lib/rspec/core/pending.rb#124 + def mark_skipped!(example, message_or_bool); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/pending.rb#29 +RSpec::Core::Pending::NOT_YET_IMPLEMENTED = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/pending.rb#26 +RSpec::Core::Pending::NO_REASON_GIVEN = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/pending.rb#22 +class RSpec::Core::Pending::PendingExampleFixedError < ::StandardError; end + +# Raised in the middle of an example to indicate that it should be marked +# as skipped. +# +# source://rspec-core//lib/rspec/core/pending.rb#8 +class RSpec::Core::Pending::SkipDeclaredInExample < ::StandardError + # @return [SkipDeclaredInExample] a new instance of SkipDeclaredInExample + # + # source://rspec-core//lib/rspec/core/pending.rb#11 + def initialize(argument); end + + # Returns the value of attribute argument. + # + # source://rspec-core//lib/rspec/core/pending.rb#9 + def argument; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/profiler.rb#4 +class RSpec::Core::Profiler + # @return [Profiler] a new instance of Profiler + # + # source://rspec-core//lib/rspec/core/profiler.rb#7 + def initialize; end + + # source://rspec-core//lib/rspec/core/profiler.rb#20 + def example_group_finished(notification); end + + # source://rspec-core//lib/rspec/core/profiler.rb#13 + def example_group_started(notification); end + + # Returns the value of attribute example_groups. + # + # source://rspec-core//lib/rspec/core/profiler.rb#11 + def example_groups; end + + # source://rspec-core//lib/rspec/core/profiler.rb#28 + def example_started(notification); end +end + +# source://rspec-core//lib/rspec/core/profiler.rb#5 +RSpec::Core::Profiler::NOTIFICATIONS = T.let(T.unsafe(nil), Array) + +# A reporter will send notifications to listeners, usually formatters for the +# spec suite run. +# +# source://rspec-core//lib/rspec/core/reporter.rb#4 +class RSpec::Core::Reporter + # @return [Reporter] a new instance of Reporter + # + # source://rspec-core//lib/rspec/core/reporter.rb#14 + def initialize(configuration); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#215 + def abort_with(msg, exit_status); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#194 + def close_after; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#155 + def deprecation(hash); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#143 + def example_failed(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#133 + def example_finished(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#122 + def example_group_finished(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#117 + def example_group_started(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#138 + def example_passed(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#149 + def example_pending(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#127 + def example_started(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#28 + def examples; end + + # Reports a run that exited early without having run any examples. + # + # @param exit_code [Integer] the exit_code to be return by the reporter + # + # source://rspec-core//lib/rspec/core/reporter.rb#84 + def exit_early(exit_code); end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#222 + def fail_fast_limit_met?; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#28 + def failed_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#173 + def finish; end + + # Send a custom message to supporting formatters. + # + # @param message [#to_s] A message object to send to formatters + # + # source://rspec-core//lib/rspec/core/reporter.rb#99 + def message(message); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#207 + def notify(event, notification); end + + # Provides a way to notify of an exception that is not tied to any + # particular example (such as an exception encountered in a :suite hook). + # Exceptions will be formatted the same way they normally are. + # + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#163 + def notify_non_example_exception(exception, context_description); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#28 + def pending_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#45 + def prepare_default(loader, output_stream, deprecation_stream); end + + # Publish a custom event to supporting registered formatters. + # + # @param event [Symbol] Name of the custom event to trigger on formatters + # @param options [Hash] Hash of arguments to provide via `CustomNotification` + # @see RSpec::Core::Notifications::CustomNotification + # + # source://rspec-core//lib/rspec/core/reporter.rb#108 + def publish(event, options = T.unsafe(nil)); end + + # Registers a listener to a list of notifications. The reporter will send + # notification of events to all registered listeners. + # + # @param listener [Object] An object that wishes to be notified of reporter + # events + # @param notifications [Array] Array of symbols represents the events a + # listener wishes to subscribe too + # + # source://rspec-core//lib/rspec/core/reporter.rb#37 + def register_listener(listener, *notifications); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#52 + def registered_listeners(notification); end + + # Initializes the report run and yields itself for further reporting. The + # block is required, so that the reporter can manage cleaning up after the + # run. + # + # @example + # + # reporter.report(group.examples.size) do |r| + # example_groups.map {|g| g.run(r) } + # end + # @overload report + # @overload report + # @param expected_example_count [Integer] the number of examples being run + # @yield [Block] block yields itself for further reporting. + # + # source://rspec-core//lib/rspec/core/reporter.rb#71 + def report(expected_example_count); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#89 + def start(expected_example_count, time = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#201 + def stop(notification); end + + private + + # source://rspec-core//lib/rspec/core/reporter.rb#243 + def close; end + + # source://rspec-core//lib/rspec/core/reporter.rb#234 + def ensure_listeners_ready; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#247 + def mute_profile_output?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#253 + def seed_used?; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/reporter.rb#6 +RSpec::Core::Reporter::RSPEC_NOTIFICATIONS = T.let(T.unsafe(nil), RSpec::Core::Set) + +# @private +# +# source://rspec-core//lib/rspec/core/ruby_project.rb#7 +module RSpec::Core::RubyProject + private + + # source://rspec-core//lib/rspec/core/ruby_project.rb#12 + def add_dir_to_load_path(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#8 + def add_to_load_path(*dirs); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#28 + def ascend_until; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#20 + def determine_root; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#24 + def find_first_parent_containing(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#16 + def root; end + + class << self + # source://rspec-core//lib/rspec/core/ruby_project.rb#46 + def add_dir_to_load_path(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#45 + def add_to_load_path(*dirs); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#50 + def ascend_until; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#48 + def determine_root; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#49 + def find_first_parent_containing(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#47 + def root; end + end +end + +# Provides the main entry point to run a suite of RSpec examples. +# +# source://rspec-core//lib/rspec/core/runner.rb#4 +class RSpec::Core::Runner + # @return [Runner] a new instance of Runner + # + # source://rspec-core//lib/rspec/core/runner.rb#75 + def initialize(options, configuration = T.unsafe(nil), world = T.unsafe(nil)); end + + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#7 + def configuration; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#129 + def configure(err, out); end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#194 + def exit_code(examples_passed = T.unsafe(nil)); end + + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#7 + def options; end + + # Configures and runs a spec suite. + # + # @param err [IO] error stream + # @param out [IO] output stream + # + # source://rspec-core//lib/rspec/core/runner.rb#85 + def run(err, out); end + + # Runs the provided example groups. + # + # @param example_groups [Array] groups to run + # @return [Fixnum] exit status code. 0 if all specs passed, + # or the configured failure exit code (1 by default) if specs + # failed. + # + # source://rspec-core//lib/rspec/core/runner.rb#113 + def run_specs(example_groups); end + + # Wires together the various configuration objects and state holders. + # + # @param err [IO] error stream + # @param out [IO] output stream + # + # source://rspec-core//lib/rspec/core/runner.rb#98 + def setup(err, out); end + + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#7 + def world; end + + private + + # source://rspec-core//lib/rspec/core/runner.rb#203 + def persist_example_statuses; end + + class << self + # Register an `at_exit` hook that runs the suite when the process exits. + # + # @note This is not generally needed. The `rspec` command takes care + # of running examples for you without involving an `at_exit` + # hook. This is only needed if you are running specs using + # the `ruby` command, and even then, the normal way to invoke + # this is by requiring `rspec/autorun`. + # + # source://rspec-core//lib/rspec/core/runner.rb#16 + def autorun; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/runner.rb#141 + def autorun_disabled?; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#136 + def disable_autorun!; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#180 + def handle_interrupt; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/runner.rb#146 + def installed_at_exit?; end + + # Runs the suite of specs and exits the process with an appropriate exit + # code. + # + # source://rspec-core//lib/rspec/core/runner.rb#43 + def invoke; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#29 + def perform_at_exit; end + + # Run a suite of RSpec examples. Does not exit. + # + # This is used internally by RSpec to run a suite, but is available + # for use by any other automation tool. + # + # If you want to run this multiple times in the same process, and you + # want files like `spec_helper.rb` to be reloaded, be sure to load `load` + # instead of `require`. + # + # @param args [Array] command-line-supported arguments + # @param err [IO] error stream + # @param out [IO] output stream + # @return [Fixnum] exit status code. 0 if all specs passed, + # or the configured failure exit code (1 by default) if specs + # failed. + # + # source://rspec-core//lib/rspec/core/runner.rb#64 + def run(args, err = T.unsafe(nil), out = T.unsafe(nil)); end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/runner.rb#151 + def running_in_drb?; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#175 + def trap_interrupt; end + end +end + +# We use this to replace `::Set` so we can have the advantage of +# constant time key lookups for unique arrays but without the +# potential to pollute a developers environment with an extra +# piece of the stdlib. This helps to prevent false positive +# builds. +# +# @private +# +# source://rspec-core//lib/rspec/core/set.rb#11 +class RSpec::Core::Set + include ::Enumerable + + # @return [Set] a new instance of Set + # + # source://rspec-core//lib/rspec/core/set.rb#14 + def initialize(array = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/set.rb#23 + def <<(key); end + + # source://rspec-core//lib/rspec/core/set.rb#48 + def clear; end + + # source://rspec-core//lib/rspec/core/set.rb#28 + def delete(key); end + + # source://rspec-core//lib/rspec/core/set.rb#32 + def each(&block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/set.rb#19 + def empty?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/set.rb#37 + def include?(key); end + + # source://rspec-core//lib/rspec/core/set.rb#41 + def merge(values); end +end + +# Exposes {ExampleGroup}-level methods to a module, so you can include that +# module in an {ExampleGroup}. +# +# @example +# +# module LoggedInAsAdmin +# extend RSpec::Core::SharedContext +# before(:example) do +# log_in_as :admin +# end +# end +# +# describe "admin section" do +# include LoggedInAsAdmin +# # ... +# end +# +# source://rspec-core//lib/rspec/core/shared_context.rb#19 +module RSpec::Core::SharedContext + # @private + # + # source://rspec-core//lib/rspec/core/shared_context.rb#28 + def __shared_context_recordings; end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def after(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def append_after(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def append_before(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def around(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def before(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def context(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def describe(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def hooks(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/shared_context.rb#21 + def included(group); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def let(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def let!(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def prepend_after(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def prepend_before(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def subject(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def subject!(*args, &block); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/shared_context.rb#40 + def record(methods); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/shared_context.rb#33 +class RSpec::Core::SharedContext::Recording < ::Struct + # Returns the value of attribute args + # + # @return [Object] the current value of args + # + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block + # + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + # + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def block=(_); end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + # + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + 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 + # + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def method_name=(_); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#34 + def playback_onto(group); end + + class << self + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def [](*_arg0); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def inspect; end + + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def keyword_init?; end + + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def members; end + + # source://rspec-core//lib/rspec/core/shared_context.rb#33 + def new(*_arg0); end + end +end + +# Shared example groups let you define common context and/or common +# examples that you wish to use in multiple example groups. +# +# When defined, the shared group block is stored for later evaluation. +# It can later be included in an example group either explicitly +# (using `include_examples`, `include_context` or `it_behaves_like`) +# or implicitly (via matching metadata). +# +# Named shared example groups are scoped based on where they are +# defined. Shared groups defined in an example group are available +# for inclusion in that example group or any child example groups, +# but not in any parent or sibling example groups. Shared example +# groups defined at the top level can be included from any example group. +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#57 +module RSpec::Core::SharedExampleGroup + # Stores the block for later use. The block will be evaluated + # in the context of an example group via `include_examples`, + # `include_context`, or `it_behaves_like`. + # + # @example + # shared_examples "auditable" do + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end + # end + # + # RSpec.describe Account do + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end + # end + # @overload shared_examples + # @overload shared_examples + # @see ExampleGroup.include_context + # @see ExampleGroup.include_examples + # @see ExampleGroup.it_behaves_like + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#100 + def shared_context(name, *args, &block); end + + # Stores the block for later use. The block will be evaluated + # in the context of an example group via `include_examples`, + # `include_context`, or `it_behaves_like`. + # + # @example + # shared_examples "auditable" do + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end + # end + # + # RSpec.describe Account do + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end + # end + # @overload shared_examples + # @overload shared_examples + # @see ExampleGroup.include_context + # @see ExampleGroup.include_examples + # @see ExampleGroup.it_behaves_like + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + def shared_examples(name, *args, &block); end + + # Stores the block for later use. The block will be evaluated + # in the context of an example group via `include_examples`, + # `include_context`, or `it_behaves_like`. + # + # @example + # shared_examples "auditable" do + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end + # end + # + # RSpec.describe Account do + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end + # end + # @overload shared_examples + # @overload shared_examples + # @see ExampleGroup.include_context + # @see ExampleGroup.include_examples + # @see ExampleGroup.it_behaves_like + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#101 + def shared_examples_for(name, *args, &block); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#149 +class RSpec::Core::SharedExampleGroup::Registry + # source://rspec-core//lib/rspec/core/shared_example_group.rb#150 + def add(context, name, *metadata_args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#174 + def find(lookup_contexts, name); end + + private + + # :nocov: + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#257 + def ensure_block_has_source_location(_block); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#245 + def formatted_location(block); end + + # TODO: remove this in RSpec 4. This exists only to support + # `config.shared_context_metadata_behavior == :trigger_inclusion`, + # the legacy behavior of shared context metadata, which we do + # not want to support in RSpec 4. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#189 + def legacy_add(context, name, *metadata_args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#204 + def shared_example_groups; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#208 + def valid_name?(candidate); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#215 + def warn_if_key_taken(context, key, new_block); end +end + +# Shared examples top level DSL. +# +# @api private +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#106 +module RSpec::Core::SharedExampleGroup::TopLevelDSL + class << self + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#108 + def definitions; end + + # Adds the top level DSL methods to Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#126 + def expose_globally!; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#119 + def exposed_globally?; end + + # Removes the top level DSL methods to Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#135 + def remove_globally!; end + end +end + +# Contains information about the inclusion site of a shared example group. +# +# source://rspec-core//lib/rspec/core/example_group.rb#789 +class RSpec::Core::SharedExampleGroupInclusionStackFrame + # @private + # @return [SharedExampleGroupInclusionStackFrame] a new instance of SharedExampleGroupInclusionStackFrame + # + # source://rspec-core//lib/rspec/core/example_group.rb#796 + def initialize(shared_group_name, inclusion_location); end + + # @return [String] Description of this stack frame, in the form used by + # RSpec's built-in formatters. + # + # source://rspec-core//lib/rspec/core/example_group.rb#812 + def description; end + + # @return [String] The {#inclusion_location}, formatted for display by a formatter. + # + # source://rspec-core//lib/rspec/core/example_group.rb#802 + def formatted_inclusion_location; end + + # @return [String] the location where the shared example was included + # + # source://rspec-core//lib/rspec/core/example_group.rb#793 + def inclusion_location; end + + # @return [String] the name of the shared example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#791 + def shared_group_name; end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#818 + def current_backtrace; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#836 + def shared_example_group_inclusions; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#823 + def with_frame(name, location); end + end +end + +# Represents some functionality that is shared with multiple example groups. +# The functionality is defined by the provided block, which is lazily +# eval'd when the `SharedExampleGroupModule` instance is included in an example +# group. +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#9 +class RSpec::Core::SharedExampleGroupModule < ::Module + # @return [SharedExampleGroupModule] a new instance of SharedExampleGroupModule + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#13 + def initialize(description, definition, metadata); end + + # @private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#11 + def definition; end + + # @private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#34 + def include_in(klass, inclusion_line, args, customization_block); end + + # Ruby callback for when a module is included in another module is class. + # Our definition evaluates the shared group block in the context of the + # including example group. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#28 + def included(klass); end + + # Provides a human-readable representation of this module. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#20 + def inspect; end + + # Provides a human-readable representation of this module. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#23 + def to_s; end +end + +# Deals with the fact that `shellwords` only works on POSIX systems. +# +# @private +# +# source://rspec-core//lib/rspec/core/shell_escape.rb#5 +module RSpec::Core::ShellEscape + private + + # source://rspec-core//lib/rspec/core/shell_escape.rb#32 + def conditionally_quote(id); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/shell_escape.rb#19 + def escape(shell_command); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#8 + def quote(argument); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#37 + def shell_allows_unquoted_ids?; end + + class << self + # source://rspec-core//lib/rspec/core/shell_escape.rb#32 + def conditionally_quote(id); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#19 + def escape(shell_command); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#8 + def quote(argument); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/shell_escape.rb#37 + def shell_allows_unquoted_ids?; end + end +end + +# Known shells that require quoting: zsh, csh, tcsh. +# +# Feel free to add other shells to this list that are known to +# allow `rspec ./some_spec.rb[1:1]` syntax without quoting the id. +# +# @private +# +# source://rspec-core//lib/rspec/core/shell_escape.rb#30 +RSpec::Core::ShellEscape::SHELLS_ALLOWING_UNQUOTED_IDS = T.let(T.unsafe(nil), Array) + +# Provides an execution context for before/after :suite hooks. +# +# @private +# +# source://rspec-core//lib/rspec/core/example.rb#651 +class RSpec::Core::SuiteHookContext < ::RSpec::Core::Example + # @return [SuiteHookContext] a new instance of SuiteHookContext + # + # source://rspec-core//lib/rspec/core/example.rb#652 + def initialize(hook_description, reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#659 + def set_exception(exception); end +end + +# This avoids issues with reporting time caused by examples that +# change the value/meaning of Time.now without properly restoring +# it. +# +# @private +# +# source://rspec-core//lib/rspec/core.rb#174 +class RSpec::Core::Time + class << self + # source://rspec-core//lib/rspec/core.rb#176 + def now(in: T.unsafe(nil)); end + end +end + +# Version information for RSpec Core. +# +# source://rspec-core//lib/rspec/core/version.rb#4 +module RSpec::Core::Version; end + +# Current version of RSpec Core, in semantic versioning format. +# +# source://rspec-core//lib/rspec/core/version.rb#6 +RSpec::Core::Version::STRING = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/warnings.rb#6 +module RSpec::Core::Warnings + # Used internally to print deprecation warnings. + # + # @private + # + # source://rspec-core//lib/rspec/core/warnings.rb#10 + def deprecate(deprecated, data = T.unsafe(nil)); end + + # Used internally to print deprecation warnings. + # + # @private + # + # source://rspec-core//lib/rspec/core/warnings.rb#22 + def warn_deprecation(message, opts = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/warnings.rb#27 + def warn_with(message, options = T.unsafe(nil)); end +end + +# Internal container for global non-configuration data. +# +# @api private +# +# source://rspec-core//lib/rspec/core/world.rb#6 +class RSpec::Core::World + # @api private + # @return [World] a new instance of World + # + # source://rspec-core//lib/rspec/core/world.rb#26 + def initialize(configuration = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#115 + def all_example_groups; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#120 + def all_examples; end + + # Add exclusion filters to announcement message. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#226 + def announce_exclusion_filter(announcements); end + + # Notify reporter of filters. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#171 + def announce_filters; end + + # Add inclusion filters to announcement message. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#217 + def announce_inclusion_filter(announcements); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#210 + def everything_filtered_message; end + + # Get count of examples to be run. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#109 + def example_count(groups = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#8 + def example_group_counts_by_spec_file; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#8 + def example_groups; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#102 + def exclusion_filter; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#69 + def filter_manager; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#8 + def filtered_examples; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#97 + def inclusion_filter; end + + # Used internally to signal that a failure outside of an example + # has occurred, and that therefore the exit status should indicate + # the run failed. + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#24 + def non_example_failure; end + + # Used internally to signal that a failure outside of an example + # has occurred, and that therefore the exit status should indicate + # the run failed. + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#24 + def non_example_failure=(_arg0); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#87 + def num_example_groups_defined_in(file); end + + # Apply ordering strategy from configuration to example groups. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#52 + def ordered_example_groups; end + + # Find line number of previous declaration. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#140 + def preceding_declaration_line(absolute_file_name, filter_line); end + + # Prepares filters so that they apply to example groups when they run. + # + # This is a separate method so that filters can be modified/replaced and + # examples refiltered during a process's lifetime, which can be useful for + # a custom runner. + # + # @api public + # + # source://rspec-core//lib/rspec/core/world.rb#43 + def prepare_example_filtering; end + + # Records an example group. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#81 + def record(example_group); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#74 + def registered_example_group_files; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#205 + def report_filter_message(message); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#149 + def reporter; end + + # Reset world to 'scratch' before running suite. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#60 + def reset; end + + # Used internally to signify that a SystemExit occurred in + # `Configuration#load_file_handling_errors`, and thus examples cannot + # be counted accurately. Specifically, we cannot accurately report + # "No examples found". + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#18 + def rspec_is_quitting; end + + # Used internally to signify that a SystemExit occurred in + # `Configuration#load_file_handling_errors`, and thus examples cannot + # be counted accurately. Specifically, we cannot accurately report + # "No examples found". + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#18 + def rspec_is_quitting=(_arg0); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#92 + def shared_example_group_registry; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#154 + def source_from_file(path); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#164 + def syntax_highlighter; end + + # Traverses the tree of each top level group. + # For each it yields the group, then the children, recursively. + # Halts the traversal of a branch of the tree as soon as the passed block returns true. + # Note that siblings groups and their sub-trees will continue to be explored. + # This is intended to make it easy to find the top-most group that satisfies some + # condition. + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#131 + def traverse_example_group_trees_until(&block); end + + # Used internally to determine what to do when a SIGINT is received. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#11 + def wants_to_quit; end + + # Used internally to determine what to do when a SIGINT is received. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#11 + def wants_to_quit=(_arg0); end + + private + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#234 + def descending_declaration_line_numbers_by_file; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#252 + def fail_if_config_and_cli_options_invalid; end +end + +# Provides a null implementation for initial use by configuration. +# +# @api private +# @private +# +# source://rspec-core//lib/rspec/core/world.rb#264 +module RSpec::Core::World::Null + class << self + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#280 + def all_example_groups; end + + # :nocov: + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#276 + def example_groups; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#265 + def non_example_failure; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#266 + def non_example_failure=(_); end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#268 + def registered_example_group_files; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#272 + def traverse_example_group_trees_until(&_block); end + end +end + +# Namespace for the example group subclasses generated by top-level +# `describe`. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#846 +module RSpec::ExampleGroups + extend ::RSpec::Support::RecursiveConstMethods + + class << self + # source://rspec-core//lib/rspec/core/example_group.rb#849 + def assign_const(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#869 + def base_name_for(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#857 + def constant_scope_for(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#902 + def disambiguate(name, const_scope); end + + # source://rspec-core//lib/rspec/core/example_group.rb#863 + def remove_all_constants; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core.rb#187 +RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/shared_context.rb#54 +RSpec::SharedContext = RSpec::Core::SharedContext diff --git a/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi b/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi new file mode 100644 index 0000000..a088a56 --- /dev/null +++ b/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi @@ -0,0 +1,8201 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-expectations` gem. +# Please instead update this file by running `bin/tapioca gem rspec-expectations`. + + +# RSpec's top level namespace. All of rspec-expectations is contained +# in the `RSpec::Expectations` and `RSpec::Matchers` namespaces. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#1 +module RSpec; end + +# RSpec::Expectations provides a simple, readable API to express +# the expected outcomes in a code example. To express an expected +# outcome, wrap an object or block in `expect`, call `to` or `to_not` +# (aliased as `not_to`) and pass it a matcher object: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# expect(list).to include(user) +# expect(message).not_to match(/foo/) +# expect { do_something }.to raise_error +# +# The last form (the block form) is needed to match against ruby constructs +# that are not objects, but can only be observed when executing a block +# of code. This includes raising errors, throwing symbols, yielding, +# and changing values. +# +# When `expect(...).to` is invoked with a matcher, it turns around +# and calls `matcher.matches?()`. For example, +# in the expression: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# +# ...`eq(Money.new(5.55, :USD))` returns a matcher object, and it results +# in the equivalent of `eq.matches?(order.total)`. If `matches?` returns +# `true`, the expectation is met and execution continues. If `false`, then +# the spec fails with the message returned by `eq.failure_message`. +# +# Given the expression: +# +# expect(order.entries).not_to include(entry) +# +# ...the `not_to` method (also available as `to_not`) invokes the equivalent of +# `include.matches?(order.entries)`, but it interprets `false` as success, and +# `true` as a failure, using the message generated by +# `include.failure_message_when_negated`. +# +# rspec-expectations ships with a standard set of useful matchers, and writing +# your own matchers is quite simple. +# +# See [RSpec::Matchers](../RSpec/Matchers) for more information about the +# built-in matchers that ship with rspec-expectations, and how to write your +# own custom matchers. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#2 +module RSpec::Expectations + class << self + # The configuration object. + # + # @return [RSpec::Expectations::Configuration] the configuration object + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#237 + def configuration; end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#13 + def differ; end + + # Raises an RSpec::Expectations::ExpectationNotMetError with message. + # Adds a diff to the failure message when `expected` and `actual` are + # both present. + # + # @param actual [Object] + # @param expected [Object] + # @param message [String] + # + # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#27 + def fail_with(message, expected = T.unsafe(nil), actual = T.unsafe(nil)); end + end +end + +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#136 +class RSpec::Expectations::BlockExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 + def not_to(matcher, message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#137 + def to(matcher, message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#146 + def to_not(matcher, message = T.unsafe(nil), &block); end + + private + + # @raise [ExpectationNotMetError] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#150 + def enforce_block_expectation(matcher); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#158 + def supports_block_expectations?(matcher); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#4 +class RSpec::Expectations::BlockSnippetExtractor + # @return [BlockSnippetExtractor] a new instance of BlockSnippetExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#17 + def initialize(proc, method_name); end + + # Ideally we should properly handle indentations of multiline snippet, + # but it's not implemented yet since because we use result of this method only when it's a + # single line and implementing the logic introduces additional complexity. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#25 + def body_content_lines; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 + def method_name; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 + def proc; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#62 + def beginning_line_number; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#39 + def block_token_extractor; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#58 + def file_path; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#31 + def raw_body_lines; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#35 + def raw_body_snippet; end + + # @raise [TargetNotFoundError] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#44 + def source; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#66 + def source_location; end + + class << self + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#9 + def try_extracting_single_line_body_of(proc, method_name); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#72 +class RSpec::Expectations::BlockSnippetExtractor::AmbiguousTargetError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Locates target block with node information (semantics), which tokens don't have. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 +class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < ::Struct + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def beginning_line_number; end + + # Sets the attribute beginning_line_number + # + # @param value [Object] the value to set the attribute beginning_line_number to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def beginning_line_number=(_); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#205 + def body_content_locations; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#201 + def method_call_location; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + 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 + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def source=(_); end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#218 + def block_body_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#223 + def block_wrapper_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#234 + def candidate_block_wrapper_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#243 + def candidate_method_ident_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#211 + def method_ident_node; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#249 + def method_ident_node?(node); end + + class << self + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def [](*_arg0); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def inspect; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def keyword_init?; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def members; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#200 + def new(*_arg0); end + end +end + +# Performs extraction of block body snippet using tokens, +# which cannot be done with node information. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 +class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < ::Struct + # @return [BlockTokenExtractor] a new instance of BlockTokenExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#80 + def initialize(*_arg0); end + + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def beginning_line_number; end + + # Sets the attribute beginning_line_number + # + # @param value [Object] the value to set the attribute beginning_line_number to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def beginning_line_number=(_); end + + # Returns the value of attribute body_tokens. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 + def body_tokens; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + 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 + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def source=(_); end + + # Returns the value of attribute state. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 + def state; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#126 + def after_beginning_of_args_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#130 + def after_beginning_of_body_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#109 + def after_method_call_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#113 + def after_opener_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#193 + def block_locator; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#187 + def correct_block?(body_tokens); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#143 + def finalize_pending_tokens!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#97 + def finish!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#149 + def finish_or_find_next_block_if_incorrect!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#170 + def handle_closer_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#160 + def handle_opener_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#105 + def initial_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#101 + def invoke_state_handler(token); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#166 + def opener_token?(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#179 + def opener_token_stack; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#87 + def parse!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#139 + def pending_tokens; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#183 + def pipe_token?(token); end + + class << self + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def [](*_arg0); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def inspect; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def keyword_init?; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def members; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#77 + def new(*_arg0); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#70 +class RSpec::Expectations::BlockSnippetExtractor::Error < ::StandardError; end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#71 +class RSpec::Expectations::BlockSnippetExtractor::TargetNotFoundError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Provides configuration options for rspec-expectations. +# If you are using rspec-core, you can access this via a +# block passed to `RSpec::Core::Configuration#expect_with`. +# Otherwise, you can access it via RSpec::Expectations.configuration. +# +# @example +# RSpec.configure do |rspec| +# rspec.expect_with :rspec do |c| +# # c is the config object +# end +# end +# +# # or +# +# RSpec::Expectations.configuration +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#20 +class RSpec::Expectations::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#29 + def initialize; end + + # :nocov: Because this is only really _useful_ on 1.8, and hard to test elsewhere. + # + # Adds `should` and `should_not` to the given classes + # or modules. This can be used to ensure `should` works + # properly on things like proxy objects (particular + # `Delegator`-subclassed objects on 1.8). + # + # @param modules [Array] the list of classes or modules + # to add `should` and `should_not` to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#116 + def add_should_and_should_not_to(*modules); end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#134 + def backtrace_formatter; end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#133 + def backtrace_formatter=(_arg0); end + + # Indicates whether or not diffs should be colored. + # Delegates to rspec-core's color option if rspec-core + # is loaded; otherwise you can set it here. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#88 + def color?; end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#230 + def false_positives_handler; end + + # Sets if custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. + # + # @param value [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#145 + def include_chain_clauses_in_custom_matcher_descriptions=(_arg0); end + + # Indicates whether or not custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. It is + # false by default for backwards compatibility. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#150 + def include_chain_clauses_in_custom_matcher_descriptions?; end + + # Configures the maximum character length that RSpec will print while + # formatting an object. You can set length to nil to prevent RSpec from + # doing truncation. + # + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.max_formatted_output_length = 200 + # end + # end + # @param length [Fixnum] the number of characters to limit the formatted output to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#70 + def max_formatted_output_length=(length); end + + # Configures what RSpec will do about matcher use which would potentially cause + # false positives in tests. Defaults to `:warn` since this is generally the desired behavior, + # but can also be set to `:raise` or `:nothing`. + # + # @overload on_potential_false_positives + # @overload on_potential_false_positives= + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#192 + def on_potential_false_positives; end + + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#194 + def on_potential_false_positives=(behavior); end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#155 + def reset_syntaxes_to_default; end + + # Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict), + # or `be_truthy` / `be_falsey` (not strict). + # Historically, the default was `false`, but `true` is recommended. + # + # @overload strict_predicate_matchers + # @overload strict_predicate_matchers= + # @overload strict_predicate_matchers? + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#211 + def strict_predicate_matchers; end + + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#213 + def strict_predicate_matchers=(value); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#218 + def strict_predicate_matchers?; end + + # The list of configured syntaxes. + # + # @example + # unless RSpec::Matchers.configuration.syntax.include?(:expect) + # raise "this RSpec extension gem requires the rspec-expectations `:expect` syntax" + # end + # @return [Array] the list of configured syntaxes. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#80 + def syntax; end + + # Configures the supported syntax. + # + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.syntax = :should + # # or + # c.syntax = :expect + # # or + # c.syntax = [:should, :expect] + # end + # end + # @param values [Array, Symbol] the syntaxes to enable + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#46 + def syntax=(values); end + + # Configures whether RSpec will warn about matcher use which will + # potentially cause false positives in tests. + # + # @param boolean [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#173 + def warn_about_potential_false_positives=(boolean); end + + # Indicates whether RSpec will warn about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#225 + def warn_about_potential_false_positives?; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#22 +RSpec::Expectations::Configuration::FALSE_POSITIVE_BEHAVIOURS = T.let(T.unsafe(nil), Hash) + +# Null implementation of a backtrace formatter used by default +# when rspec-core is not loaded. Does no filtering. +# +# @api private +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#163 +module RSpec::Expectations::Configuration::NullBacktraceFormatter + class << self + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#164 + def format_backtrace(backtrace); end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#4 +module RSpec::Expectations::ExpectationHelper + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#5 + def check_message(msg); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#32 + def handle_failure(matcher, message, failure_message_method); end + + # Returns an RSpec-3+ compatible matcher, wrapping a legacy one + # in an adapter if necessary. + # + # @private + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#18 + def modern_matcher_from(matcher); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#23 + def with_matcher(handler, matcher, message); end + end +end + +# Exception raised when an expectation fails. +# +# the user sets an expectation, it can't be caught in their +# code by a bare `rescue`. +# +# @api public +# @note We subclass Exception so that in a stub implementation if +# +# source://rspec-expectations//lib/rspec/expectations.rb#67 +class RSpec::Expectations::ExpectationNotMetError < ::Exception; end + +# Wraps the target of an expectation. +# +# @example +# expect(something) # => ExpectationTarget wrapping something +# expect { do_something } # => ExpectationTarget wrapping the block +# +# # used with `to` +# expect(actual).to eq(3) +# +# # with `not_to` +# expect(actual).not_to eq(3) +# @note `ExpectationTarget` is not intended to be instantiated +# directly by users. Use `expect` instead. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#17 +class RSpec::Expectations::ExpectationTarget + include ::RSpec::Expectations::ExpectationTarget::InstanceMethods + + # @api private + # @return [ExpectationTarget] a new instance of ExpectationTarget + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#31 + def initialize(value); end + + # @note this name aligns with `Minitest::Expectation` so that our + # {InstanceMethods} module can be included in that class when + # used in a Minitest context. + # @return [Object] the target of the expectation + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#28 + def target; end + + class << self + # @private + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#36 + def for(value, block); end + end +end + +# Defines instance {ExpectationTarget} instance methods. These are defined +# in a module so we can include it in `Minitest::Expectation` when +# `rspec/expectations/minitest_integration` is loaded in order to +# support usage with Minitest. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#53 +module RSpec::Expectations::ExpectationTarget::InstanceMethods + # Runs the given expectation, passing if `matcher` returns false. + # + # @example + # expect(value).not_to eq(5) + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns true. + # + # @example + # expect(value).to eq(5) + # expect { perform }.to raise_error + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] true if the expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#63 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns false. + # + # @example + # expect(value).not_to eq(5) + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#80 + def to_not(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#84 + def prevent_operator_matchers(verb); end +end + +# Used as a sentinel value to be able to tell when the user +# did not pass an argument. We can't use `nil` for that because +# `nil` is a valid value to pass. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#22 +module RSpec::Expectations::ExpectationTarget::UndefinedValue; end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#4 +class RSpec::Expectations::FailureAggregator + # @return [FailureAggregator] a new instance of FailureAggregator + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#97 + def initialize(block_label, metadata); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#27 + def aggregate; end + + # Returns the value of attribute block_label. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 + def block_label; end + + # This method is defined to satisfy the callable interface + # expected by `RSpec::Support.with_failure_notifier`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#64 + def call(failure, options); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#54 + def failures; end + + # Returns the value of attribute metadata. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 + def metadata; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#58 + def other_errors; end + + private + + # Using `caller` performs better (and is simpler) than `raise` on most Rubies. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#92 + def assign_backtrace(failure); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#103 + def notify_aggregated_failures; end +end + +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#25 +RSpec::Expectations::FailureAggregator::AGGREGATED_FAILURE = T.let(T.unsafe(nil), RSpec::Expectations::FailureAggregator::AggregatedFailure) + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#8 +class RSpec::Expectations::FailureAggregator::AggregatedFailure + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#19 + def inspect; end +end + +# :nocov: +# `inspect` was apparently used by some versions early in ruby 3 while constructing +# NoMethodError, but seems to be no longer. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#14 +RSpec::Expectations::FailureAggregator::AggregatedFailure::MESSAGE = T.let(T.unsafe(nil), String) + +# RSpec 3.0 was released with the class name misspelled. For SemVer compatibility, +# we will provide this misspelled alias until 4.0. +# +# @deprecated Use LegacyMatcherAdapter instead. +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#179 +RSpec::Expectations::LegacyMacherAdapter = RSpec::Expectations::LegacyMatcherAdapter + +# Wraps a matcher written against one of the legacy protocols in +# order to present the current protocol. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#112 +class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator + # @return [LegacyMatcherAdapter] a new instance of LegacyMatcherAdapter + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#113 + def initialize(matcher); end + + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#123 + def wrap(matcher); end + end +end + +# Before RSpec 1.2, the failure message protocol was: +# * `failure_message` +# * `negative_failure_message` +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#156 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#157 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#161 + def failure_message_when_negated; end + + class << self + # Note: `failure_message` is part of the RSpec 3 protocol + # (paired with `failure_message_when_negated`), so we don't check + # for `failure_message` here. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#168 + def interface_matches?(matcher); end + end +end + +# Starting in RSpec 1.2 (and continuing through all 2.x releases), +# the failure message protocol was: +# * `failure_message_for_should` +# * `failure_message_for_should_not` +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#132 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#133 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#137 + def failure_message_when_negated; end + + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#141 + def interface_matches?(matcher); end + end +end + +# Exception raised from `aggregate_failures` when multiple expectations fail. +# +# @note The constant is defined here but the extensive logic of this class +# is lazily defined when `FailureAggregator` is autoloaded, since we do +# not need to waste time defining that functionality unless +# `aggregate_failures` is used. +# +# source://rspec-expectations//lib/rspec/expectations.rb#76 +class RSpec::Expectations::MultipleExpectationsNotMetError < ::RSpec::Expectations::ExpectationNotMetError + # @return [MultipleExpectationsNotMetError] a new instance of MultipleExpectationsNotMetError + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#160 + def initialize(failure_aggregator); end + + # @return [String] The user-assigned label for the aggregation block. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#135 + def aggregation_block_label; end + + # @return [Hash] The metadata hash passed to `aggregate_failures`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#140 + def aggregation_metadata; end + + # @return [Array] The list of expectation failures and other exceptions, combined. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#132 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#151 + def exception_count_description; end + + # @return [Array] The list of expectation failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#122 + def failures; end + + # @return [String] The fully formatted exception message. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#117 + def message; end + + # @return [Array] The list of other exceptions. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#127 + def other_errors; end + + # @return [String] A summary of the failure, including the block label and a count of failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#145 + def summary; end + + private + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#192 + def backtrace_line(line); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#165 + def block_description; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#174 + def enumerated(exceptions, index_offset); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#204 + def enumerated_errors; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#200 + def enumerated_failures; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#182 + def exclusion_patterns; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#188 + def format_backtrace(backtrace); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#219 + def indentation; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#210 + def indented(failure_message, index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#231 + def index_label(index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#223 + def longest_index_label_width; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#170 + def pluralize(noun, count); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#227 + def width_of_label(index); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#73 +class RSpec::Expectations::NegativeExpectationHandler + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#87 + def does_not_match?(matcher, actual, &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#74 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#103 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#99 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#95 + def verb; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#45 +class RSpec::Expectations::PositiveExpectationHandler + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#46 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#67 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#63 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#59 + def verb; end + end +end + +# Provides methods for enabling and disabling the available +# syntaxes provided by rspec-expectations. +# +# @api private +# +# source://rspec-expectations//lib/rspec/expectations/syntax.rb#6 +module RSpec::Expectations::Syntax + private + + # Determines where we add `should` and `should_not`. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 + def default_should_host; end + + # Disables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `expect` syntax is enabled. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `should` syntax is enabled. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 + def warn_about_should!; end + + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 + def warn_about_should_unless_configured(method_name); end + + class << self + # Determines where we add `should` and `should_not`. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 + def default_should_host; end + + # Disables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `expect` syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `should` syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 + def warn_about_should!; end + + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 + def warn_about_should_unless_configured(method_name); end + end +end + +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#98 +class RSpec::Expectations::ValueExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#104 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#99 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#111 + def enforce_value_expectation(matcher); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#126 + def supports_value_expectations?(matcher); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/version.rb#4 +module RSpec::Expectations::Version; end + +# source://rspec-expectations//lib/rspec/expectations/version.rb#5 +RSpec::Expectations::Version::STRING = T.let(T.unsafe(nil), String) + +# RSpec::Matchers provides a number of useful matchers we use to define +# expectations. Any object that implements the [matcher protocol](Matchers/MatcherProtocol) +# can be used as a matcher. +# +# ## Predicates +# +# In addition to matchers that are defined explicitly, RSpec will create +# custom matchers on the fly for any arbitrary predicate, giving your specs a +# much more natural language feel. +# +# A Ruby predicate is a method that ends with a "?" and returns true or false. +# Common examples are `empty?`, `nil?`, and `instance_of?`. +# +# All you need to do is write `expect(..).to be_` followed by the predicate +# without the question mark, and RSpec will figure it out from there. +# For example: +# +# expect([]).to be_empty # => [].empty?() | passes +# expect([]).not_to be_empty # => [].empty?() | fails +# +# In addition to prefixing the predicate matchers with "be_", you can also use "be_a_" +# and "be_an_", making your specs read much more naturally: +# +# expect("a string").to be_an_instance_of(String) # =>"a string".instance_of?(String) # passes +# +# expect(3).to be_a_kind_of(Integer) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_a_kind_of(Numeric) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_an_instance_of(Integer) # => 3.instance_of?(Integer) | passes +# expect(3).not_to be_an_instance_of(Numeric) # => 3.instance_of?(Numeric) | fails +# +# RSpec will also create custom matchers for predicates like `has_key?`. To +# use this feature, just state that the object should have_key(:key) and RSpec will +# call has_key?(:key) on the target. For example: +# +# expect(:a => "A").to have_key(:a) +# expect(:a => "A").to have_key(:b) # fails +# +# You can use this feature to invoke any predicate that begins with "has_", whether it is +# part of the Ruby libraries (like `Hash#has_key?`) or a method you wrote on your own class. +# +# Note that RSpec does not provide composable aliases for these dynamic predicate +# matchers. You can easily define your own aliases, though: +# +# RSpec::Matchers.alias_matcher :a_user_who_is_an_admin, :be_an_admin +# expect(user_list).to include(a_user_who_is_an_admin) +# +# ## Alias Matchers +# +# With {RSpec::Matchers.alias_matcher}, you can easily create an +# alternate name for a given matcher. +# +# The description will also change according to the new name: +# +# RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to +# sum_to(3).description # => "sum to 3" +# a_list_that_sums_to(3).description # => "a list that sums to 3" +# +# or you can specify a custom description like this: +# +# RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| +# description.sub("be sorted by", "a list sorted by") +# end +# +# be_sorted_by(:age).description # => "be sorted by age" +# a_list_sorted_by(:age).description # => "a list sorted by age" +# +# ## Custom Matchers +# +# When you find that none of the stock matchers provide a natural feeling +# expectation, you can very easily write your own using RSpec's matcher DSL +# or writing one from scratch. +# +# ### Matcher DSL +# +# Imagine that you are writing a game in which players can be in various +# zones on a virtual board. To specify that bob should be in zone 4, you +# could say: +# +# expect(bob.current_zone).to eql(Zone.new("4")) +# +# But you might find it more expressive to say: +# +# expect(bob).to be_in_zone("4") +# +# and/or +# +# expect(bob).not_to be_in_zone("3") +# +# You can create such a matcher like so: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# end +# +# This will generate a be_in_zone method that returns a matcher +# with logical default messages for failures. You can override the failure +# messages and the generated description as follows: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# +# failure_message do |player| +# # generate and return the appropriate string. +# end +# +# failure_message_when_negated do |player| +# # generate and return the appropriate string. +# end +# +# description do +# # generate and return the appropriate string. +# end +# end +# +# Each of the message-generation methods has access to the block arguments +# passed to the create method (in this case, zone). The +# failure message methods (failure_message and +# failure_message_when_negated) are passed the actual value (the +# receiver of expect(..) or expect(..).not_to). +# +# ### Custom Matcher from scratch +# +# You could also write a custom matcher from scratch, as follows: +# +# class BeInZone +# def initialize(expected) +# @expected = expected +# end +# +# def matches?(target) +# @target = target +# @target.current_zone.eql?(Zone.new(@expected)) +# end +# +# def failure_message +# "expected #{@target.inspect} to be in Zone #{@expected}" +# end +# +# def failure_message_when_negated +# "expected #{@target.inspect} not to be in Zone #{@expected}" +# end +# end +# +# ... and a method like this: +# +# def be_in_zone(expected) +# BeInZone.new(expected) +# end +# +# And then expose the method to your specs. This is normally done +# by including the method and the class in a module, which is then +# included in your spec: +# +# module CustomGameMatchers +# class BeInZone +# # ... +# end +# +# def be_in_zone(expected) +# # ... +# end +# end +# +# describe "Player behaviour" do +# include CustomGameMatchers +# # ... +# end +# +# or you can include in globally in a spec_helper.rb file required +# from your spec file(s): +# +# RSpec::configure do |config| +# config.include(CustomGameMatchers) +# end +# +# ### Making custom matchers composable +# +# RSpec's built-in matchers are designed to be composed, in expressions like: +# +# expect(["barn", 2.45]).to contain_exactly( +# a_value_within(0.1).of(2.5), +# a_string_starting_with("bar") +# ) +# +# Custom matchers can easily participate in composed matcher expressions like these. +# Include {RSpec::Matchers::Composable} in your custom matcher to make it support +# being composed (matchers defined using the DSL have this included automatically). +# Within your matcher's `matches?` method (or the `match` block, if using the DSL), +# use `values_match?(expected, actual)` rather than `expected == actual`. +# Under the covers, `values_match?` is able to match arbitrary +# nested data structures containing a mix of both matchers and non-matcher objects. +# It uses `===` and `==` to perform the matching, considering the values to +# match if either returns `true`. The `Composable` mixin also provides some helper +# methods for surfacing the matcher descriptions within your matcher's description +# or failure messages. +# +# RSpec's built-in matchers each have a number of aliases that rephrase the matcher +# from a verb phrase (such as `be_within`) to a noun phrase (such as `a_value_within`), +# which reads better when the matcher is passed as an argument in a composed matcher +# expressions, and also uses the noun-phrase wording in the matcher's `description`, +# for readable failure messages. You can alias your custom matchers in similar fashion +# using {RSpec::Matchers.alias_matcher}. +# +# ## Negated Matchers +# +# Sometimes if you want to test for the opposite using a more descriptive name +# instead of using `not_to`, you can use {RSpec::Matchers.define_negated_matcher}: +# +# RSpec::Matchers.define_negated_matcher :exclude, :include +# include(1, 2).description # => "include 1 and 2" +# exclude(1, 2).description # => "exclude 1 and 2" +# +# While the most obvious negated form may be to add a `not_` prefix, +# the failure messages you get with that form can be confusing (e.g. +# "expected [actual] to not [verb], but did not"). We've found it works +# best to find a more positive name for the negated form, such as +# `avoid_changing` rather than `not_change`. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#2 +module RSpec::Matchers + extend ::RSpec::Matchers::DSL + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param message [Symbol] the message to send the receiver + # @param receiver [Object] + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_changing(*args, **_arg1, &block); end + + # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. + # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_outputting(*args, **_arg1, &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_raising(*args, **_arg1, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_throwing(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_yielding_control(*args, **_arg1, &block); end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_yielding_successive_args(*args, **_arg1, &block); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_yielding_with_args(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_block_yielding_with_no_args(*args, **_arg1, &block); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_collection_containing_exactly(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_collection_ending_with(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_collection_including(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_collection_starting_with(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_falsey_value(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_falsy_value(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_hash_including(*args, **_arg1, &block); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_kind_of(*args, **_arg1, &block); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_nil_value(*args, **_arg1, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_range_covering(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_string_ending_with(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_string_including(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_string_matching(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_string_starting_with(*args, **_arg1, &block); end + + # Passes if actual is truthy (anything but false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_truthy_value(*args, **_arg1, &block); end + + # Given true, false, or nil, will pass if actual value is true, false or + # nil (respectively). Given no args means the caller should satisfy an if + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_value(*args, **_arg1, &block); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_value_between(*args, **_arg1, &block); end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def a_value_within(*args, **_arg1, &block); end + + # Allows multiple expectations in the provided block to fail, and then + # aggregates them into a single exception, rather than aborting on the + # first expectation failure like normal. This allows you to see all + # failures from an entire set of expectations without splitting each + # off into its own example (which may slow things down if the example + # setup is expensive). + # + # @example + # aggregate_failures("verifying response") do + # expect(response.status).to eq(200) + # expect(response.headers).to include("Content-Type" => "text/plain") + # expect(response.body).to include("Success") + # end + # @note The implementation of this feature uses a thread-local variable, + # which means that if you have an expectation failure in another thread, + # it'll abort like normal. + # @param label [String] label for this aggregation block, which will be + # included in the aggregated exception message. + # @param metadata [Hash] additional metadata about this failure aggregation + # block. If multiple expectations fail, it will be exposed from the + # {Expectations::MultipleExpectationsNotMetError} exception. Mostly + # intended for internal RSpec use but you can use it as well. + # @raise [Expectations::MultipleExpectationsNotMetError] raised when + # multiple expectations fail. + # @raise [Expectations::ExpectationNotMetError] raised when a single + # expectation fails. + # @raise [Exception] other sorts of exceptions will be raised as normal. + # @yield Block containing as many expectation as you want. The block is + # simply yielded to, so you can trust that anything that works outside + # the block should work within it. + # + # source://rspec-expectations//lib/rspec/matchers.rb#305 + def aggregate_failures(label = T.unsafe(nil), metadata = T.unsafe(nil), &block); end + + # Passes if the provided matcher passes when checked against all + # elements of the collection. + # + # @example + # expect([1, 3, 5]).to all be_odd + # expect([1, 3, 6]).to all be_odd # fails + # @example + # expect([1, 3, 5]).to all( be_odd.and be_an(Integer) ) + # @note The negative form `not_to all` is not supported. Instead + # use `not_to include` or pass a negative form of a matcher + # as the argument (e.g. `all exclude(:foo)`). + # @note You can also use this with compound matchers as well. + # + # source://rspec-expectations//lib/rspec/matchers.rb#662 + def all(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # @see #contain_exactly + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_array_matching(*args, **_arg1, &block); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_instance_of(*args, **_arg1, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_eq_to(*args, **_arg1, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_eql_to(*args, **_arg1, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_equal_to(*args, **_arg1, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_existing(*args, **_arg1, &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_having_attributes(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_matching(*args, **_arg1, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_responding_to(*args, **_arg1, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def an_object_satisfying(*args, **_arg1, &block); end + + # Given true, false, or nil, will pass if actual value is true, false or + # nil (respectively). Given no args means the caller should satisfy an if + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # source://rspec-expectations//lib/rspec/matchers.rb#349 + def be(*args); end + + # passes if target.kind_of?(klass) + # + # source://rspec-expectations//lib/rspec/matchers.rb#355 + def be_a(klass); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#378 + def be_a_kind_of(expected); end + + # passes if target.kind_of?(klass) + # + # source://rspec-expectations//lib/rspec/matchers.rb#358 + def be_an(klass); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#366 + def be_an_instance_of(expected); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # source://rspec-expectations//lib/rspec/matchers.rb#395 + def be_between(min, max); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#316 + def be_falsey; end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def be_falsy(*args, **_arg1, &block); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#369 + def be_instance_of(expected); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#381 + def be_kind_of(expected); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers.rb#324 + def be_nil; end + + # Passes if actual is truthy (anything but false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#310 + def be_truthy; end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers.rb#405 + def be_within(delta); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param message [Symbol] the message to send the receiver + # @param receiver [Object] + # + # source://rspec-expectations//lib/rspec/matchers.rb#492 + def change(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param message [Symbol] the message to send the receiver + # @param receiver [Object] + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def changing(*args, **_arg1, &block); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers.rb#510 + def contain_exactly(*items); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def containing_exactly(*args, **_arg1, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers.rb#528 + def cover(*values); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def covering(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers.rb#543 + def end_with(*expected); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def ending_with(*args, **_arg1, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#558 + def eq(expected); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def eq_to(*args, **_arg1, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#572 + def eql(expected); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def eql_to(*args, **_arg1, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers.rb#586 + def equal(expected); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def equal_to(*args, **_arg1, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers.rb#596 + def exist(*args); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def existing(*args, **_arg1, &block); end + + # Supports `expect(actual).to matcher` syntax by wrapping `actual` in an + # `ExpectationTarget`. + # + # @example + # expect(actual).to eq(expected) + # expect(actual).not_to eq(expected) + # @return [Expectations::ExpectationTarget] + # @see Expectations::ExpectationTarget#not_to + # @see Expectations::ExpectationTarget#to + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#48 + def expect(value = T.unsafe(nil), &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers.rb#616 + def have_attributes(expected); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def having_attributes(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#639 + def include(*expected); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def including(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#697 + def match(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # @see #contain_exactly + # + # source://rspec-expectations//lib/rspec/matchers.rb#715 + def match_array(items); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def match_regex(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def matching(*args, **_arg1, &block); end + + # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. + # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # source://rspec-expectations//lib/rspec/matchers.rb#752 + def output(expected = T.unsafe(nil)); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#773 + def raise_error(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#776 + def raise_exception(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def raising(*args, **_arg1, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers.rb#792 + def respond_to(*names); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def responding_to(*args, **_arg1, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers.rb#813 + def satisfy(description = T.unsafe(nil), &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def satisfying(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers.rb#828 + def start_with(*expected); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def starting_with(*args, **_arg1, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers.rb#850 + def throw_symbol(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def throwing(*args, **_arg1, &block); end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def within(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#871 + def yield_control; end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#940 + def yield_successive_args(*args); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#919 + def yield_with_args(*args); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#889 + def yield_with_no_args; end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def yielding_control(*args, **_arg1, &block); end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def yielding_successive_args(*args, **_arg1, &block); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def yielding_with_args(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#251 + def yielding_with_no_args(*args, **_arg1, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers.rb#961 + def method_missing(method, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#974 + def respond_to_missing?(method, *_arg1); end + + class << self + # Extended from {RSpec::Matchers::DSL#alias_matcher}. + # + # source://rspec-expectations//lib/rspec/matchers.rb#250 + def alias_matcher(*args, &block); end + + # Used by rspec-core to clear the state used to generate + # descriptions after an example. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#11 + def clear_generated_description; end + + # Delegates to {RSpec::Expectations.configuration}. + # This is here because rspec-core's `expect_with` option + # looks for a `configuration` method on the mixin + # (`RSpec::Matchers`) to yield to a block. + # + # @return [RSpec::Expectations::Configuration] the configuration object + # + # source://rspec-expectations//lib/rspec/matchers.rb#951 + def configuration; end + + # Generates an an example description based on the last expectation. + # Used by rspec-core's one-liner syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#19 + def generated_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#1008 + def is_a_describable_matcher?(obj); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#988 + def is_a_matcher?(obj); end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#25 + def last_description; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_expectation_handler; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_expectation_handler=(_arg0); end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_matcher; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_matcher=(_arg0); end + end +end + +# Decorator that wraps a matcher and overrides `description` +# using the provided block in order to support an alias +# of a matcher. This is intended for use when composing +# matchers, so that you can use an expression like +# `include( a_value_within(0.1).of(3) )` rather than +# `include( be_within(0.1).of(3) )`, and have the corresponding +# description read naturally. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#12 +class RSpec::Matchers::AliasedMatcher < ::RSpec::Matchers::MatcherDelegator + # @api private + # @return [AliasedMatcher] a new instance of AliasedMatcher + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#13 + def initialize(base_matcher, description_block); end + + # Provides the description of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The description is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#36 + def description; end + + # Provides the failure_message of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#46 + def failure_message; end + + # Provides the failure_message_when_negated of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message_when_negated is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#56 + def failure_message_when_negated; end + + # Forward messages on to the wrapped matcher. + # Since many matchers provide a fluent interface + # (e.g. `a_value_within(0.1).of(3)`), we need to wrap + # the returned value if it responds to `description`, + # so that our override can be applied when it is eventually + # used. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#24 + def method_missing(*_arg0); end +end + +# Decorator used for matchers that have special implementations of +# operators like `==` and `===`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#64 +class RSpec::Matchers::AliasedMatcherWithOperatorSupport < ::RSpec::Matchers::AliasedMatcher; end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#71 +class RSpec::Matchers::AliasedNegatedMatcher < ::RSpec::Matchers::AliasedMatcher + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#80 + def does_not_match?(*args, &block); end + + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#84 + def failure_message; end + + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#88 + def failure_message_when_negated; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#72 + def matches?(*args, &block); end + + private + + # For a matcher that uses the default failure messages, we prefer to + # use the override provided by the `description_block`, because it + # includes the phrasing that the user has expressed a preference for + # by going through the effort of defining a negated matcher. + # + # However, if the override didn't actually change anything, then we + # should return the opposite failure message instead -- the overridden + # message is going to be confusing if we return it as-is, as it represents + # the non-negated failure message for a negated match (or vice versa). + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#105 + def optimal_failure_message(same, inverted); end +end + +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#94 +RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + +# source://rspec-expectations//lib/rspec/matchers.rb#957 +RSpec::Matchers::BE_PREDICATE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides a base class with as little methods as possible, so that +# most methods can be delegated via `method_missing`. +# +# On Ruby 2.0+ BasicObject could be used for this purpose, but it +# introduce some extra complexity with constant resolution, so the +# BlankSlate pattern was prefered. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#10 +class RSpec::Matchers::BaseDelegator; end + +# Container module for all built-in matchers. The matcher classes are here +# (rather than directly under `RSpec::Matchers`) in order to prevent name +# collisions, since `RSpec::Matchers` gets included into the user's namespace. +# +# Autoloading is used to delay when the matcher classes get loaded, allowing +# rspec-matchers to boot faster, and avoiding loading matchers the user is +# not using. +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#3 +module RSpec::Matchers::BuiltIn; end + +# Provides the implementation for `all`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#7 +class RSpec::Matchers::BuiltIn::All < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [All] a new instance of All + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#11 + def initialize(matcher); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#37 + def description; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#17 + def does_not_match?(_actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 + def failed_objects; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#23 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 + def matcher; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#63 + def add_new_line_if_needed(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#58 + def failure_message_for_item(index, failure_message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#67 + def indent_multiline_message(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#50 + def index_failed_objects; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#74 + def initialize_copy(other); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#80 + def iterable?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#43 + def match(_expected, _actual); end +end + +# Used _internally_ as a base class for matchers that ship with +# rspec-expectations and rspec-rails. +# +# ### Warning: +# +# This class is for internal use, and subject to change without notice. +# We strongly recommend that you do not base your custom matchers on this +# class. If/when this changes, we will announce it and remove this warning. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#14 +class RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::Composable + include ::RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # @api private + # @return [BaseMatcher] a new instance of BaseMatcher + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#28 + def initialize(expected = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def actual; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#97 + def actual_formatted; end + + # Generates a description using {EnglishPhrasing}. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#60 + def description; end + + # Matchers are not diffable by default. Override this to make your + # subclass diffable. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#69 + def diffable?; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def expected; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#92 + def expected_formatted; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#87 + def expects_call_stack_jump?; end + + # Used to wrap a block of code that will indicate failure by + # raising one of the named exceptions. + # + # This is used by rspec-rails for some of its matchers that + # wrap rails' assertions. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#47 + def match_unless_raises(*exceptions); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#107 + def matcher_name; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#26 + def matcher_name=(_arg0); end + + # Indicates if the match is successful. Delegates to `match`, which + # should be defined on a subclass. Takes care of consistently + # initializing the `actual` attribute. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#36 + def matches?(actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def rescued_exception; end + + # Most matchers are value matchers (i.e. meant to work with `expect(value)`) + # rather than block matchers (i.e. meant to work with `expect { }`), so + # this defaults to false. Block matchers must override this to return true. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#77 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#82 + def supports_value_expectations?; end + + class << self + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#102 + def matcher_name; end + + private + + # Borrowed from ActiveSupport. + # + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#117 + def underscore(camel_cased_word); end + end +end + +# Provides default implementations of failure messages, based on the `description`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#193 +module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + # Provides a good generic failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#199 + def failure_message; end + + # Provides a good generic negative failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#208 + def failure_message_when_negated; end + + class << self + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#213 + def has_default_failure_messages?(matcher); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#128 +module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + private + + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#138 + def improve_hash_formatting(inspect_string); end + + class << self + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#141 + def improve_hash_formatting(inspect_string); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#147 +module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + private + + # Formats a String's encoding as a human readable string + # :nocov: + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#172 + def format_encoding(value); end + + # :nocov: + # + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#153 + def string_encoding_differs?; end + + class << self + # Formats a String's encoding as a human readable string + # :nocov: + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#186 + def format_encoding(value); end + + # :nocov: + # + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#165 + def string_encoding_differs?; end + end +end + +# Used to detect when no arg is passed to `initialize`. +# `nil` cannot be used because it's a valid value to pass. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#20 +RSpec::Matchers::BuiltIn::BaseMatcher::UNDEFINED = T.let(T.unsafe(nil), Object) + +# Provides the implementation for `be`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#101 +class RSpec::Matchers::BuiltIn::Be < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [Be] a new instance of Be + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#104 + def initialize(*args); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def <(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def <=(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def ==(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def ===(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def =~(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def >(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def >=(operand); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#110 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#116 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#128 + def match(_, actual); end +end + +# Provides the implementation for `be_a_kind_of`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#7 +class RSpec::Matchers::BuiltIn::BeAKindOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#10 + def match(expected, actual); end +end + +# Provides the implementation for `be_an_instance_of`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#7 +class RSpec::Matchers::BuiltIn::BeAnInstanceOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#10 + def description; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#16 + def match(expected, actual); end +end + +# Provides the implementation for `be_between`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#7 +class RSpec::Matchers::BuiltIn::BeBetween < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [BeBetween] a new instance of BeBetween + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#8 + def initialize(min, max); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#57 + def description; end + + # Makes the between comparison exclusive. + # + # @api public + # @example + # expect(3).to be_between(2, 4).exclusive + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#33 + def exclusive; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#51 + def failure_message; end + + # Makes the between comparison inclusive. + # + # @api public + # @example + # expect(3).to be_between(2, 3).inclusive + # @note The matcher is inclusive by default; this simply provides + # a way to be more explicit about it. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#21 + def inclusive; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#42 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#63 + def comparable?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#71 + def compare; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#67 + def not_comparable_clause; end +end + +# Provides the implementation of `be value`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#136 +class RSpec::Matchers::BuiltIn::BeComparedTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [BeComparedTo] a new instance of BeComparedTo + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#139 + def initialize(operand, operator); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#178 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#151 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#159 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#166 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#145 + def matches?(actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#184 + def perform_match(actual); end +end + +# Provides the implementation for `be_falsey`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#30 +class RSpec::Matchers::BuiltIn::BeFalsey < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#33 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#39 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#45 + def match(_, actual); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#74 +module RSpec::Matchers::BuiltIn::BeHelpers + private + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#77 + def args_to_s; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#93 + def args_to_sentence; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#89 + def expected_to_sentence; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#85 + def inspected_args; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#81 + def parenthesize(string); end +end + +# Provides the implementation for `be_nil`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#53 +class RSpec::Matchers::BuiltIn::BeNil < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#56 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#62 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#68 + def match(_, actual); end +end + +# Provides the implementation of `be_`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#164 +class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#176 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#168 + def predicate; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#184 + def predicate_accessible?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#172 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#188 + def present_tense_predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#166 +RSpec::Matchers::BuiltIn::BePredicate::REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the implementation for `be_truthy`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#7 +class RSpec::Matchers::BuiltIn::BeTruthy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#22 + def match(_, actual); end +end + +# Provides the implementation for `be_within`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#7 +class RSpec::Matchers::BuiltIn::BeWithin < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [BeWithin] a new instance of BeWithin + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#8 + def initialize(delta); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#52 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#40 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#46 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#32 + def matches?(actual); end + + # Sets the expected value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#14 + def of(expected); end + + # Sets the expected value, and makes the matcher do + # a percent comparison. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#24 + def percent_of(expected); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#62 + def needs_expected; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#66 + def not_numeric_clause; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#58 + def numeric?; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#159 +module RSpec::Matchers::BuiltIn::CaptureStderr + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#164 + def capture(block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#160 + def name; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#139 +module RSpec::Matchers::BuiltIn::CaptureStdout + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#144 + def capture(block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#140 + def name; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#179 +class RSpec::Matchers::BuiltIn::CaptureStreamToTempfile < ::Struct + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#180 + def capture(block); end +end + +# Provides the implementation for `change`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#7 +class RSpec::Matchers::BuiltIn::Change < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Change] a new instance of Change + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#87 + def initialize(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Specifies the delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#10 + def by(expected_delta); end + + # Specifies a minimum delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#18 + def by_at_least(minimum); end + + # Specifies a maximum delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#26 + def by_at_most(maximum); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#71 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#50 + def does_not_match?(event_proc); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#57 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#64 + def failure_message_when_negated; end + + # Specifies the original value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#40 + def from(value); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#45 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#76 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#81 + def supports_value_expectations?; end + + # Specifies the new value you expect. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#34 + def to(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#93 + def change_details; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#119 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#97 + def perform_change(event_proc); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#114 + def positive_failure_reason; end + + # @api private + # @raise [SyntaxError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#109 + def raise_block_syntax_error; end +end + +# Encapsulates the details of the before/after values. +# +# Note that this class exposes the `actual_after` value, to allow the +# matchers above to derive failure messages, etc from the value on demand +# as needed, but it intentionally does _not_ expose the `actual_before` +# value. Some usages of the `change` matcher mutate a specific object +# returned by the value proc, which means that failure message snippets, +# etc, which are derived from the `before` value may not be accurate if +# they are lazily computed as needed. We must pre-compute them before +# applying the change in the `expect` block. To ensure that all `change` +# matchers do that properly, we do not expose the `actual_before` value. +# Instead, matchers must pass a block to `perform_change`, which yields +# the `actual_before` value before applying the change. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#352 +class RSpec::Matchers::BuiltIn::ChangeDetails + # @return [ChangeDetails] a new instance of ChangeDetails + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#357 + def initialize(matcher_name, receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Returns the value of attribute actual_after. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#353 + def actual_after; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#418 + def actual_delta; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#402 + def changed?; end + + # @yield [@actual_before] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#389 + def perform_change(event_proc); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#378 + def value_representation; end + + private + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#424 + def evaluate_value_proc; end + + # :nocov: + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#438 + def extract_value_block_snippet; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#428 + def message_notation(receiver, message); end +end + +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#355 +module RSpec::Matchers::BuiltIn::ChangeDetails::UNDEFINED; end + +# Used to specify a change from a specific value +# (and, optionally, to a specific value). +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#270 +class RSpec::Matchers::BuiltIn::ChangeFromValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # @api private + # @return [ChangeFromValue] a new instance of ChangeFromValue + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#271 + def initialize(change_details, expected_before); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#285 + def does_not_match?(event_proc); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#295 + def failure_message_when_negated; end + + # Specifies the new value you expect. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#278 + def to(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#303 + def change_description; end +end + +# Used to specify a relative change. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#128 +class RSpec::Matchers::BuiltIn::ChangeRelatively < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [ChangeRelatively] a new instance of ChangeRelatively + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#129 + def initialize(change_details, expected_delta, relativity, &comparer); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#156 + def description; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#150 + def does_not_match?(_event_proc); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#137 + def failure_message; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#144 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#162 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#167 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#173 + def failure_reason; end +end + +# Used to specify a change to a specific value +# (and, optionally, from a specific value). +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#311 +class RSpec::Matchers::BuiltIn::ChangeToValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # @api private + # @return [ChangeToValue] a new instance of ChangeToValue + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#312 + def initialize(change_details, expected_after); end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#326 + def does_not_match?(_event_proc); end + + # Specifies the original value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#319 + def from(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#333 + def change_description; end +end + +# Base class for `and` and `or` compound matchers. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#6 +class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Compound] a new instance of Compound + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#10 + def initialize(matcher_1, matcher_2); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#25 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#49 + def diffable?; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#16 + def does_not_match?(_actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def evaluator; end + + # @api private + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#55 + def expected; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#42 + def expects_call_stack_jump?; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def matcher_1; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def matcher_2; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#30 + def supports_block_expectations?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#36 + def supports_value_expectations?; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#62 + def diffable_matcher_list; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#96 + def compound_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#128 + def diffable_matcher_list_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#90 + def indent_multiline_message(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#71 + def initialize_copy(other); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#77 + def match(_expected, actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#102 + def matcher_1_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#106 + def matcher_2_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#122 + def matcher_is_diffable?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#110 + def matcher_supports_block_expectations?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#116 + def matcher_supports_value_expectations?(matcher); end +end + +# Matcher used to represent a compound `and` expectation. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#245 +class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#248 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#265 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#260 + def match(*_arg0); end +end + +# Normally, we evaluate the matching sequentially. For an expression like +# `expect(x).to foo.and bar`, this becomes: +# +# expect(x).to foo +# expect(x).to bar +# +# For block expectations, we need to nest them instead, so that +# `expect { x }.to foo.and bar` becomes: +# +# expect { +# expect { x }.to foo +# }.to bar +# +# This is necessary so that the `expect` block is only executed once. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#159 +class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator + # @api private + # @return [NestedEvaluator] a new instance of NestedEvaluator + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#160 + def initialize(actual, matcher_1, matcher_2); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#173 + def matcher_matches?(matcher); end + + private + + # Some block matchers (such as `yield_xyz`) pass args to the `expect` block. + # When such a matcher is used as the outer matcher, we need to forward the + # the args on to the `expect` block. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#187 + def inner_matcher_block(outer_args); end + + # For a matcher like `raise_error` or `throw_symbol`, where the block will jump + # up the call stack, we need to order things so that it is the inner matcher. + # For example, we need it to be this: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to raise_error("boom") + # }.to change { x }.by(1) + # + # ...rather than: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to change { x }.by(1) + # }.to raise_error("boom") + # + # In the latter case, the after-block logic in the `change` matcher would never + # get executed because the `raise "boom"` line would jump to the `rescue` in the + # `raise_error` logic, so only the former case will work properly. + # + # This method figures out which matcher should be the inner matcher and which + # should be the outer matcher. + # + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#227 + def order_block_matchers; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#236 + def matcher_expects_call_stack_jump?(matcher); end + end +end + +# Matcher used to represent a compound `or` expectation. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#272 +class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#275 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#286 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#281 + def match(*_arg0); end +end + +# For value expectations, we can evaluate the matchers sequentially. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#135 +class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator + # @api private + # @return [SequentialEvaluator] a new instance of SequentialEvaluator + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#136 + def initialize(actual, *_arg1); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#140 + def matcher_matches?(matcher); end +end + +# Provides the implementation for `contain_exactly` and `match_array`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#8 +class RSpec::Matchers::BuiltIn::ContainExactly < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#29 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#11 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#22 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#34 + def matches?(actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#56 + def actual_collection_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#137 + def best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#94 + def convert_actual_to_an_array; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#68 + def describe_collection(collection, surface_descriptions = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#52 + def expected_collection_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#64 + def extra_elements_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#131 + def extra_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#44 + def generate_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#81 + def match(_expected, _actual); end + + # This cannot always work (e.g. when dealing with unsortable items, + # or matchers as expected items), but it's practically free compared to + # the slowness of the full matching algorithm, and in common cases this + # works, so it's worth a try. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#90 + def match_when_sorted?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#76 + def message_line(prefix, collection, surface_descriptions = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#60 + def missing_elements_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#125 + def missing_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#141 + def pairings_maximizer; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#104 + def safe_sort(array); end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#120 + def to_a_disallowed?(object); end +end + +# Once we started supporting composing matchers, the algorithm for this matcher got +# much more complicated. Consider this expression: +# +# expect(["fool", "food"]).to contain_exactly(/foo/, /fool/) +# +# This should pass (because we can pair /fool/ with "fool" and /foo/ with "food"), but +# the original algorithm used by this matcher would pair the first elements it could +# (/foo/ with "fool"), which would leave /fool/ and "food" unmatched. When we have +# an expected element which is a matcher that matches a superset of actual items +# compared to another expected element matcher, we need to consider every possible pairing. +# +# This class is designed to maximize the number of actual/expected pairings -- or, +# conversely, to minimize the number of unpaired items. It's essentially a brute +# force solution, but with a few heuristics applied to reduce the size of the +# problem space: +# +# * Any items which match none of the items in the other list are immediately +# placed into the `unmatched_expected_indexes` or `unmatched_actual_indexes` array. +# The extra items and missing items in the matcher failure message are derived +# from these arrays. +# * Any items which reciprocally match only each other are paired up and not +# considered further. +# +# What's left is only the items which match multiple items from the other list +# (or vice versa). From here, it performs a brute-force depth-first search, +# looking for a solution which pairs all elements in both lists, or, barring that, +# that produces the fewest unmatched items. +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#188 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer + # @api private + # @return [PairingsMaximizer] a new instance of PairingsMaximizer + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#225 + def initialize(expected_to_actual_matched_indexes, actual_to_expected_matched_indexes); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 + def actual_to_expected_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 + def expected_to_actual_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#239 + def find_best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 + def solution; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#301 + def apply_pairing_to(indeterminates, original_matches, other_list_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#285 + def best_solution_for_pairing(expected_index, actual_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#265 + def categorize_indexes(indexes_to_categorize, other_indexes); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#280 + def reciprocal_single_match?(matches, index, other_list); end +end + +# Starting solution that is worse than any other real solution. +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#259 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#260 + def worse_than?(_other); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < ::Struct + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#212 + def +(derived_candidate_solution); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#196 + def candidate?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#201 + def ideal?; end + + # Returns the value of attribute indeterminate_actual_indexes + # + # @return [Object] the current value of indeterminate_actual_indexes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def indeterminate_actual_indexes; end + + # Sets the attribute indeterminate_actual_indexes + # + # @param value [Object] the value to set the attribute indeterminate_actual_indexes to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def indeterminate_actual_indexes=(_); end + + # Returns the value of attribute indeterminate_expected_indexes + # + # @return [Object] the current value of indeterminate_expected_indexes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def indeterminate_expected_indexes; end + + # Sets the attribute indeterminate_expected_indexes + # + # @param value [Object] the value to set the attribute indeterminate_expected_indexes to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def indeterminate_expected_indexes=(_); end + + # Returns the value of attribute unmatched_actual_indexes + # + # @return [Object] the current value of unmatched_actual_indexes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def unmatched_actual_indexes; end + + # Sets the attribute unmatched_actual_indexes + # + # @param value [Object] the value to set the attribute unmatched_actual_indexes to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def unmatched_actual_indexes=(_); end + + # Returns the value of attribute unmatched_expected_indexes + # + # @return [Object] the current value of unmatched_expected_indexes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def unmatched_expected_indexes; end + + # Sets the attribute unmatched_expected_indexes + # + # @param value [Object] the value to set the attribute unmatched_expected_indexes to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def unmatched_expected_indexes=(_); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#208 + def unmatched_item_count; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#192 + def worse_than?(other); end + + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def [](*_arg0); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def inspect; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def keyword_init?; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def members; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def new(*_arg0); end + end +end + +# Abstract class to implement `once`, `at_least` and other +# count constraints. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#7 +module RSpec::Matchers::BuiltIn::CountExpectation + # Specifies the minimum number of times the method is expected to match + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#42 + def at_least(number); end + + # Specifies the maximum number of times the method is expected to match + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#35 + def at_most(number); end + + # Specifies that the method is expected to match the given number of times. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#28 + def exactly(number); end + + # Specifies that the method is expected to match once. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#10 + def once; end + + # Specifies that the method is expected to match thrice. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#22 + def thrice; end + + # No-op. Provides syntactic sugar. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#49 + def times; end + + # Specifies that the method is expected to match twice. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#16 + def twice; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 + def count_expectation_type; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 + def expected_count; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#122 + def count_constraint_to_number(n); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#141 + def count_expectation_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#145 + def count_failure_reason(action); end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#60 + def cover?(count, number); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#71 + def expected_count_matches?(actual_count); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#79 + def has_expected_count?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#159 + def human_readable_count(count); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#150 + def human_readable_expectation_type; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#102 + def raise_impossible_count_expectation(count); end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#111 + def raise_unsupported_count_expectation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#83 + def set_expected_count(relativity, n); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#134 + def unsupported_count_expectation?(relativity); end +end + +# Provides the implementation for `cover`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#7 +class RSpec::Matchers::BuiltIn::Cover < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Cover] a new instance of Cover + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#17 + def does_not_match?(range); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#12 + def matches?(range); end +end + +# Provides the implementation for dynamic predicate matchers. +# Not intended to be inherited directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#7 +class RSpec::Matchers::BuiltIn::DynamicPredicate < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [DynamicPredicate] a new instance of DynamicPredicate + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#10 + def initialize(method_name, *args, **_arg2, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#43 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#23 + def does_not_match?(actual, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#31 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#37 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#16 + def matches?(actual, &block); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#126 + def expectation_of(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#121 + def failure_message_expecting(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#142 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#117 + def method_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#88 + def methods_include?(method); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#68 + def predicate_accessible?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#101 + def predicate_matches?(value = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#97 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#93 + def predicate_result; end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#84 + def private_predicate?; end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#62 + def really_responds_to?(method); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#109 + def root; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#136 + def validity_message; end +end + +# Provides the implementation for `end_with`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#81 +class RSpec::Matchers::BuiltIn::EndWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#88 + def element_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#84 + def subset_matches?; end +end + +# Provides the implementation for `eq`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#7 +class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#26 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#32 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#38 + def match(expected, actual); end +end + +# Provides the implementation for `eql`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#7 +class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#26 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#32 + def match(expected, actual); end +end + +# Provides the implementation for `equal`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#7 +class RSpec::Matchers::BuiltIn::Equal < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#33 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#49 + def actual_inspected; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#61 + def detailed_failure_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#45 + def expected_is_a_literal_singleton?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#75 + def inspect_object(o); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#39 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#57 + def simple_failure_message; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#43 +RSpec::Matchers::BuiltIn::Equal::LITERAL_SINGLETONS = T.let(T.unsafe(nil), Array) + +# Provides the implementation for `exist`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#7 +class RSpec::Matchers::BuiltIn::Exist < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Exist] a new instance of Exist + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#22 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#30 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#36 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#14 + def matches?(actual); end +end + +# Simple class for memoizing actual/expected for this matcher +# and examining the match +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#43 +class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < ::Struct + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#52 + def actual_exists?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#46 + def valid_test?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#58 + def validity_message; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#83 + def deprecated(predicate, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#75 + def existence_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#79 + def predicates; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#71 + def uniq_truthy_values; end +end + +# Provides the implementation for `has_`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#152 +class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#156 + def predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#154 +RSpec::Matchers::BuiltIn::Has::REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the implementation for `have_attributes`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#7 +class RSpec::Matchers::BuiltIn::HaveAttributes < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [HaveAttributes] a new instance of HaveAttributes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#11 + def initialize(expected); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#19 + def actual; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#43 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#50 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#34 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#56 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#64 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#25 + def matches?(actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#9 + def respond_to_failed; end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#85 + def actual_has_attribute?(attribute_key, attribute_value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#70 + def cache_all_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#107 + def formatted_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#78 + def perform_match(predicate); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#89 + def respond_to_attributes?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#99 + def respond_to_failure_message_or; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#95 + def respond_to_matcher; end +end + +# Provides the implementation for `include`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#9 +class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # @raise [ArgumentError] + # @return [Include] a new instance of Include + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#15 + def initialize(*expecteds); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#44 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#62 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#33 + def does_not_match?(actual); end + + # @api private + # @return [Array, Hash] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#68 + def expected; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#12 + def expecteds; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#50 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#56 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#22 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#168 + def actual_collection_includes?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#154 + def actual_hash_has_key?(expected_key); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#142 + def actual_hash_includes?(expected_key, expected_value); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#78 + def check_actual?(actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#84 + def check_expected_count?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#150 + def comparing_hash_keys?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#138 + def comparing_hash_to_a_subset?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#212 + def convert_to_hash?(obj); end + + # :nocov: + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#185 + def count_enumerable(expected_item); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#190 + def count_inclusions; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#202 + def diff_would_wrongly_highlight_matched_item?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#121 + def excluded_from_actual; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#96 + def format_failure_message(preposition); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#116 + def perform_match(&block); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#107 + def readable_list_of(items); end +end + +# Provides the implementation for `match`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#7 +class RSpec::Matchers::BuiltIn::Match < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Match] a new instance of Match + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#8 + def initialize(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#15 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#25 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#38 + def failure_message; end + + # Used to specify the captures we match against + # + # @api private + # @return [self] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#31 + def with_captures(*captures); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#57 + def can_safely_call_match?(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#49 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#64 + def match_captures(expected, actual); end +end + +# Handles operator matcher for `should_not`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#116 +class RSpec::Matchers::BuiltIn::NegativeOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#117 + def __delegate_operator(actual, operator, expected); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#128 +module RSpec::Matchers::BuiltIn::NullCapture + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#133 + def capture(_block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#129 + def name; end + end +end + +# Provides the implementation for operator matchers. +# Not intended to be instantiated directly. +# Only available for use with `should`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#10 +class RSpec::Matchers::BuiltIn::OperatorMatcher + # @api private + # @return [OperatorMatcher] a new instance of OperatorMatcher + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#41 + def initialize(actual); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 + def !=(_expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 + def !~(_expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def <(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def <=(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def ==(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def ===(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def =~(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def >(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def >=(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#76 + def description; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#70 + def fail_with_message(message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#88 + def eval_match(actual, operator, expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#82 + def has_non_generic_implementation_of?(op); end + + class << self + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#29 + def get(klass, operator); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#18 + def register(klass, operator, matcher); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#13 + def registry; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#24 + def unregister(klass, operator); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#46 + def use_custom_matcher_or_delegate(operator); end + end +end + +# Provides the implementation for `output`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#9 +class RSpec::Matchers::BuiltIn::Output < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Output] a new instance of Output + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#10 + def initialize(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#76 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#86 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#24 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#64 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#70 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#17 + def matches?(block); end + + # Indicates this matcher matches against a block. + # + # @api private + # @return [True] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#93 + def supports_block_expectations?; end + + # Indicates this matcher matches against a block only. + # + # @api private + # @return [False] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#100 + def supports_value_expectations?; end + + # Tells the matcher to match against stderr. + # Works only when the main Ruby process prints to stderr + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#39 + def to_stderr; end + + # Tells the matcher to match against stderr. + # Works when subprocesses print to stderr as well. + # This is significantly (~30x) slower than `to_stderr` + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#57 + def to_stderr_from_any_process; end + + # Tells the matcher to match against stdout. + # Works only when the main Ruby process prints to stdout + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#31 + def to_stdout; end + + # Tells the matcher to match against stdout. + # Works when subprocesses print to stdout as well. + # This is significantly (~30x) slower than `to_stdout` + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#48 + def to_stdout_from_any_process; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#121 + def actual_output_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#106 + def captured?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#116 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#110 + def positive_failure_reason; end +end + +# Handles operator matcher for `should`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#97 +class RSpec::Matchers::BuiltIn::PositiveOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#98 + def __delegate_operator(actual, operator, expected); end +end + +# Provides the implementation for `raise_error`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#9 +class RSpec::Matchers::BuiltIn::RaiseError + include ::RSpec::Matchers::Composable + + # @api private + # @return [RaiseError] a new instance of RaiseError + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#22 + def initialize(expected_error_or_message, expected_message, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#117 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#83 + def does_not_match?(given_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#99 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#105 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#111 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#52 + def matches?(given_proc, negative_expectation = T.unsafe(nil), &block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#89 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#94 + def supports_value_expectations?; end + + # Specifies the expected error message. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#43 + def with_message(expected_message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#123 + def actual_error_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#137 + def block_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#133 + def error_and_message_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#145 + def eval_block; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#129 + def expectation_matched?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#226 + def expected_error; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#257 + def expecting_specific_exception?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#241 + def format_backtrace(backtrace); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#246 + def given_error; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#176 + def handle_warning(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#261 + def raise_message_already_set; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#141 + def ready_to_eval_block?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#155 + def verify_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#188 + def warn_about_bare_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#180 + def warn_about_bare_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#214 + def warn_about_negative_false_positive!(expression); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#201 + def warn_about_nil_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#184 + def warn_about_nil_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#160 + def warn_for_negative_false_positives!; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#266 + def warning; end +end + +# Used as a sentinel value to be able to tell when the user did not pass an +# argument. We can't use `nil` for that because we need to warn when `nil` is +# passed in a different way. It's an Object, not a Module, since Module's `===` +# does not evaluate to true when compared to itself. +# +# Note; this _is_ the default value supplied for expected_error_or_message, but +# because there are two method-calls involved, that default is actually supplied +# in the definition of the _matcher_ method, `RSpec::Matchers#raise_error` +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#20 +RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue = T.let(T.unsafe(nil), Object) + +# Used to wrap match data and make it reliable for 1.8.7 +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#84 +class RSpec::Matchers::BuiltIn::ReliableMatchData + # @api private + # @return [ReliableMatchData] a new instance of ReliableMatchData + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#85 + def initialize(match_data); end + + # returns an array of captures from the match data + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#110 + def captures; end + + # Returns match data names for named captures + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#102 + def names; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#116 + def match_data; end +end + +# Provides the implementation for `respond_to`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#9 +class RSpec::Matchers::BuiltIn::RespondTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [RespondTo] a new instance of RespondTo + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#10 + def initialize(*names); end + + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#52 + def and_any_keywords; end + + # Specifies keyword arguments, if any. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#40 + def and_keywords(*keywords); end + + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#64 + def and_unlimited_arguments; end + + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 + def argument; end + + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#74 + def arguments; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#100 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#82 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#88 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#94 + def failure_message_when_negated; end + + # Used by other matchers to suppress a check + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#106 + def ignoring_method_signature_failure!; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#77 + def matches?(actual); end + + # Specifies the number of expected arguments. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#24 + def with(n); end + + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 + def with_any_keywords; end + + # Specifies keyword arguments, if any. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 + def with_keywords(*keywords); end + + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 + def with_unlimited_arguments; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#112 + def find_failing_method_names(actual, filter_method); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#119 + def matches_arity?(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#156 + def pp_names; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#130 + def with_arity; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#139 + def with_arity_string; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#143 + def with_keywords_string; end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#161 +class RSpec::Matchers::BuiltIn::RespondTo::ArityCheck + # @api private + # @return [ArityCheck] a new instance of ArityCheck + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#162 + def initialize(expected_arity, expected_keywords, arbitrary_keywords, unlimited_arguments); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#178 + def matches?(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#187 + def method_signature_for(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#183 + def verifier_for(actual, name); end +end + +# Provides the implementation for `satisfy`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#7 +class RSpec::Matchers::BuiltIn::Satisfy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Satisfy] a new instance of Satisfy + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#8 + def initialize(description = T.unsafe(nil), &block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#21 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#27 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#33 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#14 + def matches?(actual, &block); end + + private + + # :nocov: + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#40 + def block_representation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#48 + def extract_block_snippet; end +end + +# Base class for specifying a change from and/or to specific values. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#181 +class RSpec::Matchers::BuiltIn::SpecificValuesChange < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [SpecificValuesChange] a new instance of SpecificValuesChange + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#185 + def initialize(change_details, from, to); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#197 + def description; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#202 + def failure_message; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#192 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#210 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#215 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#244 + def after_value_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#238 + def before_value_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#255 + def did_change_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#250 + def did_not_change_failure; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#234 + def matches_after?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#261 + def not_given_a_block_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#221 + def perform_change(event_proc); end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#183 +RSpec::Matchers::BuiltIn::SpecificValuesChange::MATCH_ANYTHING = BasicObject + +# For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons, +# we still provide this constant until 4.0. +# +# @deprecated Use StartOrEndWith instead. +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#61 +RSpec::Matchers::BuiltIn::StartAndEndWith = RSpec::Matchers::BuiltIn::StartOrEndWith + +# Base class for the `end_with` and `start_with` matchers. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#7 +class RSpec::Matchers::BuiltIn::StartOrEndWith < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [StartOrEndWith] a new instance of StartOrEndWith + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#8 + def initialize(*expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#27 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#15 + def failure_message; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#36 + def match(_expected, actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#48 + def subsets_comparable?; end +end + +# Provides the implementation for `start_with`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#66 +class RSpec::Matchers::BuiltIn::StartWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#73 + def element_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#69 + def subset_matches?; end +end + +# Provides the implementation for `throw_symbol`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#7 +class RSpec::Matchers::BuiltIn::ThrowSymbol + include ::RSpec::Matchers::Composable + + # @api private + # @return [ThrowSymbol] a new instance of ThrowSymbol + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#10 + def initialize(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#86 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#68 + def does_not_match?(given_proc); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#103 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#74 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#80 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#18 + def matches?(given_proc); end + + # Indicates this matcher matches against a block. + # + # @api private + # @return [True] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#93 + def supports_block_expectations?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#98 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#109 + def actual_result; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#118 + def caught; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#114 + def expected(symbol_desc = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#122 + def throw_description(symbol, arg); end +end + +# Provides the implementation for `yield_control`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#101 +class RSpec::Matchers::BuiltIn::YieldControl < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#111 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#117 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#123 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#104 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#128 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#133 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#139 + def failure_reason; end +end + +# Object that is yielded to `expect` when one of the +# yield matchers is used. Provides information about +# the yield behavior of the object-under-test. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#12 +class RSpec::Matchers::BuiltIn::YieldProbe + # @return [YieldProbe] a new instance of YieldProbe + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#21 + def initialize(block, &callback); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#68 + def assert_used!; end + + # :nocov: + # On 1.8.7, `lambda { }.arity` and `lambda { |*a| }.arity` both return -1, + # so we can't distinguish between accepting no args and an arg splat. + # It's OK to skip, this, though; it just provides a nice error message + # when the user forgets to accept an arg in their block. They'll still get + # the `assert_used!` error message from above, which is sufficient. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#78 + def assert_valid_expect_block!; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#29 + def has_block?; end + + # Returns the value of attribute num_yields. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def num_yields; end + + # Sets the attribute num_yields + # + # @param value the value to set the attribute num_yields to. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def num_yields=(_arg0); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#33 + def probe; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#53 + def single_yield_args; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#40 + def to_proc; end + + # Returns the value of attribute yielded_args. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def yielded_args; end + + # Sets the attribute yielded_args + # + # @param value the value to set the attribute yielded_args to. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def yielded_args=(_arg0); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#57 + def yielded_once?(matcher_name); end + + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#13 + def probe(block, &callback); end + end +end + +# Provides the implementation for `yield_successive_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#296 +class RSpec::Matchers::BuiltIn::YieldSuccessiveArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [YieldSuccessiveArgs] a new instance of YieldSuccessiveArgs + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#297 + def initialize(*args); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#337 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#320 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#325 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#331 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#302 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#342 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#347 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#353 + def expected_arg_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#365 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#357 + def positive_failure_reason; end +end + +# Provides the implementation for `yield_with_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#199 +class RSpec::Matchers::BuiltIn::YieldWithArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [YieldWithArgs] a new instance of YieldWithArgs + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#200 + def initialize(*args); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#233 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#218 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#223 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#228 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#205 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#240 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#245 + def supports_value_expectations?; end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#288 + def all_args_match?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#273 + def args_currently_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#257 + def expected_arg_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#261 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#251 + def positive_failure_reason; end +end + +# Provides the implementation for `yield_with_no_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#149 +class RSpec::Matchers::BuiltIn::YieldWithNoArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#158 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#163 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#168 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#151 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#173 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#178 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#190 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#184 + def positive_failure_reason; end +end + +# Mixin designed to support the composable matcher features +# of RSpec 3+. Mix it into your custom matcher classes to +# allow them to be used in a composable fashion. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/composable.rb#10 +module RSpec::Matchers::Composable + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#25 + def &(matcher); end + + # Delegates to `#matches?`. Allows matchers to be used in composable + # fashion and also supports using matchers in case statements. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#45 + def ===(value); end + + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 + def and(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 + def or(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#41 + def |(matcher); end + + private + + # Returns the description of the given object in a way that is + # aware of composed matchers. If the object is a matcher with + # a `description` method, returns the description; otherwise + # returns `object.inspect`. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting matcher arguments. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#82 + def description_of(object); end + + # We should enumerate arrays as long as they are not recursive. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 + def should_enumerate?(item); end + + # Transforms the given data structure (typically a hash or array) + # into a new data structure that, when `#inspect` is called on it, + # will provide descriptions of any contained matchers rather than + # the normal `#inspect` output. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 + def surface_descriptions_in(item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 + def unreadable_io?(object); end + + # This provides a generic way to fuzzy-match an expected value against + # an actual value. It understands nested data structures (e.g. hashes + # and arrays) and is able to match against a matcher being used as + # the expected value or within the expected value at any level of + # nesting. + # + # Within a custom matcher you are encouraged to use this whenever your + # matcher needs to match two values, unless it needs more precise semantics. + # For example, the `eq` matcher _does not_ use this as it is meant to + # use `==` (and only `==`) for matching. + # + # @api public + # @param actual [Object] the actual value + # @param expected [Object] what is expected + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#66 + def values_match?(expected, actual); end + + # Historically, a single matcher instance was only checked + # against a single value. Given that the matcher was only + # used once, it's been common to memoize some intermediate + # calculation that is derived from the `actual` value in + # order to reuse that intermediate result in the failure + # message. + # + # This can cause a problem when using such a matcher as an + # argument to another matcher in a composed matcher expression, + # since the matcher instance may be checked against multiple + # values and produce invalid results due to the memoization. + # + # To deal with this, we clone any matchers in `expected` via + # this method when using `values_match?`, so that any memoization + # does not "leak" between checks. + # + # @api public + # @private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#128 + def with_matchers_cloned(object); end + + class << self + # We should enumerate arrays as long as they are not recursive. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#154 + def should_enumerate?(item); end + + # Transforms the given data structure (typically a hash or array) + # into a new data structure that, when `#inspect` is called on it, + # will provide descriptions of any contained matchers rather than + # the normal `#inspect` output. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#154 + def surface_descriptions_in(item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#154 + def unreadable_io?(object); end + end +end + +# Wraps an item in order to surface its `description` via `inspect`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/composable.rb#158 +class RSpec::Matchers::Composable::DescribableItem < ::Struct + # Inspectable version of the item description + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#160 + def inspect; end + + # Returns the value of attribute item + # + # @return [Object] the current value of item + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def item; end + + # Sets the attribute item + # + # @param value [Object] the value to set the attribute item to. + # @return [Object] the newly set value + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def item=(_); end + + # A pretty printed version of the item description. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#165 + def pretty_print(pp); end + + class << self + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def [](*_arg0); end + + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def inspect; end + + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def keyword_init?; end + + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def members; end + + # source://rspec-expectations//lib/rspec/matchers/composable.rb#158 + def new(*_arg0); end + end +end + +# Defines the custom matcher DSL. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#6 +module RSpec::Matchers::DSL + # Defines a matcher alias. The returned matcher's `description` will be overridden + # to reflect the phrasing of the new name, which will be used in failure messages + # when passed as an argument to another matcher in a composed matcher expression. + # + # @example + # RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to + # sum_to(3).description # => "sum to 3" + # a_list_that_sums_to(3).description # => "a list that sums to 3" + # @example + # RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| + # description.sub("be sorted by", "a list sorted by") + # end + # + # be_sorted_by(:age).description # => "be sorted by age" + # a_list_sorted_by(:age).description # => "a list sorted by age" + # @option options + # @param new_name [Symbol] the new name for the matcher + # @param old_name [Symbol] the original name for the matcher + # @param options [Hash] options for the aliased matcher + # @see RSpec::Matchers + # @yield [String] optional block that, when given, is used to define the overridden + # logic. The yielded arg is the original description or failure message. If no + # block is provided, a default override is used based on the old and new names. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#32 + def alias_matcher(new_name, old_name, options = T.unsafe(nil), &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @see RSpec::Matchers + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 + def define(name, &declarations); end + + # Defines a negated matcher. The returned matcher's `description` and `failure_message` + # will be overridden to reflect the phrasing of the new name, and the match logic will + # be based on the original matcher but negated. + # + # @example + # RSpec::Matchers.define_negated_matcher :exclude, :include + # include(1, 2).description # => "include 1 and 2" + # exclude(1, 2).description # => "exclude 1 and 2" + # @param base_name [Symbol] the name of the original matcher that will be negated + # @param negated_name [Symbol] the name for the negated matcher + # @see RSpec::Matchers + # @yield [String] optional block that, when given, is used to define the overridden + # logic. The yielded arg is the original description or failure message. If no + # block is provided, a default override is used based on the old and new names. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#61 + def define_negated_matcher(negated_name, base_name, &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @see RSpec::Matchers + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#79 + def matcher(name, &declarations); end + + private + + # :nocov: + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#84 + def warn_about_block_args(name, declarations); end +end + +# Defines default implementations of the matcher +# protocol methods for custom matchers. You can +# override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods +# from within an `RSpec::Matchers.define` block. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#385 +module RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # The default description. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#395 + def description; end + + # Used internally by objects returns by `should` and `should_not`. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#390 + def diffable?; end + + # Most matchers do not expect call stack jumps. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#412 + def expects_call_stack_jump?; end + + # Matchers do not support block expectations by default. You + # must opt-in. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#403 + def supports_block_expectations?; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#407 + def supports_value_expectations?; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#418 + def chained_method_clause_sentences; end +end + +# Contains the methods that are available from within the +# `RSpec::Matchers.define` DSL for creating custom matchers. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#104 +module RSpec::Matchers::DSL::Macros + # Convenience for defining methods on this matcher to create a fluent + # interface. The trick about fluent interfaces is that each method must + # return self in order to chain methods together. `chain` handles that + # for you. If the method is invoked and the + # `include_chain_clauses_in_custom_matcher_descriptions` config option + # hash been enabled, the chained method name and args will be added to the + # default description and failure message. + # + # In the common case where you just want the chained method to store some + # value(s) for later use (e.g. in `match`), you can provide one or more + # attribute names instead of a block; the chained method will store its + # arguments in instance variables with those names, and the values will + # be exposed via getters. + # + # @example + # + # RSpec::Matchers.define :have_errors_on do |key| + # chain :with do |message| + # @message = message + # end + # + # match do |actual| + # actual.errors[key] == @message + # end + # end + # + # expect(minor).to have_errors_on(:age).with("Not old enough to participate") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#298 + def chain(method_name, *attr_names, &definition); end + + # Customize the description to use for one-liners. Only use this when + # the description generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :qualify_for do |expected| + # match { your_match_logic } + # + # description do + # "qualify for #{expected}" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#253 + def description(&definition); end + + # Tells the matcher to diff the actual and expected values in the failure + # message. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#259 + def diffable; end + + # Customizes the failure message to use when this matcher is + # asked to positively match. Only use this when the message + # generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message do |actual| + # "Expected strength of #{expected}, but had #{actual.strength}" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#216 + def failure_message(&definition); end + + # Customize the failure message to use when this matcher is asked + # to negatively match. Only use this when the message generated by + # default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message_when_negated do |actual| + # "Expected not to have strength of #{expected}, but did" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#235 + def failure_message_when_negated(&definition); end + + # Stores the block that is used to determine whether this matcher passes + # or fails. The block should return a boolean value. When the matcher is + # passed to `expect(...).to` and the block returns `true`, then the expectation + # passes. Similarly, when the matcher is passed to `expect(...).not_to` and the + # block returns `false`, then the expectation passes. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @example + # + # RSpec::Matchers.define :be_even do + # match do |actual| + # actual.even? + # end + # end + # + # expect(4).to be_even # passes + # expect(3).not_to be_even # passes + # expect(3).to be_even # fails + # expect(4).not_to be_even # fails + # @param options [Hash] for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#131 + def match(options = T.unsafe(nil), &match_block); end + + # Use this instead of `match` when the block will raise an exception + # rather than returning false to indicate a failure. + # + # @example + # + # RSpec::Matchers.define :accept_as_valid do |candidate_address| + # match_unless_raises ValidationException do |validator| + # validator.validate(candidate_address) + # end + # end + # + # expect(email_validator).to accept_as_valid("person@company.com") + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#188 + def match_unless_raises(expected_exception = T.unsafe(nil), &match_block); end + + # Use this to define the block for a negative expectation (`expect(...).not_to`) + # when the positive and negative forms require different handling. This + # is rarely necessary, but can be helpful, for example, when specifying + # asynchronous processes that require different timeouts. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @param options [Hash] for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#160 + def match_when_negated(options = T.unsafe(nil), &match_block); end + + # Declares that the matcher can be used in a block expectation. + # Users will not be able to use your matcher in a block + # expectation without declaring this. + # (e.g. `expect { do_something }.to matcher`). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#267 + def supports_block_expectations; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#312 + def assign_attributes(attr_names); end + + # Does the following: + # + # - Defines the named method using a user-provided block + # in @user_method_defs, which is included as an ancestor + # in the singleton class in which we eval the `define` block. + # - Defines an overridden definition for the same method + # usign the provided `our_def` block. + # - Provides a default `our_def` block for the common case + # of needing to call the user's definition with `@actual` + # as an arg, but only if their block's arity can handle it. + # + # This compiles the user block into an actual method, allowing + # them to use normal method constructs like `return` + # (e.g. for an early guard statement), while allowing us to define + # an override that can provide the wrapped handling + # (e.g. assigning `@actual`, rescueing errors, etc) and + # can `super` to the user's definition. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#346 + def define_user_override(method_name, user_def, &our_def); end +end + +# Defines deprecated macro methods from RSpec 2 for backwards compatibility. +# +# @deprecated Use the methods from {Macros} instead. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#354 +module RSpec::Matchers::DSL::Macros::Deprecated + # @deprecated Use {Macros#failure_message} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#368 + def failure_message_for_should(&definition); end + + # @deprecated Use {Macros#failure_message_when_negated} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#374 + def failure_message_for_should_not(&definition); end + + # @deprecated Use {Macros#match} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#356 + def match_for_should(&definition); end + + # @deprecated Use {Macros#match_when_negated} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#362 + def match_for_should_not(&definition); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#146 +RSpec::Matchers::DSL::Macros::RAISE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# The class used for custom matchers. The block passed to +# `RSpec::Matchers.define` will be evaluated in the context +# of the singleton class of an instance, and will have the +# {RSpec::Matchers::DSL::Macros Macros} methods available. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#433 +class RSpec::Matchers::DSL::Matcher + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + include ::RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers + include ::RSpec::Matchers::Composable + extend ::RSpec::Matchers::DSL::Macros + extend ::RSpec::Matchers::DSL::Macros::Deprecated + + # @api private + # @return [Matcher] a new instance of Matcher + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#462 + def initialize(name, declarations, matcher_execution_context, *expected, &block_arg); end + + # Exposes the value being matched against -- generally the object + # object wrapped by `expect`. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#449 + def actual; end + + # The block parameter used in the expectation + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#456 + def block_arg; end + + # Provides the expected value. This will return an array if + # multiple arguments were passed to the matcher; otherwise it + # will return a single value. + # + # @see #expected_as_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#483 + def expected; end + + # Returns the expected value as an an array. This exists primarily + # to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected` + # always returned an array. + # + # @see #expected + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#495 + def expected_as_array; end + + # Adds the name (rather than a cryptic hex number) + # so we can identify an instance of + # the matcher in error messages (e.g. for `NoMethodError`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#500 + def inspect; end + + # The name of the matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#459 + def name; end + + # Exposes the exception raised during the matching by `match_unless_raises`. + # Could be useful to extract details for a failure message. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#453 + def rescued_exception; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#523 + def actual_arg_for(block); end + + # Takes care of forwarding unhandled messages to the + # `@matcher_execution_context` (typically the current + # running `RSpec::Core::Example`). This is needed by + # rspec-rails so that it can define matchers that wrap + # Rails' test helper methods, but it's also a useful + # feature in its own right. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#533 + def method_missing(method, *args, **_arg2, &block); end + + # Indicates that this matcher responds to messages + # from the `@matcher_execution_context` as well. + # Also, supports getting a method object for such methods. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#508 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://rspec-expectations//lib/rspec/matchers.rb#959 +RSpec::Matchers::DYNAMIC_MATCHER_REGEX = T.let(T.unsafe(nil), Regexp) + +# Facilitates converting ruby objects to English phrases. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#4 +module RSpec::Matchers::EnglishPhrasing + class << self + # when given an empty list. + # + # Converts an object (often a collection of objects) + # into an English list. + # + # list(['banana', 'kiwi', 'mango']) + # #=> " \"banana\", \"kiwi\", and \"mango\"" + # + # Given an empty collection, returns the empty string. + # + # list([]) #=> "" + # + # @note The returned string has a leading space except + # + # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#26 + def list(obj); end + + # Converts a symbol into an English expression. + # + # split_words(:banana_creme_pie) #=> "banana creme pie" + # + # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#9 + def split_words(sym); end + end +end + +# source://rspec-expectations//lib/rspec/matchers.rb#958 +RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the necessary plumbing to wrap a matcher with a decorator. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#31 +class RSpec::Matchers::MatcherDelegator < ::RSpec::Matchers::BaseDelegator + include ::RSpec::Matchers::Composable + + # @return [MatcherDelegator] a new instance of MatcherDelegator + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#35 + def initialize(base_matcher); end + + # Returns the value of attribute base_matcher. + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#33 + def base_matcher; end + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#39 + def method_missing(*args, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#55 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#44 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# Handles list of expected and actual value pairs when there is a need +# to render multiple diffs. Also can handle one pair. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#6 +class RSpec::Matchers::MultiMatcherDiff + # @api private + # @return [MultiMatcherDiff] a new instance of MultiMatcherDiff + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#16 + def initialize(expected_list); end + + # Returns message with diff(s) appended for provided differ + # factory and actual value if there are any + # + # @api private + # @param differ [Proc] + # @param message [String] original failure message + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#47 + def message_with_diff(message, differ); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#68 + def diffs(differ); end + + class << self + # Wraps provided matcher list in instance of + # MultiMatcherDiff. + # + # @api private + # @param matchers [Array] list of matchers to wrap + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#37 + def for_many_matchers(matchers); end + + # Wraps provided expected value in instance of + # MultiMatcherDiff. If provided value is already an + # MultiMatcherDiff then it just returns it. + # + # @api private + # @param actual [Any] value + # @param expected [Any] value to be wrapped + # @return [RSpec::Matchers::MultiMatcherDiff] + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#27 + def from(expected, actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#58 + def diff_label_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#62 + def truncated(description); end + end +end + +# Default diff label when there is only one matcher in diff +# output +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#10 +RSpec::Matchers::MultiMatcherDiff::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) + +# Maximum readable matcher description length +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#14 +RSpec::Matchers::MultiMatcherDiff::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi b/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi new file mode 100644 index 0000000..010275b --- /dev/null +++ b/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi @@ -0,0 +1,5304 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-mocks` gem. +# Please instead update this file by running `bin/tapioca gem rspec-mocks`. + + +# Share the top-level RSpec namespace, because we are a core supported +# extension. +# +# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#1 +module RSpec; end + +# Contains top-level utility methods. While this contains a few +# public methods, these are not generally meant to be called from +# a test or example. They exist primarily for integration with +# test frameworks (such as rspec-core). +# +# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#2 +module RSpec::Mocks + class << self + # Adds an allowance (stub) on `subject` + # + # @example Defines the implementation of `foo` on `bar`, using the passed block + # x = 0 + # RSpec::Mocks.allow_message(bar, :foo) { x += 1 } + # @param message a symbol, representing the message that will be + # added. + # @param opts a hash of options, :expected_from is used to set the + # original call site + # @param subject the subject to which the message will be added + # @yield an optional implementation for the allowance + # + # source://rspec-mocks//lib/rspec/mocks.rb#69 + def allow_message(subject, message, opts = T.unsafe(nil), &block); end + + # Mocks specific configuration, as distinct from `RSpec.configuration` + # which is core RSpec configuration. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#206 + def configuration; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#386 + def error_generator; end + + # Sets a message expectation on `subject`. + # + # @example Expect the message `foo` to receive `bar`, then call it + # RSpec::Mocks.expect_message(bar, :foo) + # bar.foo + # @param message a symbol, representing the message that will be + # expected. + # @param opts a hash of options, :expected_from is used to set the + # original call site + # @param subject the subject on which the message will be expected + # @yield an optional implementation for the expectation + # + # source://rspec-mocks//lib/rspec/mocks.rb#84 + def expect_message(subject, message, opts = T.unsafe(nil), &block); end + + # Performs per-test/example setup. This should be called before + # an test or example begins. + # + # source://rspec-mocks//lib/rspec/mocks.rb#38 + def setup; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks.rb#106 + def space; end + + # Cleans up all test double state (including any methods that were + # redefined on partial doubles). This _must_ be called after + # each example, even if an error was raised during the example. + # + # source://rspec-mocks//lib/rspec/mocks.rb#51 + def teardown; end + + # Verifies any message expectations that were set during the + # test or example. This should be called at the end of an example. + # + # source://rspec-mocks//lib/rspec/mocks.rb#44 + def verify; end + + # Call the passed block and verify mocks after it has executed. This allows + # mock usage in arbitrary places, such as a `before(:all)` hook. + # + # @return [Object] the return value from the block + # + # source://rspec-mocks//lib/rspec/mocks.rb#92 + def with_temporary_scope; end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#92 +class RSpec::Mocks::AllowanceTarget < ::RSpec::Mocks::TargetBase + # source://rspec-mocks//lib/rspec/mocks/targets.rb#93 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def not_to(matcher, *_args); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def to_not(matcher, *_args); end +end + +# Handles the implementation of an `and_invoke` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#772 +class RSpec::Mocks::AndInvokeImplementation + # @return [AndInvokeImplementation] a new instance of AndInvokeImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#773 + def initialize(procs_to_invoke); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#777 + def call(*args, **_arg1, &block); end +end + +# Handles the implementation of an `and_return` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#756 +class RSpec::Mocks::AndReturnImplementation + # @return [AndReturnImplementation] a new instance of AndReturnImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def initialize(values_to_return); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#761 + def call(*_args_to_ignore, &_block); end +end + +# Represents an `and_call_original` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#815 +class RSpec::Mocks::AndWrapOriginalImplementation + # @return [AndWrapOriginalImplementation] a new instance of AndWrapOriginalImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#816 + def initialize(method, block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#843 + def call(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#823 + def initial_action=(_value); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#839 + def inner_action; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#827 + def inner_action=(_value); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#835 + def present?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#831 + def terminal_action=(_value); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#850 + def cannot_modify_further_error; end +end + +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#821 +class RSpec::Mocks::AndWrapOriginalImplementation::CannotModifyFurtherError < ::StandardError; end + +# Handles the implementation of an `and_yield` declaration. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#729 +class RSpec::Mocks::AndYieldImplementation + # @return [AndYieldImplementation] a new instance of AndYieldImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#730 + def initialize(args_to_yield, eval_context, error_generator); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#736 + def call(*_args_to_ignore, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#4 +module RSpec::Mocks::AnyInstance + class << self + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#26 + def error_generator; end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#6 +class RSpec::Mocks::AnyInstance::Chain + include ::RSpec::Mocks::AnyInstance::Chain::Customizations + + # @return [Chain] a new instance of Chain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#7 + def initialize(recorder, *args, &block); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#61 + def constrained_to_any_of?(*constraints); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#75 + def expectation_fulfilled!; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#70 + def matches_args?(*args); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#79 + def never; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#53 + def playback!(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#84 + def with(*args, &block); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#99 + def last_message; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#95 + def messages; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#91 + def negated?; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#103 + def record(rspec_method_name, *args, &block); end +end + +# Provides convenience methods for recording customizations on message +# expectations. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#18 +module RSpec::Mocks::AnyInstance::Chain::Customizations + # Records the `and_call_original` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_call_original + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_call_original(*args, &block); end + + # Records the `and_raise` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_raise + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_raise(*args, &block); end + + # Records the `and_return` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_return + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_return(*args, &block); end + + # Records the `and_throw` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_throw + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_throw(*args, &block); end + + # Records the `and_wrap_original` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_wrap_original + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_wrap_original(*args, &block); end + + # Records the `and_yield` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_yield + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_yield(*args, &block); end + + # Records the `at_least` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#at_least + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def at_least(*args, &block); end + + # Records the `at_most` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#at_most + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def at_most(*args, &block); end + + # Records the `exactly` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#exactly + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def exactly(*args, &block); end + + # Records the `never` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#never + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def never(*args, &block); end + + # Records the `once` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#once + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def once(*args, &block); end + + # Records the `thrice` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#thrice + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def thrice(*args, &block); end + + # Records the `time` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#time + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def time(*args, &block); end + + # Records the `times` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#times + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def times(*args, &block); end + + # Records the `twice` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#twice + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def twice(*args, &block); end + + # Records the `with` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#with + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def with(*args, &block); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#26 + def record(method_name); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#5 +class RSpec::Mocks::AnyInstance::ErrorGenerator < ::RSpec::Mocks::ErrorGenerator + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#11 + def raise_does_not_implement_error(klass, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#15 + def raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#20 + def raise_not_supported_with_prepend_error(method_name, problem_mod); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#6 + def raise_second_instance_received_message_error(unfulfilled_expectations); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#5 +class RSpec::Mocks::AnyInstance::ExpectChainChain < ::RSpec::Mocks::AnyInstance::StubChain + # @return [ExpectChainChain] a new instance of ExpectChainChain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#6 + def initialize(*args); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#11 + def expectation_fulfilled?; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#15 + def playback!(instance); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#21 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#25 + def invocation_order; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#5 +class RSpec::Mocks::AnyInstance::ExpectationChain < ::RSpec::Mocks::AnyInstance::Chain + # @return [ExpectationChain] a new instance of ExpectationChain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#10 + def initialize(*args, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#6 + def expectation_fulfilled?; end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#17 + def verify_invocation_order(_rspec_method_name, *_args, &_block); end +end + +# Delegates messages to each of the given targets in order to +# provide the fluent interface that is available off of message +# expectations when dealing with `any_instance`. +# +# `targets` will typically contain 1 of the `AnyInstance::Recorder` +# return values and N `MessageExpectation` instances (one per instance +# of the `any_instance` klass). +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#103 +class RSpec::Mocks::AnyInstance::FluentInterfaceProxy < ::BasicObject + # @return [FluentInterfaceProxy] a new instance of FluentInterfaceProxy + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#104 + def initialize(targets); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#118 + def method_missing(*args, &block); end + + private + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#109 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#5 +class RSpec::Mocks::AnyInstance::MessageChains + # @return [MessageChains] a new instance of MessageChains + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#6 + def initialize; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#11 + def [](method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#16 + def add(method_name, chain); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#43 + def all_expectations_fulfilled?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#36 + def each_unfulfilled_expectation_matching(method_name, *args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#29 + def has_expectation?(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#64 + def playback!(instance, method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#57 + def received_expected_message!(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#22 + def remove_stub_chains_for!(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#50 + def unfulfilled_expectations; end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#73 + def raise_if_second_instance_to_receive_message(instance); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#22 +class RSpec::Mocks::AnyInstance::PositiveExpectationChain < ::RSpec::Mocks::AnyInstance::ExpectationChain + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#25 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#44 + def invocation_order; end +end + +# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#38 +RSpec::Mocks::AnyInstance::PositiveExpectationChain::ExpectationInvocationOrder = T.let(T.unsafe(nil), Hash) + +# The `AnyInstance::Recorder` is responsible for redefining the klass's +# instance method in order to add any stubs/expectations the first time +# the method is called. It's not capable of updating a stub on an instance +# that's already been previously stubbed (either directly, or via +# `any_instance`). +# +# This proxy sits in front of the recorder and delegates both to it +# and to the `RSpec::Mocks::Proxy` for each already mocked or stubbed +# instance of the class, in order to propagates changes to the instances. +# +# Note that unlike `RSpec::Mocks::Proxy`, this proxy class is stateless +# and is not persisted in `RSpec::Mocks.space`. +# +# Proxying for the message expectation fluent interface (typically chained +# off of the return value of one of these methods) is provided by the +# `FluentInterfaceProxy` class below. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#21 +class RSpec::Mocks::AnyInstance::Proxy + # @return [Proxy] a new instance of Proxy + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#22 + def initialize(recorder, target_proxies); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#55 + def expect_chain(*chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#27 + def klass; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#71 + def should_not_receive(method_name, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#61 + def should_receive(method_name, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#31 + def stub(method_name_or_method_map, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#49 + def stub_chain(*chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#43 + def unstub(method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#79 + def perform_proxying(method_name, args, block, &target_proxy_block); end +end + +# Given a class `TheClass`, `TheClass.any_instance` returns a `Recorder`, +# which records stubs and message expectations for later playback on +# instances of `TheClass`. +# +# Further constraints are stored in instances of [Chain](Chain). +# +# @see AnyInstance +# @see Chain +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#12 +class RSpec::Mocks::AnyInstance::Recorder + # @return [Recorder] a new instance of Recorder + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#16 + def initialize(klass); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#127 + def already_observing?(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#122 + def build_alias_method_name(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#53 + def expect_chain(*method_names_and_optional_return_values, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#117 + def instance_that_received(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + def klass; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + def message_chains; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#132 + def notify_received_message(_object, message, args, _blk); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#109 + def playback!(instance, method_name); end + + # The opposite of `should_receive` + # + # @see Methods#should_not_receive + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#75 + def should_not_receive(method_name, &block); end + + # Initializes the recording a message expectation to be played back + # against any instance of this object that invokes the submitted + # method. + # + # @see Methods#should_receive + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#66 + def should_receive(method_name, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#104 + def stop_all_observation!; end + + # Initializes the recording a stub to be played back against any + # instance of this object that invokes the submitted method. + # + # @see Methods#stub + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#35 + def stub(method_name, &block); end + + # Initializes the recording a stub chain to be played back against any + # instance of this object that invokes the method matching the first + # argument. + # + # @see Methods#stub_chain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#45 + def stub_chain(*method_names_and_optional_return_values, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + def stubs; end + + # Removes any previously recorded stubs, stub_chains or message + # expectations that use `method_name`. + # + # @see Methods#unstub + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#83 + def unstub(method_name); end + + # Used internally to verify that message expectations have been + # fulfilled. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#96 + def verify; end + + protected + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#148 + def stop_observing!(method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#284 + def allow_no_prepended_module_definition_of(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#159 + def ancestor_is_an_observer?(ancestor, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#235 + def backup_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#271 + def mark_invoked!(method_name); end + + # @yield [args.first, args] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#178 + def normalize_chain(*args); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#249 + def observe!(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#245 + def public_protected_or_private_method_defined?(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#183 + def received_expected_message!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#229 + def remove_dummy_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#189 + def restore_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#197 + def restore_original_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#166 + def super_class_observers_for(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#172 + def super_class_observing?(method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#5 +class RSpec::Mocks::AnyInstance::StubChain < ::RSpec::Mocks::AnyInstance::Chain + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#7 + def expectation_fulfilled?; end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#13 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#40 + def invocation_order; end + + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#44 + def verify_invocation_order(rspec_method_name, *_args, &_block); end +end + +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#38 +RSpec::Mocks::AnyInstance::StubChain::EmptyInvocationOrder = T.let(T.unsafe(nil), Hash) + +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#28 +RSpec::Mocks::AnyInstance::StubChain::InvocationOrder = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#5 +class RSpec::Mocks::AnyInstance::StubChainChain < ::RSpec::Mocks::AnyInstance::StubChain + # @return [StubChainChain] a new instance of StubChainChain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#6 + def initialize(*args); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#13 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#17 + def invocation_order; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#103 +class RSpec::Mocks::AnyInstanceAllowanceTarget < ::RSpec::Mocks::TargetBase + # source://rspec-mocks//lib/rspec/mocks/targets.rb#104 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def not_to(matcher, *_args); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def to_not(matcher, *_args); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#114 +class RSpec::Mocks::AnyInstanceExpectationTarget < ::RSpec::Mocks::TargetBase + # source://rspec-mocks//lib/rspec/mocks/targets.rb#115 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def not_to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def to_not(matcher, &block); end +end + +# Wrapper for matching arguments against a list of expected values. Used by +# the `with` method on a `MessageExpectation`: +# +# expect(object).to receive(:message).with(:a, 'b', 3) +# object.message(:a, 'b', 3) +# +# Values passed to `with` can be literal values or argument matchers that +# match against the real objects .e.g. +# +# expect(object).to receive(:message).with(hash_including(:a => 'b')) +# +# Can also be used directly to match the contents of any `Array`. This +# enables 3rd party mocking libs to take advantage of rspec's argument +# matching without using the rest of rspec-mocks. +# +# require 'rspec/mocks/argument_list_matcher' +# include RSpec::Mocks::ArgumentMatchers +# +# arg_list_matcher = RSpec::Mocks::ArgumentListMatcher.new(123, hash_including(:a => 'b')) +# arg_list_matcher.args_match?(123, :a => 'b') +# +# This class is immutable. +# +# @see ArgumentMatchers +# +# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#33 +class RSpec::Mocks::ArgumentListMatcher + # Initializes an `ArgumentListMatcher` with a collection of literal + # values and/or argument matchers. + # + # @api public + # @param expected_args [Array] a list of expected literals and/or argument matchers + # @return [ArgumentListMatcher] a new instance of ArgumentListMatcher + # @see #args_match? + # @see ArgumentMatchers + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#45 + def initialize(*expected_args, **_arg1); end + + # Matches each element in the `expected_args` against the element in the same + # position of the arguments passed to `new`. + # + # @api public + # @param actual_args [Array] + # @return [Boolean] + # @see #initialize + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#58 + def args_match?(*actual_args, **_arg1); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#35 + def expected_args; end + + # Resolves abstract arg placeholders like `no_args` and `any_args` into + # a more concrete arg list based on the provided `actual_args`. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#81 + def resolve_expected_args_based_on(actual_args); end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#100 + def ensure_expected_args_valid!; end + + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#92 + def replace_any_args_with_splat_of_anything(before_count, actual_args_count); end +end + +# Value that will match all argument lists. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#114 +RSpec::Mocks::ArgumentListMatcher::MATCH_ALL = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentListMatcher) + +# ArgumentMatchers are placeholders that you can include in message +# expectations to match arguments against a broader check than simple +# equality. +# +# With the exception of `any_args` and `no_args`, they all match against +# the arg in same position in the argument list. +# +# @see ArgumentListMatcher +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#16 +module RSpec::Mocks::ArgumentMatchers + # Matches if `arg.kind_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(kind_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#125 + def a_kind_of(klass); end + + # Matches if `arg.instance_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(instance_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#115 + def an_instance_of(klass); end + + # Acts like an arg splat, matching any number of args at any point in an arg list. + # + # @example + # expect(object).to receive(:message).with(1, 2, any_args) + # + # # matches any of these: + # object.message(1, 2) + # object.message(1, 2, 3) + # object.message(1, 2, 3, 4) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#26 + def any_args; end + + # Matches any argument at all. + # + # @example + # expect(object).to receive(:message).with(anything) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#34 + def anything; end + + # Matches an array that excludes the specified items. + # + # @example + # expect(object).to receive(:message).with(array_excluding(1,2,3)) + # expect(object).to receive(:message).with(array_excluding([1,2,3])) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#100 + def array_excluding(*args); end + + # Matches an array that includes the specified items at least once. + # Ignores duplicates and additional values + # + # @example + # expect(object).to receive(:message).with(array_including(1,2,3)) + # expect(object).to receive(:message).with(array_including([1,2,3])) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#90 + def array_including(*args); end + + # Matches a boolean value. + # + # @example + # expect(object).to receive(:message).with(boolean()) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#59 + def boolean; end + + # Matches if the actual argument responds to the specified messages. + # + # @example + # expect(object).to receive(:message).with(duck_type(:hello)) + # expect(object).to receive(:message).with(duck_type(:hello, :goodbye)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#51 + def duck_type(*args); end + + # Matches a hash that doesn't include the specified key(s) or key/value. + # + # @example + # expect(object).to receive(:message).with(hash_excluding(:key => val)) + # expect(object).to receive(:message).with(hash_excluding(:key)) + # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 + def hash_excluding(*args); end + + # Matches a hash that includes the specified key(s) or key/value pairs. + # Ignores any additional keys. + # + # @example + # expect(object).to receive(:message).with(hash_including(:key => val)) + # expect(object).to receive(:message).with(hash_including(:key)) + # expect(object).to receive(:message).with(hash_including(:key, :key2 => val2)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#70 + def hash_including(*args); end + + # Matches a hash that doesn't include the specified key(s) or key/value. + # + # @example + # expect(object).to receive(:message).with(hash_excluding(:key => val)) + # expect(object).to receive(:message).with(hash_excluding(:key)) + # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#105 + def hash_not_including(*args); end + + # Matches if `arg.instance_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(instance_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + def instance_of(klass); end + + # Matches if `arg.kind_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(kind_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 + def kind_of(klass); end + + # Matches no arguments. + # + # @example + # expect(object).to receive(:message).with(no_args) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#42 + def no_args; end + + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#128 + def anythingize_lonely_keys(*args); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#159 +class RSpec::Mocks::ArgumentMatchers::AnyArgMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 + def ===(_other); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#164 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +RSpec::Mocks::ArgumentMatchers::AnyArgMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#152 +class RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#153 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#274 +class RSpec::Mocks::ArgumentMatchers::ArrayExcludingMatcher + # @return [ArrayExcludingMatcher] a new instance of ArrayExcludingMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#275 + def initialize(unexpected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#279 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 + def description; end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#298 + def formatted_unexpected_values; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#242 +class RSpec::Mocks::ArgumentMatchers::ArrayIncludingMatcher + # @return [ArrayIncludingMatcher] a new instance of ArrayIncludingMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#243 + def initialize(expected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#247 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#260 + def description; end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#266 + def formatted_expected_values; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#188 +class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # @return [BaseHashMatcher] a new instance of BaseHashMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#189 + def initialize(expected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#193 + def ===(predicate, actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#201 + def description(name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#207 + def formatted_expected_hash; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#177 +class RSpec::Mocks::ArgumentMatchers::BooleanMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 + def ===(value); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#182 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +RSpec::Mocks::ArgumentMatchers::BooleanMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::BooleanMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#306 +class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher + # @return [DuckTypeMatcher] a new instance of DuckTypeMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#307 + def initialize(*methods_to_respond_to); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#311 + def ===(value); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#315 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#231 +class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#236 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#220 +class RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#225 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#321 +class RSpec::Mocks::ArgumentMatchers::InstanceOf + # @return [InstanceOf] a new instance of InstanceOf + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#322 + def initialize(klass); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#326 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#330 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#336 +class RSpec::Mocks::ArgumentMatchers::KindOf + # @return [KindOf] a new instance of KindOf + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#337 + def initialize(klass); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#341 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#345 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#170 +class RSpec::Mocks::ArgumentMatchers::NoArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#171 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 +RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::NoArgsMatcher) + +# Intended to be subclassed by stateless, immutable argument matchers. +# Provides a `::INSTANCE` constant for accessing a global +# singleton instance of the matcher. There is no need to construct +# multiple instance since there is no state. It also facilities the +# special case logic we need for some of these matchers, by making it +# easy to do comparisons like: `[klass::INSTANCE] == args` rather than +# `args.count == 1 && klass === args.first`. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 +class RSpec::Mocks::ArgumentMatchers::SingletonMatcher + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#146 + def inherited(subklass); end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#144 + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#7 +class RSpec::Mocks::CallbackInvocationStrategy + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#8 + def call(doubled_module); end +end + +# Raised for situations that RSpec cannot support due to mutations made +# externally on arguments that RSpec is holding onto to use for later +# comparisons. +# +# @deprecated We no longer raise this error but the constant remains until +# RSpec 4 for SemVer reasons. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#26 +class RSpec::Mocks::CannotSupportArgMutationsError < ::StandardError; end + +# When a class's `.new` method is stubbed, we want to use the method +# signature from `#initialize` because `.new`'s signature is a generic +# `def new(*args)` and it simply delegates to `#initialize` and forwards +# all args...so the method with the actually used signature is `#initialize`. +# +# This method reference implementation handles that specific case. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#184 +class RSpec::Mocks::ClassNewMethodReference < ::RSpec::Mocks::ObjectMethodReference + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#207 + def with_signature; end + + class << self + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#185 + def applies_to?(method_name); end + + # Ruby 2's Method#== is too strict + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#198 + def uses_class_new?(klass); end + end +end + +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#196 +RSpec::Mocks::ClassNewMethodReference::CLASS_NEW = T.let(T.unsafe(nil), UnboundMethod) + +# Effectively the same as an ObjectVerifyingDouble (since a class is a type +# of object), except with Module in the inheritance chain so that +# transferring nested constants to work. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#121 +class RSpec::Mocks::ClassVerifyingDouble < ::Module + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + include ::RSpec::Mocks::ObjectVerifyingDoubleMethods +end + +# Provides configuration options for rspec-mocks. +# +# source://rspec-mocks//lib/rspec/mocks/configuration.rb#4 +class RSpec::Mocks::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#5 + def initialize; end + + # Adds `stub` and `should_receive` to the given + # modules or classes. This is usually only necessary + # if you application uses some proxy classes that + # "strip themselves down" to a bare minimum set of + # methods and remove `stub` and `should_receive` in + # the process. + # + # @example + # RSpec.configure do |rspec| + # rspec.mock_with :rspec do |mocks| + # mocks.add_stub_and_should_receive_to Delegator + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#62 + def add_stub_and_should_receive_to(*modules); end + + # Sets whether RSpec will warn, ignore, or fail a test when + # expectations are set on nil. + # By default, when this flag is not set, warning messages are issued when + # expectations are set on nil. This is to prevent false-positives and to + # catch potential bugs early on. + # When set to `true`, warning messages are suppressed. + # When set to `false`, it will raise an error. + # + # @example + # RSpec.configure do |config| + # config.mock_with :rspec do |mocks| + # mocks.allow_message_expectations_on_nil = false + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#29 + def allow_message_expectations_on_nil; end + + # Sets whether RSpec will warn, ignore, or fail a test when + # expectations are set on nil. + # By default, when this flag is not set, warning messages are issued when + # expectations are set on nil. This is to prevent false-positives and to + # catch potential bugs early on. + # When set to `true`, warning messages are suppressed. + # When set to `false`, it will raise an error. + # + # @example + # RSpec.configure do |config| + # config.mock_with :rspec do |mocks| + # mocks.allow_message_expectations_on_nil = false + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#29 + def allow_message_expectations_on_nil=(_arg0); end + + # Provides a way to perform customisations when verifying doubles. + # + # @example + # RSpec::Mocks.configuration.before_verifying_doubles do |ref| + # ref.some_method! + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#128 + def before_verifying_doubles(&block); end + + # Indicates whether or not diffs should be colored. + # Delegates to rspec-core's color option if rspec-core + # is loaded; otherwise you can set it here. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#164 + def color?; end + + # Monkey-patch `Marshal.dump` to enable dumping of mocked or stubbed + # objects. By default this will not work since RSpec mocks works by + # adding singleton methods that cannot be serialized. This patch removes + # these singleton methods before serialization. Setting to falsey removes + # the patch. + # + # This method is idempotent. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#188 + def patch_marshal_to_support_partial_doubles=(val); end + + # Resets the configured syntax to the default. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#198 + def reset_syntaxes_to_default; end + + # Returns an array with a list of syntaxes + # that are enabled. + # + # @example + # unless RSpec::Mocks.configuration.syntax.include?(:expect) + # raise "this RSpec extension gem requires the rspec-mocks `:expect` syntax" + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#104 + def syntax; end + + # Provides the ability to set either `expect`, + # `should` or both syntaxes. RSpec uses `expect` + # syntax by default. This is needed if you want to + # explicitly enable `should` syntax and/or explicitly + # disable `expect` syntax. + # + # end + # + # @example + # RSpec.configure do |rspec| + # rspec.mock_with :rspec do |mocks| + # mocks.syntax = [:expect, :should] + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#81 + def syntax=(*values); end + + # Used to track whether we are temporarily suppressing verifying partial + # doubles with `without_partial_double_verification { ... }` + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#161 + def temporarily_suppress_partial_double_verification; end + + # Used to track whether we are temporarily suppressing verifying partial + # doubles with `without_partial_double_verification { ... }` + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#161 + def temporarily_suppress_partial_double_verification=(_arg0); end + + # Sets the default for the `transfer_nested_constants` option when + # stubbing constants. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#145 + def transfer_nested_constants=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#139 + def transfer_nested_constants?; end + + # When this is set to true, an error will be raised when + # `instance_double` or `class_double` is given the name of an undefined + # constant. You probably only want to set this when running your entire + # test suite, with all production code loaded. Setting this for an + # isolated unit test will prevent you from being able to isolate it! + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#120 + def verify_doubled_constant_names=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#111 + def verify_doubled_constant_names?; end + + # When set to true, partial mocks will be verified the same as object + # doubles. Any stubs will have their arguments checked against the original + # method, and methods that do not exist cannot be stubbed. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#150 + def verify_partial_doubles=(val); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#154 + def verify_partial_doubles?; end + + # Returns an array of blocks to call when verifying doubles + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#135 + def verifying_double_callbacks; end + + # Provides a way to perform customisations when verifying doubles. + # + # @example + # RSpec::Mocks.configuration.before_verifying_doubles do |ref| + # ref.some_method! + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#131 + def when_declaring_verifying_double(&block); end + + # Sets whether or not RSpec will yield the receiving instance of a + # message to blocks that are used for any_instance stub implementations. + # When set, the first yielded argument will be the receiving instance. + # Defaults to `true`. + # + # @example + # RSpec.configure do |rspec| + # rspec.mock_with :rspec do |mocks| + # mocks.yield_receiver_to_any_instance_implementation_blocks = false + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#46 + def yield_receiver_to_any_instance_implementation_blocks=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#31 + def yield_receiver_to_any_instance_implementation_blocks?; end +end + +# Provides information about constants that may (or may not) +# have been mutated by rspec-mocks. +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#7 +class RSpec::Mocks::Constant + extend ::RSpec::Support::RecursiveConstMethods + + # @api private + # @return [Constant] a new instance of Constant + # @yield [_self] + # @yieldparam _self [RSpec::Mocks::Constant] the object that the method was called on + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#11 + def initialize(name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def hidden=(_arg0); end + + # @return [Boolean] Whether or not rspec-mocks has hidden + # this constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#51 + def hidden?; end + + # The default `to_s` isn't very useful, so a custom version is provided. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#65 + def inspect; end + + # @return [Boolean] Whether or not rspec-mocks has mutated + # (stubbed or hidden) this constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#39 + def mutated?; end + + # @return [String] The fully qualified name of the constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#21 + def name; end + + # @return [Object, nil] The original value (e.g. before it + # was mutated by rspec-mocks) of the constant, or + # nil if the constant was not previously defined. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#26 + def original_value; end + + # @return [Object, nil] The original value (e.g. before it + # was mutated by rspec-mocks) of the constant, or + # nil if the constant was not previously defined. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#26 + def original_value=(_arg0); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def previously_defined=(_arg0); end + + # @return [Boolean] Whether or not the constant was defined + # before the current example. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#33 + def previously_defined?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def stubbed=(_arg0); end + + # @return [Boolean] Whether or not rspec-mocks has stubbed + # this constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#45 + def stubbed?; end + + # The default `to_s` isn't very useful, so a custom version is provided. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#62 + def to_s; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def valid_name=(_arg0); end + + # @return [Boolean] Whether or not the provided constant name + # is a valid Ruby constant name. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#57 + def valid_name?; end + + class << self + # Queries rspec-mocks to find out information about the named constant. + # + # @param name [String] the name of the constant + # @return [Constant] an object containing information about the named + # constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#86 + def original(name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#68 + def unmutated(name); end + end +end + +# Provides a means to stub constants. +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#93 +class RSpec::Mocks::ConstantMutator + extend ::RSpec::Support::RecursiveConstMethods + + class << self + # Hides a constant. + # + # @note It's recommended that you use `hide_const` in your + # examples. This is an alternate public API that is provided + # so you can hide constants in other contexts (e.g. helper + # classes). + # @param constant_name [String] The fully qualified name of the constant. + # The current constant scoping at the point of call is not considered. + # @see ExampleMethods#hide_const + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#131 + def hide(constant_name); end + + # Uses the mutator to mutate (stub or hide) a constant. Ensures that + # the mutator is correctly registered so it can be backed out at the end + # of the test. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#320 + def mutate(mutator); end + + # Used internally by the constant stubbing to raise a helpful + # error when a constant like "A::B::C" is stubbed and A::B is + # not a module (and thus, it's impossible to define "A::B::C" + # since only modules can have nested constants). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#331 + def raise_on_invalid_const; end + + # Stubs a constant. + # + # @note It's recommended that you use `stub_const` in your + # examples. This is an alternate public API that is provided + # so you can stub constants in other contexts (e.g. helper + # classes). + # @option options + # @param constant_name [String] The fully qualified name of the constant. The current + # constant scoping at the point of call is not considered. + # @param options [Hash] Stubbing options. + # @param value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @return [Object] the stubbed value of the constant + # @see ExampleMethods#stub_const + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#107 + def stub(constant_name, value, options = T.unsafe(nil)); end + end +end + +# Contains common functionality used by all of the constant mutators. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#139 +class RSpec::Mocks::ConstantMutator::BaseMutator + include ::RSpec::Support::RecursiveConstMethods + + # @return [BaseMutator] a new instance of BaseMutator + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#144 + def initialize(full_constant_name, mutated_value, transfer_nested_constants); end + + # Returns the value of attribute full_constant_name. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#142 + def full_constant_name; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#160 + def idempotently_reset; end + + # Returns the value of attribute original_value. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#142 + def original_value; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#153 + def to_constant; end +end + +# Hides a defined constant for the duration of an example. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#169 +class RSpec::Mocks::ConstantMutator::ConstantHider < ::RSpec::Mocks::ConstantMutator::BaseMutator + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#170 + def mutate; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#188 + def reset; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#178 + def to_constant; end +end + +# Replaces a defined constant for the duration of an example. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#197 +class RSpec::Mocks::ConstantMutator::DefinedConstantReplacer < ::RSpec::Mocks::ConstantMutator::BaseMutator + # @return [DefinedConstantReplacer] a new instance of DefinedConstantReplacer + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#198 + def initialize(*args); end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#203 + def mutate; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#223 + def reset; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#268 + def should_transfer_nested_constants?; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#215 + def to_constant; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#232 + def transfer_nested_constants; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#238 + def verify_constants_to_transfer!; end +end + +# Sets an undefined constant for the duration of an example. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#278 +class RSpec::Mocks::ConstantMutator::UndefinedConstantSetter < ::RSpec::Mocks::ConstantMutator::BaseMutator + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#279 + def mutate; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#299 + def reset; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#291 + def to_constant; end + + private + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#305 + def name_for(parent, name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#104 +RSpec::Mocks::DEFAULT_CALLBACK_INVOCATION_STRATEGY = T.let(T.unsafe(nil), RSpec::Mocks::CallbackInvocationStrategy) + +# An implementation of rspec-mocks' reference interface. +# Used when an object is passed to {ExampleMethods#object_double}, or +# an anonymous class or module is passed to {ExampleMethods#instance_double} +# or {ExampleMethods#class_double}. +# Represents a reference to that object. +# +# @see NamedObjectReference +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#56 +class RSpec::Mocks::DirectObjectReference + # @param object [Object] the object to which this refers + # @return [DirectObjectReference] a new instance of DirectObjectReference + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#58 + def initialize(object); end + + # Defined for interface parity with the other object reference + # implementations. Raises an `ArgumentError` to indicate that `as_stubbed_const` + # is invalid when passing an object argument to `object_double`. + # + # @raise [ArgumentError] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#70 + def const_to_replace; end + + # Always returns true for an object as the class is defined. + # + # @return [true] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#85 + def defined?; end + + # @return [String] the object's description (via `#inspect`). + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#63 + def description; end + + # The target of the verifying double (the object itself). + # + # @return [Object] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#78 + def target; end + + # Yields if the reference target is loaded, providing a generic mechanism + # to optionally run a bit of code only when a reference's target is + # loaded. + # + # This specific implementation always yields because direct references + # are always loaded. + # + # @yield [Object] the target of this reference. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#97 + def when_loaded; end +end + +# A generic test double object. `double`, `instance_double` and friends +# return an instance of this. +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#135 +class RSpec::Mocks::Double + include ::RSpec::Mocks::TestDouble +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#36 +class RSpec::Mocks::ErrorGenerator + # @return [ErrorGenerator] a new instance of ErrorGenerator + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#39 + def initialize(target = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#71 + def default_error_message(expectation, expected_args, actual_args); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#132 + def describe_expectation(verb, message, expected_received_count, _actual_received_count, args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#215 + def expectation_on_nil_message(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#222 + def intro(unwrapped = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#235 + def method_call_args_description(args, generic_prefix = T.unsafe(nil), matcher_prefix = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#44 + def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#37 + def opts=(_arg0); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#203 + def raise_already_invoked_error(message, calling_customization); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#193 + def raise_cant_constrain_count_for_negated_have_received_error(count_constraint); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#170 + def raise_double_negation_error(wrapped_expression); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#77 + def raise_expectation_error(message, expected_received_count, argument_list_matcher, actual_received_count, expectation_count_type, args, backtrace_line = T.unsafe(nil), source_id = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#164 + def raise_expectation_on_mocked_method(method); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#211 + def raise_expectation_on_nil_error(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#158 + def raise_expectation_on_unstubbed_method(method); end + + # @private + # @raise [ExpiredTestDoubleError] + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#123 + def raise_expired_test_double_error; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#187 + def raise_have_received_disallowed(type, reason); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#118 + def raise_invalid_arguments_error(verifier); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#198 + def raise_method_not_stubbed_error(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#142 + def raise_missing_block_error(args_to_yield); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#59 + def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end + + # @private + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#111 + def raise_non_public_error(method_name, visibility); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#152 + def raise_only_valid_on_a_partial_double(method); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#137 + def raise_out_of_order_error(message); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#67 + def raise_similar_message_args_error(expectation, args_for_multiple_calls, backtrace_line = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#54 + def raise_unexpected_message_args_error(expectation, args_for_multiple_calls, source_id = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#49 + def raise_unexpected_message_error(message, args); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#87 + def raise_unimplemented_error(doubled_module, method_name, object); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#178 + def raise_verifying_double_not_defined_error(ref); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#147 + def raise_wrong_arity_error(args_to_yield, signature); end + + private + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#328 + def __raise(message, backtrace_line = T.unsafe(nil), source_id = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#356 + def arg_list(args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#366 + def count_message(count, expectation_count_type = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#302 + def diff_message(expected_args, actual_args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#324 + def differ; end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#268 + def error_message(expectation, args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#257 + def expected_part_of_expectation_error(expected_received_count, expectation_count_type, argument_list_matcher); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#351 + def format_args(args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#360 + def format_received_args(args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#380 + def group_count(index, args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#376 + def grouped_args(args); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#320 + def list_of_exactly_one_string?(args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#347 + def notify(*args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#342 + def prepend_to_backtrace(exception, line); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#250 + def received_part_of_expectation_error(actual_received_count, args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#372 + def times(count); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#264 + def unexpected_arguments_message(expected_args_string, actual_args_string); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#312 + def unpack_string_args(formatted_expected_args, actual_args); end +end + +# Contains methods intended to be used from within code examples. +# Mix this in to your test context (such as a test framework base class) +# to use rspec-mocks with your test framework. If you're using rspec-core, +# it'll take care of doing this for you. +# +# source://rspec-mocks//lib/rspec/mocks/example_methods.rb#9 +module RSpec::Mocks::ExampleMethods + include ::RSpec::Mocks::ArgumentMatchers + include ::RSpec::Mocks::ExampleMethods::ExpectHost + + # Used to wrap an object in preparation for stubbing a method + # on it. + # + # @example + # allow(dbl).to receive(:foo).with(5).and_return(:return_value) + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def allow(target); end + + # Used to wrap a class in preparation for stubbing a method + # on instances of it. + # + # @example + # allow_any_instance_of(MyClass).to receive(:foo) + # @note This is only available when you have enabled the `expect` syntax. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def allow_any_instance_of(klass); end + + # Disables warning messages about expectations being set on nil. + # + # By default warning messages are issued when expectations are set on + # nil. This is to prevent false-positives and to catch potential bugs + # early on. + # + # @deprecated Use {RSpec::Mocks::Configuration#allow_message_expectations_on_nil} instead. + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#201 + def allow_message_expectations_on_nil; end + + # Constructs a test double against a specific class. If the given class + # name has been loaded, only class methods defined on the class are + # allowed to be stubbed. In all other ways it behaves like a + # [double](double). + # + # @overload class_double + # @overload class_double + # @overload class_double + # @overload class_double + # @return ClassVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#79 + def class_double(doubled_class, *args); end + + # Constructs a test double that is optimized for use with `have_received` + # against a specific class. If the given class name has been loaded, + # only class methods defined on the class are allowed to be stubbed. + # With a normal double one has to stub methods in order to be able to spy + # them. An class_spy automatically spies on all class methods to which the + # class responds. + # + # @overload class_spy + # @overload class_spy + # @overload class_spy + # @overload class_spy + # @return ClassVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#191 + def class_spy(*args); end + + # Constructs an instance of [RSpec::Mocks::Double](RSpec::Mocks::Double) configured + # with an optional name, used for reporting in failure messages, and an optional + # hash of message/return-value pairs. + # + # @example + # book = double("book", :title => "The RSpec Book") + # book.title #=> "The RSpec Book" + # + # card = double("card", :suit => "Spades", :rank => "A") + # card.suit #=> "Spades" + # card.rank #=> "A" + # @overload double + # @overload double + # @overload double + # @overload double + # @return [Double] + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#34 + def double(*args); end + + # Used to wrap a class in preparation for setting a mock expectation + # on instances of it. + # + # @example + # expect_any_instance_of(MyClass).to receive(:foo) + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def expect_any_instance_of(klass); end + + # Verifies that the given object received the expected message during the + # course of the test. On a spy objects or as null object doubles this + # works for any method, on other objects the method must have + # been stubbed beforehand in order for messages to be verified. + # + # Stubbing and verifying messages received in this way implements the + # Test Spy pattern. + # + # @example + # invitation = double('invitation', accept: true) + # user.accept_invitation(invitation) + # expect(invitation).to have_received(:accept) + # + # # You can also use most message expectations: + # expect(invitation).to have_received(:accept).with(mailer).once + # @note `have_received(...).with(...)` is unable to work properly when + # passed arguments are mutated after the spy records the received message. + # @param method_name [Symbol] name of the method expected to have been + # called. + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#281 + def have_received(method_name, &block); end + + # Hides the named constant with the given value. The constant will be + # undefined for the duration of the test. + # + # Like method stubs, the constant will be restored to its original value + # when the example completes. + # + # @example + # hide_const("MyClass") # => MyClass is now an undefined constant + # @param constant_name [String] The fully qualified name of the constant. + # The current constant scoping at the point of call is not considered. + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#256 + def hide_const(constant_name); end + + # Constructs a test double against a specific class. If the given class + # name has been loaded, only instance methods defined on the class are + # allowed to be stubbed. In all other ways it behaves like a + # [double](double). + # + # @overload instance_double + # @overload instance_double + # @overload instance_double + # @overload instance_double + # @return InstanceVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#56 + def instance_double(doubled_class, *args); end + + # Constructs a test double that is optimized for use with `have_received` + # against a specific class. If the given class name has been loaded, only + # instance methods defined on the class are allowed to be stubbed. With + # a normal double one has to stub methods in order to be able to spy + # them. An instance_spy automatically spies on all instance methods to + # which the class responds. + # + # @overload instance_spy + # @overload instance_spy + # @overload instance_spy + # @overload instance_spy + # @return InstanceVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#144 + def instance_spy(*args); end + + # Constructs a test double against a specific object. Only the methods + # the object responds to are allowed to be stubbed. If a String argument + # is provided, it is assumed to reference a constant object which is used + # for verification. In all other ways it behaves like a [double](double). + # + # @overload object_double + # @overload object_double + # @overload object_double + # @overload object_double + # @return ObjectVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#102 + def object_double(object_or_name, *args); end + + # Constructs a test double that is optimized for use with `have_received` + # against a specific object. Only instance methods defined on the object + # are allowed to be stubbed. With a normal double one has to stub + # methods in order to be able to spy them. An object_spy automatically + # spies on all methods to which the object responds. + # + # @overload object_spy + # @overload object_spy + # @overload object_spy + # @overload object_spy + # @return ObjectVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#167 + def object_spy(*args); end + + # Used to specify a message that you expect or allow an object + # to receive. The object returned by `receive` supports the same + # fluent interface that `should_receive` and `stub` have always + # supported, allowing you to constrain the arguments or number of + # times, and configure how the object should respond to the message. + # + # @example + # expect(obj).to receive(:hello).with("world").exactly(3).times + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def receive(method_name, &block); end + + # stubs/mocks a chain of messages on an object or test double. + # + # ## Warning: + # + # Chains can be arbitrarily long, which makes it quite painless to + # violate the Law of Demeter in violent ways, so you should consider any + # use of `receive_message_chain` a code smell. Even though not all code smells + # indicate real problems (think fluent interfaces), `receive_message_chain` still + # results in brittle examples. For example, if you write + # `allow(foo).to receive_message_chain(:bar, :baz => 37)` in a spec and then the + # implementation calls `foo.baz.bar`, the stub will not work. + # + # @example + # allow(double).to receive_message_chain("foo.bar") { :baz } + # allow(double).to receive_message_chain(:foo, :bar => :baz) + # allow(double).to receive_message_chain(:foo, :bar) { :baz } + # + # # Given any of ^^ these three forms ^^: + # double.foo.bar # => :baz + # + # # Common use in Rails/ActiveRecord: + # allow(Article).to receive_message_chain("recent.published") { [Article.new] } + # @note If you disable the `:expect` syntax this method will be undefined. + # @overload receive_message_chain + # @overload receive_message_chain + # @overload receive_message_chain + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def receive_message_chain(*messages, &block); end + + # Shorthand syntax used to setup message(s), and their return value(s), + # that you expect or allow an object to receive. The method takes a hash + # of messages and their respective return values. Unlike with `receive`, + # you cannot apply further customizations using a block or the fluent + # interface. + # + # @example + # allow(obj).to receive_messages(:speak => "Hello World") + # allow(obj).to receive_messages(:speak => "Hello", :meow => "Meow") + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def receive_messages(message_return_value_hash, &_block); end + + # Constructs a test double that is optimized for use with + # `have_received`. With a normal double one has to stub methods in order + # to be able to spy them. A spy automatically spies on all methods. + # + # @overload spy + # @overload spy + # @overload spy + # @overload spy + # @return [Double] + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#120 + def spy(*args); end + + # Stubs the named constant with the given value. + # Like method stubs, the constant will be restored + # to its original value (or lack of one, if it was + # undefined) when the example completes. + # + # @example + # stub_const("MyClass", Class.new) # => Replaces (or defines) MyClass with a new class object. + # stub_const("SomeModel::PER_PAGE", 5) # => Sets SomeModel::PER_PAGE to 5. + # + # class CardDeck + # SUITS = [:Spades, :Diamonds, :Clubs, :Hearts] + # NUM_CARDS = 52 + # end + # + # stub_const("CardDeck", Class.new) + # CardDeck::SUITS # => uninitialized constant error + # CardDeck::NUM_CARDS # => uninitialized constant error + # + # stub_const("CardDeck", Class.new, :transfer_nested_constants => true) + # CardDeck::SUITS # => our suits array + # CardDeck::NUM_CARDS # => 52 + # + # stub_const("CardDeck", Class.new, :transfer_nested_constants => [:SUITS]) + # CardDeck::SUITS # => our suits array + # CardDeck::NUM_CARDS # => uninitialized constant error + # @option options + # @param constant_name [String] The fully qualified name of the constant. The current + # constant scoping at the point of call is not considered. + # @param options [Hash] Stubbing options. + # @param value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @return [Object] the stubbed value of the constant + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#241 + def stub_const(constant_name, value, options = T.unsafe(nil)); end + + # Turns off the verifying of partial doubles for the duration of the + # block, this is useful in situations where methods are defined at run + # time and you wish to define stubs for them but not turn off partial + # doubles for the entire run suite. (e.g. view specs in rspec-rails). + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#289 + def without_partial_double_verification; end + + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#423 + def declare_double(type, *args); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#408 + def declare_verifying_double(type, ref, *args); end + + # @private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#401 + def extended(object); end + + # @private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#392 + def included(klass); end + end +end + +# This module exists to host the `expect` method for cases where +# rspec-mocks is used w/o rspec-expectations. +# +# source://rspec-mocks//lib/rspec/mocks/example_methods.rb#430 +module RSpec::Mocks::ExampleMethods::ExpectHost + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#84 + def expect(target); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#61 +class RSpec::Mocks::ExpectChain < ::RSpec::Mocks::MessageChain + private + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#69 + def expectation(object, message, &return_block); end + + class << self + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#63 + def expect_chain_on(object, *chain, &blk); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#87 +class RSpec::Mocks::ExpectationTarget < ::RSpec::Mocks::TargetBase + include ::RSpec::Mocks::ExpectationTargetMethods +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#73 +module RSpec::Mocks::ExpectationTargetMethods + include ::RSpec::Mocks::TargetDelegationInstanceMethods + extend ::RSpec::Mocks::TargetDelegationClassMethods + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#81 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def not_to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def to_not(matcher, &block); end +end + +# Raised when a test double is used after it has been torn +# down (typically at the end of an rspec-core example). +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#10 +class RSpec::Mocks::ExpiredTestDoubleError < ::RSpec::Mocks::MockExpectationError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks.rb#112 +RSpec::Mocks::IGNORED_BACKTRACE_LINE = T.let(T.unsafe(nil), String) + +# Represents a configured implementation. Takes into account +# any number of sub-implementations. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#792 +class RSpec::Mocks::Implementation + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#795 + def call(*args, **_arg1, &block); end + + # Returns the value of attribute initial_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#793 + def initial_action; end + + # Sets the attribute initial_action + # + # @param value the value to set the attribute initial_action to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#793 + def initial_action=(_arg0); end + + # Returns the value of attribute inner_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#793 + def inner_action; end + + # Sets the attribute inner_action + # + # @param value the value to set the attribute inner_action to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#793 + def inner_action=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#802 + def present?; end + + # Returns the value of attribute terminal_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#793 + def terminal_action; end + + # Sets the attribute terminal_action + # + # @param value the value to set the attribute terminal_action to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#793 + def terminal_action=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#808 + def actions; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#113 +class RSpec::Mocks::InstanceMethodReference < ::RSpec::Mocks::MethodReference + private + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#138 + def find_method(mod); end + + # Ideally, we'd use `respond_to?` for `method_implemented?` but we need a + # reference to an instance to do that and we don't have one. Note that + # we may get false negatives: if the method is implemented via + # `method_missing`, we'll return `false` even though it meets our + # definition of "implemented". However, it's the best we can do. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#125 + def method_defined?(mod); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#116 + def method_implemented?(mod); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#143 + def visibility_from(mod); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#4 +class RSpec::Mocks::InstanceMethodStasher + # @return [InstanceMethodStasher] a new instance of InstanceMethodStasher + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#5 + def initialize(object, method); end + + # ruby 2.0.0-p247 and 2.0.0-p195 both have a bug that we can't work around :(. + # https://bugs.ruby-lang.org/issues/8686 + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#91 + def handle_restoration_failures; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#49 + def method_is_stashed?; end + + # Returns the value of attribute original_method. + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#14 + def original_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#61 + def restore; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#54 + def stash; end + + private + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#100 + def method_defined_directly_on_klass?; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#105 + def method_defined_on_klass?(klass = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#109 + def method_owned_by_klass?; end +end + +# A mock providing a custom proxy that can verify the validity of any +# method stubs or expectations against the public instance methods of the +# given class. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#73 +class RSpec::Mocks::InstanceVerifyingDouble + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#77 + def __build_mock_proxy(order_group); end +end + +# Support for `patch_marshal_to_support_partial_doubles` configuration. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#6 +class RSpec::Mocks::MarshalExtension + class << self + # source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#7 + def patch!; end + + # source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#27 + def unpatch!; end + end +end + +# Namespace for mock-related matchers. +# +# source://rspec-mocks//lib/rspec/mocks.rb#122 +module RSpec::Mocks::Matchers; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#5 +class RSpec::Mocks::Matchers::ExpectationCustomization + # @return [ExpectationCustomization] a new instance of ExpectationCustomization + # + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#8 + def initialize(method_name, args, block); end + + # Returns the value of attribute block. + # + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#6 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#6 + def block=(_arg0); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#14 + def playback_onto(expectation); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#5 +class RSpec::Mocks::Matchers::HaveReceived + include ::RSpec::Mocks::Matchers::Matcher + + # @return [HaveReceived] a new instance of HaveReceived + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#12 + def initialize(method_name, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def at_least(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def at_most(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#48 + def description; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#32 + def does_not_match?(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def exactly(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#40 + def failure_message; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#44 + def failure_message_when_negated; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#19 + def matcher_name; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#23 + def matches?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def once(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def ordered(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#67 + def setup_allowance(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#71 + def setup_any_instance_allowance(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#75 + def setup_any_instance_expectation(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#79 + def setup_any_instance_negative_expectation(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#59 + def setup_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#63 + def setup_negative_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def thrice(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def time(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def times(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def twice(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def with(*args); end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#95 + def apply_constraints_to(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#112 + def capture_failure_message; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#106 + def count_constraint; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#85 + def disallow(type, reason = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#101 + def ensure_count_unconstrained; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#89 + def expect; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#123 + def expected_messages_received_in_order?; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#128 + def mock_proxy; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#118 + def notify_failure_message; end +end + +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#9 +RSpec::Mocks::Matchers::HaveReceived::ARGS_CONSTRAINTS = T.let(T.unsafe(nil), Array) + +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#10 +RSpec::Mocks::Matchers::HaveReceived::CONSTRAINTS = T.let(T.unsafe(nil), Array) + +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#8 +RSpec::Mocks::Matchers::HaveReceived::COUNT_CONSTRAINTS = T.let(T.unsafe(nil), Array) + +# just a "tag" for rspec-mock matchers detection +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks.rb#125 +module RSpec::Mocks::Matchers::Matcher; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#7 +class RSpec::Mocks::Matchers::Receive + include ::RSpec::Mocks::Matchers::Matcher + + # @return [Receive] a new instance of Receive + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#10 + def initialize(message, block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_call_original(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_invoke(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_raise(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_return(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_throw(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_wrap_original(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_yield(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def at_least(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def at_most(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#20 + def description; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#39 + def does_not_match?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def exactly(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def inspect(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#16 + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#28 + def matches?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def never(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def once(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def ordered(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#41 + def setup_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#54 + def setup_any_instance_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#46 + def setup_any_instance_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#50 + def setup_any_instance_negative_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 + def setup_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 + def setup_negative_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def thrice(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def time(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def times(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def to_s(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def twice(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def with(*args, **_arg1, &block); end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#71 + def describable; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#108 + def move_block_to_last_customization(block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#91 + def setup_any_instance_method_substitute(subject, method, block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#96 + def setup_method_substitute(host, method, block, *args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#86 + def setup_mock_proxy_method_substitute(subject, method, block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#75 + def warn_if_any_instance(expression, subject); end +end + +# MessageExpectation objects are able to describe themselves in detail. +# We use this as a fall back when a MessageExpectation is not available. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#119 +class RSpec::Mocks::Matchers::Receive::DefaultDescribable + # @return [DefaultDescribable] a new instance of DefaultDescribable + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#120 + def initialize(message); end + + # This is much simpler for the `any_instance` case than what the + # user may want, but I'm not up for putting a bunch of effort + # into full descriptions for `any_instance` expectations at this point :(. + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#127 + def description_for(verb); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#7 +class RSpec::Mocks::Matchers::ReceiveMessageChain + include ::RSpec::Mocks::Matchers::Matcher + + # @return [ReceiveMessageChain] a new instance of ReceiveMessageChain + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#10 + def initialize(chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_call_original(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_invoke(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_raise(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_return(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_throw(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_yield(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#27 + def description; end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#60 + def does_not_match?(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#23 + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#59 + def matches?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#31 + def setup_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#36 + def setup_any_instance_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#42 + def setup_any_instance_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#48 + def setup_expectation(subject, &block); end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#53 + def setup_negative_expectation(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def with(*args, &block); end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#70 + def formatted_chain; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#64 + def replay_customizations(chain); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#5 +class RSpec::Mocks::Matchers::ReceiveMessages + include ::RSpec::Mocks::Matchers::Matcher + + # @return [ReceiveMessages] a new instance of ReceiveMessages + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#8 + def initialize(message_return_value_hash); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#17 + def description; end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#34 + def does_not_match?(_subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#13 + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#27 + def matches?(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#36 + def setup_allowance(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#50 + def setup_any_instance_allowance(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#43 + def setup_any_instance_expectation(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#21 + def setup_expectation(subject); end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#29 + def setup_negative_expectation(_subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#55 + def warn_about_block; end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#65 + def any_instance_of(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#69 + def each_message_on(host); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#61 + def proxy_on(subject); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#4 +class RSpec::Mocks::MessageChain + # @return [MessageChain] a new instance of MessageChain + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#7 + def initialize(object, *chain, &blk); end + + # Returns the value of attribute block. + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + def block; end + + # Returns the value of attribute chain. + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + def chain; end + + # Returns the value of attribute object. + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + def object; end + + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#13 + def setup_chain; end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#33 + def chain_on(object, *chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#54 + def find_matching_expectation; end + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#49 + def find_matching_stub; end + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#38 + def format_chain(*chain, &blk); end +end + +# Represents an individual method stub or message expectation. The methods +# defined here can be used to configure how it behaves. The methods return +# `self` so that they can be chained together to form a fluent interface. +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#44 +class RSpec::Mocks::MessageExpectation + include ::RSpec::Mocks::MessageExpectation::ImplementationDetails + + # Tells the object to delegate to the original unmodified method + # when it receives the message. + # + # @example + # expect(counter).to receive(:increment).and_call_original + # original_count = counter.count + # counter.increment + # expect(counter.count).to eq(original_count + 1) + # @note This is only available on partial doubles. + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#141 + def and_call_original; end + + # Tells the object to invoke a Proc when it receives the message. Given + # more than one value, the result of the first Proc is returned the first + # time the message is received, the result of the second Proc is returned + # the next time, etc, etc. + # + # If the message is received more times than there are Procs, the result of + # the last Proc is returned for every subsequent call. + # + # @example + # allow(api).to receive(:get_foo).and_invoke(-> { raise ApiTimeout }) + # api.get_foo # => raises ApiTimeout + # api.get_foo # => raises ApiTimeout + # + # allow(api).to receive(:get_foo).and_invoke(-> { raise ApiTimeout }, -> { raise ApiTimeout }, -> { :a_foo }) + # api.get_foo # => raises ApiTimeout + # api.get_foo # => raises ApiTimeout + # api.get_foo # => :a_foo + # api.get_foo # => :a_foo + # api.get_foo # => :a_foo + # # etc + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#109 + def and_invoke(first_proc, *procs, &_block); end + + # Tells the object to raise an exception when the message is received. + # + # @example + # allow(car).to receive(:go).and_raise + # allow(car).to receive(:go).and_raise(OutOfGas) + # allow(car).to receive(:go).and_raise(OutOfGas, "At least 2 oz of gas needed to drive") + # allow(car).to receive(:go).and_raise(OutOfGas.new(2, :oz)) + # @note When you pass an exception class, the MessageExpectation will raise + # an instance of it, creating it with `exception` and passing `message` + # if specified. If the exception class initializer requires more than + # one parameters, you must pass in an instance and not the class, + # otherwise this method will raise an ArgumentError exception. + # @overload and_raise + # @overload and_raise + # @overload and_raise + # @overload and_raise + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#186 + def and_raise(*args); end + + # Tells the object to return a value when it receives the message. Given + # more than one value, the first value is returned the first time the + # message is received, the second value is returned the next time, etc, + # etc. + # + # If the message is received more times than there are values, the last + # value is returned for every subsequent call. + # + # @example + # allow(counter).to receive(:count).and_return(1) + # counter.count # => 1 + # counter.count # => 1 + # + # allow(counter).to receive(:count).and_return(1,2,3) + # counter.count # => 1 + # counter.count # => 2 + # counter.count # => 3 + # counter.count # => 3 + # counter.count # => 3 + # # etc + # @overload and_return + # @overload and_return + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#71 + def and_return(first_value, *values, &_block); end + + # Tells the object to throw a symbol (with the object if that form is + # used) when the message is received. + # + # @example + # allow(car).to receive(:go).and_throw(:out_of_gas) + # allow(car).to receive(:go).and_throw(:out_of_gas, :level => 0.1) + # @overload and_throw + # @overload and_throw + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#202 + def and_throw(*args); end + + # Decorates the stubbed method with the supplied block. The original + # unmodified method is passed to the block along with any method call + # arguments so you can delegate to it, whilst still being able to + # change what args are passed to it and/or change the return value. + # + # @example + # expect(api).to receive(:large_list).and_wrap_original do |original_method, *args, &block| + # original_method.call(*args, &block).first(10) + # end + # @note This is only available on partial doubles. + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#162 + def and_wrap_original(&block); end + + # Tells the object to yield one or more args to a block when the message + # is received. + # + # @example + # stream.stub(:open).and_yield(StringIO.new) + # @return [MessageExpectation] self, to support further chaining. + # @yield [@eval_context = Object.new] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#214 + def and_yield(*args, &block); end + + # Constrain a message expectation to be received at least a specific + # number of times. + # + # @example + # expect(dealer).to receive(:deal_card).at_least(9).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#249 + def at_least(n, &block); end + + # Constrain a message expectation to be received at most a specific + # number of times. + # + # @example + # expect(dealer).to receive(:deal_card).at_most(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#268 + def at_most(n, &block); end + + # Constrain a message expectation to be received a specific number of + # times. + # + # @example + # expect(dealer).to receive(:deal_card).exactly(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#236 + def exactly(n, &block); end + + # @return [String] a nice representation of the message expectation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#401 + def inspect; end + + # Expect a message not to be received at all. + # + # @example + # expect(car).to receive(:stop).never + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#293 + def never; end + + # Expect a message to be received exactly one time. + # + # @example + # expect(car).to receive(:go).once + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#304 + def once(&block); end + + # Expect messages to be received in a specific order. + # + # @example + # expect(api).to receive(:prepare).ordered + # expect(api).to receive(:run).ordered + # expect(api).to receive(:finish).ordered + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#379 + def ordered(&block); end + + # Expect a message to be received exactly three times. + # + # @example + # expect(car).to receive(:go).thrice + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#326 + def thrice(&block); end + + # Syntactic sugar for `exactly`, `at_least` and `at_most` + # + # @example + # expect(dealer).to receive(:deal_card).exactly(10).times + # expect(dealer).to receive(:deal_card).at_least(10).times + # expect(dealer).to receive(:deal_card).at_most(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#286 + def time(&block); end + + # Syntactic sugar for `exactly`, `at_least` and `at_most` + # + # @example + # expect(dealer).to receive(:deal_card).exactly(10).times + # expect(dealer).to receive(:deal_card).at_least(10).times + # expect(dealer).to receive(:deal_card).at_most(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#282 + def times(&block); end + + # @return [String] a nice representation of the message expectation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#396 + def to_s; end + + # Expect a message to be received exactly two times. + # + # @example + # expect(car).to receive(:go).twice + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#315 + def twice(&block); end + + # Constrains a stub or message expectation to invocations with specific + # arguments. + # + # With a stub, if the message might be received with other args as well, + # you should stub a default value first, and then stub or mock the same + # message using `with` to constrain to specific arguments. + # + # A message expectation will fail if the message is received with different + # arguments. + # + # @example + # allow(cart).to receive(:add) { :failure } + # allow(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success } + # cart.add(Book.new(:isbn => 1234567890)) + # # => :failure + # cart.add(Book.new(:isbn => 1934356379)) + # # => :success + # + # expect(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success } + # cart.add(Book.new(:isbn => 1234567890)) + # # => failed expectation + # cart.add(Book.new(:isbn => 1934356379)) + # # => passes + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#359 + def with(*args, **_arg1, &block); end +end + +# Contains the parts of `MessageExpectation` that aren't part of +# rspec-mocks' public API. The class is very big and could really use +# some collaborators it delegates to for this stuff but for now this was +# the simplest way to split the public from private stuff to make it +# easier to publish the docs for the APIs we want published. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#412 +module RSpec::Mocks::MessageExpectation::ImplementationDetails + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#423 + def initialize(error_generator, expectation_ordering, expected_from, method_double, type = T.unsafe(nil), opts = T.unsafe(nil), &implementation_block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#602 + def actual_received_count_matters?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#589 + def additional_expected_calls; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#546 + def advise(*args); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#459 + def and_yield_receiver_to_implementation; end + + # Sets the attribute argument_list_matcher + # + # @param value the value to set the attribute argument_list_matcher to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#416 + def argument_list_matcher=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#501 + def called_max_times?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#578 + def description_for(verb); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#521 + def ensure_expected_ordering_received!; end + + # Returns the value of attribute error_generator. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def error_generator; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#572 + def expectation_count_type; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#455 + def expected_args; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#517 + def expected_messages_received?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#554 + def generate_error; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#526 + def ignoring_args?; end + + # Returns the value of attribute implementation. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def implementation; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#606 + def increase_actual_received_count!; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#478 + def invoke(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#492 + def invoke_without_incrementing_received_count(parent_stub, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#468 + def matches?(message, *args, **_arg2); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#530 + def matches_at_least_count?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#534 + def matches_at_most_count?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#538 + def matches_exact_count?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#508 + def matches_name_but_not_args(message, *args); end + + # Returns the value of attribute message. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#414 + def message; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#497 + def negative?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#598 + def negative_expectation_for?(message); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#594 + def ordered?; end + + # Returns the value of attribute orig_object. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#415 + def orig_object; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#585 + def raise_out_of_order_error; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#568 + def raise_unexpected_message_args_error(args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#473 + def safe_invoke(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#487 + def safe_invoke_without_incrementing_received_count(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#542 + def similar_messages; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#420 + def type; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#550 + def unadvise(args); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#512 + def verify_messages_received; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#464 + def yield_receiver_to_implementation_block?; end + + protected + + # Sets the attribute error_generator + # + # @param value the value to set the attribute error_generator to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def error_generator=(_arg0); end + + # Sets the attribute expected_from + # + # @param value the value to set the attribute expected_from to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#416 + def expected_from=(_arg0); end + + # Sets the attribute expected_received_count + # + # @param value the value to set the attribute expected_received_count to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#416 + def expected_received_count=(_arg0); end + + # Sets the attribute implementation + # + # @param value the value to set the attribute implementation to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def implementation=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#614 + def exception_source_id; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#666 + def has_been_invoked?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#689 + def initial_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#693 + def inner_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#633 + def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, **_arg4, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#618 + def invoking_internals; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#622 + def invoking_internals=(value); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#670 + def raise_already_invoked_error_if_necessary(calling_customization); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#676 + def set_expected_received_count(relativity, n); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#699 + def terminal_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#703 + def warn_about_stub_override; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#710 + def wrap_original(method_name, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#4 +class RSpec::Mocks::MethodDouble + # @private + # @return [MethodDouble] a new instance of MethodDouble + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#12 + def initialize(object, method_name, proxy); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#216 + def add_default_stub(*args, &implementation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#166 + def add_expectation(error_generator, expectation_ordering, expected_from, opts, &implementation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#202 + def add_simple_expectation(method_name, response, error_generator, backtrace_line); end + + # A simple stub can only return a concrete value for a message, and + # cannot match on arguments. It is used as an optimization over + # `add_stub` / `add_expectation` where it is known in advance that this + # is all that will be required of a stub, such as when passing attributes + # to the `double` example method. They do not stash or restore existing method + # definitions. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#197 + def add_simple_stub(method_name, response); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#181 + def add_stub(error_generator, expectation_ordering, expected_from, opts = T.unsafe(nil), &implementation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#175 + def build_expectation(error_generator, expectation_ordering); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#152 + def clear; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#61 + def configure_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#68 + def define_proxy_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def expectations; end + + # The type of message expectation to create has been extracted to its own + # method so that subclasses can override it. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#161 + def message_expectation_class; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#41 + def method_missing_block; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def method_name; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def method_stasher; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#56 + def object_singleton_class; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 + def original_implementation_callable; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#34 + def original_method; end + + # The implementation of the proxied method. Subclasses may override this + # method to perform additional operations. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#97 + def proxy_method_invoked(_obj, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#233 + def raise_method_not_stubbed_error; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#222 + def remove_stub; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#228 + def remove_stub_if_present; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#146 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#103 + def restore_original_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#133 + def restore_original_visibility; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#32 + def save_original_implementation_callable!; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#207 + def setup_simple_method_double(method_name, response, collection, error_generator = T.unsafe(nil), backtrace_line = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#122 + def show_frozen_warning; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def stubs; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#141 + def verify; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#51 + def visibility; end + + private + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#255 + def definition_target; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#275 + def new_rspec_prepended_module; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#293 + def remove_method_from_definition_target; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#259 + def usable_rspec_prepended_module; end +end + +# @private TODO: drop in favor of FrozenError in ruby 2.5+ +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 +RSpec::Mocks::MethodDouble::FROZEN_ERROR_MSG = T.let(T.unsafe(nil), Regexp) + +# We subclass `Module` in order to be able to easily detect our prepended module. +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#253 +class RSpec::Mocks::MethodDouble::RSpecPrependedModule < ::Module; end + +# Represents a method on an object that may or may not be defined. +# The method may be an instance method on a module or a method on +# any object. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#10 +class RSpec::Mocks::MethodReference + # @return [MethodReference] a new instance of MethodReference + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#15 + def initialize(object_reference, method_name); end + + # A method is defined if we are able to get a `Method` object for it. + # In that case, we can assert against metadata like the arity. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#46 + def defined?; end + + # A method is implemented if sending the message does not result in + # a `NoMethodError`. It might be dynamically implemented by + # `method_missing`. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#23 + def implemented?; end + + # Returns true if we definitively know that sending the method + # will result in a `NoMethodError`. + # + # This is not simply the inverse of `implemented?`: there are + # cases when we don't know if a method is implemented and + # both `implemented?` and `unimplemented?` will return false. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#35 + def unimplemented?; end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#57 + def visibility; end + + # @yield [Support::MethodSignature.new(original)] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#52 + def with_signature; end + + private + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#105 + def original_method; end + + class << self + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#11 + def for(object_reference, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#67 + def instance_method_visibility_for(klass, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#78 + def method_defined_at_any_visibility?(klass, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#81 + def method_visibility_for(object, method_name); end + end +end + +# Raised when an expectation customization method (e.g. `with`, +# `and_return`) is called on a message expectation which has already been +# invoked. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#18 +class RSpec::Mocks::MockExpectationAlreadyInvokedError < ::Exception; end + +# Raised when a message expectation is not satisfied. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#6 +class RSpec::Mocks::MockExpectationError < ::Exception; end + +# An implementation of rspec-mocks' reference interface. +# Used when a string is passed to {ExampleMethods#object_double}, +# and when a string, named class or named module is passed to +# {ExampleMethods#instance_double}, or {ExampleMethods#class_double}. +# Represents a reference to the object named (via a constant lookup) +# by the string. +# +# @see DirectObjectReference +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#109 +class RSpec::Mocks::NamedObjectReference + # @param const_name [String] constant name + # @return [NamedObjectReference] a new instance of NamedObjectReference + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#111 + def initialize(const_name); end + + # @return [String] the constant name to replace with a double. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#121 + def const_to_replace; end + + # @return [Boolean] true if the named constant is defined, false otherwise. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#116 + def defined?; end + + # @return [String] the constant name to replace with a double. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#124 + def description; end + + # @return [Object, nil] the target of the verifying double (the named object), or + # nil if it is not defined. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#128 + def target; end + + # Yields if the reference target is loaded, providing a generic mechanism + # to optionally run a bit of code only when a reference's target is + # loaded. + # + # @yield [Object] the target object + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#137 + def when_loaded; end + + private + + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#143 + def object; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#31 +class RSpec::Mocks::NegationUnsupportedError < ::StandardError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/space.rb#209 +class RSpec::Mocks::NestedSpace < ::RSpec::Mocks::Space + # @return [NestedSpace] a new instance of NestedSpace + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#210 + def initialize(parent); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#219 + def constant_mutator_for(name); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#215 + def proxies_of(klass); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#223 + def registered?(object); end + + private + + # source://rspec-mocks//lib/rspec/mocks/space.rb#233 + def any_instance_recorder_not_found_for(id, klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#229 + def proxy_not_found_for(id, object); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#16 +class RSpec::Mocks::NoCallbackInvocationStrategy + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#17 + def call(_doubled_module); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#149 +class RSpec::Mocks::ObjectMethodReference < ::RSpec::Mocks::MethodReference + private + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#168 + def find_method(object); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#164 + def method_defined?(object); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#160 + def method_implemented?(object); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#172 + def visibility_from(object); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#150 + def for(object_reference, method_name); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#4 +class RSpec::Mocks::ObjectReference + class << self + # Returns an appropriate Object or Module reference based + # on the given argument. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#7 + def for(object_module_or_name, allow_direct_object_refs = T.unsafe(nil)); end + + private + + # 1.8.7 + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#31 + def anonymous_module?(mod); end + + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#41 + def name_of(mod); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#47 +RSpec::Mocks::ObjectReference::MODULE_NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# Similar to an InstanceVerifyingDouble, except that it verifies against +# public methods of the given object. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#112 +class RSpec::Mocks::ObjectVerifyingDouble + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + include ::RSpec::Mocks::ObjectVerifyingDoubleMethods +end + +# An awkward module necessary because we cannot otherwise have +# ClassVerifyingDouble inherit from Module and still share these methods. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#89 +module RSpec::Mocks::ObjectVerifyingDoubleMethods + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#93 + def as_stubbed_const(options = T.unsafe(nil)); end + + private + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#100 + def __build_mock_proxy(order_group); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/order_group.rb#6 +class RSpec::Mocks::OrderGroup + # @return [OrderGroup] a new instance of OrderGroup + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#7 + def initialize; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#53 + def clear; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#31 + def consume; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#61 + def empty?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#42 + def handle_order_constraint(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#19 + def invoked(message); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#26 + def ready_for?(expectation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#15 + def register(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#48 + def verify_invocation_order(expectation); end + + private + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#87 + def expectation_for(message); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#71 + def expectations_invoked_in_order?; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#81 + def expected_invocations; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#75 + def invoked_expectations; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#67 + def remaining_expectations; end +end + +# Raised when doubles or partial doubles are used outside of the per-test lifecycle. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#13 +class RSpec::Mocks::OutsideOfExampleError < ::StandardError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#456 +class RSpec::Mocks::PartialClassDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy + include ::RSpec::Mocks::PartialClassDoubleProxyMethods +end + +# When we mock or stub a method on a class, we have to treat it a bit different, +# because normally singleton method definitions only affect the object on which +# they are defined, but on classes they affect subclasses, too. As a result, +# we need some special handling to get the original method. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#380 +module RSpec::Mocks::PartialClassDoubleProxyMethods + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#381 + def initialize(source_space, *args); end + + # Consider this situation: + # + # class A; end + # class B < A; end + # + # allow(A).to receive(:new) + # expect(B).to receive(:new).and_call_original + # + # When getting the original definition for `B.new`, we cannot rely purely on + # using `B.method(:new)` before our redefinition is defined on `B`, because + # `B.method(:new)` will return a method that will execute the stubbed version + # of the method on `A` since singleton methods on classes are in the lookup + # hierarchy. + # + # To do it properly, we need to find the original definition of `new` from `A` + # from _before_ `A` was stubbed, and we need to rebind it to `B` so that it will + # run with the proper `self`. + # + # That's what this method (together with `original_unbound_method_handle_from_ancestor_for`) + # does. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#406 + def original_method_handle_for(message); end + + protected + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#434 + def method_double_from_ancestor_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#429 + def original_unbound_method_handle_from_ancestor_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#444 + def superclass_proxy; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#317 +class RSpec::Mocks::PartialDoubleProxy < ::RSpec::Mocks::Proxy + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#331 + def add_simple_expectation(method_name, response, location); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#337 + def add_simple_stub(method_name, response); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#354 + def message_received(message, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#318 + def original_method_handle_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#349 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#343 + def visibility_for(method_name); end + + private + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#364 + def any_instance_class_recorder_observing_method?(klass, method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#6 +class RSpec::Mocks::Proxy + # @private + # @return [Proxy] a new instance of Proxy + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#20 + def initialize(object, order_group, options = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#65 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#79 + def add_simple_expectation(method_name, response, location); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#140 + def add_simple_stub(method_name, response); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#134 + def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + + # Tells the object to ignore any messages that aren't explicitly set as + # stubs or message expectations. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#52 + def as_null_object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#84 + def build_expectation(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#117 + def check_for_unexpected_arguments(expectation); end + + # @private + # @raise [ArgumentError] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#34 + def ensure_can_be_proxied!(object); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#15 + def ensure_implemented(*_args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#181 + def has_negative_expectation?(message); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#195 + def message_received(message, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#174 + def messages_arg_list; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#260 + def method_double_if_exists_for_message(message); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#45 + def null_object?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#42 + def object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#58 + def original_method_handle_for(_message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#254 + def prepended_modules_of_singleton_class; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#233 + def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#228 + def raise_unexpected_message_error(method_name, args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#167 + def received_message?(method_name, *args, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#186 + def record_message_received(message, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#145 + def remove_stub(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#150 + def remove_stub_if_present(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#94 + def replay_received_message_on(expectation, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#160 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#155 + def verify; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#238 + def visibility_for(_method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#277 + def find_almost_matching_expectation(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#301 + def find_almost_matching_stub(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#284 + def find_best_matching_expectation_for(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#270 + def find_matching_expectation(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#296 + def find_matching_method_stub(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#266 + def method_double_for(message); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#244 + def prepended_modules_of(klass); end + end +end + +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#62 +RSpec::Mocks::Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 +class RSpec::Mocks::Proxy::SpecificMessage < ::Struct + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#9 + def ==(expectation); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def args=(_); end + + # Returns the value of attribute message + # + # @return [Object] the current value of message + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def message; end + + # Sets the attribute message + # + # @param value [Object] the value to set the attribute message to. + # @return [Object] the newly set value + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def message=(_); end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def object=(_); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def [](*_arg0); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def inspect; end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def keyword_init?; end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def members; end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#8 + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#461 +class RSpec::Mocks::ProxyForNil < ::RSpec::Mocks::PartialDoubleProxy + # @return [ProxyForNil] a new instance of ProxyForNil + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#462 + def initialize(order_group); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#475 + def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + + # Returns the value of attribute disallow_expectations. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#467 + def disallow_expectations; end + + # Sets the attribute disallow_expectations + # + # @param value the value to set the attribute disallow_expectations to. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#467 + def disallow_expectations=(_arg0); end + + # Returns the value of attribute warn_about_expectations. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#468 + def warn_about_expectations; end + + # Sets the attribute warn_about_expectations + # + # @param value the value to set the attribute warn_about_expectations to. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#468 + def warn_about_expectations=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#512 + def raise_error(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#482 + def set_expectation_behavior; end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#507 + def warn(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#496 + def warn_or_raise!(method_name); end +end + +# Provides a default space implementation for outside +# the scope of an example. Called "root" because it serves +# as the root of the space stack. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/space.rb#9 +class RSpec::Mocks::RootSpace + # source://rspec-mocks//lib/rspec/mocks/space.rb#18 + def any_instance_proxy_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#14 + def any_instance_recorder_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#26 + def any_instance_recorders_from_ancestry_of(_object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#44 + def new_scope; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#10 + def proxy_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#22 + def register_constant_mutator(_mutator); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#36 + def registered?(_object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#30 + def reset_all; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#40 + def superclass_proxy_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#33 + def verify_all; end + + private + + # @raise [OutsideOfExampleError] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#50 + def raise_lifecycle_message; end +end + +# A message expectation that only allows concrete return values to be set +# for a message. While this same effect can be achieved using a standard +# MessageExpectation, this version is much faster and so can be used as an +# optimization. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#11 +class RSpec::Mocks::SimpleMessageExpectation + # @return [SimpleMessageExpectation] a new instance of SimpleMessageExpectation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#12 + def initialize(message, response, error_generator, backtrace_line = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#26 + def called_max_times?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#17 + def invoke(*_); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#22 + def matches?(message, *_); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#37 + def unadvise(_); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#30 + def verify_messages_received; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/space.rb#57 +class RSpec::Mocks::Space + # @return [Space] a new instance of Space + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#60 + def initialize; end + + # Returns the value of attribute any_instance_mutex. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def any_instance_mutex; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#103 + def any_instance_proxy_for(klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#93 + def any_instance_recorder_for(klass, only_return_existing = T.unsafe(nil)); end + + # Returns the value of attribute any_instance_recorders. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def any_instance_recorders; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#131 + def any_instance_recorders_from_ancestry_of(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#89 + def constant_mutator_for(name); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#125 + def ensure_registered(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#69 + def new_scope; end + + # Returns the value of attribute proxies. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def proxies; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#107 + def proxies_of(klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#111 + def proxy_for(object); end + + # Returns the value of attribute proxy_mutex. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def proxy_mutex; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#85 + def register_constant_mutator(mutator); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#127 + def registered?(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#78 + def reset_all; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#118 + def superclass_proxy_for(klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#73 + def verify_all; end + + private + + # source://rspec-mocks//lib/rspec/mocks/space.rb#184 + def any_instance_recorder_not_found_for(id, klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#171 + def class_proxy_with_callback_verification_strategy(object, strategy); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#202 + def id_for(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#147 + def new_mutex; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#151 + def proxy_not_found_for(id, object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#166 + def superclass_proxy_not_found_for(id, object); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#75 +class RSpec::Mocks::StubChain < ::RSpec::Mocks::MessageChain + private + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#82 + def expectation(object, message, &return_block); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#76 + def stub_chain_on(object, *chain, &blk); end + end +end + +# Provides methods for enabling and disabling the available syntaxes +# provided by rspec-mocks. +# +# @api private +# +# source://rspec-mocks//lib/rspec/mocks/syntax.rb#6 +module RSpec::Mocks::Syntax + class << self + # Determines where the methods like `should_receive`, and `stub` are added. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#181 + def default_should_syntax_host; end + + # Disables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#150 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#89 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#110 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#26 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the expect syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#175 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the should syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#169 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#8 + def warn_about_should!; end + + # @api private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#13 + def warn_unless_should_configured(method_name, replacement = T.unsafe(nil)); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#63 +class RSpec::Mocks::TargetBase + include ::RSpec::Mocks::TargetDelegationInstanceMethods + extend ::RSpec::Mocks::TargetDelegationClassMethods + + # @return [TargetBase] a new instance of TargetBase + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#64 + def initialize(target); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#4 +module RSpec::Mocks::TargetDelegationClassMethods + # source://rspec-mocks//lib/rspec/mocks/targets.rb#14 + def delegate_not_to(matcher_method, options = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#5 + def delegate_to(matcher_method); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#28 + def disallow_negation(method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#36 +module RSpec::Mocks::TargetDelegationInstanceMethods + # Returns the value of attribute target. + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#37 + def target; end + + private + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#45 + def define_matcher(matcher, name, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#41 + def matcher_allowed?(matcher); end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#55 + def raise_negation_unsupported(method_name, matcher); end + + # @raise [UnsupportedMatcherError] + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#49 + def raise_unsupported_matcher(method_name, matcher); end +end + +# Implements the methods needed for a pure test double. RSpec::Mocks::Double +# includes this module, and it is provided for cases where you want a +# pure test double without subclassing RSpec::Mocks::Double. +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#6 +module RSpec::Mocks::TestDouble + # Creates a new test double with a `name` (that will be used in error + # messages only) + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#9 + def initialize(name = T.unsafe(nil), stubs = T.unsafe(nil)); end + + # This allows for comparing the mock to other objects that proxy such as + # ActiveRecords belongs_to proxy objects. By making the other object run + # the comparison, we're sure the call gets delegated to the proxy + # target. + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#36 + def ==(other); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#58 + def __build_mock_proxy_unless_expired(order_group); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#63 + def __disallow_further_usage!; end + + # Tells the object to respond to all messages. If specific stub values + # are declared, they'll work as expected. If not, the receiver is + # returned. + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#23 + def as_null_object; end + + # Override for default freeze implementation to prevent freezing of test + # doubles. + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#69 + def freeze; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#41 + def inspect; end + + # Returns true if this object has received `as_null_object` + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#28 + def null_object?; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#51 + def respond_to?(message, incl_private = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#46 + def to_s; end + + private + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#118 + def __build_mock_proxy(order_group); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#114 + def __mock_proxy; end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#122 + def __raise_expired_error; end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#108 + def assign_stubs(stubs); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#127 + def initialize_copy(other); end + + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#76 + def method_missing(message, *args, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#140 +module RSpec::Mocks::TestDoubleFormatter + class << self + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#141 + def format(dbl, unwrap = T.unsafe(nil)); end + + private + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#167 + def name_desc(dbl); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#150 + def type_desc(dbl); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#162 + def verified_module_desc(dbl); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#308 +class RSpec::Mocks::TestDoubleProxy < ::RSpec::Mocks::Proxy + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#309 + def reset; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#29 +class RSpec::Mocks::UnsupportedMatcherError < ::StandardError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#6 +module RSpec::Mocks::VerifyingDouble + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#55 + def initialize(doubled_module, *args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#40 + def __send__(name, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#20 + def method_missing(message, *args, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#7 + def respond_to?(message, include_private = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#50 + def send(name, *args, **_arg2, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#33 +class RSpec::Mocks::VerifyingDoubleNotDefinedError < ::StandardError; end + +# Used in place of a `VerifyingExistingMethodDouble` for the specific case +# of mocking or stubbing a `new` method on a class. In this case, we substitute +# the method signature from `#initialize` since new's signature is just `*args`. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#215 +class RSpec::Mocks::VerifyingExistingClassNewMethodDouble < ::RSpec::Mocks::VerifyingExistingMethodDouble + # @yield [Support::MethodSignature.new(object.instance_method(:initialize))] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#216 + def with_signature; end +end + +# A VerifyingMethodDouble fetches the method to verify against from the +# original object, using a MethodReference. This works for pure doubles, +# but when the original object is itself the one being modified we need to +# collapse the reference and the method double into a single object so that +# we can access the original pristine method definition. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#180 +class RSpec::Mocks::VerifyingExistingMethodDouble < ::RSpec::Mocks::VerifyingMethodDouble + # @return [VerifyingExistingMethodDouble] a new instance of VerifyingExistingMethodDouble + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#181 + def initialize(object, method_name, proxy); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#195 + def unimplemented?; end + + # @yield [Support::MethodSignature.new(original_implementation_callable)] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#191 + def with_signature; end + + class << self + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#199 + def for(object, method_name, proxy); end + end +end + +# A message expectation that knows about the real implementation of the +# message being expected, so that it can verify that any expectations +# have the valid arguments. +# +# @api private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#9 +class RSpec::Mocks::VerifyingMessageExpectation < ::RSpec::Mocks::MessageExpectation + # @api private + # @return [VerifyingMessageExpectation] a new instance of VerifyingMessageExpectation + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#20 + def initialize(*args); end + + # A level of indirection is used here rather than just passing in the + # method itself, since method look up is expensive and we only want to + # do it if actually needed. + # + # Conceptually the method reference makes more sense as a constructor + # argument since it should be immutable, but it is significantly more + # straight forward to build the object in pieces so for now it stays as + # an accessor. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#18 + def method_reference; end + + # A level of indirection is used here rather than just passing in the + # method itself, since method look up is expensive and we only want to + # do it if actually needed. + # + # Conceptually the method reference makes more sense as a constructor + # argument since it should be immutable, but it is significantly more + # straight forward to build the object in pieces so for now it stays as + # an accessor. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#18 + def method_reference=(_arg0); end + + # @api private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#25 + def with(*args, **_arg1, &block); end + + private + + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#38 + def validate_expected_arguments!; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#139 +class RSpec::Mocks::VerifyingMethodDouble < ::RSpec::Mocks::MethodDouble + # @return [VerifyingMethodDouble] a new instance of VerifyingMethodDouble + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#140 + def initialize(object, method_name, proxy, method_reference); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#149 + def add_expectation(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#154 + def add_stub(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#145 + def message_expectation_class; end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#159 + def proxy_method_invoked(obj, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#165 + def validate_arguments!(actual_args); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#134 +class RSpec::Mocks::VerifyingPartialClassDoubleProxy < ::RSpec::Mocks::VerifyingPartialDoubleProxy + include ::RSpec::Mocks::PartialClassDoubleProxyMethods +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#107 +class RSpec::Mocks::VerifyingPartialDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy + include ::RSpec::Mocks::VerifyingProxyMethods + + # @return [VerifyingPartialDoubleProxy] a new instance of VerifyingPartialDoubleProxy + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#110 + def initialize(object, expectation_ordering, optional_callback_invocation_strategy = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#123 + def ensure_implemented(_method_name); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#128 + def method_reference; end +end + +# A verifying proxy mostly acts like a normal proxy, except that it +# contains extra logic to try and determine the validity of any expectation +# set on it. This includes whether or not methods have been defined and the +# validity of arguments on method calls. +# +# In all other ways this behaves like a normal proxy. It only adds the +# verification behaviour to specific methods then delegates to the parent +# implementation. +# +# These checks are only activated if the doubled class has already been +# loaded, otherwise they are disabled. This allows for testing in +# isolation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#71 +class RSpec::Mocks::VerifyingProxy < ::RSpec::Mocks::TestDoubleProxy + include ::RSpec::Mocks::VerifyingProxyMethods + + # @return [VerifyingProxy] a new instance of VerifyingProxy + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#74 + def initialize(object, order_group, doubled_module, method_reference_class); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#88 + def method_reference; end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#98 + def validate_arguments!(method_name, args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#94 + def visibility_for(method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#22 +module RSpec::Mocks::VerifyingProxyMethods + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#33 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#28 + def add_simple_stub(method_name, *args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#23 + def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#38 + def ensure_implemented(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#48 + def ensure_publicly_implemented(method_name, _object); end +end + +# Version information for RSpec mocks. +# +# source://rspec-mocks//lib/rspec/mocks/version.rb#4 +module RSpec::Mocks::Version; end + +# Version of RSpec mocks currently in use in SemVer format. +# +# source://rspec-mocks//lib/rspec/mocks/version.rb#6 +RSpec::Mocks::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec-support@3.10.2.rbi b/sorbet/rbi/gems/rspec-support@3.10.2.rbi deleted file mode 100644 index 99aefe0..0000000 --- a/sorbet/rbi/gems/rspec-support@3.10.2.rbi +++ /dev/null @@ -1,495 +0,0 @@ -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rspec-support` gem. -# Please instead update this file by running `bin/tapioca gem rspec-support`. - -# typed: true - -module RSpec - extend ::RSpec::Support::Warnings - extend ::RSpec::Core::Warnings - - class << self - def clear_examples; end - def configuration; end - def configuration=(_arg0); end - def configure; end - def const_missing(name); end - def context(*args, &example_group_block); end - def current_example; end - def current_example=(example); end - def describe(*args, &example_group_block); end - def example_group(*args, &example_group_block); end - def fcontext(*args, &example_group_block); end - def fdescribe(*args, &example_group_block); end - def reset; end - def shared_context(name, *args, &block); end - def shared_examples(name, *args, &block); end - def shared_examples_for(name, *args, &block); end - def world; end - def world=(_arg0); end - def xcontext(*args, &example_group_block); end - def xdescribe(*args, &example_group_block); end - end -end - -class RSpec::CallerFilter - class << self - def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end - end -end - -RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) -RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) -RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) -RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) -RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash) -RSpec::SharedContext = RSpec::Core::SharedContext - -module RSpec::Support - class << self - def class_of(object); end - def define_optimized_require_for_rspec(lib, &require_relative); end - def deregister_matcher_definition(&block); end - def failure_notifier; end - def failure_notifier=(callable); end - def is_a_matcher?(object); end - def matcher_definitions; end - def method_handle_for(object, method_name); end - def notify_failure(failure, options = T.unsafe(nil)); end - def register_matcher_definition(&block); end - def require_rspec_core(f); end - def require_rspec_support(f); end - def rspec_description_for_object(object); end - def thread_local_data; end - def warning_notifier; end - def warning_notifier=(_arg0); end - def with_failure_notifier(callable); end - end -end - -module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue - class << self - def ===(exception); end - end -end - -RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array) - -class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature - def classify_parameters; end -end - -class RSpec::Support::ComparableVersion - include ::Comparable - - def initialize(string); end - - def <=>(other); end - def segments; end - def string; end -end - -RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc) -RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) - -class RSpec::Support::Differ - def initialize(opts = T.unsafe(nil)); end - - def color?; end - def diff(actual, expected); end - def diff_as_object(actual, expected); end - def diff_as_string(actual, expected); end - - private - - def add_old_hunk_to_hunk(hunk, oldhunk); end - def add_to_output(output, string); end - def all_strings?(*args); end - def any_multiline_strings?(*args); end - def blue(text); end - def build_hunks(actual, expected); end - def coerce_to_string(string_or_array); end - def color(text, color_code); end - def color_diff(diff); end - def diffably_stringify(array); end - def finalize_output(output, final_line); end - def format_type; end - def green(text); end - def handle_encoding_errors(actual, expected); end - def hash_to_string(hash); end - def multiline?(string); end - def no_numbers?(*args); end - def no_procs?(*args); end - def normal(text); end - def object_to_string(object); end - def red(text); end - def safely_flatten(array); end -end - -class RSpec::Support::DirectoryMaker - class << self - def mkdir_p(path); end - - private - - def directory_exists?(dirname); end - def generate_path(stack, part); end - def generate_stack(path); end - end -end - -class RSpec::Support::EncodedString - def initialize(string, encoding = T.unsafe(nil)); end - - def <<(string); end - def ==(*args, &block); end - def empty?(*args, &block); end - def encoding(*args, &block); end - def eql?(*args, &block); end - def lines(*args, &block); end - def source_encoding; end - def split(regex_or_string); end - def to_s; end - def to_str; end - - private - - def detect_source_encoding(string); end - def matching_encoding(string); end - def remove_invalid_bytes(string); end - - class << self - def pick_encoding(source_a, source_b); end - end -end - -RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) -RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String) -RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) - -class RSpec::Support::HunkGenerator - def initialize(actual, expected); end - - def hunks; end - - private - - def actual_lines; end - def build_hunk(piece); end - def context_lines; end - def diffs; end - def expected_lines; end -end - -RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier - private - - def split_args(*args); end -end - -class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher - def initialize(signature); end - - def has_kw_args_in?(args); end - def invalid_kw_args_from(_kw_args); end - def missing_kw_args_from(_kw_args); end - def non_kw_args_arity_description; end - def valid_non_kw_args?(*args); end -end - -class RSpec::Support::MethodSignature - def initialize(method); end - - def arbitrary_kw_args?; end - def classify_arity(arity = T.unsafe(nil)); end - def classify_parameters; end - def could_contain_kw_args?(args); end - def description; end - def has_kw_args_in?(args); end - def invalid_kw_args_from(given_kw_args); end - def max_non_kw_args; end - def min_non_kw_args; end - def missing_kw_args_from(given_kw_args); end - def non_kw_args_arity_description; end - def optional_kw_args; end - def required_kw_args; end - def unlimited_args?; end - def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end -end - -RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) - -class RSpec::Support::MethodSignatureExpectation - def initialize; end - - def empty?; end - def expect_arbitrary_keywords; end - def expect_arbitrary_keywords=(_arg0); end - def expect_unlimited_arguments; end - def expect_unlimited_arguments=(_arg0); end - def keywords; end - def keywords=(values); end - def max_count; end - def max_count=(number); end - def min_count; end - def min_count=(number); end -end - -class RSpec::Support::MethodSignatureVerifier - def initialize(signature, args = T.unsafe(nil)); end - - def error_message; end - def kw_args; end - def max_non_kw_args; end - def min_non_kw_args; end - def non_kw_args; end - def valid?; end - def with_expectation(expectation); end - - private - - def arbitrary_kw_args?; end - def invalid_kw_args; end - def missing_kw_args; end - def split_args(*args); end - def unlimited_args?; end - def valid_non_kw_args?; end -end - -class RSpec::Support::Mutex < ::Thread::Mutex - class << self - def new; end - end -end - -RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method) - -module RSpec::Support::OS - private - - def windows?; end - def windows_file_path?; end - - class << self - def windows?; end - def windows_file_path?; end - end -end - -class RSpec::Support::ObjectFormatter - def initialize(max_formatted_output_length = T.unsafe(nil)); end - - def format(object); end - def max_formatted_output_length; end - def max_formatted_output_length=(_arg0); end - def prepare_array(array); end - def prepare_element(element); end - def prepare_for_inspection(object); end - def prepare_hash(input_hash); end - def recursive_structure?(object); end - def sort_hash_keys(input_hash); end - def with_entering_structure(structure); end - - private - - def truncate_string(str, start_index, end_index); end - - class << self - def default_instance; end - def format(object); end - def prepare_for_inspection(object); end - end -end - -class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct - def formatter; end - def formatter=(_); end - def inspect; end - def object; end - def object=(_); end - def pretty_print(pp); end - - class << self - def [](*_arg0); end - def can_inspect?(_object); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - - class << self - def can_inspect?(object); end - end -end - -class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - - class << self - def can_inspect?(object); end - end -end - -RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) - -class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - - class << self - def can_inspect?(object); end - end -end - -class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - - class << self - def can_inspect?(object); end - end -end - -RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) -RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) - -class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct - def inspect; end - def pretty_print(pp); end - def text; end - def text=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - - class << self - def can_inspect?(object); end - end -end - -class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - - class << self - def can_inspect?(object); end - end -end - -RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) - -class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector - def inspect; end - def klass; end - def native_object_id; end - - class << self - def can_inspect?(object); end - end -end - -RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String) - -module RSpec::Support::RecursiveConstMethods - def const_defined_on?(mod, const_name); end - def constants_defined_on(mod); end - def get_const_defined_on(mod, const_name); end - def normalize_const_name(const_name); end - def recursive_const_defined?(const_name); end - def recursive_const_get(const_name); end -end - -class RSpec::Support::ReentrantMutex - def initialize; end - - def synchronize; end - - private - - def enter; end - def exit; end -end - -module RSpec::Support::Ruby - private - - def jruby?; end - def jruby_9000?; end - def jruby_version; end - def mri?; end - def non_mri?; end - def rbx?; end - def truffleruby?; end - - class << self - def jruby?; end - def jruby_9000?; end - def jruby_version; end - def mri?; end - def non_mri?; end - def rbx?; end - def truffleruby?; end - end -end - -module RSpec::Support::RubyFeatures - private - - def caller_locations_supported?; end - def fork_supported?; end - def kw_args_supported?; end - def module_prepends_supported?; end - def module_refinement_supported?; end - def optional_and_splat_args_supported?; end - def required_kw_args_supported?; end - def ripper_supported?; end - def supports_exception_cause?; end - def supports_rebinding_module_methods?; end - def supports_taint?; end - - class << self - def caller_locations_supported?; end - def fork_supported?; end - def kw_args_supported?; end - def module_prepends_supported?; end - def module_refinement_supported?; end - def optional_and_splat_args_supported?; end - def required_kw_args_supported?; end - def ripper_supported?; end - def supports_exception_cause?; end - def supports_rebinding_module_methods?; end - def supports_taint?; end - end -end - -RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier -module RSpec::Support::Version; end -RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) - -module RSpec::Support::Warnings - def deprecate(deprecated, options = T.unsafe(nil)); end - def warn_deprecation(message, options = T.unsafe(nil)); end - def warn_with(message, options = T.unsafe(nil)); end - def warning(text, options = T.unsafe(nil)); end -end - -module RSpec::Support::WithKeywordsWhenNeeded - private - - def class_exec(klass, *args, &block); end - - class << self - def class_exec(klass, *args, &block); end - end -end diff --git a/sorbet/rbi/gems/rspec-support@3.13.7.rbi b/sorbet/rbi/gems/rspec-support@3.13.7.rbi new file mode 100644 index 0000000..3b39158 --- /dev/null +++ b/sorbet/rbi/gems/rspec-support@3.13.7.rbi @@ -0,0 +1,1585 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-support` gem. +# Please instead update this file by running `bin/tapioca gem rspec-support`. + + +# source://rspec-support//lib/rspec/support.rb#3 +module RSpec + extend ::RSpec::Support::Warnings +end + +# Consistent implementation for "cleaning" the caller method to strip out +# non-rspec lines. This enables errors to be reported at the call site in +# the code using the library, which is far more useful than the particular +# internal method that raised an error. +# +# source://rspec-support//lib/rspec/support/caller_filter.rb#10 +class RSpec::CallerFilter + class << self + # Earlier rubies do not support the two argument form of `caller`. This + # fallback is logically the same, but slower. + # + # source://rspec-support//lib/rspec/support/caller_filter.rb#49 + def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end + end +end + +# source://rspec-support//lib/rspec/support/caller_filter.rb#20 +RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) + +# rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want +# it ignored when we are looking for the first meaningful line of the backtrace outside +# of RSpec. It can show up in the backtrace as the immediate first caller +# when `CallerFilter.first_non_rspec_line` is called from the top level of a required +# file, but it depends on if rubygems is loaded or not. We don't want to have to deal +# with this complexity in our `RSpec.deprecate` calls, so we ignore it here. +# +# source://rspec-support//lib/rspec/support/caller_filter.rb#30 +RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-support//lib/rspec/support/caller_filter.rb#22 +RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-support//lib/rspec/support/caller_filter.rb#11 +RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) + +# source://rspec-support//lib/rspec/support.rb#4 +module RSpec::Support + class << self + # Used internally to get a class of a given object, even if it does not respond to #class. + # + # @api private + # + # source://rspec-support//lib/rspec/support.rb#86 + def class_of(object); end + + # Defines a helper method that is optimized to require files from the + # named lib. The passed block MUST be `{ |f| require_relative f }` + # because for `require_relative` to work properly from within the named + # lib the line of code must be IN that lib. + # + # `require_relative` is preferred when available because it is always O(1), + # regardless of the number of dirs in $LOAD_PATH. `require`, on the other + # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until + # it can resolve the file relative to one of the dirs. + # + # @api private + # + # source://rspec-support//lib/rspec/support.rb#16 + def define_optimized_require_for_rspec(lib, &require_relative); end + + # Remove a previously registered matcher. Useful for cleaning up after + # yourself in specs. + # + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#24 + def deregister_matcher_definition(&block); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#113 + def failure_notifier; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#105 + def failure_notifier=(callable); end + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#29 + def is_a_matcher?(object); end + + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#6 + def matcher_definitions; end + + # source://rspec-support//lib/rspec/support.rb#54 + def method_handle_for(object, method_name); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#118 + def notify_failure(failure, options = T.unsafe(nil)); end + + # Used internally to break cyclic dependency between mocks, expectations, + # and support. We don't currently have a consistent implementation of our + # matchers, though we are considering changing that: + # https://github.com/rspec/rspec-mocks/issues/513 + # + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#16 + def register_matcher_definition(&block); end + + # source://rspec-support//lib/rspec/support.rb#25 + def require_rspec_support(f); end + + # gives a string representation of an object for use in RSpec descriptions + # + # @api private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#36 + def rspec_description_for_object(object); end + + # source://rspec-support//lib/rspec/support.rb#95 + def thread_local_data; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#140 + def warning_notifier; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#133 + def warning_notifier=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#123 + def with_failure_notifier(callable); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support.rb#145 +module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue + class << self + # source://rspec-support//lib/rspec/support.rb#150 + def ===(exception); end + end +end + +# These exceptions are dangerous to rescue as rescuing them +# would interfere with things we should not interfere with. +# +# source://rspec-support//lib/rspec/support.rb#148 +RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array) + +# Deals with the slightly different semantics of block arguments. +# For methods, arguments are required unless a default value is provided. +# For blocks, arguments are optional, even if no default value is provided. +# +# However, we want to treat block args as required since you virtually +# always want to pass a value for each received argument and our +# `and_yield` has treated block args as required for many years. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#293 +class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#295 + def classify_parameters; end +end + +# @private +# +# source://rspec-support//lib/rspec/support/comparable_version.rb#6 +class RSpec::Support::ComparableVersion + include ::Comparable + + # @return [ComparableVersion] a new instance of ComparableVersion + # + # source://rspec-support//lib/rspec/support/comparable_version.rb#11 + def initialize(string); end + + # source://rspec-support//lib/rspec/support/comparable_version.rb#15 + def <=>(other); end + + # source://rspec-support//lib/rspec/support/comparable_version.rb#37 + def segments; end + + # Returns the value of attribute string. + # + # source://rspec-support//lib/rspec/support/comparable_version.rb#9 + def string; end +end + +# @private +# +# source://rspec-support//lib/rspec/support.rb#110 +RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# @private +# +# source://rspec-support//lib/rspec/support.rb#137 +RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# source://rspec-support//lib/rspec/support/differ.rb#11 +class RSpec::Support::Differ + # @return [Differ] a new instance of Differ + # + # source://rspec-support//lib/rspec/support/differ.rb#68 + def initialize(opts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#64 + def color?; end + + # source://rspec-support//lib/rspec/support/differ.rb#12 + def diff(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#58 + def diff_as_object(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#29 + def diff_as_string(actual, expected); end + + private + + # source://rspec-support//lib/rspec/support/differ.rb#129 + def add_old_hunk_to_hunk(hunk, oldhunk); end + + # source://rspec-support//lib/rspec/support/differ.rb#125 + def add_to_output(output, string); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#79 + def all_strings?(*args); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#83 + def any_multiline_strings?(*args); end + + # source://rspec-support//lib/rspec/support/differ.rb#154 + def blue(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#116 + def build_hunks(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#91 + def coerce_to_string(string_or_array); end + + # source://rspec-support//lib/rspec/support/differ.rb#142 + def color(text, color_code); end + + # source://rspec-support//lib/rspec/support/differ.rb#162 + def color_diff(diff); end + + # source://rspec-support//lib/rspec/support/differ.rb#96 + def diffably_stringify(array); end + + # source://rspec-support//lib/rspec/support/differ.rb#120 + def finalize_output(output, final_line); end + + # source://rspec-support//lib/rspec/support/differ.rb#138 + def format_type; end + + # source://rspec-support//lib/rspec/support/differ.rb#150 + def green(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#203 + def handle_encoding_errors(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#193 + def hash_to_string(hash); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#107 + def multiline?(string); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#87 + def no_numbers?(*args); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#75 + def no_procs?(*args); end + + # source://rspec-support//lib/rspec/support/differ.rb#158 + def normal(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#179 + def object_to_string(object); end + + # source://rspec-support//lib/rspec/support/differ.rb#146 + def red(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#133 + def safely_flatten(array); end +end + +# Replacement for fileutils#mkdir_p because we don't want to require parts +# of stdlib in RSpec. +# +# @api private +# +# source://rspec-support//lib/rspec/support/directory_maker.rb#11 +class RSpec::Support::DirectoryMaker + class << self + # Implements nested directory construction + # + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#15 + def mkdir_p(path); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#57 + def directory_exists?(dirname); end + + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#52 + def generate_path(stack, part); end + + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#49 + def generate_stack(path); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#6 +class RSpec::Support::EncodedString + # @return [EncodedString] a new instance of EncodedString + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#16 + def initialize(string, encoding = T.unsafe(nil)); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#28 + def <<(string); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 + def ==(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 + def empty?(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 + def encoding(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 + def eql?(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 + def lines(*args, &block); end + + # Returns the value of attribute source_encoding. + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#21 + def source_encoding; end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#41 + def split(regex_or_string); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#46 + def to_s; end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#49 + def to_str; end + + private + + # source://rspec-support//lib/rspec/support/encoded_string.rb#139 + def detect_source_encoding(string); end + + # Encoding Exceptions: + # + # Raised by Encoding and String methods: + # Encoding::UndefinedConversionError: + # when a transcoding operation fails + # if the String contains characters invalid for the target encoding + # e.g. "\x80".encode('UTF-8','ASCII-8BIT') + # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '') + # # => '' + # Encoding::CompatibilityError + # when Encoding.compatible?(str1, str2) is nil + # e.g. utf_16le_emoji_string.split("\n") + # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string + # Encoding::InvalidByteSequenceError: + # when the string being transcoded contains a byte invalid for + # either the source or target encoding + # e.g. "\x80".encode('UTF-8','US-ASCII') + # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '') + # # => '' + # ArgumentError + # when operating on a string with invalid bytes + # e.g."\x80".split("\n") + # TypeError + # when a symbol is passed as an encoding + # Encoding.find(:"UTF-8") + # when calling force_encoding on an object + # that doesn't respond to #to_str + # + # Raised by transcoding methods: + # Encoding::ConverterNotFoundError: + # when a named encoding does not correspond with a known converter + # e.g. 'abc'.force_encoding('UTF-8').encode('foo') + # or a converter path cannot be found + # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule') + # + # Raised by byte <-> char conversions + # RangeError: out of char range + # e.g. the UTF-16LE emoji: 128169.chr + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#93 + def matching_encoding(string); end + + # http://stackoverflow.com/a/8711118/879854 + # Loop over chars in a string replacing chars + # with invalid encoding, which is a pretty good proxy + # for the invalid byte sequence that causes an ArgumentError + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#124 + def remove_invalid_bytes(string); end + + class << self + # source://rspec-support//lib/rspec/support/encoded_string.rb#143 + def pick_encoding(source_a, source_b); end + end +end + +# Ruby's default replacement string is: +# U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else +# ? ("\x3F") +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#14 +RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) + +# source://rspec-support//lib/rspec/support/encoded_string.rb#9 +RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String) + +# Reduce allocations by storing constants. +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#8 +RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-support//lib/rspec/support/hunk_generator.rb#9 +class RSpec::Support::HunkGenerator + # @return [HunkGenerator] a new instance of HunkGenerator + # + # source://rspec-support//lib/rspec/support/hunk_generator.rb#10 + def initialize(actual, expected); end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#15 + def hunks; end + + private + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#32 + def actual_lines; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#36 + def build_hunk(piece); end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#44 + def context_lines; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#24 + def diffs; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#28 + def expected_lines; end +end + +# @api private +# +# source://rspec-support//lib/rspec/support.rb#40 +RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# Allows matchers to be used instead of providing keyword arguments. In +# practice, when this happens only the arity of the method is verified. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 +class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier + private + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#423 + def split_args(args); end +end + +# If a matcher is used in a signature in place of keyword arguments, all +# keyword argument validation needs to be skipped since the matcher is +# opaque. +# +# Instead, keyword arguments will be validated when the method is called +# and they are actually known. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#440 +class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher + # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#441 + def initialize(signature); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#461 + def has_kw_args_in?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#449 + def invalid_kw_args_from(_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#445 + def missing_kw_args_from(_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#453 + def non_kw_args_arity_description; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#457 + def valid_non_kw_args?(*args); end +end + +# Extracts info about the number of arguments and allowed/required +# keyword args of a given method. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#13 +class RSpec::Support::MethodSignature + # @return [MethodSignature] a new instance of MethodSignature + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#16 + def initialize(method); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#123 + def arbitrary_kw_args?; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#38 + def classify_arity(arity = T.unsafe(nil)); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#131 + def classify_parameters; end + + # Without considering what the last arg is, could it + # contain keyword arguments? + # + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#117 + def could_contain_kw_args?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#51 + def description; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#84 + def has_kw_args_in?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#77 + def invalid_kw_args_from(given_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + def max_non_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + def min_non_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#73 + def missing_kw_args_from(given_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#23 + def non_kw_args_arity_description; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + def optional_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + def required_kw_args; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#127 + def unlimited_args?; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#31 + def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end +end + +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#187 +RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) + +# Encapsulates expectations about the number of arguments and +# allowed/required keyword args of a given method. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#244 +class RSpec::Support::MethodSignatureExpectation + # @api private + # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#245 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#272 + def empty?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#256 + def expect_arbitrary_keywords; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#256 + def expect_arbitrary_keywords=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#256 + def expect_unlimited_arguments; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#256 + def expect_unlimited_arguments=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254 + def keywords; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def keywords=(values); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254 + def max_count; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#258 + def max_count=(number); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254 + def min_count; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#265 + def min_count=(number); end +end + +# Abstract base class for signature verifiers. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#305 +class RSpec::Support::MethodSignatureVerifier + # @api private + # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#308 + def initialize(signature, args = T.unsafe(nil)); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#351 + def error_message; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#306 + def kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#306 + def max_non_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#306 + def min_non_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#306 + def non_kw_args; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#343 + def valid?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#315 + def with_expectation(expectation); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#382 + def arbitrary_kw_args?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#378 + def invalid_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#374 + def missing_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#390 + def split_args(args); end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#386 + def unlimited_args?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#370 + def valid_non_kw_args?; end +end + +# On 1.9 and up, this is in core, so we just use the real one +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#65 +class RSpec::Support::Mutex < ::Thread::Mutex + class << self + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#70 + def new; end + end +end + +# If you mock Mutex.new you break our usage of Mutex, so +# instead we capture the original method to return Mutexes. +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68 +RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method) + +# Provides query methods for different OS or OS features. +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#11 +module RSpec::Support::OS + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#14 + def windows?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#18 + def windows_file_path?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#14 + def windows?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#18 + def windows_file_path?; end + end +end + +# Provide additional output details beyond what `inspect` provides when +# printing Time, DateTime, or BigDecimal +# +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#10 +class RSpec::Support::ObjectFormatter + # @api private + # @return [ObjectFormatter] a new instance of ObjectFormatter + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#29 + def initialize(max_formatted_output_length = T.unsafe(nil)); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#34 + def format(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#13 + def max_formatted_output_length; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#13 + def max_formatted_output_length=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#72 + def prepare_array(array); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#96 + def prepare_element(element); end + + # Prepares the provided object to be formatted by wrapping it as needed + # in something that, when `inspect` is called on it, will produce the + # desired output. + # + # This allows us to apply the desired formatting to hash/array data structures + # at any level of nesting, simply by walking that structure and replacing items + # with custom items that have `inspect` defined to return the desired output + # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to + # format the entire thing. + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#58 + def prepare_for_inspection(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#78 + def prepare_hash(input_hash); end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#115 + def recursive_structure?(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#88 + def sort_hash_keys(input_hash); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#108 + def with_entering_structure(structure); end + + private + + # Returns the substring defined by the start_index and end_index + # If the string ends with a partial ANSI code code then that + # will be removed as printing partial ANSI + # codes to the terminal can lead to corruption + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#270 + def truncate_string(str, start_index, end_index); end + + class << self + # Methods are deferred to a default instance of the class to maintain the interface + # For example, calling ObjectFormatter.format is still possible + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#17 + def default_instance; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#21 + def format(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#25 + def prepare_for_inspection(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#129 +class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct + # Returns the value of attribute formatter + # + # @return [Object] the current value of formatter + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def formatter; end + + # Sets the attribute formatter + # + # @param value [Object] the value to set the attribute formatter to. + # @return [Object] the newly set value + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def formatter=(_); end + + # @api private + # @raise [NotImplementedError] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#134 + def inspect; end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def object=(_); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#138 + def pretty_print(pp); end + + class << self + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def [](*_arg0); end + + # @api private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#130 + def can_inspect?(_object); end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def inspect; end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def keyword_init?; end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def members; end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#129 + def new(*_arg0); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#179 +class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#184 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#180 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#161 +class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is + # defined use a custom format string that includes more time precision. + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#170 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#164 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#162 +RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#226 +class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#231 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#227 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#189 +class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#194 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#190 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#11 +RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#249 +RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#119 +class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#120 + def inspect; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#124 + def pretty_print(pp); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def text=(_); end + + class << self + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def [](*_arg0); end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def inspect; end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def keyword_init?; end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def members; end + + # source://rspec-support//lib/rspec/support/object_formatter.rb#119 + def new(*_arg0); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#236 +class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#244 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#237 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#143 +class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # for 1.8.7 + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#151 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#146 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#144 +RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#199 +class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#209 + def inspect; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#213 + def klass; end + + # http://stackoverflow.com/a/2818916 + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#218 + def native_object_id; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#202 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#200 +RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String) + +# Provides recursive constant lookup methods useful for +# constant stubbing. +# +# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#7 +module RSpec::Support::RecursiveConstMethods + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#45 + def const_defined_on?(mod, const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#53 + def constants_defined_on(mod); end + + # @raise [NameError] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#49 + def get_const_defined_on(mod, const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#73 + def normalize_const_name(const_name); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#64 + def recursive_const_defined?(const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#58 + def recursive_const_get(const_name); end +end + +# Allows a thread to lock out other threads from a critical section of code, +# while allowing the thread with the lock to reenter that section. +# +# Based on Monitor as of 2.2 - +# https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9 +# +# Depends on Mutex, but Mutex is only available as part of core since 1.9.1: +# exists - http://ruby-doc.org/core-1.9.1/Mutex.html +# dne - http://ruby-doc.org/core-1.9.0/Mutex.html +# +# @private +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#16 +class RSpec::Support::ReentrantMutex + # @return [ReentrantMutex] a new instance of ReentrantMutex + # + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#17 + def initialize; end + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#23 + def synchronize; end + + private + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#35 + def enter; end + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#40 + def exit; end +end + +# Provides query methods for different rubies +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#26 +module RSpec::Support::Ruby + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#29 + def jruby?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#37 + def jruby_9000?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#33 + def jruby_version; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#49 + def mri?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#45 + def non_mri?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#41 + def rbx?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#53 + def truffleruby?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#29 + def jruby?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#37 + def jruby_9000?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#33 + def jruby_version; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#49 + def mri?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#45 + def non_mri?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#41 + def rbx?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#53 + def truffleruby?; end + end +end + +# Provides query methods for ruby features that differ among +# implementations. +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#62 +module RSpec::Support::RubyFeatures + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#85 + def caller_locations_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#155 + def distincts_kw_args_from_positional_hash?; end + + # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true, + # but when you try to fork, it raises an error: + # NotImplementedError: fork is not available on this platform + # + # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop + # this special case. + # + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#76 + def fork_supported?; end + + # https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments + # + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#111 + def kw_arg_separation?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#160 + def kw_args_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#216 + def module_prepends_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#212 + def module_refinement_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#81 + def optional_and_splat_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#164 + def required_kw_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#146 + def ripper_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#90 + def supports_exception_cause?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#168 + def supports_rebinding_module_methods?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#100 + def supports_syntax_suggest?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#121 + def supports_taint?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#85 + def caller_locations_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#155 + def distincts_kw_args_from_positional_hash?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#76 + def fork_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#111 + def kw_arg_separation?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#160 + def kw_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#216 + def module_prepends_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#212 + def module_refinement_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#81 + def optional_and_splat_args_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#164 + def required_kw_args_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#146 + def ripper_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#90 + def supports_exception_cause?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#168 + def supports_rebinding_module_methods?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#100 + def supports_syntax_suggest?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#121 + def supports_taint?; end + end +end + +# Figures out whether a given method can accept various arguments. +# Surprisingly non-trivial. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#414 +RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier + +# source://rspec-support//lib/rspec/support/version.rb#5 +module RSpec::Support::Version; end + +# source://rspec-support//lib/rspec/support/version.rb#6 +RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) + +# source://rspec-support//lib/rspec/support/warnings.rb#8 +module RSpec::Support::Warnings + # source://rspec-support//lib/rspec/support/warnings.rb#9 + def deprecate(deprecated, options = T.unsafe(nil)); end + + # Used internally to print deprecation warnings + # when rspec-core isn't loaded + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#17 + def warn_deprecation(message, options = T.unsafe(nil)); end + + # Used internally to print longer warnings + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#31 + def warn_with(message, options = T.unsafe(nil)); end + + # Used internally to print warnings + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#24 + def warning(text, options = T.unsafe(nil)); end +end + +# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#7 +module RSpec::Support::WithKeywordsWhenNeeded + private + + # Remove this in RSpec 4 in favour of explicitly passed in kwargs where + # this is used. Works around a warning in Ruby 2.7 + # + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17 + def class_exec(klass, *args, **_arg2, &block); end + + class << self + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17 + def class_exec(klass, *args, **_arg2, &block); end + end +end diff --git a/sorbet/rbi/gems/rspec@3.11.0.rbi b/sorbet/rbi/gems/rspec@3.11.0.rbi deleted file mode 100644 index 2ceaf83..0000000 --- a/sorbet/rbi/gems/rspec@3.11.0.rbi +++ /dev/null @@ -1,40 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rspec` gem. -# Please instead update this file by running `bin/tapioca gem rspec`. - -module RSpec - extend ::RSpec::Support::Warnings - extend ::RSpec::Core::Warnings - - class << self - def clear_examples; end - def configuration; end - def configuration=(_arg0); end - def configure; end - def const_missing(name); end - def context(*args, &example_group_block); end - def current_example; end - def current_example=(example); end - def current_scope; end - def current_scope=(scope); end - def describe(*args, &example_group_block); end - def example_group(*args, &example_group_block); end - def fcontext(*args, &example_group_block); end - def fdescribe(*args, &example_group_block); end - def reset; end - def shared_context(name, *args, &block); end - def shared_examples(name, *args, &block); end - def shared_examples_for(name, *args, &block); end - def world; end - def world=(_arg0); end - def xcontext(*args, &example_group_block); end - def xdescribe(*args, &example_group_block); end - end -end - -RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash) -RSpec::SharedContext = RSpec::Core::SharedContext -module RSpec::Version; end -RSpec::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec@3.13.2.rbi b/sorbet/rbi/gems/rspec@3.13.2.rbi new file mode 100644 index 0000000..5677a07 --- /dev/null +++ b/sorbet/rbi/gems/rspec@3.13.2.rbi @@ -0,0 +1,15 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec` gem. +# Please instead update this file by running `bin/tapioca gem rspec`. + + +# source://rspec//lib/rspec/version.rb#1 +module RSpec; end + +# source://rspec//lib/rspec/version.rb#2 +module RSpec::Version; end + +# source://rspec//lib/rspec/version.rb#3 +RSpec::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi deleted file mode 100644 index e85f03b..0000000 --- a/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +++ /dev/null @@ -1,1953 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-ast` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-ast`. - -module RuboCop; end - -module RuboCop::AST - extend ::RuboCop::AST::RuboCopCompatibility -end - -class RuboCop::AST::AliasNode < ::RuboCop::AST::Node - def new_identifier; end - def old_identifier; end -end - -class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode - def operator; end -end - -class RuboCop::AST::AndNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BinaryOperatorNode - include ::RuboCop::AST::PredicateOperatorNode - - def alternate_operator; end - def inverse_operator; end -end - -class RuboCop::AST::ArgNode < ::RuboCop::AST::Node - def default?; end - def default_value; end - def name; end -end - -class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node - include ::RuboCop::AST::CollectionNode - - def argument_list; end - def empty_and_without_delimiters?; end -end - -class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node - def bracketed?; end - def each_value(&block); end - def percent_literal?(type = T.unsafe(nil)); end - def square_brackets?; end - def values; end -end - -RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node - def expression; end - def name; end -end - -module RuboCop::AST::BasicLiteralNode - def value; end -end - -module RuboCop::AST::BinaryOperatorNode - def conditions; end - def lhs; end - def rhs; end -end - -class RuboCop::AST::BlockNode < ::RuboCop::AST::Node - include ::RuboCop::AST::MethodIdentifierPredicates - - def argument_list; end - def arguments; end - def arguments?; end - def body; end - def braces?; end - def closing_delimiter; end - def delimiters; end - def keywords?; end - def lambda?; end - def method_name; end - def multiline?; end - def opening_delimiter; end - def send_node; end - def single_line?; end - def void_context?; end - - private - - def numbered_arguments; end -end - -RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::AST::BreakNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -class RuboCop::AST::Builder < ::Parser::Builders::Default - def n(type, children, source_map); end - def string_value(token); end - - private - - def node_klass(type); end -end - -RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - - def branches; end - def each_in_pattern(&block); end - def else?; end - def else_branch; end - def in_pattern_branches; end - def keyword; end -end - -class RuboCop::AST::CaseNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - - def branches; end - def each_when(&block); end - def else?; end - def else_branch; end - def keyword; end - def when_branches; end -end - -class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node - def expression; end - def name; end - def namespace; end -end - -class RuboCop::AST::ClassNode < ::RuboCop::AST::Node - def body; end - def identifier; end - def parent_class; end -end - -module RuboCop::AST::CollectionNode - extend ::Forwardable - - def &(*args, &block); end - def *(*args, &block); end - def +(*args, &block); end - def -(*args, &block); end - def <<(*args, &block); end - def [](*args, &block); end - def []=(*args, &block); end - def all?(*args, &block); end - def any?(*args, &block); end - def append(*args, &block); end - def assoc(*args, &block); end - def at(*args, &block); end - def bsearch(*args, &block); end - def bsearch_index(*args, &block); end - def chain(*args, &block); end - def chunk(*args, &block); end - def chunk_while(*args, &block); end - def clear(*args, &block); end - def collect(*args, &block); end - def collect!(*args, &block); end - def collect_concat(*args, &block); end - def combination(*args, &block); end - def compact(*args, &block); end - def compact!(*args, &block); end - def concat(*args, &block); end - def count(*args, &block); end - def cycle(*args, &block); end - def deconstruct(*args, &block); end - def delete(*args, &block); end - def delete_at(*args, &block); end - def delete_if(*args, &block); end - def detect(*args, &block); end - def difference(*args, &block); end - def dig(*args, &block); end - def drop(*args, &block); end - def drop_while(*args, &block); end - def each(*args, &block); end - def each_cons(*args, &block); end - def each_entry(*args, &block); end - def each_index(*args, &block); end - def each_slice(*args, &block); end - def each_with_index(*args, &block); end - def each_with_object(*args, &block); end - def empty?(*args, &block); end - def entries(*args, &block); end - def fetch(*args, &block); end - def fill(*args, &block); end - def filter(*args, &block); end - def filter!(*args, &block); end - def filter_map(*args, &block); end - def find(*args, &block); end - def find_all(*args, &block); end - def find_index(*args, &block); end - def first(*args, &block); end - def flat_map(*args, &block); end - def flatten(*args, &block); end - def flatten!(*args, &block); end - def grep(*args, &block); end - def grep_v(*args, &block); end - def group_by(*args, &block); end - def include?(*args, &block); end - def index(*args, &block); end - def inject(*args, &block); end - def insert(*args, &block); end - def intersection(*args, &block); end - def join(*args, &block); end - def keep_if(*args, &block); end - def last(*args, &block); end - def lazy(*args, &block); end - def length(*args, &block); end - def map(*args, &block); end - def map!(*args, &block); end - def max(*args, &block); end - def max_by(*args, &block); end - def member?(*args, &block); end - def min(*args, &block); end - def min_by(*args, &block); end - def minmax(*args, &block); end - def minmax_by(*args, &block); end - def none?(*args, &block); end - def one?(*args, &block); end - def pack(*args, &block); end - def partition(*args, &block); end - def permutation(*args, &block); end - def place(*args, &block); end - def pop(*args, &block); end - def prepend(*args, &block); end - def product(*args, &block); end - def push(*args, &block); end - def rassoc(*args, &block); end - def reduce(*args, &block); end - def reject(*args, &block); end - def reject!(*args, &block); end - def repeated_combination(*args, &block); end - def repeated_permutation(*args, &block); end - def replace(*args, &block); end - def reverse(*args, &block); end - def reverse!(*args, &block); end - def reverse_each(*args, &block); end - def rindex(*args, &block); end - def rotate(*args, &block); end - def rotate!(*args, &block); end - def sample(*args, &block); end - def select(*args, &block); end - def select!(*args, &block); end - def shelljoin(*args, &block); end - def shift(*args, &block); end - def shuffle(*args, &block); end - def shuffle!(*args, &block); end - def size(*args, &block); end - def slice(*args, &block); end - def slice!(*args, &block); end - def slice_after(*args, &block); end - def slice_before(*args, &block); end - def slice_when(*args, &block); end - def sort(*args, &block); end - def sort!(*args, &block); end - def sort_by(*args, &block); end - def sort_by!(*args, &block); end - def sum(*args, &block); end - def take(*args, &block); end - def take_while(*args, &block); end - def tally(*args, &block); end - def to_ary(*args, &block); end - def to_h(*args, &block); end - def to_set(*args, &block); end - def transpose(*args, &block); end - def union(*args, &block); end - def uniq(*args, &block); end - def uniq!(*args, &block); end - def unshift(*args, &block); end - def values_at(*args, &block); end - def zip(*args, &block); end - def |(*args, &block); end -end - -RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - -module RuboCop::AST::ConditionalNode - def body; end - def condition; end - def multiline_condition?; end - def single_line_condition?; end -end - -class RuboCop::AST::ConstNode < ::RuboCop::AST::Node - def absolute?; end - def class_name?; end - def each_path(&block); end - def module_name?; end - def namespace; end - def relative?; end - def short_name; end -end - -class RuboCop::AST::DefNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - - def argument_forwarding?; end - def arguments; end - def body; end - def endless?; end - def method_name; end - def receiver; end - def void_context?; end -end - -class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def arguments; end - def node_parts; end -end - -module RuboCop::AST::Descendence - def child_nodes; end - def descendants; end - def each_child_node(*types); end - def each_descendant(*types, &block); end - def each_node(*types, &block); end - - protected - - def visit_descendants(types, &block); end -end - -class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode - def value; end -end - -class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node - def body; end -end - -module RuboCop::AST::Ext; end - -module RuboCop::AST::Ext::Range - def line_span(exclude_end: T.unsafe(nil)); end -end - -module RuboCop::AST::Ext::RangeMinMax; end - -class RuboCop::AST::FloatNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -class RuboCop::AST::ForNode < ::RuboCop::AST::Node - def body; end - def collection; end - def do?; end - def keyword; end - def variable; end - def void_context?; end -end - -class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node - include ::RuboCop::AST::CollectionNode - - def to_a; end -end - -module RuboCop::AST::HashElementNode - def delimiter_delta(other); end - def key; end - def key_delta(other, alignment = T.unsafe(nil)); end - def same_line?(other); end - def value; end - def value_delta(other); end -end - -class RuboCop::AST::HashElementNode::HashElementDelta - def initialize(first, second); end - - def delimiter_delta; end - def key_delta(alignment = T.unsafe(nil)); end - def value_delta; end - - private - - def delta(first, second, alignment = T.unsafe(nil)); end - def first; end - def keyword_splat?; end - def second; end - def valid_argument_types?; end -end - -class RuboCop::AST::HashNode < ::RuboCop::AST::Node - def braces?; end - def each_key(&block); end - def each_pair; end - def each_value(&block); end - def empty?; end - def keys; end - def mixed_delimiters?; end - def pairs; end - def pairs_on_same_line?; end - def values; end -end - -class RuboCop::AST::IfNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - def branches; end - def each_branch(&block); end - def else?; end - def else_branch; end - def elsif?; end - def elsif_conditional?; end - def if?; end - def if_branch; end - def inverse_keyword; end - def keyword; end - def modifier_form?; end - def nested_conditional?; end - def node_parts; end - def ternary?; end - def unless?; end -end - -class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node - def body; end - def branch_index; end - def pattern; end - def then?; end -end - -class RuboCop::AST::IndexNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def assignment_method?; end - def attribute_accessor?; end - def method_name; end - - private - - def first_argument_index; end -end - -class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def assignment_method?; end - def attribute_accessor?; end - def method_name; end - - private - - def first_argument_index; end -end - -class RuboCop::AST::IntNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - include ::RuboCop::AST::NumericNode -end - -class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node - include ::RuboCop::AST::HashElementNode - - def colon?; end - def hash_rocket?; end - def node_parts; end - def operator; end -end - -RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) - -class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def assignment_method?; end - def attribute_accessor?; end - def lambda?; end - def lambda_literal?; end - def method_name; end - def receiver; end - - private - - def first_argument_index; end -end - -module RuboCop::AST::MethodDispatchNode - include ::RuboCop::AST::MethodIdentifierPredicates - extend ::RuboCop::AST::NodePattern::Macros - - def access_modifier?; end - def adjacent_def_modifier?(param0 = T.unsafe(nil)); end - def arithmetic_operation?; end - def assignment?; end - def bare_access_modifier?; end - def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end - def binary_operation?; end - def block_literal?; end - def block_node; end - def command?(name); end - def const_receiver?; end - def def_modifier(node = T.unsafe(nil)); end - def def_modifier?(node = T.unsafe(nil)); end - def dot?; end - def double_colon?; end - def implicit_call?; end - def in_macro_scope?(param0 = T.unsafe(nil)); end - def lambda?; end - def lambda_literal?; end - def macro?; end - def method_name; end - def non_bare_access_modifier?; end - def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end - def receiver; end - def safe_navigation?; end - def self_receiver?; end - def setter_method?; end - def special_modifier?; end - def unary_operation?; end -end - -RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) - -module RuboCop::AST::MethodIdentifierPredicates - def assignment_method?; end - def bang_method?; end - def camel_case_method?; end - def comparison_method?; end - def const_receiver?; end - def enumerable_method?; end - def enumerator_method?; end - def method?(name); end - def negation_method?; end - def nonmutating_array_method?; end - def nonmutating_binary_operator_method?; end - def nonmutating_hash_method?; end - def nonmutating_operator_method?; end - def nonmutating_string_method?; end - def nonmutating_unary_operator_method?; end - def operator_method?; end - def predicate_method?; end - def prefix_bang?; end - def prefix_not?; end - def self_receiver?; end -end - -RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) - -module RuboCop::AST::ModifierNode - def modifier_form?; end -end - -class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node - def body; end - def identifier; end -end - -class RuboCop::AST::NextNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -class RuboCop::AST::Node < ::Parser::AST::Node - include ::RuboCop::AST::Sexp - include ::RuboCop::AST::Descendence - include ::RuboCop::RSpec::Node - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - - def __ENCODING___type?; end - def __FILE___type?; end - def __LINE___type?; end - def alias_type?; end - def ancestors; end - def and_asgn_type?; end - def and_type?; end - def arg_expr_type?; end - def arg_type?; end - def args_type?; end - def argument?; end - def argument_type?; end - def array_pattern_type?; end - def array_pattern_with_tail_type?; end - def array_type?; end - def assignment?; end - def assignment_or_similar?(param0 = T.unsafe(nil)); end - def back_ref_type?; end - def basic_conditional?; end - def basic_literal?; end - def begin_type?; end - def block_pass_type?; end - def block_type?; end - def blockarg_expr_type?; end - def blockarg_type?; end - def boolean_type?; end - def break_type?; end - def call_type?; end - def case_match_type?; end - def case_type?; end - def casgn_type?; end - def cbase_type?; end - def chained?; end - def class_constructor?(param0 = T.unsafe(nil)); end - def class_definition?(param0 = T.unsafe(nil)); end - def class_type?; end - def complete!; end - def complete?; end - def complex_type?; end - def conditional?; end - def const_name; end - def const_pattern_type?; end - def const_type?; end - def csend_type?; end - def cvar_type?; end - def cvasgn_type?; end - def def_type?; end - def defined_module; end - def defined_module_name; end - def defined_type?; end - def defs_type?; end - def dstr_type?; end - def dsym_type?; end - def each_ancestor(*types, &block); end - def eflipflop_type?; end - def empty_else_type?; end - def empty_source?; end - def ensure_type?; end - def equals_asgn?; end - def erange_type?; end - def false_type?; end - def falsey_literal?; end - def find_pattern_type?; end - def first_line; end - def float_type?; end - def for_type?; end - def forward_arg_type?; end - def forward_args_type?; end - def forwarded_args_type?; end - def global_const?(param0 = T.unsafe(nil), param1); end - def guard_clause?; end - def gvar_type?; end - def gvasgn_type?; end - def hash_pattern_type?; end - def hash_type?; end - def ident_type?; end - def if_guard_type?; end - def if_type?; end - def iflipflop_type?; end - def immutable_literal?; end - def in_match_type?; end - def in_pattern_type?; end - def index_type?; end - def indexasgn_type?; end - def int_type?; end - def irange_type?; end - def ivar_type?; end - def ivasgn_type?; end - def keyword?; end - def kwarg_type?; end - def kwargs_type?; end - def kwbegin_type?; end - def kwnilarg_type?; end - def kwoptarg_type?; end - def kwrestarg_type?; end - def kwsplat_type?; end - def lambda?(param0 = T.unsafe(nil)); end - def lambda_or_proc?(param0 = T.unsafe(nil)); end - def lambda_type?; end - def last_line; end - def left_sibling; end - def left_siblings; end - def line_count; end - def literal?; end - def loop_keyword?; end - def lvar_type?; end - def lvasgn_type?; end - def masgn_type?; end - def match_alt_type?; end - def match_as_type?; end - def match_current_line_type?; end - def match_guard_clause?(param0 = T.unsafe(nil)); end - def match_nil_pattern_type?; end - def match_pattern_p_type?; end - def match_pattern_type?; end - def match_rest_type?; end - def match_var_type?; end - def match_with_lvasgn_type?; end - def match_with_trailing_comma_type?; end - def mlhs_type?; end - def module_definition?(param0 = T.unsafe(nil)); end - def module_type?; end - def multiline?; end - def mutable_literal?; end - def new_class_or_module_block?(param0 = T.unsafe(nil)); end - def next_type?; end - def nil_type?; end - def node_parts; end - def nonempty_line_count; end - def not_type?; end - def nth_ref_type?; end - def numargs_type?; end - def numblock_type?; end - def numeric_type?; end - def objc_kwarg_type?; end - def objc_restarg_type?; end - def objc_varargs_type?; end - def op_asgn_type?; end - def operator_keyword?; end - def optarg_type?; end - def or_asgn_type?; end - def or_type?; end - def pair_type?; end - def parent; end - def parent?; end - def parent_module_name; end - def parenthesized_call?; end - def pin_type?; end - def post_condition_loop?; end - def postexe_type?; end - def preexe_type?; end - def proc?(param0 = T.unsafe(nil)); end - def procarg0_type?; end - def pure?; end - def range_type?; end - def rational_type?; end - def receiver(param0 = T.unsafe(nil)); end - def recursive_basic_literal?; end - def recursive_literal?; end - def redo_type?; end - def reference?; end - def regexp_type?; end - def regopt_type?; end - def resbody_type?; end - def rescue_type?; end - def restarg_expr_type?; end - def restarg_type?; end - def retry_type?; end - def return_type?; end - def right_sibling; end - def right_siblings; end - def root?; end - def sclass_type?; end - def self_type?; end - def send_type?; end - def shadowarg_type?; end - def shorthand_asgn?; end - def sibling_index; end - def single_line?; end - def source; end - def source_length; end - def source_range; end - def special_keyword?; end - def splat_type?; end - def str_content(param0 = T.unsafe(nil)); end - def str_type?; end - def struct_constructor?(param0 = T.unsafe(nil)); end - def super_type?; end - def sym_type?; end - def true_type?; end - def truthy_literal?; end - def undef_type?; end - def unless_guard_type?; end - def until_post_type?; end - def until_type?; end - def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end - def value_used?; end - def variable?; end - def when_type?; end - def while_post_type?; end - def while_type?; end - def xstr_type?; end - def yield_type?; end - def zsuper_type?; end - - protected - - def parent=(node); end - - private - - def begin_value_used?; end - def case_if_value_used?; end - def defined_module0(param0 = T.unsafe(nil)); end - def for_value_used?; end - def parent_module_name_for_block(ancestor); end - def parent_module_name_for_sclass(sclass_node); end - def parent_module_name_part(node); end - def visit_ancestors(types); end - def while_until_value_used?; end -end - -RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) -RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) - -class RuboCop::AST::NodePattern - include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable - - def initialize(str, compiler: T.unsafe(nil)); end - - def ==(other); end - def as_json(_options = T.unsafe(nil)); end - def ast; end - def captures(*args, &block); end - def encode_with(coder); end - def eql?(other); end - def freeze; end - def init_with(coder); end - def marshal_dump; end - def marshal_load(pattern); end - def match(*args, **rest, &block); end - def match_code; end - def named_parameters(*args, &block); end - def pattern; end - def positional_parameters(*args, &block); end - def to_s; end - - class << self - def descend(element, &block); end - end -end - -class RuboCop::AST::NodePattern::Builder - def emit_atom(type, value); end - def emit_call(type, selector, args = T.unsafe(nil)); end - def emit_capture(capture_token, node); end - def emit_list(type, _begin, children, _end); end - def emit_subsequence(node_list); end - def emit_unary_op(type, _operator = T.unsafe(nil), *children); end - def emit_union(begin_t, pattern_lists, end_t); end - - private - - def n(type, *args); end - def optimizable_as_set?(children); end - def union_children(pattern_lists); end -end - -class RuboCop::AST::NodePattern::Comment - def initialize(range); end - - def ==(other); end - def inspect; end - def loc; end - def location; end - def text; end -end - -class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable - - def initialize; end - - def bind(*args, &block); end - def binding; end - def captures; end - def compile_as_atom(node); end - def compile_as_node_pattern(node, **options); end - def compile_sequence(sequence, var:); end - def each_union(enum, &block); end - def freeze; end - def named_parameter(name); end - def named_parameters; end - def next_capture; end - def parser; end - def positional_parameter(number); end - def positional_parameters; end - def with_temp_variables(*names, &block); end - - private - - def enforce_same_captures(enum); end - def new_capture; end -end - -class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - private - - def visit_const; end - def visit_named_parameter; end - def visit_number; end - def visit_other_type; end - def visit_positional_parameter; end - def visit_regexp; end - def visit_set; end - def visit_string; end - def visit_symbol; end - def visit_unify; end -end - -class RuboCop::AST::NodePattern::Compiler::Binding - def initialize; end - - def bind(name); end - def union_bind(enum); end - - private - - def forbid(names); end -end - -class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler - def initialize; end - - def comments(*args, &block); end - def named_parameters; end - def node_ids; end - def parser; end - def tokens(*args, &block); end -end - -class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer - def initialize(pattern, compiler: T.unsafe(nil)); end - - def compiler; end - def node_pattern; end - def pattern; end - def test(ruby, trace: T.unsafe(nil)); end - - private - - def ruby_ast(ruby); end - def ruby_parser; end -end - -RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug - -class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct - def color_map(color_scheme = T.unsafe(nil)); end - def colorize(color_scheme = T.unsafe(nil)); end - def colorizer; end - def colorizer=(_); end - def match_map; end - def matched?(node); end - def returned; end - def returned=(_); end - def ruby_ast; end - def ruby_ast=(_); end - def trace; end - def trace=(_); end - - private - - def ast; end - def color_map_for(node, color); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler - def do_compile; end - - private - - def node_id; end - def tracer(kind); end -end - -class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler - include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler -end - -class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler - include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler -end - -class RuboCop::AST::NodePattern::Compiler::Debug::Trace - def initialize; end - - def enter(node_id); end - def matched?(node_id); end - def success(node_id); end -end - -class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end - - def access; end - def seq_head; end - - private - - def access_element; end - def access_node; end - def compile_args(arg_list, first: T.unsafe(nil)); end - def compile_guard_clause; end - def compile_value_match(value); end - def multiple_access(kind); end - def visit_ascend; end - def visit_capture; end - def visit_descend; end - def visit_function_call; end - def visit_intersection; end - def visit_negation; end - def visit_node_type; end - def visit_other_type; end - def visit_predicate; end - def visit_sequence; end - def visit_unify; end - def visit_union; end - def visit_wildcard; end -end - -class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - def initialize(compiler, sequence:, var:); end - - def compile_sequence; end - def in_sync; end - - protected - - def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end - def cur_index; end - def sync; end - - private - - def compile_and_advance(term); end - def compile_any_order_branches(matched_var); end - def compile_any_order_else; end - def compile_captured_repetition(child_code, child_captures); end - def compile_case(when_branches, else_code); end - def compile_child_nb_guard(arity_range); end - def compile_cur_index; end - def compile_index(cur = T.unsafe(nil)); end - def compile_loop(term); end - def compile_loop_advance(to = T.unsafe(nil)); end - def compile_matched(kind); end - def compile_max_matched; end - def compile_min_check; end - def compile_remaining; end - def compile_union_forks; end - def empty_loop; end - def handle_prev; end - def merge_forks!(forks); end - def preserve_union_start(forks); end - def remaining_arities(children, last_arity); end - def use_index_from_end; end - def visit_any_order; end - def visit_capture; end - def visit_other_type; end - def visit_repetition; end - def visit_rest; end - def visit_union; end - def within_loop; end -end - -RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) -RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) - -class RuboCop::AST::NodePattern::Compiler::Subcompiler - def initialize(compiler); end - - def compile(node); end - def compiler; end - - private - - def do_compile; end - def node; end - - class << self - def inherited(base); end - def method_added(method); end - def registry; end - end -end - -class RuboCop::AST::NodePattern::Invalid < ::StandardError; end - -class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex - def initialize(source); end - - def comments; end - def source_buffer; end - def tokens; end - - private - - def do_parse; end - def emit(type); end - def emit_comment; end - def emit_regexp; end - def token(type, value); end -end - -RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError -RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::NodePattern::LexerRex - def action; end - def filename; end - def filename=(_arg0); end - def location; end - def match; end - def matches; end - def next_token; end - def parse(str); end - def parse_file(path); end - def scanner_class; end - def ss; end - def ss=(_arg0); end - def state; end - def state=(_arg0); end -end - -RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) -class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end -RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) -RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) -class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end - -module RuboCop::AST::NodePattern::Macros - def def_node_matcher(method_name, pattern_str, **keyword_defaults); end - def def_node_search(method_name, pattern_str, **keyword_defaults); end -end - -module RuboCop::AST::NodePattern::MethodDefiner - def as_lambda; end - def compile_as_lambda; end - def def_node_matcher(base, method_name, **defaults); end - def def_node_search(base, method_name, **defaults); end - - private - - def compile_init; end - def def_helper(base, method_name, **defaults); end - def emit_keyword_list(forwarding: T.unsafe(nil)); end - def emit_lambda_code; end - def emit_method_code; end - def emit_node_search(method_name); end - def emit_node_search_body(method_name, prelude:, on_match:); end - def emit_param_list; end - def emit_params(*first, forwarding: T.unsafe(nil)); end - def emit_retval; end - def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end - def wrapping_block(method_name, **defaults); end -end - -class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node - include ::RuboCop::AST::Descendence - extend ::Forwardable - - def arity; end - def arity_range; end - def capture?; end - def child; end - def children_nodes; end - def in_sequence_head; end - def matches_within_set?; end - def nb_captures; end - def rest?; end - def variadic?; end - def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end -end - -class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def arity; end - def ends_with_rest?; end - def rest_node; end - def term_nodes; end -end - -RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - def arity(*args, &block); end - def capture?; end - def in_sequence_head; end - def nb_captures; end - def rest?(*args, &block); end -end - -module RuboCop::AST::NodePattern::Node::ForbidInSeqHead - def in_sequence_head; end -end - -RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate -RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) - -class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node - def arg_list; end - def method_name; end -end - -class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def arity; end - def operator; end -end - -RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node - def arity; end - def in_sequence_head; end - def rest?; end -end - -RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) - -class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end -end - -class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node - include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - - def arity; end - def in_sequence_head; end -end - -class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node - def arity; end - def in_sequence_head; end -end - -class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable - - def initialize(builder = T.unsafe(nil)); end - - def _reduce_10(val, _values); end - def _reduce_11(val, _values); end - def _reduce_13(val, _values); end - def _reduce_14(val, _values); end - def _reduce_15(val, _values); end - def _reduce_16(val, _values); end - def _reduce_17(val, _values); end - def _reduce_18(val, _values); end - def _reduce_19(val, _values); end - def _reduce_2(val, _values); end - def _reduce_20(val, _values); end - def _reduce_21(val, _values); end - def _reduce_22(val, _values); end - def _reduce_25(val, _values); end - def _reduce_26(val, _values); end - def _reduce_3(val, _values); end - def _reduce_33(val, _values); end - def _reduce_37(val, _values); end - def _reduce_38(val, _values); end - def _reduce_39(val, _values); end - def _reduce_4(val, _values); end - def _reduce_40(val, _values); end - def _reduce_41(val, _values); end - def _reduce_42(val, _values); end - def _reduce_43(val, _values); end - def _reduce_44(val, _values); end - def _reduce_45(val, _values); end - def _reduce_46(val, _values); end - def _reduce_5(val, _values); end - def _reduce_6(val, _values); end - def _reduce_7(val, _values); end - def _reduce_8(val, _values); end - def _reduce_9(val, _values); end - def _reduce_none(val, _values); end - def emit_atom(*args, &block); end - def emit_call(*args, &block); end - def emit_capture(*args, &block); end - def emit_list(*args, &block); end - def emit_unary_op(*args, &block); end - def emit_union(*args, &block); end - def inspect; end - def next_token(*args, &block); end - def parse(source); end - - private - - def enforce_unary(node); end - def on_error(token, val, _vstack); end -end - -RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder -RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer -RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser - def comments; end - def do_parse; end - def tokens; end -end - -class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder - def emit_atom(type, token); end - def emit_call(type, selector_t, args = T.unsafe(nil)); end - def emit_list(type, begin_t, children, end_t); end - def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end - - private - - def join_exprs(left_expr, right_expr); end - def loc(token_or_range); end - def n(type, children, source_map); end - def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end -end - -class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer - def initialize(str_or_buffer); end - - def emit_comment; end - def pos; end - def source_buffer; end - def token(type, value); end -end - -module RuboCop::AST::NodePattern::Sets - class << self - def [](set); end - def name(set); end - def uniq(name); end - end -end - -RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) -RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) -RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_1_2 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_BE_TRUTHY_BE_FALSEY_BE_FALSY_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CALL_RUN = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CONSTANTIZE_CONSTANTS_CONST_GET = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_CONTEXT_SHARED_CONTEXT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_DOUBLE_SPY = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EACH_EXAMPLE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ENUMERATOR_RATIONAL_COMPLEX_THREAD = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EQL_EQ_BE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EXACTLY_AT_LEAST_AT_MOST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PENDING_SKIP = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PROC_LAMBDA = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RAISE_ERROR_RAISE_EXCEPTION = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RECEIVE_HAVE_RECEIVED = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RECEIVE_MESSAGE_CHAIN_STUB_CHAIN = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGES_RECEIVE_MESSAGE_CHAIN_HAVE_RECEIVED = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___EQL_ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___EQL_INCLUDE = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) -RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) - -module RuboCop::AST::NumericNode - def sign?; end -end - -RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node - def assignment_node; end - def expression; end - def name; end - def operator; end -end - -class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode - def operator; end -end - -class RuboCop::AST::OrNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BinaryOperatorNode - include ::RuboCop::AST::PredicateOperatorNode - - def alternate_operator; end - def inverse_operator; end -end - -class RuboCop::AST::PairNode < ::RuboCop::AST::Node - include ::RuboCop::AST::HashElementNode - - def colon?; end - def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end - def hash_rocket?; end - def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end - def value_omission?; end - def value_on_new_line?; end -end - -RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) -RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) -RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) -RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) - -module RuboCop::AST::ParameterizedNode - def arguments?; end - def block_argument?; end - def first_argument; end - def last_argument; end - def parenthesized?; end - def rest_argument?; end - def splat_argument?; end -end - -module RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::ParameterizedNode - - def arguments; end - def arguments?; end - def first_argument; end - def last_argument; end -end - -module RuboCop::AST::ParameterizedNode::WrappedArguments - include ::RuboCop::AST::ParameterizedNode - - def arguments; end -end - -module RuboCop::AST::PredicateOperatorNode - def logical_operator?; end - def operator; end - def semantic_operator?; end -end - -RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) -RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) -RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) -RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) - -class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode - def name; end -end - -class RuboCop::AST::ProcessedSource - include ::RuboCop::Ext::ProcessedSource - - def initialize(source, ruby_version, path = T.unsafe(nil)); end - - def [](*args); end - def ast; end - def ast_with_comments; end - def blank?; end - def buffer; end - def checksum; end - def comment_at_line(line); end - def commented?(source_range); end - def comments; end - def comments_before_line(line); end - def contains_comment?(source_range); end - def current_line(token); end - def diagnostics; end - def each_comment(&block); end - def each_comment_in_lines(line_range); end - def each_token(&block); end - def file_path; end - def find_comment(&block); end - def find_token(&block); end - def first_token_of(range_or_node); end - def following_line(token); end - def last_token_of(range_or_node); end - def line_indentation(line_number); end - def line_with_comment?(line); end - def lines; end - def parser_error; end - def path; end - def preceding_line(token); end - def raw_source; end - def ruby_version; end - def sorted_tokens; end - def start_with?(string); end - def tokens; end - def tokens_within(range_or_node); end - def valid_syntax?; end - - private - - def comment_index; end - def create_parser(ruby_version); end - def first_token_index(range_or_node); end - def last_token_index(range_or_node); end - def parse(source, ruby_version); end - def parser_class(ruby_version); end - def source_range(range_or_node); end - def tokenize(parser); end - - class << self - def from_file(path, ruby_version); end - end -end - -RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) -RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) - -class RuboCop::AST::RangeNode < ::RuboCop::AST::Node - def begin; end - def end; end -end - -class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node - include ::RuboCop::Ext::RegexpNode - - def content; end - def delimiter?(char); end - def delimiters; end - def extended?; end - def fixed_encoding?; end - def ignore_case?; end - def interpolation?; end - def multiline_mode?; end - def no_encoding?; end - def options; end - def percent_r_literal?; end - def regopt; end - def single_interpolation?; end - def slash_literal?; end - def to_regexp; end - - private - - def regopt_include?(option); end -end - -RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node - def body; end - def branch_index; end - def exception_variable; end - def exceptions; end -end - -class RuboCop::AST::RescueNode < ::RuboCop::AST::Node - def body; end - def branches; end - def else?; end - def else_branch; end - def resbody_branches; end -end - -class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::WrappedArguments -end - -module RuboCop::AST::RuboCopCompatibility - def rubocop_loaded; end -end - -RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node - def body; end - def identifier; end -end - -class RuboCop::AST::SendNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::ParameterizedNode::RestArguments - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def attribute_accessor?(param0 = T.unsafe(nil)); end - - private - - def first_argument_index; end -end - -module RuboCop::AST::Sexp - def s(type, *children); end -end - -class RuboCop::AST::StrNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode - - def heredoc?; end -end - -class RuboCop::AST::SuperNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def arguments; end - def node_parts; end -end - -class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node - include ::RuboCop::AST::BasicLiteralNode -end - -class RuboCop::AST::Token - def initialize(pos, type, text); end - - def begin_pos; end - def column; end - def comma?; end - def comment?; end - def dot?; end - def end?; end - def end_pos; end - def equal_sign?; end - def left_array_bracket?; end - def left_brace?; end - def left_bracket?; end - def left_curly_brace?; end - def left_parens?; end - def left_ref_bracket?; end - def line; end - def pos; end - def regexp_dots?; end - def rescue_modifier?; end - def right_bracket?; end - def right_curly_brace?; end - def right_parens?; end - def semicolon?; end - def space_after?; end - def space_before?; end - def text; end - def to_s; end - def type; end - - class << self - def from_parser_token(parser_token); end - end -end - -module RuboCop::AST::Traversal - extend ::RuboCop::AST::Traversal::CallbackCompiler - - def on_(node); end - def on___ENCODING__(node); end - def on___FILE__(node); end - def on___LINE__(node); end - def on_alias(node); end - def on_and(node); end - def on_and_asgn(node); end - def on_arg(node); end - def on_arg_expr(node); end - def on_args(node); end - def on_array(node); end - def on_array_pattern(node); end - def on_array_pattern_with_tail(node); end - def on_back_ref(node); end - def on_begin(node); end - def on_block(node); end - def on_block_pass(node); end - def on_blockarg(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_cbase(node); end - def on_class(node); end - def on_complex(node); end - def on_const(node); end - def on_const_pattern(node); end - def on_csend(node); end - def on_cvar(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defined?(node); end - def on_defs(node); end - def on_dstr(node); end - def on_dsym(node); end - def on_eflipflop(node); end - def on_empty_else(node); end - def on_ensure(node); end - def on_erange(node); end - def on_false(node); end - def on_find_pattern(node); end - def on_float(node); end - def on_for(node); end - def on_forward_arg(node); end - def on_forward_args(node); end - def on_forwarded_args(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def on_hash(node); end - def on_hash_pattern(node); end - def on_if(node); end - def on_if_guard(node); end - def on_iflipflop(node); end - def on_in_match(node); end - def on_in_pattern(node); end - def on_index(node); end - def on_indexasgn(node); end - def on_int(node); end - def on_irange(node); end - def on_ivar(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwargs(node); end - def on_kwbegin(node); end - def on_kwnilarg(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_kwsplat(node); end - def on_lambda(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_alt(node); end - def on_match_as(node); end - def on_match_current_line(node); end - def on_match_nil_pattern(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_match_rest(node); end - def on_match_var(node); end - def on_match_with_lvasgn(node); end - def on_match_with_trailing_comma(node); end - def on_mlhs(node); end - def on_module(node); end - def on_mrasgn(node); end - def on_next(node); end - def on_nil(node); end - def on_not(node); end - def on_nth_ref(node); end - def on_numblock(node); end - def on_op_asgn(node); end - def on_optarg(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_pin(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_procarg0(node); end - def on_rasgn(node); end - def on_rational(node); end - def on_redo(node); end - def on_regexp(node); end - def on_regopt(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_restarg(node); end - def on_retry(node); end - def on_return(node); end - def on_sclass(node); end - def on_self(node); end - def on_send(node); end - def on_shadowarg(node); end - def on_splat(node); end - def on_str(node); end - def on_super(node); end - def on_sym(node); end - def on_true(node); end - def on_undef(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_until_post(node); end - def on_when(node); end - def on_while(node); end - def on_while_post(node); end - def on_xstr(node); end - def on_yield(node); end - def on_zsuper(node); end - def walk(node); end -end - -module RuboCop::AST::Traversal::CallbackCompiler - def arity_check(range); end - def body(signature, prelude); end - def def_callback(type, *signature, arity: T.unsafe(nil), arity_check: T.unsafe(nil), body: T.unsafe(nil)); end -end - -RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) -RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) -class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end -RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) -RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) - -class RuboCop::AST::UntilNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - def do?; end - def inverse_keyword; end - def keyword; end -end - -module RuboCop::AST::Version; end -RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) - -class RuboCop::AST::WhenNode < ::RuboCop::AST::Node - def body; end - def branch_index; end - def conditions; end - def each_condition(&block); end - def then?; end -end - -class RuboCop::AST::WhileNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ConditionalNode - include ::RuboCop::AST::ModifierNode - - def do?; end - def inverse_keyword; end - def keyword; end -end - -class RuboCop::AST::YieldNode < ::RuboCop::AST::Node - include ::RuboCop::AST::ParameterizedNode - include ::RuboCop::AST::MethodIdentifierPredicates - include ::RuboCop::AST::MethodDispatchNode - - def arguments; end - def node_parts; end -end - -RuboCop::NodePattern = RuboCop::AST::NodePattern -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource -RuboCop::Token = RuboCop::AST::Token diff --git a/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi new file mode 100644 index 0000000..335a303 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-ast@1.49.0.rbi @@ -0,0 +1,7468 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-ast` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-ast`. + + +class Parser::Source::Range + include ::RuboCop::AST::Ext::Range +end + +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#3 +module RuboCop; end + +# ... +# +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#4 +module RuboCop::AST + extend ::RuboCop::AST::RuboCopCompatibility +end + +# A node extension for `alias` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `alias` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#8 +class RuboCop::AST::AliasNode < ::RuboCop::AST::Node + # Returns the new identifier as specified by the `alias`. + # + # @return [SymbolNode] the new identifier + # + # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#19 + def new_identifier; end + + # Returns the old identifier as specified by the `alias`. + # + # @return [SymbolNode] the old identifier + # + # source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#12 + def old_identifier; end +end + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#8 +class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#12 + def operator; end +end + +# A node extension for `until` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `until` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#8 +class RuboCop::AST::AndNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `and` as a string. + # Returns `and` for `&&` and vice versa. + # + # @return [String] the alternate of the `and` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#16 + def alternate_operator; end + + # Returns the inverse keyword of the `and` node as a string. + # Returns `||` for `&&` and `or` for `and`. + # + # @return [String] the inverse of the `and` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/and_node.rb#24 + def inverse_operator; end +end + +# A node extension for `arg`, `optarg`, `restarg`, `kwarg`, `kwoptarg`, +# `kwrestarg`, `blockarg`, `shadowarg` and `forward_arg` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all `arg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#9 +class RuboCop::AST::ArgNode < ::RuboCop::AST::Node + # Checks whether the argument has a default value + # + # @return [Boolean] whether the argument has a default value + # + # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#29 + def default?; end + + # Returns the default value of the argument, if any. + # + # @return [Node, nil] the default value of the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#20 + def default_value; end + + # Returns the name of an argument. + # + # @return [Symbol, nil] the name of the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#13 + def name; end +end + +# A node extension for `args` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `args` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#8 +class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Yield each argument from the collection. + # Arguments can be inside `mlhs` nodes in the case of destructuring, so this + # flattens the collection to just `arg`, `optarg`, `restarg`, `kwarg`, + # `kwoptarg`, `kwrestarg`, `blockarg`, `forward_arg` and `shadowarg`. + # + # @return [Array] array of argument nodes. + # + # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#34 + def argument_list; end + + # It returns true if arguments are empty and delimiters do not exist. + # @example: + # # true + # def x; end + # x { } + # -> {} + # + # # false + # def x(); end + # def x a; end + # x { || } + # -> () {} + # -> a {} + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/args_node.rb#24 + def empty_and_without_delimiters?; end +end + +# A node extension for `array` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `array` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#8 +class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node + # Checks whether the `array` literal is delimited by either percent or + # square brackets + # + # brackets + # + # @return [Boolean] whether the array is enclosed in percent or square + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64 + def bracketed?; end + + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#25 + def each_value(&block); end + + # Checks whether the `array` literal is delimited by percent brackets. + # + # @overload percent_literal? + # @overload percent_literal? + # @return [Boolean] whether the array is enclosed in percent brackets + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#51 + def percent_literal?(type = T.unsafe(nil)); end + + # Checks whether the `array` literal is delimited by square brackets. + # + # @return [Boolean] whether the array is enclosed in square brackets + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#36 + def square_brackets?; end + + # Returns an array of all value nodes in the `array` literal. + # + # @return [Array] an array of value nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#18 + def values; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#9 +RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + +# A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#8 +class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#20 + def expression; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#15 + def lhs; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#12 + def name; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#23 + def rhs; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, `rational`, `complex`... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 +module RuboCop::AST::BasicLiteralNode + # Returns the value of the literal. + # + # @return [mixed] the value of the literal + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#11 + def value; end +end + +# Common functionality for nodes that are binary operations: +# `or`, `and` ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#7 +module RuboCop::AST::BinaryOperatorNode + # Returns all of the conditions, including nested conditions, + # of the binary operation. + # + # operation and the let and right hand side of any nested binary + # operators + # + # @return [Array] the left and right hand side of the binary + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#28 + def conditions; end + + # Returns the left hand side node of the binary operation. + # + # @return [Node] the left hand side of the binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#11 + def lhs; end + + # Returns the right hand side node of the binary operation. + # + # @return [Node] the right hand side of the binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/binary_operator_node.rb#18 + def rhs; end +end + +# A node extension for `block` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# A `block` node is essentially a method send with a block. Parser nests +# the `send` node inside the `block` node. +# +# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#11 +class RuboCop::AST::BlockNode < ::RuboCop::AST::Node + include ::RuboCop::AST::MethodIdentifierPredicates + + # Returns a collection of all descendants of this node that are + # argument type nodes. See `ArgsNode#argument_list` for details. + # + # @return [Array] + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#62 + def argument_list; end + + # The arguments of this block. + # Note that if the block has destructured arguments, `arguments` will + # return a `mlhs` node, whereas `argument_list` will return only + # actual argument nodes. + # + # @return [Array] + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#50 + def arguments; end + + # Checks whether this block takes any arguments. + # + # @return [Boolean] whether this `block` node takes any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#89 + def arguments?; end + + # The body of this block. + # + # @return [Node, nil] the body of the `block` node or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#75 + def body; end + + # Checks whether the `block` literal is delimited by curly braces. + # + # @return [Boolean] whether the `block` literal is enclosed in braces + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#96 + def braces?; end + + # The closing delimiter for this `block` literal. + # + # @return [String] the closing delimiter for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#124 + def closing_delimiter; end + + # The delimiters for this `block` literal. + # + # @return [Array] the delimiters for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#110 + def delimiters; end + + # A shorthand for getting the first argument of this block. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#31 + def first_argument; end + + # Checks whether the `block` literal is delimited by `do`-`end` keywords. + # + # @return [Boolean] whether the `block` literal is enclosed in `do`-`end` + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#103 + def keywords?; end + + # Checks whether this `block` literal belongs to a lambda. + # + # @return [Boolean] whether the `block` literal belongs to a lambda + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#147 + def lambda?; end + + # A shorthand for getting the last argument of this block. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#40 + def last_argument; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#82 + def method_name; end + + # Checks whether this is a multiline block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a several lines + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#140 + def multiline?; end + + # The opening delimiter for this `block` literal. + # + # @return [String] the opening delimiter for the `block` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#117 + def opening_delimiter; end + + # The `send` node associated with this block. + # + # @return [SendNode] the `send` node associated with the `block` node + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#22 + def send_node; end + + # Checks whether this is a single line block. This is overridden here + # because the general version in `Node` does not work for `block` nodes. + # + # @return [Boolean] whether the `block` literal is on a single line + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#132 + def single_line?; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `block` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#154 + def void_context?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#160 + def numbered_arguments; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#14 +RuboCop::AST::BlockNode::IT_BLOCK_ARGUMENT = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#16 +RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) + +# A node extension for `break` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `break` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/break_node.rb#8 +class RuboCop::AST::BreakNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Builder` is an AST builder that is utilized to let `Parser` +# generate ASTs with {RuboCop::AST::Node}. +# +# @example +# buffer = Parser::Source::Buffer.new('(string)') +# buffer.source = 'puts :foo' +# +# builder = RuboCop::AST::Builder.new +# require 'parser/ruby25' +# parser = Parser::Ruby25.new(builder) +# root_node = parser.parse(buffer) +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#129 +class RuboCop::AST::Builder < ::Parser::Builders::Default + include ::RuboCop::AST::BuilderExtensions +end + +# Common functionality between the parser and prism builder +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#7 +module RuboCop::AST::BuilderExtensions + # Generates {Node} from the given information. + # + # @api private + # @return [Node] the generated node + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#101 + def n(type, children, source_map); end + + # Overwrite the base method to allow strings with invalid encoding + # More details here https://github.com/whitequark/parser/issues/283 + # + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#107 + def string_value(token); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#113 + def node_klass(type); end + + class << self + # @api private + # @private + # + # source://rubocop-ast//lib/rubocop/ast/builder.rb#8 + def included(base); end + end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/builder.rb#14 +RuboCop::AST::BuilderExtensions::NODE_MAP = T.let(T.unsafe(nil), Hash) + +# A parser builder, based on the one provided by prism, +# which is capable of emitting AST for more recent Rubies. +# +# source://rubocop-ast//lib/rubocop/ast/builder_prism.rb#7 +class RuboCop::AST::BuilderPrism < ::Prism::Translation::Parser::Builder + include ::RuboCop::AST::BuilderExtensions +end + +# A node extension for `case_match` nodes. This will be used in place of +# a plain node when the builder constructs the AST, making its methods +# available to all `case_match` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#8 +class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # and the `else` (if any). Note that these bodies could be nil. + # + # @return [Array] an array of the bodies of the `in` branches + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#38 + def branches; end + + # @deprecated Use `in_pattern_branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#19 + def each_in_pattern(&block); end + + # Checks whether this case statement has an `else` branch. + # + # @return [Boolean] whether the `case` statement has an `else` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#59 + def else?; end + + # Returns the else branch of the `case` statement, if any. + # + # @return [Node] the else branch node of the `case` statement + # @return [EmptyElse] the empty else branch node of the `case` statement + # @return [nil] if the case statement does not have an else branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#52 + def else_branch; end + + # Returns an array of all the `in` pattern branches in the `case` statement. + # + # @return [Array] an array of `in_pattern` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#30 + def in_pattern_branches; end + + # Returns the keyword of the `case` statement as a string. + # + # @return [String] the keyword of the `case` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/case_match_node.rb#14 + def keyword; end +end + +# A node extension for `case` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `case` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#8 +class RuboCop::AST::CaseNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + + # Returns an array of all the when branches in the `case` statement. + # + # and the else (if any). Note that these bodies could be nil. + # + # @return [Array] an array of the bodies of the when branches + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#38 + def branches; end + + # @deprecated Use `when_branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#19 + def each_when(&block); end + + # Checks whether this case statement has an `else` branch. + # + # @return [Boolean] whether the `case` statement has an `else` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#55 + def else?; end + + # Returns the else branch of the `case` statement, if any. + # + # @return [Node] the else branch node of the `case` statement + # @return [nil] if the case statement does not have an else branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#48 + def else_branch; end + + # Returns the keyword of the `case` statement as a string. + # + # @return [String] the keyword of the `case` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#14 + def keyword; end + + # Returns an array of all the when branches in the `case` statement. + # + # @return [Array] an array of `when` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/case_node.rb#30 + def when_branches; end +end + +# A node extension for `casgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#8 +class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#17 + def expression; end + + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#12 + def lhs; end + + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#11 + def name; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#20 + def rhs; end +end + +# A node extension for `class` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `class` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#8 +class RuboCop::AST::ClassNode < ::RuboCop::AST::Node + # The body of this `class` node. + # + # @return [Node, nil] the body of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#26 + def body; end + + # The identifier for this `class` node. + # + # @return [Node] the identifier of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#12 + def identifier; end + + # The parent class for this `class` node. + # + # @return [Node, nil] the parent class of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#19 + def parent_class; end +end + +# A mixin that helps give collection nodes array polymorphism. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 +module RuboCop::AST::CollectionNode + extend ::RuboCop::SimpleForwardable + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def &(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def *(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def +(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def -(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def <<(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def all?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def any?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def append(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def assoc(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def at(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def bsearch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def bsearch_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def chain(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def chunk(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def chunk_while(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def clear(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def collect(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def collect!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def collect_concat(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def combination(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def compact(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def compact!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def concat(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def count(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def cycle(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def deconstruct(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def delete_at(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def delete_if(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def detect(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def difference(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def dig(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def drop(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def drop_while(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each_cons(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each_entry(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each_slice(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each_with_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def each_with_object(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def empty?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def entries(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def fill(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def filter(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def filter!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def filter_map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def find(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def find_all(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def find_index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def first(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def flat_map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def flatten(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def flatten!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def grep(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def grep_v(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def group_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def include?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def index(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def inject(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def insert(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def intersect?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def intersection(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def join(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def keep_if(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def last(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def lazy(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def length(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def map!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def max(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def max_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def member?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def min(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def min_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def minmax(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def minmax_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def none?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def one?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def pack(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def partition(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def permutation(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def place(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def pop(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def prepend(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def product(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def push(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def rassoc(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def reduce(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def reject(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def reject!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def repeated_combination(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def reverse(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def reverse!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def reverse_each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def rindex(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def rotate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def rotate!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def sample(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def select(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def select!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def shelljoin(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def shift(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def shuffle(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def shuffle!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def size(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def slice(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def slice!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def slice_after(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def slice_before(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def slice_when(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def sort(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def sort!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def sort_by(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def sort_by!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def sum(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def take(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def take_while(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def tally(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def to_ary(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def to_set(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def transpose(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def union(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def uniq(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def uniq!(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def unshift(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def values_at(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def zip(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#13 + def |(*_arg0, **_arg1, &_arg2); end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 +RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# A node extension for `complex` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `complex` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/complex_node.rb#8 +class RuboCop::AST::ComplexNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# Common functionality for nodes that have conditions: +# `if`, `while`, `until`, `case`. +# This currently doesn't include `when` nodes, because they have multiple +# conditions, and need to be checked for that. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#9 +module RuboCop::AST::ConditionalNode + # Returns the body associated with the condition. This works together with + # each node's custom destructuring method to select the correct part of + # the node. + # + # @note For `if` nodes, this is the truthy branch. + # @return [Node, nil] the body of the node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#40 + def body; end + + # Returns the condition of the node. This works together with each node's + # custom destructuring method to select the correct part of the node. + # + # @return [Node, nil] the condition of the node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#29 + def condition; end + + # Checks whether the condition of the node is written on more than + # one line. + # + # @return [Boolean] whether the condition is on more than one line + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#21 + def multiline_condition?; end + + # Checks whether the condition of the node is written on a single line. + # + # @return [Boolean] whether the condition is on a single line + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/conditional_node.rb#13 + def single_line_condition?; end +end + +# A node extension for `const` nodes. +# +# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 +class RuboCop::AST::ConstNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode +end + +# Common functionality for nodes that deal with constants: +# `const`, `casgn`. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#7 +module RuboCop::AST::ConstantNode + # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#27 + def absolute?; end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#24 + def class_name?; end + + # Yield nodes for the namespace + # + # For `::Foo::Bar::BAZ` => yields: + # s(:cbase), then + # s(:const, :Foo), then + # s(:const, s(:const, :Foo), :Bar) + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#44 + def each_path(&block); end + + # @return [Boolean] if the constant is a Module / Class, according to the standard convention. + # Note: some classes might have uppercase in which case this method + # returns false + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#21 + def module_name?; end + + # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#9 + def namespace; end + + # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#34 + def relative?; end + + # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#14 + def short_name; end +end + +# A node extension for `csend` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `csend` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#8 +class RuboCop::AST::CsendNode < ::RuboCop::AST::SendNode + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/csend_node.rb#9 + def send_type?; end +end + +# A node extension for `def` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `def` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#8 +class RuboCop::AST::DefNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + + # Checks whether this method definition node forwards its arguments + # as per the feature added in Ruby 2.7. + # + # @note This is written in a way that may support lead arguments + # which are rumored to be added in a later version of Ruby. + # @return [Boolean] whether the `def` node uses argument forwarding + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#26 + def argument_forwarding?; end + + # An array containing the arguments of the method definition. + # + # @return [Array] the arguments of the method definition + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#40 + def arguments; end + + # The body of the method definition. + # + # @note this can be either a `begin` node, if the method body contains + # multiple expressions, or any other node, if it contains a single + # expression. + # @return [Node] the body of the method definition + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#51 + def body; end + + # @return [Boolean] if the definition is without an `end` or not. + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#63 + def endless?; end + + # The name of the defined method as a symbol. + # + # @return [Symbol] the name of the defined method + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#33 + def method_name; end + + # The receiver of the method definition, if any. + # + # @return [Node, nil] the receiver of the method definition, or `nil`. + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#58 + def receiver; end + + # Checks whether this node body is a void context. + # + # @return [Boolean] whether the `def` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/def_node.rb#15 + def void_context?; end +end + +# A node extension for `defined?` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `send` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#8 +class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#16 + def arguments; end + + # source://rubocop-ast//lib/rubocop/ast/node/defined_node.rb#12 + def node_parts; end +end + +# Common functionality for primitive literal nodes: `sym`, `str`, +# `int`, `float`, ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#7 +module RuboCop::AST::Descendence + # Returns an array of child nodes. + # This is a shorthand for `node.each_child_node.to_a`. + # + # @return [Array] an array of child nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#38 + def child_nodes; end + + # Returns an array of descendant nodes. + # This is a shorthand for `node.each_descendant.to_a`. + # + # @return [Array] an array of descendant nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#72 + def descendants; end + + # Calls the given block for each child node. + # If no block is given, an `Enumerator` is returned. + # + # Note that this is different from `node.children.each { |child| ... }` + # which yields all children including non-node elements. + # + # @overload each_child_node + # @overload each_child_node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each child node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#22 + def each_child_node(*types); end + + # Calls the given block for each descendant node with depth first order. + # If no block is given, an `Enumerator` is returned. + # + # @overload each_descendant + # @overload each_descendant + # @overload each_descendant + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each descendant node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#60 + def each_descendant(*types, &block); end + + # Calls the given block for the receiver and each descendant node in + # depth-first order. + # If no block is given, an `Enumerator` is returned. + # + # This method would be useful when you treat the receiver node as the root + # of a tree and want to iterate over all nodes in the tree. + # + # @overload each_node + # @overload each_node + # @overload each_node + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#95 + def each_node(*types, &block); end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/descendence.rb#107 + def visit_descendants(types, &block); end +end + +# A node extension for `dstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `dstr` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#8 +class RuboCop::AST::DstrNode < ::RuboCop::AST::StrNode + # source://rubocop-ast//lib/rubocop/ast/node/dstr_node.rb#9 + def value; end +end + +# A node extension for `ensure` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `ensure` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#8 +class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node + # Returns the body of the `ensure` clause. + # + # @deprecated Use `EnsureNode#branch` + # @return [Node, nil] The body of the `ensure`. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#16 + def body; end + + # Returns an the ensure branch in the exception handling statement. + # + # @return [Node, nil] the body of the ensure branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#33 + def branch; end + + # Returns the `rescue` node of the `ensure`, if present. + # + # @return [Node, nil] The `rescue` node. + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#40 + def rescue_node; end + + # Checks whether this node body is a void context. + # Always `true` for `ensure`. + # + # @return [true] whether the `ensure` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#48 + def void_context?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#9 +RuboCop::AST::EnsureNode::DEPRECATION_WARNING_LOCATION_CACHE = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 +module RuboCop::AST::Ext; end + +# Extensions to Parser::AST::Range +# +# source://rubocop-ast//lib/rubocop/ast/ext/range.rb#7 +module RuboCop::AST::Ext::Range + # If `exclude_end` is `true`, then the range will be exclusive. + # + # Assume that `node` corresponds to the following array literal: + # + # [ + # :foo, + # :bar + # ] + # + # node.loc.begin.line_span # => 1..1 + # node.source_range.line_span(exclude_end: true) # => 1...4 + # + # @return [Range] the range of line numbers for the node + # + # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#20 + def line_span(exclude_end: T.unsafe(nil)); end +end + +# A node extension for `float` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `float` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/float_node.rb#8 +class RuboCop::AST::FloatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `for` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `for` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#8 +class RuboCop::AST::ForNode < ::RuboCop::AST::Node + # Returns the body of the `for` loop. + # + # @return [Node, nil] The body of the `for` loop. + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#48 + def body; end + + # Returns the collection the `for` loop is iterating over. + # + # @return [Node] The collection the `for` loop is iterating over + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#41 + def collection; end + + # Checks whether the `for` node has a `do` keyword. + # + # @return [Boolean] whether the `for` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#19 + def do?; end + + # Returns the keyword of the `for` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#12 + def keyword; end + + # Returns the iteration variable of the `for` loop. + # + # @return [Node] The iteration variable of the `for` loop + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#34 + def variable; end + + # Checks whether this node body is a void context. + # Always `true` for `for`. + # + # @return [true] whether the `for` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#27 + def void_context?; end +end + +# A node extension for `forward-args` nodes. This will be used in place +# of a plain node when the builder constructs the AST, making its methods +# available to all `forward-args` nodes within RuboCop. +# +# Not used with modern emitters: +# +# $ ruby-parse -e "def foo(...); end" +# (def :foo +# (args +# (forward-arg)) nil) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (def :foo +# (forward-args) nil) +# +# Note the extra 's' with legacy form. +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#23 +class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node + include ::RuboCop::AST::CollectionNode + + # Node wraps itself in an array to be compatible with other + # enumerable argument types. + # + # source://rubocop-ast//lib/rubocop/ast/node/forward_args_node.rb#28 + def to_a; end +end + +# Common functionality for nodes that can be used as hash elements: +# `pair`, `kwsplat` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#7 +module RuboCop::AST::HashElementNode + # Returns the delta between this element's delimiter and the argument's. + # + # @note Pairs with different delimiter styles return a delta of 0 + # @return [Integer] the delta between the two delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#61 + def delimiter_delta(other); end + + # Returns the key of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # @return [Node] the key of the hash element + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#13 + def key; end + + # Returns the delta between this pair's key and the argument pair's. + # + # @note Keys on the same line always return a delta of 0 + # @note Keyword splats always return a delta of 0 for right alignment + # @param alignment [Symbol] whether to check the left or right side + # @return [Integer] the delta between the two keys + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#43 + def key_delta(other, alignment = T.unsafe(nil)); end + + # Checks whether this `hash` element is on the same line as `other`. + # + # @note A multiline element is considered to be on the same line if it + # shares any of its lines with `other` + # @return [Boolean] whether this element is on the same line as `other` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#32 + def same_line?(other); end + + # Returns the value of this `hash` element. + # + # @note For keyword splats, this returns the whole node + # @return [Node] the value of the hash element + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#22 + def value; end + + # Returns the delta between this element's value and the argument's. + # + # @note Keyword splats always return a delta of 0 + # @return [Integer] the delta between the two values + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#52 + def value_delta(other); end +end + +# A helper class for comparing the positions of different parts of a +# `pair` node. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#67 +class RuboCop::AST::HashElementNode::HashElementDelta + # @raise [ArgumentError] + # @return [HashElementDelta] a new instance of HashElementDelta + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#68 + def initialize(first, second); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#89 + def delimiter_delta; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#75 + def key_delta(alignment = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#82 + def value_delta; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#108 + def delta(first, second, alignment = T.unsafe(nil)); end + + # Returns the value of attribute first. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + def first; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#119 + def keyword_splat?; end + + # Returns the value of attribute second. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#98 + def second; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/hash_element_node.rb#100 + def valid_argument_types?; end +end + +# A node extension for `hash` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `hash` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#8 +class RuboCop::AST::HashNode < ::RuboCop::AST::Node + # Checks whether the `hash` literal is delimited by curly braces. + # + # @return [Boolean] whether the `hash` literal is enclosed in braces + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#117 + def braces?; end + + # Calls the given block for each `key` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#59 + def each_key(&block); end + + # Calls the given block for each `pair` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#33 + def each_pair; end + + # Calls the given block for each `value` node in the `hash` literal. + # If no block is given, an `Enumerator` is returned. + # + # @note `kwsplat` nodes are ignored. + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#83 + def each_value(&block); end + + # Checks whether the `hash` node contains any `pair`- or `kwsplat` nodes. + # + # @return[Boolean] whether the `hash` is empty + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#22 + def empty?; end + + # Returns an array of all the keys in the `hash` literal. + # + # @note `kwsplat` nodes are ignored. + # @return [Array] an array of keys in the `hash` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#48 + def keys; end + + # Checks whether this `hash` uses a mix of hash rocket and colon + # delimiters for its pairs. + # + # @note `kwsplat` nodes are ignored. + # @return [Boolean] whether the `hash` uses mixed delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#110 + def mixed_delimiters?; end + + # Returns an array of all the key value pairs in the `hash` literal. + # + # ignored. + # + # @note this may be different from children as `kwsplat` nodes are + # @return [Array] an array of `pair` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#15 + def pairs; end + + # Checks whether any of the key value pairs in the `hash` literal are on + # the same line. + # + # @note A multiline `pair` is considered to be on the same line if it + # shares any of its lines with another `pair` + # @note `kwsplat` nodes are ignored. + # @return [Boolean] whether any `pair` nodes are on the same line + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#100 + def pairs_on_same_line?; end + + # Returns an array of all the values in the `hash` literal. + # + # @note `kwsplat` nodes are ignored. + # @return [Array] an array of values in the `hash` literal + # + # source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#72 + def values; end +end + +# A node extension for `if` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `if` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#8 +class RuboCop::AST::IfNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Returns an array of all the branches in the conditional statement. + # + # @return [Array] an array of branch nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#154 + def branches; end + + # @deprecated Use `branches.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#171 + def each_branch(&block); end + + # Checks whether the `if` node has an `else` clause. + # + # @note This returns `true` for nodes containing an `elsif` clause. + # This is legacy behavior, and many cops rely on it. + # @return [Boolean] whether the node has an `else` clause + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#49 + def else?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is falsey. + # + # @note This is normalized for `unless` nodes. + # @return [Node] the falsey branch node of the `if` node + # @return [nil] when there is no else branch + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#133 + def else_branch; end + + # Checks whether the `if` is an `elsif`. Parser handles these by nesting + # `if` nodes in the `else` branch. + # + # @return [Boolean] whether the node is an `elsif` + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#39 + def elsif?; end + + # Checks whether the `if` node has at least one `elsif` branch. Returns + # true if this `if` node itself is an `elsif`. + # + # @return [Boolean] whether the `if` node has at least one `elsif` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#111 + def elsif_conditional?; end + + # Checks whether this node is an `if` statement. (This is not true of + # ternary operators and `unless` statements.) + # + # @return [Boolean] whether the node is an `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#16 + def if?; end + + # Returns the branch of the `if` node that gets evaluated when its + # condition is truthy. + # + # @note This is normalized for `unless` nodes. + # @return [Node] the truthy branch node of the `if` node + # @return [nil] if the truthy branch is empty + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#122 + def if_branch; end + + # Returns the inverse keyword of the `if` node as a string. Returns `if` + # for `unless` nodes and vice versa. Returns an empty string for ternary + # operators. + # + # @return [String] the inverse keyword of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#73 + def inverse_keyword; end + + # Returns the keyword of the `if` statement as a string. Returns an empty + # string for ternary operators. + # + # @return [String] the keyword of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#64 + def keyword; end + + # Checks whether the `if` node is in a modifier form, i.e. a condition + # trailing behind an expression. Only `if` and `unless` nodes without + # other branches can be modifiers. + # + # @return [Boolean] whether the `if` node is a modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#87 + def modifier_form?; end + + # Checks whether the `if` node has nested `if` nodes in any of its + # branches. + # + # @note This performs a shallow search. + # @return [Boolean] whether the `if` node contains nested conditionals + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#97 + def nested_conditional?; end + + # Custom destructuring method. This is used to normalize the branches + # for `if` and `unless` nodes, to aid comparisons and conversions. + # + # @return [Array] the different parts of the `if` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#141 + def node_parts; end + + # Checks whether the `if` node is a ternary operator. + # + # @return [Boolean] whether the `if` node is a ternary operator + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#56 + def ternary?; end + + # Checks whether the `if` node has an `then` clause. + # + # @return [Boolean] whether the node has an `then` clause + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#31 + def then?; end + + # Checks whether this node is an `unless` statement. (This is not true + # of ternary operators and `if` statements.) + # + # @return [Boolean] whether the node is an `unless` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#24 + def unless?; end +end + +# A node extension for `in` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `in` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#8 +class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node + # Returns the body of the `in` node. + # + # @return [Node, nil] the body of the `in` node + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#33 + def body; end + + # Returns the index of the `in` branch within the `case` statement. + # + # @return [Integer] the index of the `in` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#19 + def branch_index; end + + # Returns a node of the pattern in the `in` branch. + # + # @return [Node] a pattern node + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#12 + def pattern; end + + # Checks whether the `in` node has a `then` keyword. + # + # @return [Boolean] whether the `in` node has a `then` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#26 + def then?; end +end + +# Used for modern support only! +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "foo[:bar]" +# (index +# (send nil :foo) +# (sym :bar)) +# $ ruby-parse --legacy -e "foo[:bar]" +# (send +# (send nil :foo) :[] +# (sym :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#19 +class RuboCop::AST::IndexNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#29 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#24 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#34 + def method_name; end + + private + + # An array containing the arguments of the dispatched method. + # + # @return [Array] the arguments of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/index_node.rb#43 + def first_argument_index; end +end + +# Used for modern support only! +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "foo[:bar] = :baz" +# (indexasgn +# (send nil :foo) +# (sym :bar) +# (sym :baz)) +# $ ruby-parse --legacy -e "foo[:bar] = :baz" +# (send +# (send nil :foo) :[]= +# (sym :bar) +# (sym :baz)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_index=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#21 +class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#31 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#26 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#36 + def method_name; end + + private + + # An array containing the arguments of the dispatched method. + # + # @return [Array] the arguments of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/indexasgn_node.rb#45 + def first_argument_index; end +end + +# A node extension for `int` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `int` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/int_node.rb#8 +class RuboCop::AST::IntNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `kwbegin` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `kwbegin` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#8 +class RuboCop::AST::KeywordBeginNode < ::RuboCop::AST::Node + # Returns the body of the `kwbegin` block. Returns `self` if the `kwbegin` contains + # multiple nodes. + # + # @return [Node, nil] The body of the `kwbegin`. + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#13 + def body; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#30 + def ensure_node; end + + # Returns the `rescue` node of the `kwbegin` block, if one is present. + # + # @return [Node, nil] The `rescue` node within `kwbegin`. + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_begin_node.rb#37 + def rescue_node; end +end + +# A node extension for `kwsplat` and `forwarded_kwrestarg` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its methods available to +# all `kwsplat` and `forwarded_kwrestarg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#8 +class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#26 + def colon?; end + + # This is used for duck typing with `pair` nodes which also appear as + # `hash` elements. + # + # @return [false] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#18 + def hash_rocket?; end + + # This provides `forwarded_kwrestarg` node to return true to be compatible with `kwsplat` node. + # + # @return [true] + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#48 + def kwsplat_type?; end + + # Custom destructuring method. This is used to normalize the branches + # for `pair` and `kwsplat` nodes, to add duck typing to `hash` elements. + # + # @return [Array] the different parts of the `kwsplat` + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#41 + def node_parts; end + + # Returns the operator for the `kwsplat` as a string. + # + # @return [String] the double splat operator + # + # source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#33 + def operator; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/keyword_splat_node.rb#11 +RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) + +# Used for modern support only: +# Not as thoroughly tested as legacy equivalent +# +# $ ruby-parse -e "->(foo) { bar }" +# (block +# (lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# $ ruby-parse --legacy -e "->(foo) { bar }" +# (block +# (send nil :lambda) +# (args +# (arg :foo)) +# (send nil :bar)) +# +# The main RuboCop runs in legacy mode; this node is only used +# if user `AST::Builder.modernize` or `AST::Builder.emit_lambda=true` +# +# source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#23 +class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#43 + def assignment_method?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#38 + def attribute_accessor?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#28 + def lambda?; end + + # For similarity with legacy mode + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#33 + def lambda_literal?; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#53 + def method_name; end + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#48 + def receiver; end + + private + + # For similarity with legacy mode + # + # source://rubocop-ast//lib/rubocop/ast/node/lambda_node.rb#60 + def first_argument_index; end +end + +# A node extension for `masgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#8 +class RuboCop::AST::MasgnNode < ::RuboCop::AST::Node + # @return [Array] the assignment nodes of the multiple assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#16 + def assignments; end + + # The RHS (right hand side) of the multiple assignment. This returns + # the nodes as parsed: either a single node if the RHS has a single value, + # or an `array` node containing multiple nodes. + # + # NOTE: Due to how parsing works, `expression` will return the same for + # `a, b = x, y` and `a, b = [x, y]`. + # + # @return [Node] the right hand side of a multiple assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#39 + def expression; end + + # @return [MlhsNode] the `mlhs` node + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#10 + def lhs; end + + # @return [Array] names of all the variables being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#21 + def names; end + + # The RHS (right hand side) of the multiple assignment. This returns + # the nodes as parsed: either a single node if the RHS has a single value, + # or an `array` node containing multiple nodes. + # + # NOTE: Due to how parsing works, `expression` will return the same for + # `a, b = x, y` and `a, b = [x, y]`. + # + # @return [Node] the right hand side of a multiple assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#42 + def rhs; end + + # In contrast to `expression`, `values` always returns a Ruby array + # containing all the nodes being assigned on the RHS. + # + # Literal arrays are considered a singular value; but unlike `expression`, + # implied `array` nodes from assigning multiple values on the RHS are treated + # as separate. + # + # @return [Array] individual values being assigned on the RHS of the multiple assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#52 + def values; end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#58 + def multiple_rhs?; end +end + +# Common functionality for nodes that are a kind of method dispatch: +# `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, +# and (modern only): `index`, `indexasgn`, `lambda` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#8 +module RuboCop::AST::MethodDispatchNode + include ::RuboCop::AST::MethodIdentifierPredicates + extend ::RuboCop::AST::NodePattern::Macros + + # Checks whether the dispatched method is an access modifier. + # + # @return [Boolean] whether the dispatched method is an access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#64 + def access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#272 + def adjacent_def_modifier?(param0 = T.unsafe(nil)); end + + # Checks whether this node is an arithmetic operation + # + # @return [Boolean] whether the dispatched method is an arithmetic + # operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#175 + def arithmetic_operation?; end + + # Checks whether the dispatched method is a setter method. + # + # @return [Boolean] whether the dispatched method is a setter + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#110 + def assignment?; end + + # Checks whether the dispatched method is a bare access modifier that + # affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#73 + def bare_access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#277 + def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # Checks whether this is a binary operation. + # + # @example + # + # foo + bar + # @return [Boolean] whether this method is a binary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#247 + def binary_operation?; end + + # Whether this method dispatch has an explicit block. + # + # @return [Boolean] whether the dispatched method has a block + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#167 + def block_literal?; end + + # The `block`, `numblock`, or `itblock` node associated with this method dispatch, if any. + # + # @return [BlockNode, nil] the `block`, `numblock`, or `itblock` node associated with this + # method call or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#46 + def block_node; end + + # Checks whether the name of the dispatched method matches the argument + # and has an implicit receiver. + # + # @param name [Symbol, String] the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#100 + def command?(name); end + + # Checks whether the *explicit* receiver of this method dispatch is a + # `const` node. + # + # @return [Boolean] whether the receiver of this method dispatch + # is a `const` node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#152 + def const_receiver?; end + + # Checks if this node is part of a chain of `def` or `defs` modifiers. + # + # or `nil` if it isn't a def modifier + # + # @example + # + # private def foo; end + # @return [Node | nil] returns the `def|defs` node this is a modifier for, + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#199 + def def_modifier(node = T.unsafe(nil)); end + + # Checks if this node is part of a chain of `def` or `defs` modifiers. + # + # See also `def_modifier` that returns the node or `nil` + # + # @example + # + # private def foo; end + # @return [Boolean] whether the `def|defs` node is a modifier or not. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#187 + def def_modifier?(node = T.unsafe(nil)); end + + # Checks whether the dispatched method uses a dot to connect the + # receiver and the method name. + # + # This is useful for comparison operators, which can be called either + # with or without a dot, i.e. `foo == bar` or `foo.== bar`. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#119 + def dot?; end + + # Checks whether the dispatched method uses a double colon to connect the + # receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#127 + def double_colon?; end + + # Checks whether the method dispatch is the implicit form of `#call`, + # e.g. `foo.(bar)`. + # + # @return [Boolean] whether the method is the implicit form of `#call` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#160 + def implicit_call?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#256 + def in_macro_scope?(param0 = T.unsafe(nil)); end + + # Checks whether this is a lambda. Some versions of parser parses + # non-literal lambdas as a method send. + # + # @return [Boolean] whether this method is a lambda + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#212 + def lambda?; end + + # Checks whether this is a lambda literal (stabby lambda.) + # + # @example + # + # -> (foo) { bar } + # @return [Boolean] whether this method is a lambda literal + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#223 + def lambda_literal?; end + + # Checks whether the dispatched method is a macro method. A macro method + # is defined as a method that sits in a class, module, or block body and + # has an implicit receiver. + # + # @note This does not include DSLs that use nested blocks, like RSpec + # @return [Boolean] whether the dispatched method is a macro method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#57 + def macro?; end + + # The name of the dispatched method as a symbol. + # + # @return [Symbol] the name of the dispatched method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#27 + def method_name; end + + # Checks whether the dispatched method is a non-bare access modifier that + # affects only the method it receives. + # + # @return [Boolean] whether the dispatched method is a non-bare + # access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#82 + def non_bare_access_modifier?; end + + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#282 + def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end + + # The receiving node of the method dispatch. + # + # @return [Node, nil] the receiver of the dispatched method or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#20 + def receiver; end + + # Checks whether the dispatched method uses a safe navigation operator to + # connect the receiver and the method name. + # + # @return [Boolean] whether the method was called with a connecting dot + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#135 + def safe_navigation?; end + + # The source range for the method name or keyword that dispatches this call. + # + # @return [Parser::Source::Range] the source range for the method name or keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#34 + def selector; end + + # Checks whether the *explicit* receiver of this method dispatch is + # `self`. + # + # @return [Boolean] whether the receiver of this method dispatch is `self` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#143 + def self_receiver?; end + + # Checks whether the dispatched method is a setter method. + # + # @return [Boolean] whether the dispatched method is a setter + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 + def setter_method?; end + + # Checks whether the dispatched method is a bare `private` or `protected` + # access modifier that affects all methods defined after the macro. + # + # @return [Boolean] whether the dispatched method is a bare + # `private` or `protected` access modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#91 + def special_modifier?; end + + # Checks whether this is a unary operation. + # + # @example + # + # -foo + # @return [Boolean] whether this method is a unary operation + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#234 + def unary_operation?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#12 +RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#14 +RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) + +# Common predicates for nodes that reference method identifiers: +# `send`, `csend`, `def`, `defs`, `super`, `zsuper` +# +# @note this mixin expects `#method_name` and `#receiver` to be implemented +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#9 +module RuboCop::AST::MethodIdentifierPredicates + # Checks whether the method is an assignment method. + # + # @return [Boolean] whether the method is an assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#142 + def assignment_method?; end + + # Checks whether the method is a bang method. + # + # @return [Boolean] whether the method is a bang method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#171 + def bang_method?; end + + # Checks whether the method is a camel case method, + # e.g. `Integer()`. + # + # @return [Boolean] whether the method is a camel case method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#179 + def camel_case_method?; end + + # Checks whether the method is a comparison method. + # + # @return [Boolean] whether the method is a comparison + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#135 + def comparison_method?; end + + # Checks whether the *explicit* receiver of node is a `const` node. + # + # @return [Boolean] whether the receiver of this node is a `const` node + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#193 + def const_receiver?; end + + # Checks whether the method is an Enumerable method. + # + # @return [Boolean] whether the method is an Enumerable method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#157 + def enumerable_method?; end + + # Checks whether the method is an enumerator method. + # + # @return [Boolean] whether the method is an enumerator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#149 + def enumerator_method?; end + + # Checks whether the method name matches the argument. + # + # @param name [Symbol, String] the method name to check for + # @return [Boolean] whether the method name matches the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#79 + def method?(name); end + + # Checks whether this is a negation method, i.e. `!` or keyword `not`. + # + # @return [Boolean] whether this method is a negation method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#200 + def negation_method?; end + + # Checks whether the method is a nonmutating Array method. + # + # @return [Boolean] whether the method is a nonmutating Array method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#114 + def nonmutating_array_method?; end + + # Checks whether the method is a nonmutating binary operator method. + # + # @return [Boolean] whether the method is a nonmutating binary operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#93 + def nonmutating_binary_operator_method?; end + + # Checks whether the method is a nonmutating Hash method. + # + # @return [Boolean] whether the method is a nonmutating Hash method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#121 + def nonmutating_hash_method?; end + + # Checks whether the method is a nonmutating operator method. + # + # @return [Boolean] whether the method is a nonmutating operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#107 + def nonmutating_operator_method?; end + + # Checks whether the method is a nonmutating String method. + # + # @return [Boolean] whether the method is a nonmutating String method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#128 + def nonmutating_string_method?; end + + # Checks whether the method is a nonmutating unary operator method. + # + # @return [Boolean] whether the method is a nonmutating unary operator method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#100 + def nonmutating_unary_operator_method?; end + + # Checks whether the method is an operator method. + # + # @return [Boolean] whether the method is an operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#86 + def operator_method?; end + + # Checks whether the method is a predicate method. + # + # @return [Boolean] whether the method is a predicate method + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#164 + def predicate_method?; end + + # Checks whether this is a prefix bang method, e.g. `!foo`. + # + # @return [Boolean] whether this method is a prefix bang + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#214 + def prefix_bang?; end + + # Checks whether this is a prefix not method, e.g. `not foo`. + # + # @return [Boolean] whether this method is a prefix not + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#207 + def prefix_not?; end + + # Checks whether the *explicit* receiver of this node is `self`. + # + # @return [Boolean] whether the receiver of this node is `self` + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#186 + def self_receiver?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#16 +RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#10 +RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#32 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#24 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#48 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#28 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#59 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#26 +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# http://phrogz.net/programmingruby/language.html#table_18.4 +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#20 +RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# A node extension for `mlhs` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#8 +class RuboCop::AST::MlhsNode < ::RuboCop::AST::Node + # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment. + # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`) + # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`, + # or a `splat` node for `*, ... =`. + # + # @return [Array] the assignment nodes of the multiple assignment LHS + # + # source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#15 + def assignments; end +end + +# Common functionality for nodes that can be used as modifiers: +# `if`, `while`, `until` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#7 +module RuboCop::AST::ModifierNode + # Checks whether the node is in a modifier form, i.e. a condition + # trailing behind an expression. + # + # @return [Boolean] whether the node is a modifier + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/modifier_node.rb#12 + def modifier_form?; end +end + +# A node extension for `module` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `module` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#8 +class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node + # The body of this `module` node. + # + # @return [Node, nil] the body of the module + # + # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#19 + def body; end + + # The identifier for this `module` node. + # + # @return [Node] the identifier of the module + # + # source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#12 + def identifier; end +end + +# A node extension for `next` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `next` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/next_node.rb#8 +class RuboCop::AST::NextNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# `RuboCop::AST::Node` is a subclass of `Parser::AST::Node`. It provides +# access to parent nodes and an object-oriented way to traverse an AST with +# the power of `Enumerable`. +# +# It has predicate methods for every node type, like this: +# +# @example +# node.send_type? # Equivalent to: `node.type == :send` +# node.op_asgn_type? # Equivalent to: `node.type == :op_asgn` +# +# # Non-word characters (other than a-zA-Z0-9_) in type names are omitted. +# node.defined_type? # Equivalent to: `node.type == :defined?` +# +# # Find the first lvar node under the receiver node. +# lvar_node = node.each_descendant.find(&:lvar_type?) +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#21 +class RuboCop::AST::Node < ::Parser::AST::Node + include ::RuboCop::AST::Sexp + include ::RuboCop::AST::Descendence + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Node] a new instance of Node + # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#155 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def __ENCODING___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def __FILE___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def __LINE___type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def alias_type?; end + + # Returns an array of ancestor nodes. + # This is a shorthand for `node.each_ancestor.to_a`. + # + # @return [Array] an array of ancestor nodes + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#320 + def ancestors; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def and_asgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def and_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#549 + def any_block_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#529 + def any_def_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#553 + def any_match_pattern_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#557 + def any_str_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#561 + def any_sym_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def arg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def arg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def args_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#525 + def argument?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#533 + def argument_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def array_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def array_pattern_with_tail_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def array_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#477 + def assignment?; end + + # Some cops treat the shovel operator as a kind of assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#427 + def assignment_or_similar?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def back_ref_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#481 + def basic_conditional?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#435 + def basic_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def begin_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def block_pass_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def block_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def blockarg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def blockarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def blocknilarg_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#537 + def boolean_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def break_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#517 + def call_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def case_match_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def case_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def casgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def cbase_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#521 + def chained?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#609 + def class_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#627 + def class_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def class_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#217 + def complete!; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#222 + def complete?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def complex_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#485 + def conditional?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#366 + def const_name; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def const_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def const_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def csend_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def cvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def cvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def def_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + def defined_module; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#391 + def defined_module_name; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def defined_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def defs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def dstr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def dsym_type?; end + + # Calls the given block for each ancestor node from parent to root. + # If no block is given, an `Enumerator` is returned. + # + # @overload each_ancestor + # @overload each_ancestor + # @overload each_ancestor + # @return [self] if a block is given + # @return [Enumerator] if no block is given + # @yieldparam node [Node] each ancestor node + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#308 + def each_ancestor(*types, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def eflipflop_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def empty_else_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#421 + def empty_source?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def ensure_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#469 + def equals_asgn?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def erange_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def false_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#443 + def falsey_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def find_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#334 + def first_line; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def float_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def for_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def forward_arg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def forward_args_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def forwarded_args_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def forwarded_kwrestarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def forwarded_restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#606 + def global_const?(param0 = T.unsafe(nil), param1); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#565 + def guard_clause?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def gvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def gvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def hash_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def hash_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def ident_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def if_guard_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def if_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def iflipflop_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#451 + def immutable_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def in_match_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def in_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def index_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def indexasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def int_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def irange_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def itarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def itblock_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def ivar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def ivasgn_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#498 + def keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwbegin_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwnilarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwoptarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwrestarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def kwsplat_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#600 + def lambda?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#603 + def lambda_or_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def lambda_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#338 + def last_line; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Node, nil] the left (aka previous) sibling + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#260 + def left_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Array] the left (aka previous) siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#270 + def left_siblings; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#342 + def line_count; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#431 + def literal?; end + + # Shortcut to safely check if a location is present + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#573 + def loc?(which_loc); end + + # Shortcut to safely test a particular location, even if + # this location does not exist or is `nil` + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#581 + def loc_is?(which_loc, str); end + + # NOTE: `loop { }` is a normal method call and thus not a loop keyword. + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#494 + def loop_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def lvar_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def lvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def masgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_alt_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_as_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_current_line_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#588 + def match_guard_clause?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_nil_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_pattern_p_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_pattern_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_rest_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_var_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_with_lvasgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def match_with_trailing_comma_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def mlhs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#634 + def module_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def module_type?; end + + # Predicates + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#413 + def multiline?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#447 + def mutable_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#765 + def new_class_or_module_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def next_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def nil_type?; end + + # Common destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # Some node types override this with their own custom + # destructuring method. + # + # @return [Array] the different parts of the ndde + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#291 + def node_parts; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#348 + def nonempty_line_count; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def not_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def nth_ref_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def numargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def numblock_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#541 + def numeric_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def objc_kwarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def objc_restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def objc_varargs_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def op_asgn_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#509 + def operator_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def optarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def or_asgn_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def or_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def pair_type?; end + + # Returns the parent node, or `nil` if the receiver is a root node. + # + # @return [Node, nil] the parent node or `nil` + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#199 + def parent; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#208 + def parent?; end + + # Searching the AST + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#397 + def parent_module_name; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#513 + def parenthesized_call?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def pin_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#489 + def post_condition_loop?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def postexe_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def preexe_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#593 + def proc?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def procarg0_type?; end + + # Some expressions are evaluated for their value, some for their side + # effects, and some for both. + # If we know that expressions are useful only for their return values, + # and have no side effects, that means we can reorder them, change the + # number of times they are evaluated, or replace them with other + # expressions which are equivalent in value. + # So, is evaluation of this node free of side effects? + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#677 + def pure?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#545 + def range_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def rational_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#359 + def receiver(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#138 + def recursive_basic_literal?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#138 + def recursive_literal?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def redo_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#465 + def reference?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def regexp_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def regopt_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def resbody_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def rescue_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def restarg_expr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def restarg_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def retry_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def return_type?; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Node, nil] the right (aka next) sibling + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#251 + def right_sibling; end + + # Use is discouraged, this is a potentially slow method and can lead + # to even slower algorithms + # + # @return [Array] the right (aka next) siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#279 + def right_siblings; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#213 + def root?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def sclass_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def self_type?; end + + # Most nodes are of 'send' type, so this method is defined + # separately to make this check as fast as possible. + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#192 + def send_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def shadowarg_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#473 + def shorthand_asgn?; end + + # Returns the index of the receiver node in its siblings. (Sibling index + # uses zero based numbering.) + # Use is discouraged, this is a potentially slow method. + # + # @return [Integer, nil] the index of the receiver node in its siblings + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#244 + def sibling_index; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#417 + def single_line?; end + + # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` + # + # @return [String, nil] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#326 + def source; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#352 + def source_length; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#330 + def source_range; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#505 + def special_keyword?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def splat_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#364 + def str_content(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def str_type?; end + + # @deprecated Use `:class_constructor?` + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#622 + def struct_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def super_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def sym_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def true_type?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#439 + def truthy_literal?; end + + # Determine if the node is one of several node types in a single query + # Allows specific single node types, as well as "grouped" types + # (e.g. `:boolean` for `:true` or `:false`) + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#174 + def type?(*types); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def undef_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def unless_guard_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def until_post_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def until_type?; end + + # Override `AST::Node#updated` so that `AST::Processor` does not try to + # mutate our ASTs. Since we keep references from children to parents and + # not just the other way around, we cannot update an AST and share + # identical subtrees. Rather, the entire AST must be copied any time any + # part of it is changed. + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#233 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Some expressions are evaluated for their value, some for their side + # effects, and some for both + # If we know that an expression is useful only for its side effects, that + # means we can transform it in ways which preserve the side effects, but + # change the return value + # So, does the return value of this node matter? If we changed it to + # `(...; nil)`, might that affect anything? + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#647 + def value_used?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#461 + def variable?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def when_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def while_post_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def while_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def xstr_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def yield_type?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#183 + def zsuper_type?; end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node.rb#203 + def parent=(node); end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#704 + def begin_value_used?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#715 + def case_if_value_used?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#377 + def defined_module0(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#709 + def for_value_used?; end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#751 + def parent_module_name_for_block(ancestor); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#739 + def parent_module_name_for_sclass(sclass_node); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#726 + def parent_module_name_part(node); end + + # source://rubocop-ast//lib/rubocop/ast/node.rb#695 + def visit_ancestors(types); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#721 + def while_until_value_used?; end + + class << self + private + + # source://rubocop-ast//lib/rubocop/ast/node.rb#134 + def def_recursive_literal_predicate(kind); end + end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#55 +RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#58 +RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#42 +RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) + +# <=> isn't included here, because it doesn't return a boolean. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#28 +RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#39 +RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#60 +RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#84 +RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#85 +RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#50 +RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#35 +RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#89 +RuboCop::AST::Node::GROUP_FOR_TYPE = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#47 +RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#70 +RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#37 +RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#80 +RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node.rb#81 +RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#64 +RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#44 +RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#76 +RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#62 +RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#68 +RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#53 +RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#78 +RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#31 +RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node.rb#66 +RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) + +# This class performs a pattern-matching operation on an AST node. +# +# Detailed syntax: /docs/modules/ROOT/pages/node_pattern.adoc +# +# Initialize a new `NodePattern` with `NodePattern.new(pattern_string)`, then +# pass an AST node to `NodePattern#match`. Alternatively, use one of the class +# macros in `NodePattern::Macros` to define your own pattern-matching method. +# +# If the match fails, `nil` will be returned. If the match succeeds, the +# return value depends on whether a block was provided to `#match`, and +# whether the pattern contained any "captures" (values which are extracted +# from a matching AST.) +# +# - With block: #match yields the captures (if any) and passes the return +# value of the block through. +# - With no block, but one capture: the capture is returned. +# - With no block, but multiple captures: captures are returned as an array. +# - With no block and no captures: #match returns `true`. +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 +class RuboCop::AST::NodePattern + include ::RuboCop::AST::NodePattern::MethodDefiner + extend ::RuboCop::SimpleForwardable + + # @return [NodePattern] a new instance of NodePattern + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#78 + def initialize(str, compiler: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#91 + def ==(other); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#108 + def as_json(_options = T.unsafe(nil)); end + + # Returns the value of attribute ast. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#74 + def ast; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#76 + def captures(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#112 + def encode_with(coder); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#94 + def eql?(other); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#120 + def freeze; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#116 + def init_with(coder); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#104 + def marshal_dump; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#100 + def marshal_load(pattern); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#86 + def match(*args, **rest, &block); end + + # Returns the value of attribute match_code. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#74 + def match_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#76 + def named_parameters(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute pattern. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#74 + def pattern; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#76 + def positional_parameters(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#96 + def to_s; end + + class << self + # Yields its argument and any descendants, depth-first. + # + # @yield [element] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#60 + def descend(element, &block); end + end +end + +# Responsible to build the AST nodes for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#10 +class RuboCop::AST::NodePattern::Builder + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#17 + def emit_atom(type, value); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#29 + def emit_call(type, selector, args = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#11 + def emit_capture(capture_token, node); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#25 + def emit_list(type, _begin, children, _end); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#41 + def emit_subsequence(node_list); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#21 + def emit_unary_op(type, _operator = T.unsafe(nil), *children); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#34 + def emit_union(begin_t, pattern_lists, end_t); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#53 + def n(type, *args); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#49 + def optimizable_as_set?(children); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/builder.rb#57 + def union_children(pattern_lists); end +end + +# A NodePattern comment, simplified version of ::Parser::Source::Comment +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#7 +class RuboCop::AST::NodePattern::Comment + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#14 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @param other [Object] + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#31 + def ==(other); end + + # @return [String] a human-readable representation of this comment + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#39 + def inspect; end + + # Returns the value of attribute location. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#9 + def loc; end + + # Returns the value of attribute location. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#8 + def location; end + + # @return [String] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/comment.rb#20 + def text; end +end + +# The top-level compiler holding the global state +# Defers work to its subcompilers +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 +class RuboCop::AST::NodePattern::Compiler + extend ::RuboCop::SimpleForwardable + + # @return [Compiler] a new instance of Compiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#16 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#25 + def bind(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute binding. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#14 + def binding; end + + # Returns the value of attribute captures. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#14 + def captures; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#43 + def compile_as_atom(node); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#47 + def compile_as_node_pattern(node, **options); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#51 + def compile_sequence(sequence, var:); end + + # Enumerates `enum` while keeping track of state across + # union branches (captures and unification). + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#39 + def each_union(enum, &block); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#75 + def freeze; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#32 + def named_parameter(name); end + + # Returns the value of attribute named_parameters. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#14 + def named_parameters; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#71 + def next_capture; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#55 + def parser; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#27 + def positional_parameter(number); end + + # Returns the value of attribute positional_parameters. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#14 + def positional_parameters; end + + # Utilities + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#61 + def with_temp_variables(*names, &block); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#82 + def enforce_same_captures(enum); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#97 + def new_capture; end +end + +# Generates code that evaluates to a value (Ruby object) +# This value responds to `===`. +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#12 +class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#28 + def visit_const; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#32 + def visit_named_parameter; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#24 + def visit_number; end + + # Assumes other types are node patterns. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#46 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#36 + def visit_positional_parameter; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#26 + def visit_regexp; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#40 + def visit_set; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#25 + def visit_string; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#21 + def visit_symbol; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/atom_subcompiler.rb#15 + def visit_unify; end +end + +# Holds the list of bound variable names +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#8 +class RuboCop::AST::NodePattern::Compiler::Binding + # @return [Binding] a new instance of Binding + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#9 + def initialize; end + + # Yields the first time a given name is bound + # + # @return [String] bound variable name + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 + def bind(name); end + + # Yields for each branch of the given union, forbidding unification of + # bindings which only appear in a subset of the union. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#31 + def union_bind(enum); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#69 + def forbid(names); end +end + +# Variant of the Compiler with tracing information for nodes +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#10 +class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler + # @return [Debug] a new instance of Debug + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#118 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#131 + def comments(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 + def named_parameters; end + + # Returns the value of attribute node_ids. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#35 + def node_ids; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#127 + def parser; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#131 + def tokens(*_arg0, **_arg1, &_arg2); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#38 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer + # @api private + # @return [Colorizer] a new instance of Colorizer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#98 + def initialize(pattern, compiler: T.unsafe(nil)); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 + def compiler; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 + def node_pattern; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#96 + def pattern; end + + # @api private + # @return [Node] the Ruby AST + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#105 + def test(ruby, trace: T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#113 + def ruby_ast(ruby); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#39 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#94 +RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug + +# Result of a NodePattern run against a particular AST +# Consider constructor is private +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 +class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct + # @api private + # @return [Hash] a map for {character_position => color} + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#58 + def color_map(color_scheme = T.unsafe(nil)); end + + # @api private + # @return [String] a Rainbow colorized version of ruby + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#50 + def colorize(color_scheme = T.unsafe(nil)); end + + # Returns the value of attribute colorizer + # + # @return [Object] the current value of colorizer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def colorizer; end + + # Sets the attribute colorizer + # + # @param value [Object] the value to set the attribute colorizer to. + # @return [Object] the newly set value + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def colorizer=(_); end + + # @api private + # @return [Hash] a map for {node => matched?}, depth-first + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#68 + def match_map; end + + # @api private + # @return [Boolean] a value of `Trace#matched?` or `:not_visitable` + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#76 + def matched?(node); end + + # Returns the value of attribute returned + # + # @return [Object] the current value of returned + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def returned; end + + # Sets the attribute returned + # + # @param value [Object] the value to set the attribute returned to. + # @return [Object] the newly set value + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def returned=(_); end + + # Returns the value of attribute ruby_ast + # + # @return [Object] the current value of ruby_ast + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def ruby_ast; end + + # Sets the attribute ruby_ast + # + # @param value [Object] the value to set the attribute ruby_ast to. + # @return [Object] the newly set value + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def ruby_ast=(_); end + + # Returns the value of attribute trace + # + # @return [Object] the current value of trace + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def trace; end + + # Sets the attribute trace + # + # @param value [Object] the value to set the attribute trace to. + # @return [Object] the newly set value + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def trace=(_); end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#89 + def ast; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#83 + def color_map_for(node, color); end + + class << self + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def [](*_arg0); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def inspect; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def keyword_init?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def members; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#48 + def new(*_arg0); end + end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#134 +module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#135 + def do_compile; end + + private + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#145 + def node_id; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#141 + def tracer(kind); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#151 +class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#156 +class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler +end + +# Compiled node pattern requires a named parameter `trace`, +# which should be an instance of this class +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#13 +class RuboCop::AST::NodePattern::Compiler::Debug::Trace + # @return [Trace] a new instance of Trace + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#14 + def initialize; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#19 + def enter(node_id); end + + # return nil (not visited), false (not matched) or true (matched) + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#30 + def matched?(node_id); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#25 + def success(node_id); end +end + +# Compiles code that evalues to true or false +# for a given value `var` (typically a RuboCop::AST::Node) +# or it's `node.type` if `seq_head` is true +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#13 +class RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # @return [NodePatternSubcompiler] a new instance of NodePatternSubcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#16 + def initialize(compiler, var: T.unsafe(nil), access: T.unsafe(nil), seq_head: T.unsafe(nil)); end + + # Returns the value of attribute access. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + def access; end + + # Returns the value of attribute seq_head. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#14 + def seq_head; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#119 + def access_element; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#123 + def access_node; end + + # @param [Array, nil] + # @return [String, nil] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#113 + def compile_args(arg_list, first: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#129 + def compile_guard_clause; end + + # Compiling helpers + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#107 + def compile_value_match(value); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#133 + def multiple_access(kind); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#30 + def visit_ascend; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#58 + def visit_capture; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#37 + def visit_descend; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#84 + def visit_function_call; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#73 + def visit_intersection; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#25 + def visit_negation; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#88 + def visit_node_type; end + + # Assumes other types are atoms. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#100 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#80 + def visit_predicate; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#92 + def visit_sequence; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#49 + def visit_unify; end + + # Lists + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#64 + def visit_union; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/node_pattern_subcompiler.rb#45 + def visit_wildcard; end +end + +# Compiles terms within a sequence to code that evalues to true or false. +# Compilation of the nodes that can match only a single term is deferred to +# `NodePatternSubcompiler`; only nodes that can match multiple terms are +# compiled here. +# Assumes the given `var` is a `::RuboCop::AST::Node` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 +class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler + # Calls `compile_sequence`; the actual `compile` method + # will be used for the different terms of the sequence. + # The only case of re-entrant call to `compile` is `visit_capture` + # + # @return [SequenceSubcompiler] a new instance of SequenceSubcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#25 + def initialize(compiler, sequence:, var:); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#31 + def compile_sequence; end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + def in_sync; end + + protected + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#226 + def compile_terms(children = T.unsafe(nil), last_arity = T.unsafe(nil)); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#251 + def cur_index; end + + # yield `sync_code` iff not already in sync + # + # @yield [code] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#242 + def sync; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#59 + def compile(node); end + + # Compilation helpers + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#165 + def compile_and_advance(term); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#128 + def compile_any_order_branches(matched_var); end + + # @return [Array] Else code, and init code (if any) + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#137 + def compile_any_order_else; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#180 + def compile_captured_repetition(child_code, child_captures); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#119 + def compile_case(when_branches, else_code); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#361 + def compile_child_nb_guard(arity_range); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#319 + def compile_cur_index; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#325 + def compile_index(cur = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#353 + def compile_loop(term); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#347 + def compile_loop_advance(to = T.unsafe(nil)); end + + # Assumes `@cur_index` is already updated + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#198 + def compile_matched(kind); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#304 + def compile_max_matched; end + + # @return [String] code that evaluates to `false` if the matched arity is too small + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#270 + def compile_min_check; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#285 + def compile_remaining; end + + # @return [Hash] of {subcompiler => code} + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#373 + def compile_union_forks; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#313 + def empty_loop; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#214 + def handle_prev; end + + # Modifies in place `forks` + # Syncs our state + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#400 + def merge_forks!(forks); end + + # Modifies in place `forks` to insure that `cur_{child|index}_var` are ok + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#384 + def preserve_union_start(forks); end + + # E.g. For sequence `(_ _? <_ _>)`, arities are: 1, 0..1, 2 + # and remaining arities are: 3..4, 2..3, 2..2, 0..0 + # + # @return [Array] total arities (as Ranges) of remaining children nodes + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#259 + def remaining_arities(children, last_arity); end + + # returns truthy iff `@cur_index` switched to relative from end mode (i.e. < 0) + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#341 + def use_index_from_end; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#88 + def visit_any_order; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#150 + def visit_capture; end + + # Single node patterns are all handled here + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#62 + def visit_other_type; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#78 + def visit_repetition; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#159 + def visit_rest; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#104 + def visit_union; end + + # NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must + # have `def in_sequence_head; :raise; end` + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#333 + def within_loop; end +end + +# Shift of 1 from standard Ruby indices +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#19 +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) + +# Base class for subcompilers +# Implements visitor pattern +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#12 +class RuboCop::AST::NodePattern::Compiler::Subcompiler + # @return [Subcompiler] a new instance of Subcompiler + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#15 + def initialize(compiler); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 + def compile(node); end + + # Returns the value of attribute compiler. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#13 + def compiler; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#34 + def do_compile; end + + # Returns the value of attribute node. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#32 + def node; end + + class << self + # @private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#47 + def inherited(base); end + + # @private + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#42 + def method_added(method); end + + # Returns the value of attribute registry. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#40 + def registry; end + end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#54 +class RuboCop::AST::NodePattern::Invalid < ::StandardError; end + +# Lexer class for `NodePattern` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#18 +class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex + # @return [Lexer] a new instance of Lexer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#31 + def initialize(source); end + + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def comments; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def source_buffer; end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#29 + def tokens; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#60 + def do_parse; end + + # @return [token] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#40 + def emit(type); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#48 + def emit_comment; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#52 + def emit_regexp; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#64 + def token(type, value); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#19 +RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rb#21 +RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) + +# The generated lexer RuboCop::AST::NodePattern::LexerRex +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#23 +class RuboCop::AST::NodePattern::LexerRex + # Yields on the current action. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#69 + def action; end + + # The file name / path + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + def filename; end + + # The file name / path + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#43 + def filename=(_arg0); end + + # The current location in the parse. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#103 + def location; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#55 + def match; end + + # The match groups for the current scan. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#60 + def matches; end + + # Lex the next token. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#112 + def next_token; end + + # Parse the given string. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#83 + def parse(str); end + + # Read in and parse the file at +path+. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#93 + def parse_file(path); end + + # The current scanner class. Must be overridden in subclasses. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#76 + def scanner_class; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def ss; end + + # The StringScanner for this lexer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#48 + def ss=(_arg0); end + + # The current lexical state. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + def state; end + + # The current lexical state. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#53 + def state=(_arg0); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#31 +RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#27 +RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#29 +RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) + +# :startdoc: +# :stopdoc: +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#36 +class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#30 +RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#33 +RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#32 +RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#28 +RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#37 +class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end + +# Helpers for defining methods based on a pattern string +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#28 +module RuboCop::AST::NodePattern::Macros + # Define a method which applies a pattern to an AST node + # + # The new method will return nil if the node does not match. + # If the node matches, and a block is provided, the new method will + # yield to the block (passing any captures as block arguments). + # If the node matches, and no block is provided, the new method will + # return the captures, or `true` if there were none. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#36 + def def_node_matcher(method_name, pattern_str, **keyword_defaults); end + + # Define a method which recurses over the descendants of an AST node, + # checking whether any of them match the provided pattern + # + # If the method name ends with '?', the new method will return `true` + # as soon as it finds a descendant which matches. Otherwise, it will + # yield all descendants which match. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#46 + def def_node_search(method_name, pattern_str, **keyword_defaults); end +end + +# Functionality to turn `match_code` into methods/lambda +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#7 +module RuboCop::AST::NodePattern::MethodDefiner + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#37 + def as_lambda; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#27 + def compile_as_lambda; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#8 + def def_node_matcher(base, method_name, **defaults); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#21 + def def_node_search(base, method_name, **defaults); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#139 + def compile_init; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#50 + def def_helper(base, method_name, **defaults); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#114 + def emit_keyword_list(forwarding: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#132 + def emit_lambda_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#125 + def emit_method_code; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#63 + def emit_node_search(method_name); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#74 + def emit_node_search_body(method_name, prelude:, on_match:); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#110 + def emit_param_list; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#119 + def emit_params(*first, forwarding: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#100 + def emit_retval; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#89 + def emit_yield_capture(when_no_capture = T.unsafe(nil), yield_with: T.unsafe(nil)); end + + # This method minimizes the closure for our method + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#44 + def wrapping_block(method_name, **defaults); end +end + +# Base class for AST Nodes of a `NodePattern` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 +class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node + include ::RuboCop::AST::Descendence + extend ::RuboCop::SimpleForwardable + + # Note: `arity.end` may be `Float::INFINITY` + # + # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#28 + def arity; end + + # @return [Range] arity as a Range + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#68 + def arity_range; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#22 + def capture?; end + + # @return [Node] most nodes have only one child + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#47 + def child; end + + # @return [Array] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#42 + def children_nodes; end + + # @return [Array, nil] replace node with result, or `nil` if no change requested. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#33 + def in_sequence_head; end + + # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) + # + # @return [Boolean] returns true for nodes having a Ruby literal equivalent + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 + def matches_within_set?; end + + # @return [Integer] nb of captures that this node will emit + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52 + def nb_captures; end + + # To be overridden by subclasses + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18 + def rest?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#77 + def source_range; end + + # @return [Boolean] returns whether it matches a variable number of elements + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57 + def variadic?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#73 + def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end +end + +# Node class for `` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#179 +class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#197 + def arity; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#189 + def ends_with_rest?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#193 + def rest_node; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#185 + def term_nodes; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#182 +RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) + +# Node class for `$something` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96 +class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#98 + def arity(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100 + def capture?; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#108 + def in_sequence_head; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 + def nb_captures; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#98 + def rest?(*_arg0, **_arg1, &_arg2); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85 +module RuboCop::AST::NodePattern::Node::ForbidInSeqHead + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 + def in_sequence_head; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#139 +RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#81 +RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) + +# Registry +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#255 +RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11 +RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) + +# Node class for `predicate?(:arg, :list)` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#130 +class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#135 + def arg_list; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 + def method_name; end +end + +# Node class for `int+` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#142 +class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#145 + def operator; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#149 +RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) + +# Node class for `...` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#161 +class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#173 + def in_sequence_head; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#165 + def rest?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 +RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) + +# Node class for `(type first second ...)` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#117 +class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # @return [Sequence] a new instance of Sequence + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#120 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end +end + +# A list (potentially empty) of nodes; part of a Union +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#205 +class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#213 + def in_sequence_head; end +end + +# Node class for `{ ... }` +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#223 +class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 + def arity; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 + def in_sequence_head; end + + # Each child in a union must contain the same number + # of captures. Only one branch ends up capturing. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 + def nb_captures; end +end + +# Parser for NodePattern +# Note: class reopened in `parser.racc` +# +# Doc on how this fits in the compiling process: +# /docs/modules/ROOT/pages/node_pattern.adoc +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 +class RuboCop::AST::NodePattern::Parser < ::Racc::Parser + extend ::RuboCop::SimpleForwardable + + # @return [Parser] a new instance of Parser + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 + def initialize(builder = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 + def _reduce_10(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 + def _reduce_11(val, _values); end + + # reduce 12 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 + def _reduce_13(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 + def _reduce_14(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 + def _reduce_15(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 + def _reduce_16(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 + def _reduce_17(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 + def _reduce_18(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 + def _reduce_19(val, _values); end + + # reduce 1 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 + def _reduce_2(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 + def _reduce_20(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 + def _reduce_21(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 + def _reduce_22(val, _values); end + + # reduce 24 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 + def _reduce_25(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 + def _reduce_26(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 + def _reduce_3(val, _values); end + + # reduce 32 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 + def _reduce_33(val, _values); end + + # reduce 36 omitted + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 + def _reduce_37(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 + def _reduce_38(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 + def _reduce_39(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 + def _reduce_4(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 + def _reduce_40(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 + def _reduce_41(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 + def _reduce_42(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 + def _reduce_43(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 + def _reduce_44(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 + def _reduce_45(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 + def _reduce_46(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 + def _reduce_5(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 + def _reduce_6(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 + def _reduce_7(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 + def _reduce_8(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 + def _reduce_9(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 + def _reduce_none(val, _values); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#46 + def emit_atom(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#46 + def emit_call(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#46 + def emit_capture(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#46 + def emit_list(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#46 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#46 + def emit_union(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 + def inspect; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#48 + def next_token(*_arg0, **_arg1, &_arg2); end + + # (Similar API to `parser` gem) + # Parses a source and returns the AST. + # + # @param source_buffer [Parser::Source::Buffer, String] The source buffer to parse. + # @return [NodePattern::Node] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#31 + def parse(source); end + + private + + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#50 + def enforce_unary(node); end + + # Overrides Racc::Parser's method: + # + # @raise [NodePattern::Invalid] + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#59 + def on_error(token, val, _vstack); end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#16 +RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#17 +RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 +RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293 +RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 +RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# Overrides Parser to use `WithMeta` variants and provide additional methods +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#8 +class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + def comments; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#100 + def do_parse; end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#98 + def tokens; end +end + +# Overrides Builder to emit nodes with locations +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#39 +class RuboCop::AST::NodePattern::Parser::WithMeta::Builder < ::RuboCop::AST::NodePattern::Builder + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#40 + def emit_atom(type, token); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#61 + def emit_call(type, selector_t, args = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#55 + def emit_list(type, begin_t, children, end_t); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#49 + def emit_unary_op(type, operator_t = T.unsafe(nil), *children); end + + private + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#81 + def join_exprs(left_expr, right_expr); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#75 + def loc(token_or_range); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#71 + def n(type, children, source_map); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#85 + def source_map(token_or_range, begin_t: T.unsafe(nil), end_t: T.unsafe(nil), operator_t: T.unsafe(nil), selector_t: T.unsafe(nil)); end +end + +# Overrides Lexer to token locations and comments +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#10 +class RuboCop::AST::NodePattern::Parser::WithMeta::Lexer < ::RuboCop::AST::NodePattern::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#13 + def initialize(str_or_buffer); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#27 + def emit_comment; end + + # @return [::Parser::Source::Range] last match's position + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#33 + def pos; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#11 + def source_buffer; end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#23 + def token(type, value); end +end + +# Utility to assign a set of values to a constant +# +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#7 +module RuboCop::AST::NodePattern::Sets + class << self + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#31 + def [](set); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#15 + def name(set); end + + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#22 + def uniq(name); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#14 +RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#8 +RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ANY_NONE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ARRAY_HASH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_BRANCH_REF_TAG = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_COVER_INCLUDE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DEF_DELEGATORS_DEF_INSTANCE_DELEGATORS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DEF_DELEGATOR_DEF_INSTANCE_DELEGATOR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_EXIST_EXISTS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIND_DETECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GROUP_BY_TO_H_TALLY_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INTEGER_BIGDECIMAL_COMPLEX_RATIONAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAX_BY_MIN_BY_MINMAX_BY = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REVERSE_REVERSE_EACH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT_FILTER_FILTER = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SET_SORTEDSET = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SQUISH_SQUISH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH_MERGE_ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__DUP = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__PUSH_APPEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#56 +RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) + +# Common functionality for primitive numeric nodes: `int`, `float`, `rational`, `complex`... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6 +module RuboCop::AST::NumericNode + # Checks whether this is literal has a sign. + # + # @example + # + # +42 + # @return [Boolean] whether this literal has a sign. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#17 + def sign?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#7 +RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#8 +class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node + # @return [AsgnNode] the assignment node + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#10 + def assignment_node; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#32 + def expression; end + + # @return [AsgnNode] the assignment node + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#13 + def lhs; end + + # The name of the variable being assigned as a symbol. + # + # @return [Symbol] the name of the variable being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#18 + def name; end + + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#25 + def operator; end + + # The expression being assigned to the variable. + # + # @return [Node] the expression being assigned. + # + # source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#35 + def rhs; end +end + +# A node extension for `op_asgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#8 +class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode + # The operator being used for assignment as a symbol. + # + # @return [Symbol] the assignment operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#12 + def operator; end +end + +# A node extension for `or` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `or` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#8 +class RuboCop::AST::OrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode + + # Returns the alternate operator of the `or` as a string. + # Returns `or` for `||` and vice versa. + # + # @return [String] the alternate of the `or` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#16 + def alternate_operator; end + + # Returns the inverse keyword of the `or` node as a string. + # Returns `and` for `or` and `&&` for `||`. + # + # @return [String] the inverse of the `or` operator + # + # source://rubocop-ast//lib/rubocop/ast/node/or_node.rb#24 + def inverse_operator; end +end + +# A node extension for `pair` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `pair` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#8 +class RuboCop::AST::PairNode < ::RuboCop::AST::Node + include ::RuboCop::AST::HashElementNode + + # Checks whether the `pair` uses a colon delimiter. + # + # @return [Boolean] whether this `pair` uses a colon delimiter + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#30 + def colon?; end + + # Returns the delimiter of the `pair` as a string. Returns `=>` for a + # colon delimited `pair` and `:` for a hash rocket delimited `pair`. + # + # @param with_spacing [Boolean] whether to include spacing + # @return [String] the delimiter of the `pair` + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#39 + def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses a hash rocket delimiter. + # + # @return [Boolean] whether this `pair` uses a hash rocket delimiter + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#23 + def hash_rocket?; end + + # Returns the inverse delimiter of the `pair` as a string. + # + # @param with_spacing [Boolean] whether to include spacing + # @return [String] the inverse delimiter of the `pair` + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#51 + def inverse_delimiter(*deprecated, with_spacing: T.unsafe(nil)); end + + # Checks whether the `pair` uses hash value omission. + # + # @return [Boolean] whether this `pair` uses hash value omission + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#69 + def value_omission?; end + + # Checks whether the value starts on its own line. + # + # @return [Boolean] whether the value in the `pair` starts its own line + # + # source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#62 + def value_on_new_line?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#15 +RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#11 +RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#17 +RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/pair_node.rb#13 +RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) + +# Requires implementing `arguments`. +# +# Common functionality for nodes that are parameterized: +# `send`, `super`, `zsuper`, `def`, `defs` +# and (modern only): `index`, `indexasgn`, `lambda` +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#10 +module RuboCop::AST::ParameterizedNode + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#40 + def arguments?; end + + # Whether the last argument of the node is a block pass, + # i.e. `&block`. + # + # @return [Boolean] whether the last argument of the node is a block pass + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#58 + def block_argument?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#24 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#33 + def last_argument; end + + # Checks whether this node's arguments are wrapped in parentheses. + # + # @return [Boolean] whether this node's arguments are + # wrapped in parentheses + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#15 + def parenthesized?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#52 + def rest_argument?; end + + # Checks whether any argument of the node is a splat + # argument, i.e. `*splat`. + # + # @return [Boolean] whether the node is a splat argument + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#48 + def splat_argument?; end +end + +# A specialized `ParameterizedNode`. +# Requires implementing `first_argument_index` +# Implements `arguments` as `children[first_argument_index..-1]` +# and optimizes other calls +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#84 +module RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] arguments, if any + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#90 + def arguments; end + + # Checks whether this node has any arguments. + # + # @return [Boolean] whether this node has any arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#120 + def arguments?; end + + # A shorthand for getting the first argument of the node. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#104 + def first_argument; end + + # A shorthand for getting the last argument of the node. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of the node, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#113 + def last_argument; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#87 +RuboCop::AST::ParameterizedNode::RestArguments::EMPTY_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# A specialized `ParameterizedNode` for node that have a single child +# containing either `nil`, an argument, or a `begin` node with all the +# arguments +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#66 +module RuboCop::AST::ParameterizedNode::WrappedArguments + include ::RuboCop::AST::ParameterizedNode + + # @return [Array] The arguments of the node. + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/parameterized_node.rb#70 + def arguments; end +end + +# Common functionality for nodes that are predicates: +# `or`, `and` ... +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#7 +module RuboCop::AST::PredicateOperatorNode + # Checks whether this is a logical operator. + # + # @return [Boolean] whether this is a logical operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#32 + def logical_operator?; end + + # Returns the operator as a string. + # + # @return [String] the operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#25 + def operator; end + + # Checks whether this is a semantic operator. + # + # @return [Boolean] whether this is a semantic operator + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#39 + def semantic_operator?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#8 +RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#17 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#12 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#10 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#19 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#14 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) + +# A `Prism` interface's class that provides a fixed `Prism::ParseLexResult` instead of parsing. +# +# This class implements the `parse_lex` method to return a preparsed `Prism::ParseLexResult` +# rather than parsing the source code. When the parse result is already available externally, +# such as in Ruby LSP, the Prism parsing process can be bypassed. +# +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12 +class RuboCop::AST::PrismPreparsed + # @return [PrismPreparsed] a new instance of PrismPreparsed + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 + def initialize(prism_result); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23 + def parse_lex(_source, **_prism_options); end +end + +# A node extension for `procarg0` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all `arg` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#8 +class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode + # Returns the name of an argument. + # + # @return [Symbol, nil] the name of the argument + # + # source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#12 + def name; end +end + +# ProcessedSource contains objects which are generated by Parser +# and other information such as disabled lines for cops. +# It also provides a convenient way to access source lines. +# +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#31 +class RuboCop::AST::ProcessedSource + # @return [ProcessedSource] a new instance of ProcessedSource + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#49 + def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil), prism_result: T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#91 + def [](*args); end + + # Returns the value of attribute ast. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def ast; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#69 + def ast_with_comments; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#130 + def blank?; end + + # Returns the value of attribute buffer. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def buffer; end + + # Raw source checksum for tracking infinite loops. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#102 + def checksum; end + + # @return [Comment, nil] the comment at that line, if any. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#135 + def comment_at_line(line); end + + # Consider using `each_comment_in_lines` instead + # + # @deprecated use contains_comment? + # @return [Boolean] if any of the lines in the given `source_range` has a comment. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#161 + def commented?(source_range); end + + # Returns the value of attribute comments. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def comments; end + + # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. + # + # @deprecated Use `each_comment_in_lines` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#165 + def comments_before_line(line); end + + # Consider using `each_comment_in_lines` instead + # + # @return [Boolean] if any of the lines in the given `source_range` has a comment. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#157 + def contains_comment?(source_range); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#179 + def current_line(token); end + + # Returns the value of attribute diagnostics. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def diagnostics; end + + # @deprecated Use `comments.each` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 + def each_comment(&block); end + + # Enumerates on the comments contained with the given `line_range` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#145 + def each_comment_in_lines(line_range); end + + # @deprecated Use `tokens.each` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 + def each_token(&block); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 + def file_path; end + + # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#112 + def find_comment(&block); end + + # @deprecated Use `tokens.find` + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#122 + def find_token(&block); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#200 + def first_token_of(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#183 + def following_line(token); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#204 + def last_token_of(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#187 + def line_indentation(line_number); end + + # @return [Boolean] if the given line number has a comment. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#140 + def line_with_comment?(line); end + + # Returns the source lines, line break characters removed, excluding a + # possible __END__ and everything that comes after. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#77 + def lines; end + + # Returns the value of attribute parser_engine. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def parser_engine; end + + # Returns the value of attribute parser_error. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def parser_error; end + + # Returns the value of attribute path. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def path; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175 + def preceding_line(token); end + + # Returns the value of attribute raw_source. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def raw_source; end + + # Returns the value of attribute ruby_version. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def ruby_version; end + + # The tokens list is always sorted by token position, except for cases when heredoc + # is passed as a method argument. In this case tokens are interleaved by + # heredoc contents' tokens. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#211 + def sorted_tokens; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#169 + def start_with?(string); end + + # Returns the value of attribute tokens. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + def tokens; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#194 + def tokens_within(range_or_node); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#95 + def valid_syntax?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#328 + def builder_class(parser_engine); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#218 + def comment_index; end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#338 + def create_parser(ruby_version, parser_engine, prism_result); end + + # The Parser gem does not support Ruby 3.5 or later. + # It is also not fully compatible with Ruby 3.4 but for + # now respects using parser for backwards compatibility. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#384 + def default_parser_engine(ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#392 + def first_token_index(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#397 + def last_token_index(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#367 + def normalize_parser_engine(parser_engine, ruby_version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#224 + def parse(source, ruby_version, parser_engine, prism_result); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#260 + def parser_class(ruby_version, parser_engine); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#402 + def source_range(range_or_node); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#243 + def tokenize(parser); end + + class << self + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#44 + def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#35 +RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#38 +RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#33 +RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) + +# A node extension for `irange` and `erange` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `irange` and `erange` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#8 +class RuboCop::AST::RangeNode < ::RuboCop::AST::Node + # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#9 + def begin; end + + # source://rubocop-ast//lib/rubocop/ast/node/range_node.rb#13 + def end; end +end + +# A node extension for `rational` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `rational` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/rational_node.rb#8 +class RuboCop::AST::RationalNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + +# A node extension for `regexp` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `regexp` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#8 +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + # @return [String] a string of regexp content + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#37 + def content; end + + # @return [Bool] if char is one of the delimiters + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#57 + def delimiter?(char); end + + # @return [String] the regexp delimiters (without %r) + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#52 + def delimiters; end + + # @return [Bool] if regexp uses the extended regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#72 + def extended?; end + + # @return [Bool] if regexp uses the fixed-encoding regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#92 + def fixed_encoding?; end + + # @return [Bool] if regexp uses the ignore-case regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#77 + def ignore_case?; end + + # @return [Bool] if regexp contains interpolation + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#62 + def interpolation?; end + + # @return [Bool] if regexp uses the multiline regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#67 + def multiline_mode?; end + + # @return [Bool] if regexp uses the no-encoding regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#87 + def no_encoding?; end + + # NOTE: The 'o' option is ignored. + # + # @return [Integer] the Regexp option bits as returned by Regexp#options + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#32 + def options; end + + # @return [Bool] if the regexp is a %r{...} literal (using any delimiters) + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#47 + def percent_r_literal?; end + + # @return [RuboCop::AST::Node] a regopt node + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#25 + def regopt; end + + # @return [Bool] if regexp uses the single-interpolation regopt + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#82 + def single_interpolation?; end + + # @return [Bool] if the regexp is a /.../ literal + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#42 + def slash_literal?; end + + # @return [Regexp] a regexp of this node + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#20 + def to_regexp; end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#98 + def regopt_include?(option); end +end + +# source://rubocop-ast//lib/rubocop/ast/node/regexp_node.rb#9 +RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) + +# A node extension for `resbody` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `resbody` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#8 +class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node + # Returns the body of the `rescue` clause. + # + # @return [Node, nil] The body of the `resbody`. + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#12 + def body; end + + # Returns the index of the `resbody` branch within the exception handling statement. + # + # @return [Integer] the index of the `resbody` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#40 + def branch_index; end + + # Returns the exception variable of the `rescue` clause. + # + # @return [Node, nil] The exception variable of the `resbody`. + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#33 + def exception_variable; end + + # Returns an array of all the exceptions in the `rescue` clause. + # + # @return [Array] an array of exception nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#19 + def exceptions; end +end + +# A node extension for `rescue` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `rescue` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#8 +class RuboCop::AST::RescueNode < ::RuboCop::AST::Node + # Returns the body of the rescue node. + # + # @return [Node, nil] The body of the rescue node. + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#12 + def body; end + + # Returns an array of all the rescue branches in the exception handling statement. + # + # and the else (if any). Note that these bodies could be nil. + # + # @return [Array] an array of the bodies of the rescue branches + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#27 + def branches; end + + # Checks whether this exception handling statement has an `else` branch. + # + # @return [Boolean] whether the exception handling statement has an `else` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#44 + def else?; end + + # Returns the else branch of the exception handling statement, if any. + # + # @return [Node] the else branch node of the exception handling statement + # @return [nil] if the exception handling statement does not have an else branch. + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#37 + def else_branch; end + + # Returns an array of all the rescue branches in the exception handling statement. + # + # @return [Array] an array of `resbody` nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#19 + def resbody_branches; end +end + +# A node extension for `return` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `return` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/return_node.rb#8 +class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments +end + +# Responsible for compatibility with main gem +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#8 +module RuboCop::AST::RuboCopCompatibility + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#13 + def rubocop_loaded; end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/rubocop_compatibility.rb#9 +RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Hash) + +# A node extension for `sclass` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sclass` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#8 +class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node + # The body of this `sclass` node. + # + # @return [Node, nil] the body of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#19 + def body; end + + # The identifier for this `sclass` node. (Always `self`.) + # + # @return [Node] the identifier of the class + # + # source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#12 + def identifier; end +end + +# A node extension for `send` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `send` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#8 +class RuboCop::AST::SendNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#13 + def attribute_accessor?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#18 + def send_type?; end + + private + + # source://rubocop-ast//lib/rubocop/ast/node/send_node.rb#24 + def first_argument_index; end +end + +# This module provides a shorthand method to create a {Node} like +# `Parser::AST::Sexp`. +# +# @see https://www.rubydoc.info/gems/ast/AST/Sexp +# +# source://rubocop-ast//lib/rubocop/ast/sexp.rb#9 +module RuboCop::AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # + # source://rubocop-ast//lib/rubocop/ast/sexp.rb#11 + def s(type, *children); end +end + +# A node extension for `str`, `dstr`, and `xstr` nodes. This will be used +# in place of a plain node when the builder constructs the AST, making +# its methods available to all `str` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#8 +class RuboCop::AST::StrNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#26 + def character_literal?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#22 + def double_quoted?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#30 + def heredoc?; end + + # Checks whether the string literal is delimited by percent brackets. + # + # @overload percent_literal? + # @overload percent_literal? + # @param type [Symbol] an optional percent literal type + # @return [Boolean] whether the string is enclosed in percent brackets + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#45 + def percent_literal?(type = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#18 + def single_quoted?; end +end + +# source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#11 +RuboCop::AST::StrNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + +# A node extension for `super`- and `zsuper` nodes. This will be used in +# place of a plain node when the builder constructs the AST, making its +# methods available to all `super`- and `zsuper` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#8 +class RuboCop::AST::SuperNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#20 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `super` node + # + # source://rubocop-ast//lib/rubocop/ast/node/super_node.rb#16 + def node_parts; end +end + +# A node extension for `sym` nodes. This will be used in place of a +# plain node when the builder constructs the AST, making its methods +# available to all `sym` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/symbol_node.rb#8 +class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode +end + +# A basic wrapper around Parser's tokens. +# +# source://rubocop-ast//lib/rubocop/ast/token.rb#6 +class RuboCop::AST::Token + # @return [Token] a new instance of Token + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#18 + def initialize(pos, type, text); end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#33 + def begin_pos; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#29 + def column; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#102 + def comma?; end + + # Type Predicates + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#58 + def comment?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#106 + def dot?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#118 + def end?; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#37 + def end_pos; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#122 + def equal_sign?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#66 + def left_array_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#82 + def left_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#74 + def left_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#86 + def left_curly_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#94 + def left_parens?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#70 + def left_ref_bracket?; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#25 + def line; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#126 + def new_line?; end + + # Returns the value of attribute pos. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#10 + def pos; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#110 + def regexp_dots?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#114 + def rescue_modifier?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#78 + def right_bracket?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#90 + def right_curly_brace?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#98 + def right_parens?; end + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#62 + def semicolon?; end + + # Checks if there is whitespace after token + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#46 + def space_after?; end + + # Checks if there is whitespace before token + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#51 + def space_before?; end + + # Returns the value of attribute text. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#10 + def text; end + + # source://rubocop-ast//lib/rubocop/ast/token.rb#41 + def to_s; end + + # Returns the value of attribute type. + # + # source://rubocop-ast//lib/rubocop/ast/token.rb#10 + def type; end + + class << self + # source://rubocop-ast//lib/rubocop/ast/token.rb#12 + def from_parser_token(parser_token); end + end +end + +# source://rubocop-ast//lib/rubocop/ast/token.rb#8 +RuboCop::AST::Token::LEFT_CURLY_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-ast//lib/rubocop/ast/token.rb#7 +RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) + +# Provides methods for traversing an AST. +# Does not transform an AST; for that, use Parser::AST::Processor. +# Override methods to perform custom processing. Remember to call `super` +# if you want to recursively process descendant nodes. +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#9 +module RuboCop::AST::Traversal + extend ::RuboCop::AST::Traversal::CallbackCompiler + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on___ENCODING__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on___FILE__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on___LINE__(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_alias(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_and(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_and_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_arg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_arg_expr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_array(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_array_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_array_pattern_with_tail(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_back_ref(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_begin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_block(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_block_pass(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_blockarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_blocknilarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_break(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_case(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_case_match(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_casgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_cbase(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_class(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_complex(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_const(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_const_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_csend(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_cvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_cvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_def(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_defined?(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_defs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_dstr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_dsym(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_eflipflop(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_empty_else(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_ensure(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_erange(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_false(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_find_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_float(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_for(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_forward_arg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_forward_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_forwarded_args(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_forwarded_kwrestarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_forwarded_restarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_gvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_gvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_hash(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_hash_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_if(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_if_guard(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_iflipflop(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_in_match(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_in_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_index(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_indexasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_int(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_irange(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_itblock(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_ivar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_ivasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwargs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwbegin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwnilarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwoptarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwrestarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_kwsplat(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_lambda(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_lvar(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_lvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_masgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_alt(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_as(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_current_line(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_nil_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_pattern(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_pattern_p(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_rest(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_var(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_with_lvasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_match_with_trailing_comma(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_mlhs(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_module(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_mrasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_next(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_nil(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_not(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_nth_ref(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_numblock(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_op_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_optarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_or(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_or_asgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_pair(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_pin(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_postexe(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_preexe(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_procarg0(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_rasgn(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_rational(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_redo(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_regexp(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_regopt(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_resbody(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_rescue(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_restarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_retry(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_return(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_sclass(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_self(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_send(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_shadowarg(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_splat(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_str(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_super(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_sym(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_true(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_undef(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_unless_guard(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_until(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_until_post(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_when(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#43 + def on_while(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_while_post(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_xstr(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_yield(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#50 + def on_zsuper(node); end + + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#17 + def walk(node); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#25 +module RuboCop::AST::Traversal::CallbackCompiler + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#54 + def body(child_node_types, expected_children_count); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#68 + def children_count_check_code(range); end + + # @api private + # + # source://rubocop-ast//lib/rubocop/ast/traversal.rb#38 + def def_callback(type, *child_node_types, expected_children_count: T.unsafe(nil), body: T.unsafe(nil)); end +end + +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#26 +RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) + +# How a particular child node should be visited. For example, if a child node +# can be nil it should be guarded behind a nil check. Or, if a child node is a literal +# (like a symbol) then the literal itself should not be visited. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#32 +RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) + +# Only for debugging. +# +# @api private +# +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#12 +class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end + +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#110 +RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/traversal.rb#15 +RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) + +# A node extension for `until` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `until` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#8 +class RuboCop::AST::UntilNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#30 + def do?; end + + # Returns the inverse keyword of the `until` node as a string. + # Returns `while` for `until` nodes and vice versa. + # + # @return [String] the inverse keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#23 + def inverse_keyword; end + + # Returns the keyword of the `until` statement as a string. + # + # @return [String] the keyword of the `until` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/until_node.rb#15 + def keyword; end +end + +# A node extension for `lvar`, `ivar`, `cvar` and `gvar` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/var_node.rb#8 +class RuboCop::AST::VarNode < ::RuboCop::AST::Node + # @return [Symbol] The name of the variable. + # + # source://rubocop-ast//lib/rubocop/ast/node/var_node.rb#10 + def name; end +end + +# source://rubocop-ast//lib/rubocop/ast/version.rb#5 +module RuboCop::AST::Version; end + +# source://rubocop-ast//lib/rubocop/ast/version.rb#6 +RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) + +# A node extension for `when` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `when` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#8 +class RuboCop::AST::WhenNode < ::RuboCop::AST::Node + # Returns the body of the `when` node. + # + # @return [Node, nil] the body of the `when` node + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#42 + def body; end + + # Returns the index of the `when` branch within the `case` statement. + # + # @return [Integer] the index of the `when` branch + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#28 + def branch_index; end + + # Returns an array of all the conditions in the `when` branch. + # + # @return [Array] an array of condition nodes + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#12 + def conditions; end + + # @deprecated Use `conditions.each` + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#17 + def each_condition(&block); end + + # Checks whether the `when` node has a `then` keyword. + # + # @return [Boolean] whether the `when` node has a `then` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#35 + def then?; end +end + +# A node extension for `while` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `while` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#8 +class RuboCop::AST::WhileNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode + + # Checks whether the `until` node has a `do` keyword. + # + # @return [Boolean] whether the `until` node has a `do` keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#30 + def do?; end + + # Returns the inverse keyword of the `while` node as a string. + # Returns `until` for `while` nodes and vice versa. + # + # @return [String] the inverse keyword of the `while` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#23 + def inverse_keyword; end + + # Returns the keyword of the `while` statement as a string. + # + # @return [String] the keyword of the `while` statement + # + # source://rubocop-ast//lib/rubocop/ast/node/while_node.rb#15 + def keyword; end +end + +# A node extension for `yield` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available +# to all `yield` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#8 +class RuboCop::AST::YieldNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode + + # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#20 + def arguments; end + + # Custom destructuring method. This can be used to normalize + # destructuring for different variations of the node. + # + # @return [Array] the different parts of the `send` node + # + # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 + def node_parts; end +end + +class RuboCop::CommentConfig; end +class RuboCop::Config; end +class RuboCop::ConfigValidator; end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#5 +module RuboCop::SimpleForwardable + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#6 + def def_delegators(accessor, *methods); end +end diff --git a/sorbet/rbi/gems/rubocop-rspec@2.13.2.rbi b/sorbet/rbi/gems/rubocop-rspec@2.13.2.rbi deleted file mode 100644 index f346e39..0000000 --- a/sorbet/rbi/gems/rubocop-rspec@2.13.2.rbi +++ /dev/null @@ -1,2004 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-rspec` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-rspec`. - -module RuboCop; end -module RuboCop::Cop; end -RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods -RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern -module RuboCop::Cop::RSpec; end - -class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def token_aligner; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::RSpec::AlignLeftLetBrace::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::AlignRightLetBrace < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def token_aligner; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::RSpec::AlignRightLetBrace::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::AnyInstance < ::RuboCop::Cop::RSpec::Base - def on_send(node); end -end - -RuboCop::Cop::RSpec::AnyInstance::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::AnyInstance::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base - def find_arg_usage(param0); end - def hook_block(param0 = T.unsafe(nil)); end - def hook_numblock(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_numblock(node); end - - private - - def add_no_arg_offense(node); end - def check_for_numblock(block); end - def check_for_unused_proxy(block, proxy); end -end - -RuboCop::Cop::RSpec::AroundBlock::MSG_NO_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base - include ::RuboCop::RSpec::Language - extend ::RuboCop::RSpec::Language::NodePattern - - def on_new_investigation; end - - class << self - def inherited(subclass); end - end -end - -class RuboCop::Cop::RSpec::Be < ::RuboCop::Cop::RSpec::Base - def be_without_args(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::Be::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::BeEq < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def eq_type_with_identity?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::BeEq::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::BeEq::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::BeEql < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def eql_type_with_identity(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::BeEql::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::BeEql::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::BeNil < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def be_nil_matcher?(param0 = T.unsafe(nil)); end - def nil_value_expectation?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def check_be_nil_style(node); end - def check_be_style(node); end -end - -RuboCop::Cop::RSpec::BeNil::BE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::BeNil::BE_NIL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::BeNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base - def before_or_after_all(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -module RuboCop::Cop::RSpec::Capybara; end - -class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def as_is_matcher(param0 = T.unsafe(nil)); end - def expectation_set_on_current_path(param0 = T.unsafe(nil)); end - def on_send(node); end - def regexp_str_matcher(param0 = T.unsafe(nil)); end - - private - - def add_ignore_query_options(corrector, node); end - def autocorrect(corrector, node); end - def convert_regexp_str_to_literal(corrector, matcher_node, regexp_str); end - def rewrite_expectation(corrector, node, to_symbol, matcher_node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - def capybara_speak(param0 = T.unsafe(nil)); end - def feature_method(param0 = T.unsafe(nil)); end - def message(range); end - def on_block(node); end - - private - - def enabled?(method_name); end - def enabled_methods; end -end - -RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::Capybara::SpecificFinders < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def find_argument(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def attribute?(arg); end - def end_pos(node); end - def offense_range(node); end - def on_attr(node, arg); end - def on_id(node, arg); end - def register_offense(node, arg_replacement); end - def replaced_arguments(arg, id); end - def to_options(attrs); end -end - -RuboCop::Cop::RSpec::Capybara::SpecificFinders::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::Capybara::SpecificMatcher < ::RuboCop::Cop::RSpec::Base - def first_argument(param0 = T.unsafe(nil)); end - def on_send(node); end - def option?(param0, param1); end - - private - - def good_matcher(node, matcher); end - def message(node, matcher); end - def replaceable_matcher?(node, matcher, attrs); end - def replaceable_pseudo_class?(pseudo_class, arg); end - def replaceable_pseudo_class_not?(arg); end - def replaceable_to_have_link?(node, attrs); end - def specific_matcher(arg); end - def specific_matcher_option?(node, arg, matcher); end - def specific_matcher_pseudo_classes?(arg); end -end - -RuboCop::Cop::RSpec::Capybara::SpecificMatcher::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::Capybara::SpecificMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::Capybara::SpecificMatcher::SPECIFIC_MATCHER = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::RSpec::Capybara::SpecificMatcher::SPECIFIC_MATCHER_OPTIONS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::RSpec::Capybara::SpecificMatcher::SPECIFIC_MATCHER_PSEUDO_CLASSES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec::Base - def on_send(node); end - def visible_false?(param0 = T.unsafe(nil)); end - def visible_true?(param0 = T.unsafe(nil)); end - - private - - def capybara_matcher?(method_name); end -end - -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::CAPYBARA_MATCHER_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::MSG_FALSE = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::MSG_TRUE = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ChangeByZero < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def change_nodes(param0); end - def expect_change_with_arguments(param0 = T.unsafe(nil)); end - def expect_change_with_block(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def autocorrect_compound(corrector, node); end - def check_offense(node); end - def compound_expectations?(node); end - def message_compound; end - def negated_matcher; end - def preferred_method; end -end - -RuboCop::Cop::RSpec::ChangeByZero::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ChangeByZero::MSG_COMPOUND = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ChangeByZero::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ClassCheck < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def format_message(node); end - def offending?(node); end - def preferred_method_name; end - def preferred_method_name?(method_name); end - def preferred_method_names; end -end - -RuboCop::Cop::RSpec::ClassCheck::METHOD_NAMES_FOR_BE_A = T.let(T.unsafe(nil), Set) -RuboCop::Cop::RSpec::ClassCheck::METHOD_NAMES_FOR_KIND_OF = T.let(T.unsafe(nil), Set) -RuboCop::Cop::RSpec::ClassCheck::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ClassCheck::PREFERRED_METHOD_NAME_BY_STYLE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::RSpec::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::RSpec::CommentsHelp - include ::RuboCop::Cop::RSpec::FinalEndLocation - - def begin_pos_with_comment(node); end - def buffer; end - def end_line_position(node); end - def source_range_with_comment(node); end - def start_line_position(node); end -end - -class RuboCop::Cop::RSpec::ContextMethod < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def context_method(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def method_name?(description); end -end - -RuboCop::Cop::RSpec::ContextMethod::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ContextWording < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::AllowedPattern - - def context_wording(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def allowed_patterns; end - def bad_pattern?(description); end - def expect_patterns; end - def prefix_regexes; end - def prefixes; end -end - -RuboCop::Cop::RSpec::ContextWording::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::CssSelector - private - - def attribute?(selector); end - def attributes(selector); end - def common_attributes?(selector); end - def id?(selector); end - def multiple_selectors?(selector); end - def normalize_value(value); end - def pseudo_classes(selector); end - - class << self - def attribute?(selector); end - def attributes(selector); end - def common_attributes?(selector); end - def id?(selector); end - def multiple_selectors?(selector); end - def normalize_value(value); end - def pseudo_classes(selector); end - end -end - -RuboCop::Cop::RSpec::CssSelector::COMMON_OPTIONS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::DescribeClass < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - def example_group_with_ignored_metadata?(param0 = T.unsafe(nil)); end - def not_a_const_described(param0 = T.unsafe(nil)); end - def on_top_level_group(node); end - def sym_pair(param0 = T.unsafe(nil)); end - - private - - def ignored_metadata; end - def ignored_metadata?(node); end - def string_constant?(described); end -end - -RuboCop::Cop::RSpec::DescribeClass::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::DescribeMethod < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - def on_top_level_group(node); end - def second_argument(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::RSpec::DescribeMethod::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::DescribeSymbol < ::RuboCop::Cop::RSpec::Base - def describe_symbol?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::DescribeSymbol::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::Namespace - extend ::RuboCop::Cop::AutoCorrector - - def common_instance_exec_closure?(param0 = T.unsafe(nil)); end - def contains_described_class?(param0); end - def described_constant(param0 = T.unsafe(nil)); end - def on_block(node); end - def rspec_block?(param0 = T.unsafe(nil)); end - def scope_changing_syntax?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, match); end - def collapse_namespace(namespace, const); end - def const_name(node); end - def find_usage(node, &block); end - def full_const_name(node); end - def message(offense); end - def offensive?(node); end - def offensive_described_class?(node); end - def scope_change?(node); end - def skippable_block?(node); end -end - -RuboCop::Cop::RSpec::DescribedClass::DESCRIBED_CLASS = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::DescribedClass::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::DescribedClassModuleWrapping < ::RuboCop::Cop::RSpec::Base - def find_rspec_blocks(param0); end - def on_module(node); end -end - -RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::Dialect < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def rspec_method?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::RSpec::Dialect::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def example_group_body(param0 = T.unsafe(nil)); end - def example_or_group_or_include?(param0 = T.unsafe(nil)); end - def examples?(param0 = T.unsafe(nil)); end - def examples_directly_or_in_block?(param0 = T.unsafe(nil)); end - def examples_inside_block?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def conditionals_with_examples?(body); end - def examples_in_branches?(condition_node); end - def offensive?(body); end - def removed_range(node); end -end - -RuboCop::Cop::RSpec::EmptyExampleGroup::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyHook < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def empty_hook?(param0 = T.unsafe(nil)); end - def on_block(node); end -end - -RuboCop::Cop::RSpec::EmptyHook::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - def allow_consecutive_one_liners?; end - def allowed_one_liner?(node); end - def consecutive_one_liner?(node); end - def next_one_line_example?(node); end - def on_block(node); end -end - -RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end -end - -RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end -end - -RuboCop::Cop::RSpec::EmptyLineAfterFinalLet::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyLineAfterHook < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_numblock(node); end - - private - - def chained_single_line_hooks?(node); end -end - -RuboCop::Cop::RSpec::EmptyLineAfterHook::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::EmptyLineAfterSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end -end - -RuboCop::Cop::RSpec::EmptyLineAfterSubject::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::EmptyLineSeparation - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - - def last_child?(node); end - def missing_separating_line(node); end - def missing_separating_line_offense(node); end - def offending_loc(last_line); end -end - -class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::CodeLength - - def on_block(node); end - - private - - def cop_label; end -end - -RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def example_description(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def check_example_without_description(node); end - def disallow_empty_description?(node); end -end - -RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_ADD_DESCRIPTION = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def it_description(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def add_wording_offense(node, message); end - def custom_transform; end - def docstring(node); end - def ignored_words; end - def replacement_text(node); end - def text(node); end -end - -RuboCop::Cop::RSpec::ExampleWording::IT_PREFIX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def example_description(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def add_whitespace_offense(node, text); end - def docstring(node); end - def excessive_whitespace?(text); end - def strip_excessive_whitespace(text); end - def text(node); end -end - -RuboCop::Cop::RSpec::ExcessiveDocstringSpacing::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def expect_literal(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def complex_literal?(node); end - def literal?(node); end - def simple_literal?(node); end - def swap(corrector, actual, expected); end -end - -RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::ExpectActual::SUPPORTED_MATCHERS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def expect_change_with_arguments(param0 = T.unsafe(nil)); end - def expect_change_with_block(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::ExpectChange::MSG_BLOCK = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ExpectChange::MSG_CALL = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ExpectChange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ExpectInHook < ::RuboCop::Cop::RSpec::Base - def expectation(param0); end - def on_block(node); end - def on_numblock(node); end - - private - - def message(expect, hook); end -end - -RuboCop::Cop::RSpec::ExpectInHook::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ExpectOutput < ::RuboCop::Cop::RSpec::Base - def on_gvasgn(node); end - - private - - def inside_example_scope?(node); end -end - -RuboCop::Cop::RSpec::ExpectOutput::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::ExplicitHelper - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - - def predicate_matcher?(param0 = T.unsafe(nil)); end - def predicate_matcher_block?(param0 = T.unsafe(nil)); end - - private - - def allowed_explicit_matchers; end - def check_explicit(node); end - def corrector_explicit(corrector, to_node, actual, matcher, block_child); end - def message_explicit(matcher); end - def move_predicate(corrector, actual, matcher, block_child); end - def predicate_matcher_name?(name); end - def replacement_matcher(node); end - def to_predicate_method(matcher); end -end - -RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) -module RuboCop::Cop::RSpec::FactoryBot; end - -class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def association?(param0 = T.unsafe(nil)); end - def factory_attributes(param0 = T.unsafe(nil)); end - def on_block(node); end - def value_matcher(param0 = T.unsafe(nil)); end - - private - - def attribute_defining_method?(method_name); end - def autocorrect(corrector, node); end - def autocorrect_replacing_parens(corrector, node); end - def autocorrect_without_parens(corrector, node); end - def braces(node); end - def offensive_receiver?(receiver, node); end - def proc?(attribute); end - def receiver_matches_first_block_argument?(receiver, node); end - def reserved_method?(method_name); end - def value_hash_without_braces?(node); end -end - -RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - def arguments_include_method_call?(param0 = T.unsafe(nil)); end - def array_new_or_n_times_block?(param0 = T.unsafe(nil)); end - def block_with_arg_and_used?(param0 = T.unsafe(nil)); end - def factory_call(param0 = T.unsafe(nil)); end - def factory_list_call(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_send(node); end - - private - - def contains_only_factory?(node); end -end - -module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - private - - def build_options_string(options); end - def format_method_call(node, method, arguments); end - def format_receiver(receiver); end -end - -class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector - include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - - def initialize(node); end - - def call(corrector); end - - private - - def build_arguments(node, count); end - def call_replacement(node); end - def call_with_block_replacement(node); end - def count_from(node); end - def format_block(node); end - def format_multiline_block(node); end - def format_singleline_block(node); end - def node; end -end - -RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_CREATE_LIST = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_N_TIMES = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector - include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - - def initialize(node); end - - def call(corrector); end - - private - - def generate_n_times_block(node); end - def node; end -end - -class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def class_name(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed?(const_name); end -end - -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def crime_scene(node); end - def offense(node); end -end - -RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - include ::RuboCop::Cop::RSpec::Namespace - - def example_group(param0 = T.unsafe(nil)); end - def on_top_level_example_group(node); end - def routing_metadata?(param0); end - - private - - def camel_to_snake_case(string); end - def custom_transform; end - def ensure_correct_file_path(send_node, example_group, arguments); end - def expected_path(constant); end - def filename_ends_with?(pattern); end - def ignore_methods?; end - def name_pattern(method_name); end - def pattern_for(example_group, method_name); end - def pattern_for_spec_suffix_only; end - def relevant_rubocop_rspec_file?(_file); end - def routing_spec?(args); end - def spec_suffix_only?; end -end - -RuboCop::Cop::RSpec::FilePath::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::FinalEndLocation - def final_end_location(start_node); end -end - -class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def focusable_selector?(param0 = T.unsafe(nil)); end - def focused_block?(param0 = T.unsafe(nil)); end - def metadata(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def correct_send(corrector, focus); end - def focus_metadata(node, &block); end - def with_surrounding(focus); end -end - -RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_numblock(node); end - def scoped_hook(param0 = T.unsafe(nil)); end - def unscoped_hook(param0 = T.unsafe(nil)); end - - private - - def argument_range(send_node); end - def check_implicit(method_send); end - def explicit_message(scope); end - def hook(node, &block); end - def implicit_style?; end -end - -RuboCop::Cop::RSpec::HookArgument::EXPLICIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::HookArgument::IMPLICIT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::HooksBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def example_or_group?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_numblock(node); end - - private - - def autocorrect(corrector, node, first_example); end - def check_hooks(node); end - def find_first_example(node); end - def multiline_block?(block); end -end - -RuboCop::Cop::RSpec::HooksBeforeExamples::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::IdenticalEqualityAssertion < ::RuboCop::Cop::RSpec::Base - def equality_check?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::IdenticalEqualityAssertion::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::IdenticalEqualityAssertion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Base - def implicit_expect(param0 = T.unsafe(nil)); end - def lambda?(param0 = T.unsafe(nil)); end - def lambda_subject?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def find_subject(block_node); end - def multi_statement_example_group?(node); end - def nearest_subject(node); end -end - -RuboCop::Cop::RSpec::ImplicitBlockExpectation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ImplicitBlockExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def implicit_expect(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def is_expected_range(source_map); end - def offending_expect(node); end - def offense_message(offending_source); end - def replacement_source(offending_source); end -end - -RuboCop::Cop::RSpec::ImplicitExpect::ENFORCED_REPLACEMENTS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::RSpec::ImplicitExpect::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def implicit_subject?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_by_style?(example); end - def autocorrect(corrector, node); end - def valid_usage?(node); end -end - -RuboCop::Cop::RSpec::ImplicitSubject::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::RSpec::InflectedHelper - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - - def be_bool?(param0 = T.unsafe(nil)); end - def be_boolthy?(param0 = T.unsafe(nil)); end - def predicate_in_actual?(param0 = T.unsafe(nil)); end - - private - - def boolean_matcher?(node); end - def check_inflected(node); end - def message_inflected(predicate); end - def predicate?(sym); end - def remove_predicate(corrector, predicate); end - def rewrite_matcher(corrector, predicate, matcher); end - def to_predicate_matcher(name); end - def true?(to_symbol, matcher); end -end - -RuboCop::Cop::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::InsideExampleGroup - private - - def example_group_root?(node); end - def example_group_root_with_siblings?(node); end - def inside_example_group?(node); end -end - -class RuboCop::Cop::RSpec::InstanceSpy < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def have_received_usage(param0); end - def null_double(param0); end - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::InstanceVariable < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - def custom_matcher?(param0 = T.unsafe(nil)); end - def dynamic_class?(param0 = T.unsafe(nil)); end - def ivar_assigned?(param0, param1); end - def ivar_usage(param0); end - def on_top_level_group(node); end - - private - - def assignment_only?; end - def valid_usage?(node); end -end - -RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def example_inclusion_offense(param0 = T.unsafe(nil), param1); end - def on_send(node); end - - private - - def message(_node); end -end - -RuboCop::Cop::RSpec::ItBehavesLike::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ItBehavesLike::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::IteratedExpectation < ::RuboCop::Cop::RSpec::Base - def each?(param0 = T.unsafe(nil)); end - def each_numblock?(param0 = T.unsafe(nil)); end - def expectation?(param0 = T.unsafe(nil), param1); end - def on_block(node); end - def on_numblock(node); end - - private - - def only_expectations?(body, arg); end - def single_expectation?(body, arg); end -end - -RuboCop::Cop::RSpec::IteratedExpectation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::LeadingSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - def check_previous_nodes(node); end - def on_block(node); end - - private - - def autocorrect(corrector, node, sibling); end - def offending?(node); end - def offending_node(node); end - def parent(node); end -end - -RuboCop::Cop::RSpec::LeadingSubject::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::LeakyConstantDeclaration < ::RuboCop::Cop::RSpec::Base - def on_casgn(node); end - def on_class(node); end - def on_module(node); end - - private - - def inside_describe_block?(node); end -end - -RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CLASS = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CONST = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_MODULE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::LetBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def example_or_group?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def autocorrect(corrector, node, first_example); end - def check_let_declarations(node); end - def find_first_example(node); end - def multiline_block?(block); end -end - -RuboCop::Cop::RSpec::LetBeforeExamples::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::LetSetup < ::RuboCop::Cop::RSpec::Base - def example_or_shared_group_or_including?(param0 = T.unsafe(nil)); end - def let_bang(param0 = T.unsafe(nil)); end - def method_called?(param0, param1); end - def on_block(node); end - - private - - def child_let_bang(node, &block); end - def unused_let_bang(node); end -end - -RuboCop::Cop::RSpec::LetSetup::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::MessageChain < ::RuboCop::Cop::RSpec::Base - def on_send(node); end -end - -RuboCop::Cop::RSpec::MessageChain::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::MessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def message_expectation(param0 = T.unsafe(nil)); end - def on_send(node); end - def receive_message?(param0); end - - private - - def preferred_style?(expectation); end -end - -RuboCop::Cop::RSpec::MessageExpectation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::RSpec::MessageExpectation::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def message_expectation(param0 = T.unsafe(nil)); end - def on_send(node); end - def receive_message(param0); end - - private - - def error_message(receiver); end - def preferred_style?(expectation); end - def receive_message_matcher(node); end -end - -RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::MessageSpies::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::MissingExampleGroupArgument < ::RuboCop::Cop::RSpec::Base - def on_block(node); end -end - -RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::MultipleDescribes < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - def on_top_level_group(node); end -end - -RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - - def aggregate_failures?(param0 = T.unsafe(nil), param1); end - def aggregate_failures_block?(param0 = T.unsafe(nil)); end - def expect?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def example_with_aggregate_failures?(example_node); end - def find_aggregate_failures(example_node); end - def find_expectation(node, &block); end - def flag_example(node, expectation_count:); end - def max_expectations; end -end - -RuboCop::Cop::RSpec::MultipleExpectations::ANYTHING = T.let(T.unsafe(nil), Proc) -RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) - -class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - include ::RuboCop::Cop::RSpec::Variable - - def on_block(node); end - def on_new_investigation; end - - private - - def all_helpers(node); end - def allow_subject?; end - def example_group_memoized_helpers; end - def helpers(node); end - def max; end - def variable_nodes(node); end -end - -RuboCop::Cop::RSpec::MultipleMemoizedHelpers::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::MultipleSubjects < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, subject); end - def named_subject?(node); end - def remove_autocorrect(corrector, node); end - def rename_autocorrect(corrector, node); end -end - -RuboCop::Cop::RSpec::MultipleSubjects::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::NamedSubject < ::RuboCop::Cop::RSpec::Base - def example_or_hook_block?(param0 = T.unsafe(nil)); end - def ignored_shared_example?(node); end - def on_block(node); end - def shared_example?(param0 = T.unsafe(nil)); end - def subject_usage(param0); end -end - -RuboCop::Cop::RSpec::NamedSubject::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::Namespace - private - - def namespace(node); end -end - -class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - include ::RuboCop::Cop::RSpec::TopLevelGroup - - def on_top_level_group(node); end - - private - - def allowed_groups; end - def count_up_nesting?(node, example_group); end - def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end - def max_nesting; end - def max_nesting_config; end - def message(nesting); end -end - -RuboCop::Cop::RSpec::NestedGroups::DEPRECATED_MAX_KEY = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::NestedGroups::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::NoExpectationExample < ::RuboCop::Cop::RSpec::Base - def including_any_expectation?(param0); end - def including_any_skip_example?(param0); end - def on_block(node); end - def on_numblock(node); end - def regular_or_focused_example?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::RSpec::NoExpectationExample::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def not_to_not_offense(param0 = T.unsafe(nil), param1); end - def on_send(node); end - - private - - def message(_node); end -end - -RuboCop::Cop::RSpec::NotToNot::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::NotToNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::OverwritingSetup < ::RuboCop::Cop::RSpec::Base - def first_argument_name(param0 = T.unsafe(nil)); end - def on_block(node); end - def setup?(param0 = T.unsafe(nil)); end - - private - - def common_setup?(node); end - def find_duplicates(node); end -end - -RuboCop::Cop::RSpec::OverwritingSetup::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::Pending < ::RuboCop::Cop::RSpec::Base - def on_send(node); end - def pending_block?(param0 = T.unsafe(nil)); end - def skip_or_pending?(param0 = T.unsafe(nil)); end - def skippable?(param0 = T.unsafe(nil)); end - def skipped_in_metadata?(param0 = T.unsafe(nil)); end - - private - - def skipped?(node); end -end - -RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::InflectedHelper - include ::RuboCop::Cop::RSpec::ExplicitHelper - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_send(node); end - - private - - def args_loc(send_node); end - def block_loc(send_node); end -end - -module RuboCop::Cop::RSpec::Rails; end - -class RuboCop::Cop::RSpec::Rails::AvoidSetupHook < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def setup_call(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::Rails::HaveHttpStatus < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def match_status(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def receive_counts(param0 = T.unsafe(nil)); end - def stub?(param0); end - - private - - def autocorrect(corrector, node, range); end - def matcher_for(method, count); end - def message_for(node, source); end - def range(node, offending_node); end -end - -RuboCop::Cop::RSpec::ReceiveCounts::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ReceiveCounts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def method_on_stub?(param0); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::RSpec::ReceiveNever::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ReceiveNever::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::RepeatedDescription < ::RuboCop::Cop::RSpec::Base - def on_block(node); end - - private - - def example_signature(example); end - def repeated_descriptions(node); end -end - -RuboCop::Cop::RSpec::RepeatedDescription::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::RepeatedExample < ::RuboCop::Cop::RSpec::Base - def on_block(node); end - - private - - def example_signature(example); end - def repeated_examples(node); end -end - -RuboCop::Cop::RSpec::RepeatedExample::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::RepeatedExampleGroupBody < ::RuboCop::Cop::RSpec::Base - def body(param0 = T.unsafe(nil)); end - def const_arg(param0 = T.unsafe(nil)); end - def metadata(param0 = T.unsafe(nil)); end - def on_begin(node); end - def several_example_groups?(param0 = T.unsafe(nil)); end - def skip_or_pending?(param0 = T.unsafe(nil)); end - - private - - def add_repeated_lines(groups); end - def message(group, repeats); end - def repeated_group_bodies(node); end - def signature_keys(group); end -end - -RuboCop::Cop::RSpec::RepeatedExampleGroupBody::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::RepeatedExampleGroupDescription < ::RuboCop::Cop::RSpec::Base - def doc_string_and_metadata(param0 = T.unsafe(nil)); end - def empty_description?(param0 = T.unsafe(nil)); end - def on_begin(node); end - def several_example_groups?(param0 = T.unsafe(nil)); end - def skip_or_pending?(param0 = T.unsafe(nil)); end - - private - - def add_repeated_lines(groups); end - def message(group, repeats); end - def repeated_group_descriptions(node); end -end - -RuboCop::Cop::RSpec::RepeatedExampleGroupDescription::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::RepeatedIncludeExample < ::RuboCop::Cop::RSpec::Base - def include_examples?(param0 = T.unsafe(nil)); end - def on_begin(node); end - def several_include_examples?(param0 = T.unsafe(nil)); end - def shared_examples_name(param0 = T.unsafe(nil)); end - - private - - def add_repeated_lines(items); end - def literal_include_examples?(node); end - def message(item, repeats); end - def repeated_include_examples(node); end - def signature_keys(item); end -end - -RuboCop::Cop::RSpec::RepeatedIncludeExample::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ReturnFromStub < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def and_return_value(param0); end - def contains_stub?(param0); end - def on_block(node); end - def on_send(node); end - def stub_with_block?(param0 = T.unsafe(nil)); end - - private - - def check_and_return_call(node); end - def check_block_body(block); end - def dynamic?(node); end -end - -class RuboCop::Cop::RSpec::ReturnFromStub::AndReturnCallCorrector - def initialize(node); end - - def call(corrector); end - - private - - def arg; end - def hash_without_braces?; end - def heredoc?; end - def node; end - def range; end - def receiver; end - def replacement; end -end - -class RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector - def initialize(block); end - - def call(corrector); end - - private - - def block; end - def body; end - def heredoc?; end - def node; end -end - -RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector::NULL_BLOCK_BODY = T.let(T.unsafe(nil), T.untyped) -RuboCop::Cop::RSpec::ReturnFromStub::MSG_AND_RETURN = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ReturnFromStub::MSG_BLOCK = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::ReturnFromStub::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::ScatteredLet < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def check_let_declarations(body); end -end - -RuboCop::Cop::RSpec::ScatteredLet::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::ScatteredSetup < ::RuboCop::Cop::RSpec::Base - def lines_msg(numbers); end - def on_block(node); end - def repeated_hooks(node); end -end - -RuboCop::Cop::RSpec::ScatteredSetup::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def context?(param0); end - def examples?(param0); end - def on_block(node); end - def shared_context(param0 = T.unsafe(nil)); end - def shared_example(param0 = T.unsafe(nil)); end - - private - - def context_with_only_examples(node); end - def examples_with_only_context(node); end -end - -RuboCop::Cop::RSpec::SharedContext::MSG_CONTEXT = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::SharedExamples < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def shared_examples(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::RSpec::SharedExamples::Checker - def initialize(node); end - - def message; end - def node; end - def preferred_style; end - - private - - def symbol; end - def wrap_with_single_quotes(string); end -end - -RuboCop::Cop::RSpec::SharedExamples::Checker::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - def message_chain(param0 = T.unsafe(nil)); end - def on_send(node); end - def single_key_hash?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node, method, arg); end - def autocorrect_array_arg(corrector, arg); end - def autocorrect_hash_arg(corrector, arg); end - def key_to_arg(node); end - def replacement(method); end - def single_element_array?(node); end - def valid_usage?(node); end -end - -RuboCop::Cop::RSpec::SingleArgumentMessageChain::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::SingleArgumentMessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base - def configured_response?(param0 = T.unsafe(nil)); end - def expectation(param0 = T.unsafe(nil)); end - def matcher_with_blockpass(param0 = T.unsafe(nil)); end - def matcher_with_configured_response(param0 = T.unsafe(nil)); end - def matcher_with_hash(param0 = T.unsafe(nil)); end - def matcher_with_return_block(param0 = T.unsafe(nil)); end - def message_expectation?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def msg(method_name); end - def on_expectation(expectation, method_name, matcher); end - def replacement(method_name); end -end - -RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::SubjectDeclaration < ::RuboCop::Cop::RSpec::Base - def offensive_subject_declaration?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def message_for(offense); end -end - -RuboCop::Cop::RSpec::SubjectDeclaration::MSG_LET = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::SubjectDeclaration::MSG_REDUNDANT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::SubjectStub < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - def let?(param0 = T.unsafe(nil)); end - def message_expectation?(param0 = T.unsafe(nil), param1); end - def message_expectation_matcher?(param0); end - def on_top_level_group(node); end - def subject?(param0 = T.unsafe(nil)); end - - private - - def find_all_explicit(node); end - def find_subject_expectations(node, subject_names = T.unsafe(nil), &block); end -end - -RuboCop::Cop::RSpec::SubjectStub::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::TopLevelGroup - extend ::RuboCop::AST::NodePattern::Macros - - def on_new_investigation; end - def top_level_groups; end - - private - - def on_top_level_example_group(_node); end - def on_top_level_group(_node); end - def root_node; end - def top_level_group?(node); end - def top_level_nodes(node); end -end - -class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base - def block_with_args?(node); end - def empty_exception_matcher?(node); end - def empty_raise_error_or_exception(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::UnspecifiedException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::RSpec::Variable - extend ::RuboCop::AST::NodePattern::Macros - - def variable_definition?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::RSpec::Variable::Helpers = RuboCop::RSpec::Language::Helpers -RuboCop::Cop::RSpec::Variable::Subjects = RuboCop::RSpec::Language::Subjects - -class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::Variable - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def correct_variable(variable); end - def string?(node); end - def style_violation?(variable); end - def symbol?(node); end -end - -RuboCop::Cop::RSpec::VariableDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RSpec::Variable - - def on_send(node); end - - private - - def message(style); end -end - -RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def verified_double(param0 = T.unsafe(nil)); end - - private - - def correct_style(violation); end - def opposing_style?(class_reference); end -end - -RuboCop::Cop::RSpec::VerifiedDoubleReference::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::VerifiedDoubleReference::REFERENCE_TYPE_STYLES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::RSpec::VerifiedDoubleReference::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base - def on_send(node); end - def unverified_double(param0 = T.unsafe(nil)); end - - private - - def symbol?(name); end -end - -RuboCop::Cop::RSpec::VerifiedDoubles::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::VerifiedDoubles::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base - def expect?(param0 = T.unsafe(nil)); end - def expect_block?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_send(node); end - - private - - def check_expect(node); end - def void?(expect); end -end - -RuboCop::Cop::RSpec::VoidExpect::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::RSpec::VoidExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_arg(param0 = T.unsafe(nil)); end - def block_call?(param0 = T.unsafe(nil), param1); end - def method_on_stub?(param0); end - def on_block(node); end - - private - - def autocorrect(corrector, node, range); end - def block_range(node); end - def calling_block?(node, block); end - def convert_block_to_yield(node); end - def generate_replacement(node); end -end - -RuboCop::Cop::RSpec::Yield::MSG = T.let(T.unsafe(nil), String) -RuboCop::NodePattern = RuboCop::AST::NodePattern -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource -module RuboCop::RSpec; end - -class RuboCop::RSpec::AlignLetBrace - include ::RuboCop::RSpec::Language - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - - def initialize(root, token); end - - def indent_for(node); end - def offending_tokens; end - - private - - def adjacent_let_chunks; end - def let_group_for(let); end - def let_token(node); end - def root; end - def single_line_lets; end - def target_column_for(let); end - def token; end -end - -RuboCop::RSpec::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -class RuboCop::RSpec::Concept - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::RSpec::Language::NodePattern - - def initialize(node); end - - def ==(other); end - def eql?(other); end - def hash; end - def to_node; end - - protected - - def node; end -end - -module RuboCop::RSpec::Corrector; end - -class RuboCop::RSpec::Corrector::MoveNode - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RSpec::CommentsHelp - - def initialize(node, corrector, processed_source); end - - def corrector; end - def move_after(other); end - def move_before(other); end - def original; end - def processed_source; end - - private - - def node_range(node); end - def node_range_with_surrounding_space(node); end - def source(node); end -end - -class RuboCop::RSpec::Example < ::RuboCop::RSpec::Concept - def definition; end - def doc_string; end - def extract_doc_string(param0 = T.unsafe(nil)); end - def extract_implementation(param0 = T.unsafe(nil)); end - def extract_metadata(param0 = T.unsafe(nil)); end - def implementation; end - def metadata; end -end - -class RuboCop::RSpec::ExampleGroup < ::RuboCop::RSpec::Concept - def examples; end - def hooks; end - def lets; end - def scope_change?(param0 = T.unsafe(nil)); end - def subjects; end - - private - - def find_all(node, predicate); end - def find_all_in_scope(node, predicate); end -end - -module RuboCop::RSpec::FactoryBot - class << self - def attribute_defining_methods; end - def reserved_methods; end - end -end - -RuboCop::RSpec::FactoryBot::ATTRIBUTE_DEFINING_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::RSpec::FactoryBot::DEFINITION_PROXY_METHODS = T.let(T.unsafe(nil), Array) - -module RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::AST::NodePattern::Macros - - def factory_bot?(param0 = T.unsafe(nil)); end -end - -RuboCop::RSpec::FactoryBot::RESERVED_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::RSpec::FactoryBot::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept - def example?; end - def extract_metadata(param0 = T.unsafe(nil)); end - def knowable_scope?; end - def metadata; end - def name; end - def scope; end - - private - - def scope_argument; end - def scope_name; end - def transform_metadata(meta); end - def transform_true(node); end - def valid_scope?(node); end -end - -module RuboCop::RSpec::Inject - class << self - def defaults!; end - end -end - -module RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::RSpec::Language::NodePattern - - def example?(param0 = T.unsafe(nil)); end - def example_group?(param0 = T.unsafe(nil)); end - def example_group_with_body?(param0 = T.unsafe(nil)); end - def hook?(param0 = T.unsafe(nil)); end - def include?(param0 = T.unsafe(nil)); end - def let?(param0 = T.unsafe(nil)); end - def rspec?(param0 = T.unsafe(nil)); end - def shared_group?(param0 = T.unsafe(nil)); end - def spec_group?(param0 = T.unsafe(nil)); end - def subject?(param0 = T.unsafe(nil)); end - - class << self - def config; end - def config=(_arg0); end - end -end - -module RuboCop::RSpec::Language::ALL - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Language::ExampleGroups - class << self - def all(element); end - def focused(element); end - def regular(element); end - def skipped(element); end - end -end - -module RuboCop::RSpec::Language::Examples - class << self - def all(element); end - def focused(element); end - def pending(element); end - def regular(element); end - def skipped(element); end - end -end - -module RuboCop::RSpec::Language::Expectations - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Language::Helpers - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Language::HookScopes - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Language::Hooks - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Language::Includes - class << self - def all(element); end - def context(element); end - def examples(element); end - end -end - -module RuboCop::RSpec::Language::NodePattern - def block_pattern(string); end - def numblock_pattern(string); end - def send_pattern(string); end -end - -module RuboCop::RSpec::Language::Runners - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Language::SharedGroups - class << self - def all(element); end - def context(element); end - def examples(element); end - end -end - -module RuboCop::RSpec::Language::Subjects - class << self - def all(element); end - end -end - -module RuboCop::RSpec::Node - def recursive_literal_or_const?; end -end - -RuboCop::RSpec::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) -module RuboCop::RSpec::Version; end -RuboCop::RSpec::Version::STRING = T.let(T.unsafe(nil), String) - -class RuboCop::RSpec::Wording - def initialize(text, ignore:, replace:); end - - def rewrite; end - - private - - def append_suffix(word, suffix); end - def ignored_word?(word); end - def ignores; end - def remove_should_and_pluralize; end - def replace_prefix(pattern, replacement); end - def replacements; end - def substitute(word); end - def text; end - def uppercase?(word); end -end - -RuboCop::RSpec::Wording::ES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::RSpec::Wording::IES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::RSpec::Wording::SHOULDNT_BE_PREFIX = T.let(T.unsafe(nil), Regexp) -RuboCop::RSpec::Wording::SHOULDNT_PREFIX = T.let(T.unsafe(nil), Regexp) -RuboCop::Token = RuboCop::AST::Token diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi deleted file mode 100644 index 40a3ed0..0000000 --- a/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +++ /dev/null @@ -1,318 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. - -module RuboCop; end -module RuboCop::Cop; end -RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods -RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern -module RuboCop::Cop::Sorbet; end - -class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop - def allow_incompatible?(param0); end - def allow_incompatible_override?(param0 = T.unsafe(nil)); end - def not_nil?(node); end - def on_send(node); end - def sig?(param0); end -end - -class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Cop - def autocorrect(node); end - def binding_unaliased_type?(param0 = T.unsafe(nil)); end - def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end - def generic_parameter_decl_block_call?(param0 = T.unsafe(nil)); end - def generic_parameter_decl_call?(param0 = T.unsafe(nil)); end - def method_needing_aliasing_on_t?(param0); end - def not_dynamic_type_creation_with_block?(node); end - def not_generic_parameter_decl?(node); end - def not_nil?(node); end - def not_t_let?(node); end - def on_casgn(node); end - def t_let?(param0 = T.unsafe(nil)); end - def using_deprecated_type_alias_syntax?(param0 = T.unsafe(nil)); end - def using_type_alias?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - def autocorrect(node); end - def on_send(node); end -end - -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop - include ::RuboCop::Cop::RangeHelp - - def offending_node(param0); end - def on_signature(node); end -end - -RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - def constant_from_string?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - def autocorrect(_node); end - def investigate(processed_source); end - - protected - - def check_magic_comments_order(tokens); end - def extract_magic_comments(processed_source); end -end - -RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def accessor?(param0 = T.unsafe(nil)); end - def autocorrect(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def on_signature(node); end - def scope(node); end - - private - - def check_node(node); end - def param_type_placeholder; end - def return_type_placeholder; end -end - -class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion - def initialize(indent, param_placeholder, return_placeholder); end - - def params; end - def params=(_arg0); end - def returns; end - def returns=(_arg0); end - def to_autocorrect; end - - private - - def generate_params; end - def generate_return; end -end - -class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - def autocorrect(_node); end - def investigate(processed_source); end - - protected - - def extract_all_sigils(processed_source); end -end - -class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop - include ::RuboCop::Cop::RangeHelp - - def autocorrect(node); end - def extend_t_helpers?(param0 = T.unsafe(nil)); end - def extend_t_sig?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop - def initialize(*_arg0); end - - def autocorrect(node); end - def not_lit_const_include?(param0 = T.unsafe(nil)); end - def on_send(node); end - def used_names; end - def used_names=(_arg0); end -end - -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop - include ::RuboCop::Cop::RangeHelp - - def investigate(processed_source); end - - private - - def allowed_paths; end -end - -class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop - def not_lit_const_superclass?(param0 = T.unsafe(nil)); end - def on_class(node); end -end - -RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop - def on_send(node); end - def t_unsafe?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Cop - def on_send(node); end - def t_untyped?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop - def on_class(node); end - def subclass_of_t_struct?(param0 = T.unsafe(nil)); end - def t_nilable_untyped(param0 = T.unsafe(nil)); end - def t_struct(param0 = T.unsafe(nil)); end - def t_untyped(param0 = T.unsafe(nil)); end - def untyped_props(param0); end -end - -RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil - def require_sigil_on_all_files?; end -end - -class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop - def on_signature(node); end - - private - - def check_order_for_kwoptargs(parameters); end -end - -module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour - def on_assignment(value); end - - class << self - def prepended(base); end - end -end - -class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - def abstract?(param0); end - def autocorrect(node); end - def more_than_one_ancestor(param0 = T.unsafe(nil)); end - def on_class(node); end - def on_module(node); end - def requires_ancestors(param0); end - - private - - def new_ra_line(indent_count); end - def process_node(node); end -end - -RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop - def autocorrect(node); end - def on_signature(node); end - def root_call(param0); end - - private - - def call_chain(sig_child_node); end - def can_autocorrect?; end - def node_reparsed_with_modern_features(node); end -end - -class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end -RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop - def allowed_recv(recv); end - def on_block(node); end - def on_signature(_); end - def signature?(param0 = T.unsafe(nil)); end - def with_runtime?(param0 = T.unsafe(nil)); end - def without_runtime?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Cop - def autocorrect(node); end - def on_class(node); end - def on_module(node); end - - protected - - def convert_newlines(source); end - def process_node(node); end -end - -RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil - def minimum_strictness; end -end - -class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Cop - def casgn_type_alias?(param0 = T.unsafe(nil)); end - def on_casgn(node); end -end - -RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - def autocorrect(_node); end - def investigate(processed_source); end - - protected - - def check_sigil_present(sigil); end - def check_strictness_level(sigil, strictness); end - def check_strictness_not_empty(sigil, strictness); end - def check_strictness_valid(sigil, strictness); end - def extract_sigil(processed_source); end - def extract_strictness(sigil); end - def minimum_strictness; end - def require_sigil_on_all_files?; end - def suggested_strictness; end - def suggested_strictness_level(minimum_strictness, suggested_strictness); end -end - -RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) -RuboCop::NodePattern = RuboCop::AST::NodePattern -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource -module RuboCop::Sorbet; end -RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) -RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) -class RuboCop::Sorbet::Error < ::StandardError; end - -module RuboCop::Sorbet::Inject - class << self - def defaults!; end - end -end - -RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) -RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) -RuboCop::Token = RuboCop::AST::Token diff --git a/sorbet/rbi/gems/rubocop@1.33.0.rbi b/sorbet/rbi/gems/rubocop@1.33.0.rbi deleted file mode 100644 index 1df27ee..0000000 --- a/sorbet/rbi/gems/rubocop@1.33.0.rbi +++ /dev/null @@ -1,13977 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop` gem. -# Please instead update this file by running `bin/tapioca gem rubocop`. - -module RuboCop; end - -class RuboCop::CLI - def initialize; end - - def config_store; end - def options; end - def run(args = T.unsafe(nil)); end - - private - - def act_on_options; end - def apply_default_formatter; end - def execute_runners; end - def handle_exiting_options; end - def parallel_by_default!; end - def run_command(name); end - def set_options_to_config_loader; end - def suggest_extensions; end - def validate_options_vs_config; end -end - -module RuboCop::CLI::Command - class << self - def run(env, name); end - - private - - def class_for(name); end - end -end - -class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base - def run; end - - private - - def add_formatter; end - def add_inheritance_from_auto_generated_file(config_file); end - def execute_runner; end - def existing_configuration(config_file); end - def line_length_cop(config); end - def line_length_enabled?(config); end - def max_line_length(config); end - def maybe_run_line_length_cop; end - def options_config_in_root?; end - def relative_path_to_todo_from_options_config; end - def reset_config_and_auto_gen_file; end - def run_all_cops(line_length_contents); end - def run_line_length_cop; end - def same_max_line_length?(config1, config2); end - def skip_line_length_cop(reason); end - def write_config_file(file_name, file_string, rubocop_yml_contents); end -end - -RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) -RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) - -class RuboCop::CLI::Command::Base - def initialize(env); end - - def env; end - - class << self - def by_command_name(name); end - def command_name; end - def command_name=(_arg0); end - def inherited(subclass); end - end -end - -class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base - include ::RuboCop::Formatter::TextUtil - - def run; end - - private - - def display_error_summary(errors); end - def display_summary(runner); end - def display_warning_summary(warnings); end - def execute_runner(paths); end - def maybe_print_corrected_source; end - def with_redirect; end -end - -RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) - -class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base - def run; end -end - -RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) - -class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base - def initialize(env); end - - def run; end - - private - - def config_lines(cop); end - def cops_of_department(cops, department); end - def print_available_cops; end - def print_cop_details(cops); end - def print_cops_of_department(registry, department, show_all); end - def selected_cops_of_department(cops, department); end -end - -class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base - def initialize(env); end - - def run; end - - private - - def cops_array; end - def print_documentation_url; end - def registry_hash; end -end - -class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base - def run; end - - private - - def current_formatter; end - def dependent_gems; end - def extensions; end - def installed_gems; end - def lockfile; end - def puts(*args); end - def skip?; end -end - -RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) - -class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base - def run; end -end - -RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) - -class RuboCop::CLI::Environment - def initialize(options, config_store, paths); end - - def config_store; end - def options; end - def paths; end - def run(name); end -end - -class RuboCop::CLI::Finished < ::StandardError; end -RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) -RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) -RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) -RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) - -class RuboCop::CacheConfig - class << self - def root_dir; end - end -end - -class RuboCop::CachedData - def initialize(filename); end - - def from_json(text); end - def to_json(offenses); end - - private - - def deserialize_offenses(offenses); end - def message(offense); end - def serialize_offense(offense); end -end - -class RuboCop::CommentConfig - def initialize(processed_source); end - - def comment_only_line?(line_number); end - def cop_disabled_line_ranges; end - def cop_enabled_at_line?(cop, line_number); end - def extra_enabled_comments; end - def processed_source; end - - private - - def analyze; end - def analyze_cop(analysis, directive); end - def analyze_disabled(analysis, directive); end - def analyze_rest(analysis, directive); end - def analyze_single_line(analysis, directive); end - def cop_line_ranges(analysis); end - def each_directive; end - def extra_enabled_comments_with_names(extras:, names:); end - def handle_enable_all(directive, names, extras); end - def handle_switch(directive, names, extras); end - def non_comment_token_line_numbers; end - def qualified_cop_name(cop_name); end -end - -class RuboCop::CommentConfig::CopAnalysis < ::Struct - def line_ranges; end - def line_ranges=(_); end - def start_line_number; end - def start_line_number=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Config - include ::RuboCop::PathUtil - include ::RuboCop::FileFinder - extend ::Forwardable - - def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - - def [](*args, &block); end - def []=(*args, &block); end - def active_support_extensions_enabled?; end - def add_excludes_from_higher_level(highest_config); end - def allowed_camel_case_file?(file); end - def base_dir_for_path_parameters; end - def bundler_lock_file_path; end - def check; end - def delete(*args, &block); end - def deprecation_check; end - def dig(*args, &block); end - def disabled_new_cops?; end - def each(*args, &block); end - def each_key(*args, &block); end - def enabled_new_cops?; end - def fetch(*args, &block); end - def file_to_exclude?(file); end - def file_to_include?(file); end - def for_all_cops; end - def for_badge(badge); end - def for_cop(cop); end - def for_department(department_name); end - def internal?; end - def key?(*args, &block); end - def keys(*args, &block); end - def loaded_features; end - def loaded_path; end - def make_excludes_absolute; end - def map(*args, &block); end - def merge(*args, &block); end - def path_relative_to_config(path); end - def patterns_to_exclude; end - def patterns_to_include; end - def pending_cops; end - def possibly_include_hidden?; end - def replace(*args, &block); end - def signature; end - def smart_loaded_path; end - def target_rails_version; end - def target_ruby_version(*args, &block); end - def to_h(*args, &block); end - def to_hash(*args, &block); end - def to_s; end - def transform_values(*args, &block); end - def validate(*args, &block); end - def validate_after_resolution; end - - private - - def department_of(qualified_cop_name); end - def enable_cop?(qualified_cop_name, cop_options); end - def read_rails_version_from_bundler_lock_file; end - def target_rails_version_from_bundler_lock_file; end - - class << self - def create(hash, path, check: T.unsafe(nil)); end - end -end - -class RuboCop::Config::CopConfig < ::Struct - def metadata; end - def metadata=(_); end - def name; end - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) - -class RuboCop::ConfigFinder - extend ::RuboCop::FileFinder - - class << self - def find_config_path(target_dir); end - def project_root; end - def project_root=(_arg0); end - - private - - def expand_path(path); end - def find_project_dotfile(target_dir); end - def find_project_root; end - def find_user_dotfile; end - def find_user_xdg_config; end - end -end - -RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) -RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigLoader - extend ::RuboCop::FileFinder - - class << self - def add_excludes_from_files(config, config_file); end - def add_loaded_features(loaded_features); end - def add_missing_namespaces(path, hash); end - def clear_options; end - def configuration_file_for(target_dir); end - def configuration_from_file(config_file, check: T.unsafe(nil)); end - def debug; end - def debug=(_arg0); end - def debug?; end - def default_configuration; end - def default_configuration=(_arg0); end - def disable_pending_cops; end - def disable_pending_cops=(_arg0); end - def enable_pending_cops; end - def enable_pending_cops=(_arg0); end - def ignore_parent_exclusion; end - def ignore_parent_exclusion=(_arg0); end - def ignore_parent_exclusion?; end - def ignore_unrecognized_cops; end - def ignore_unrecognized_cops=(_arg0); end - def load_file(file, check: T.unsafe(nil)); end - def load_yaml_configuration(absolute_path); end - def loaded_features; end - def merge(base_hash, derived_hash); end - def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - def possible_new_cops?(config); end - def warn_on_pending_cops(pending_cops); end - def warn_pending_cop(cop); end - - private - - def check_duplication(yaml_code, absolute_path); end - def file_path(file); end - def read_file(absolute_path); end - def resolver; end - def yaml_safe_load(yaml_code, filename); end - def yaml_safe_load!(yaml_code, filename); end - end -end - -RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigLoaderResolver - def fix_include_paths(base_config_path, hash, path, key, value); end - def merge(base_hash, derived_hash, **opts); end - def merge_with_default(config, config_file, unset_nil:); end - def override_department_setting_for_cops(base_hash, derived_hash); end - def override_enabled_for_disabled_departments(base_hash, derived_hash); end - def resolve_inheritance(path, hash, file, debug); end - def resolve_inheritance_from_gems(hash); end - def resolve_requires(path, hash); end - - private - - def base_configs(path, inherit_from, file); end - def determine_inherit_mode(hash, key); end - def disabled?(hash, department); end - def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end - def gem_config_path(gem_name, relative_config_path); end - def handle_disabled_by_default(config, new_default_configuration); end - def inherited_file(path, inherit_from, file); end - def merge_hashes?(base_hash, derived_hash, key); end - def remote_file?(uri); end - def should_merge?(mode, key); end - def should_override?(mode, key); end - def should_union?(derived_hash, base_hash, root_mode, key); end - def transform(config, &block); end - def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end -end - -class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end - -class RuboCop::ConfigObsoletion - def initialize(config); end - - def reject_obsolete!; end - def rules; end - def warnings; end - - private - - def load_cop_rules(rules); end - def load_parameter_rules(rules); end - def load_rules; end - def obsoletions; end - - class << self - def files; end - def files=(_arg0); end - def legacy_cop_names; end - end -end - -RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule - def message; end - def violated?; end - - private - - def value; end -end - -RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule - def message; end -end - -RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule - def initialize(config, old_name); end - - def cop_rule?; end - def message; end - def old_name; end - def violated?; end - def warning?; end -end - -RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, gem); end - - def department; end - def gem; end - def rule_message; end - def violated?; end - - private - - def affected_cops; end - def feature_loaded?; end -end - -RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) - -class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule - def initialize(config, cop, parameter, metadata); end - - def cop; end - def metadata; end - def parameter; end - def parameter_rule?; end - def violated?; end - def warning?; end - - private - - def alternative; end - def alternatives; end - def reason; end - def severity; end -end - -class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, metadata); end - - def metadata; end - def old_name; end - def rule_message; end - - private - - def alternatives; end - def reason; end -end - -RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, new_name); end - - def new_name; end - def rule_message; end - - private - - def moved?; end - def verb; end -end - -class RuboCop::ConfigObsoletion::Rule - def initialize(config); end - - def cop_rule?; end - def parameter_rule?; end - def violated?; end - - private - - def config; end - def smart_loaded_path; end - def to_sentence(collection, connector: T.unsafe(nil)); end -end - -class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule - def initialize(config, old_name, metadata); end - - def metadata; end - def rule_message; end - - private - - def alternatives; end -end - -class RuboCop::ConfigRegeneration - def options; end - - private - - def generation_command; end - def todo_exists?; end -end - -RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) -RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -class RuboCop::ConfigStore - def initialize; end - - def for(file_or_dir); end - def for_dir(dir); end - def for_file(file); end - def for_pwd; end - def force_default_config!; end - def options_config=(options_config); end - def unvalidated; end - def validated; end - def validated?; end -end - -class RuboCop::ConfigValidator - extend ::Forwardable - - def initialize(config); end - - def for_all_cops(*args, &block); end - def smart_loaded_path(*args, &block); end - def target_ruby_version; end - def validate; end - def validate_after_resolution; end - def validate_section_presence(name); end - - private - - def alert_about_unrecognized_cops(invalid_cop_names); end - def check_cop_config_value(hash, parent = T.unsafe(nil)); end - def check_obsoletions; end - def check_target_ruby; end - def each_invalid_parameter(cop_name); end - def list_unknown_cops(invalid_cop_names); end - def msg_not_boolean(parent, key, value); end - def reject_conflicting_safe_settings; end - def reject_mutually_exclusive_defaults; end - def suggestion(name); end - def target_ruby; end - def validate_enforced_styles(valid_cop_names); end - def validate_new_cops_parameter; end - def validate_parameter_names(valid_cop_names); end - def validate_support_and_has_list(name, formats, valid); end - def validate_syntax_cop; end -end - -RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) -RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) -RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) -RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) -module RuboCop::Cop; end - -module RuboCop::Cop::Alignment - private - - def check_alignment(items, base_column = T.unsafe(nil)); end - def column_delta; end - def configured_indentation_width; end - def display_column(range); end - def each_bad_alignment(items, base_column); end - def end_of_line_comment(line); end - def indentation(node); end - def offset(node); end - def register_offense(offense_node, message_node); end - def within?(inner, outer); end -end - -RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::AlignmentCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::Alignment - - class << self - def align_end(corrector, processed_source, node, align_to); end - def correct(corrector, processed_source, node, column_delta); end - def processed_source; end - - private - - def alignment_column(align_to); end - def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end - def block_comment_within?(expr); end - def calculate_range(expr, line_begin_pos, column_delta); end - def delimited_string_literal?(node); end - def each_line(expr); end - def inside_string_range(node); end - def inside_string_ranges(node); end - def remove(range, corrector); end - def whitespace_range(node); end - end -end - -module RuboCop::Cop::AllowedIdentifiers - def allowed_identifier?(name); end - def allowed_identifiers; end -end - -RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::AllowedMethods - private - - def allowed_method?(name); end - def allowed_methods; end - def cop_config_deprecated_values; end - def ignored_method?(name); end -end - -module RuboCop::Cop::AllowedPattern - private - - def allowed_line?(line); end - def allowed_patterns; end - def cop_config_deprecated_methods_values; end - def ignored_line?(line); end - def matches_allowed_pattern?(line); end - def matches_ignored_pattern?(line); end -end - -class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error - def initialize(name, origin, badges); end -end - -RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::AnnotationComment - extend ::Forwardable - - def initialize(comment, keywords); end - - def annotation?; end - def bounds; end - def colon; end - def comment; end - def correct?(colon:); end - def keyword; end - def margin; end - def note; end - def space; end - - private - - def just_keyword_of_sentence?; end - def keyword_appearance?; end - def keywords; end - def split_comment(comment); end -end - -module RuboCop::Cop::ArrayMinSize - private - - def array_style_detected(style, ary_size); end - def below_array_length?(node); end - def largest_brackets_size(style, ary_size); end - def min_size_config; end - def smallest_percent_size(style, ary_size); end -end - -module RuboCop::Cop::ArraySyntax - private - - def bracketed_array_of?(element_type, node); end -end - -module RuboCop::Cop::AutoCorrector - def support_autocorrect?; end -end - -module RuboCop::Cop::AutocorrectLogic - def autocorrect?; end - def autocorrect_enabled?; end - def autocorrect_requested?; end - def autocorrect_with_disable_uncorrectable?; end - def correctable?; end - def disable_uncorrectable?; end - def safe_autocorrect?; end - - private - - def disable_offense(range); end - def disable_offense_at_end_of_line(range, eol_comment); end - def disable_offense_before_and_after(range_by_lines); end - def max_line_length; end - def range_by_lines(range); end - def range_of_first_line(range); end - def surrounding_heredoc(offense_range); end -end - -class RuboCop::Cop::Badge - def initialize(class_name_parts); end - - def ==(other); end - def cop_name; end - def department; end - def eql?(other); end - def hash; end - def match?(other); end - def qualified?; end - def to_s; end - def with_department(department); end - - class << self - def camel_case(name_part); end - def for(class_name); end - def parse(identifier); end - end -end - -class RuboCop::Cop::Base - include ::RuboCop::AST::Sexp - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - include ::RuboCop::Cop::IgnoredNode - include ::RuboCop::Cop::AutocorrectLogic - extend ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def active_support_extensions_enabled?; end - def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end - def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - def callbacks_needed; end - def config; end - def config_to_allow_offenses; end - def config_to_allow_offenses=(hash); end - def cop_config; end - def cop_name; end - def excluded_file?(file); end - def external_dependency_checksum; end - def message(_range = T.unsafe(nil)); end - def name; end - def offenses; end - def on_investigation_end; end - def on_new_investigation; end - def on_other_file; end - def parse(source, path = T.unsafe(nil)); end - def processed_source; end - def ready; end - def relevant_file?(file); end - def target_rails_version; end - def target_ruby_version; end - - private - - def annotate(message); end - def apply_correction(corrector); end - def attempt_correction(range, corrector); end - def begin_investigation(processed_source); end - def callback_argument(range); end - def complete_investigation; end - def correct(range); end - def current_offense_locations; end - def currently_disabled_lines; end - def custom_severity; end - def default_severity; end - def disable_uncorrectable(range); end - def enabled_line?(line_number); end - def file_name_matches_any?(file, parameter, default_result); end - def find_message(range, message); end - def find_severity(_range, severity); end - def range_from_node_or_range(node_or_range); end - def reset_investigation; end - def use_corrector(range, corrector); end - - class << self - def autocorrect_incompatible_with; end - def badge; end - def callbacks_needed; end - def cop_name; end - def department; end - def documentation_url; end - def exclude_from_registry; end - def inherited(subclass); end - def joining_forces; end - def lint?; end - def match?(given_names); end - def support_autocorrect?; end - def support_multiple_source?; end - - private - - def builtin?; end - def restrict_on_send; end - end -end - -class RuboCop::Cop::Base::InvestigationReport < ::Struct - def cop; end - def cop=(_); end - def corrector; end - def corrector=(_); end - def offenses; end - def offenses=(_); end - def processed_source; end - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -module RuboCop::Cop::Bundler; end - -class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def gem_declarations(param0); end - def on_new_investigation; end - - private - - def conditional_declaration?(nodes); end - def duplicated_gem_nodes; end - def register_offense(node, gem_name, line_of_first_occurrence); end - def within_conditional?(node, conditional_node); end -end - -RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::DefNode - include ::RuboCop::Cop::GemDeclaration - - def on_send(node); end - - private - - def checked_options_present?(node); end - def commented?(node); end - def commented_any_descendant?(node); end - def contains_checked_options?(node); end - def gem_options(node); end - def ignored_gem?(node); end - def precede?(node1, node2); end - def preceding_comment?(node1, node2); end - def preceding_lines(node); end - def restrictive_version_specified_gem?(node); end - def version_specified_gem?(node); end -end - -RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def expected_gemfile?(basename); end - def gemfile_offense?(basename); end - def gemfile_required?; end - def gems_rb_offense?(basename); end - def gems_rb_required?; end - def register_gemfile_offense(file_path, basename); end - def register_gems_rb_offense(file_path, basename); end - def register_offense(file_path, basename); end -end - -RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemDeclaration - - def includes_commit_reference?(param0 = T.unsafe(nil)); end - def includes_version_specification?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_gem?(node); end - def allowed_gems; end - def forbidden_offense?(node); end - def forbidden_style?; end - def message(range); end - def offense?(node); end - def required_offense?(node); end - def required_style?; end - def version_specification?(expression); end -end - -RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def insecure_protocol_source?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allow_http_protocol?; end -end - -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::AutoCorrector - - def gem_declarations(param0); end - def on_new_investigation; end - - private - - def previous_declaration(node); end -end - -RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::CheckAssignment - def on_and_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end - def on_send(node); end - - private - - def extract_rhs(node); end - - class << self - def extract_rhs(node); end - end -end - -module RuboCop::Cop::CheckLineBreakable - def extract_breakable_node(node, max); end - - private - - def all_on_same_line?(nodes); end - def already_on_multiple_lines?(node); end - def breakable_collection?(node, elements); end - def children_could_be_broken_up?(children); end - def contained_by_breakable_collection_on_same_line?(node); end - def contained_by_multiline_collection_that_could_be_broken_up?(node); end - def extract_breakable_node_from_elements(node, elements, max); end - def extract_first_element_over_column_limit(node, elements, max); end - def first_argument_is_heredoc?(node); end - def process_args(args); end - def safe_to_ignore?(node); end - def shift_elements_for_heredoc_arg(node, elements, index); end - def within_column_limit?(element, max, line); end -end - -module RuboCop::Cop::CodeLength - extend ::RuboCop::ExcludeLimit - - def max=(value); end - - private - - def build_code_length_calculator(node); end - def check_code_length(node); end - def count_as_one; end - def count_comments?; end - def irrelevant_line(source_line); end - def max_length; end - def message(length, max_length); end -end - -RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::CommentsHelp - def comments_in_range(node); end - def contains_comments?(node); end - def source_range_with_comment(node); end - - private - - def begin_pos_with_comment(node); end - def buffer; end - def end_position_for(node); end - def find_end_line(node); end - def start_line_position(node); end -end - -class RuboCop::Cop::Commissioner - include ::RuboCop::AST::Traversal - - def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end - - def errors; end - def investigate(processed_source); end - def on___ENCODING__(node); end - def on___FILE__(node); end - def on___LINE__(node); end - def on_alias(node); end - def on_and(node); end - def on_and_asgn(node); end - def on_arg(node); end - def on_arg_expr(node); end - def on_args(node); end - def on_array(node); end - def on_array_pattern(node); end - def on_array_pattern_with_tail(node); end - def on_back_ref(node); end - def on_begin(node); end - def on_block(node); end - def on_block_pass(node); end - def on_blockarg(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_cbase(node); end - def on_class(node); end - def on_complex(node); end - def on_const(node); end - def on_const_pattern(node); end - def on_csend(node); end - def on_cvar(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defined?(node); end - def on_defs(node); end - def on_dstr(node); end - def on_dsym(node); end - def on_eflipflop(node); end - def on_empty_else(node); end - def on_ensure(node); end - def on_erange(node); end - def on_false(node); end - def on_find_pattern(node); end - def on_float(node); end - def on_for(node); end - def on_forward_arg(node); end - def on_forward_args(node); end - def on_forwarded_args(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def on_hash(node); end - def on_hash_pattern(node); end - def on_if(node); end - def on_if_guard(node); end - def on_iflipflop(node); end - def on_in_match(node); end - def on_in_pattern(node); end - def on_index(node); end - def on_indexasgn(node); end - def on_int(node); end - def on_irange(node); end - def on_ivar(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwargs(node); end - def on_kwbegin(node); end - def on_kwnilarg(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_kwsplat(node); end - def on_lambda(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_alt(node); end - def on_match_as(node); end - def on_match_current_line(node); end - def on_match_nil_pattern(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_match_rest(node); end - def on_match_var(node); end - def on_match_with_lvasgn(node); end - def on_match_with_trailing_comma(node); end - def on_mlhs(node); end - def on_module(node); end - def on_next(node); end - def on_nil(node); end - def on_not(node); end - def on_nth_ref(node); end - def on_numblock(node); end - def on_op_asgn(node); end - def on_optarg(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_pin(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_procarg0(node); end - def on_rational(node); end - def on_redo(node); end - def on_regexp(node); end - def on_regopt(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_restarg(node); end - def on_retry(node); end - def on_return(node); end - def on_sclass(node); end - def on_self(node); end - def on_send(node); end - def on_shadowarg(node); end - def on_splat(node); end - def on_str(node); end - def on_super(node); end - def on_sym(node); end - def on_true(node); end - def on_undef(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_until_post(node); end - def on_when(node); end - def on_while(node); end - def on_while_post(node); end - def on_xstr(node); end - def on_yield(node); end - def on_zsuper(node); end - - private - - def build_callbacks(cops); end - def initialize_callbacks; end - def invoke(callback, cops, *args); end - def reset; end - def restrict_callbacks(callbacks); end - def restricted_map(callbacks); end - def trigger_responding_cops(callback, node); end - def trigger_restricted_cops(event, node); end - def with_cop_error_handling(cop, node = T.unsafe(nil)); end -end - -class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct - def cop_reports; end - def cop_reports=(_); end - def cops; end - def correctors; end - def errors; end - def errors=(_); end - def merge(investigation); end - def offenses; end - def offenses_per_cop; end - def processed_source; end - def processed_source=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::ConditionCorrector - class << self - def correct_negative_condition(corrector, node); end - - private - - def negated_condition(node); end - end -end - -module RuboCop::Cop::ConfigurableEnforcedStyle - def alternative_style; end - def alternative_styles; end - def ambiguous_style_detected(*possibilities); end - def conflicting_styles_detected; end - def correct_style_detected; end - def detected_style; end - def detected_style=(style); end - def no_acceptable_style!; end - def no_acceptable_style?; end - def opposite_style_detected; end - def style; end - def style_configured?; end - def style_detected(detected); end - def style_parameter_name; end - def supported_styles; end - def unexpected_style_detected(unexpected); end - def unrecognized_style_detected; end -end - -module RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def check_name(node, name, name_range); end - def class_emitter_method?(node, name); end - def report_opposing_styles(node, name); end - def valid_name?(node, name, given_style = T.unsafe(nil)); end -end - -module RuboCop::Cop::ConfigurableMax - private - - def max=(value); end - def max_parameter_name; end -end - -module RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) - -module RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting -end - -RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end - def corrections; end - def find_location(node, loc); end - def offenses; end - def on_investigation_end; end - def on_new_investigation; end - def support_autocorrect?; end - - private - - def apply_correction(corrector); end - def begin_investigation(processed_source); end - def callback_argument(_range); end - def correction_lambda; end - def dedup_on_node(node); end - def emulate_v0_callsequence(corrector); end - def suppress_clobbering; end - - class << self - def all; end - def joining_forces; end - def qualified_cop_name(name, origin); end - def registry; end - def support_autocorrect?; end - end -end - -class RuboCop::Cop::Cop::Correction < ::Struct - def call(corrector); end - def cop; end - def cop=(_); end - def lambda; end - def lambda=(_); end - def node; end - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter - def initialize(source); end - - def remove_leading(node_or_range, size); end - def remove_preceding(node_or_range, size); end - def remove_trailing(node_or_range, size); end - def rewrite; end - - private - - def check_range_validity(node_or_range); end - def to_range(node_or_range); end - def validate_buffer(buffer); end - - class << self - def source_buffer(source); end - end -end - -RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) - -module RuboCop::Cop::DefNode - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - def non_public_modifier?(param0 = T.unsafe(nil)); end - - private - - def non_public?(node); end - def preceding_non_public_modifier?(node); end -end - -module RuboCop::Cop::Documentation - private - - def base_url_for(cop_class, config); end - def default_base_url; end - def department_to_basename(department); end - def url_for(cop_class, config = T.unsafe(nil)); end - - class << self - def base_url_for(cop_class, config); end - def default_base_url; end - def department_to_basename(department); end - def url_for(cop_class, config = T.unsafe(nil)); end - end -end - -module RuboCop::Cop::DocumentationComment - extend ::RuboCop::AST::NodePattern::Macros - - private - - def annotation_keywords; end - def documentation_comment?(node); end - def interpreter_directive_comment?(comment); end - def precede?(node1, node2); end - def preceding_comment?(node1, node2); end - def preceding_lines(node); end - def rubocop_directive_comment?(comment); end -end - -module RuboCop::Cop::Duplication - private - - def consecutive_duplicates(collection); end - def duplicates(collection); end - def duplicates?(collection); end - def grouped_duplicates(collection); end -end - -class RuboCop::Cop::EachToForCorrector - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(block_node); end - - def call(corrector); end - - private - - def argument_node; end - def block_node; end - def collection_node; end - def correction; end - def offending_range; end - def replacement_range(end_pos); end -end - -RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) -RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::EmptyLineCorrector - class << self - def correct(corrector, node); end - def insert_before(corrector, node); end - end -end - -module RuboCop::Cop::EmptyParameter - extend ::RuboCop::AST::NodePattern::Macros - - def empty_arguments?(param0 = T.unsafe(nil)); end - - private - - def check(node); end -end - -module RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - def accept_end_kw_alignment?(end_loc); end - def add_offense_for_misalignment(node, align_with); end - def check_end_kw_alignment(node, align_ranges); end - def check_end_kw_in_node(node); end - def line_break_before_keyword?(whole_expression, rhs); end - def matching_ranges(end_loc, align_ranges); end - def start_line_range(node); end - def style_parameter_name; end - def variable_alignment?(whole_expression, rhs, end_alignment_style); end -end - -RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::EnforceSuperclass - def on_class(node); end - def on_send(node); end - - class << self - def included(base); end - end -end - -module RuboCop::Cop::FirstElementLineBreak - private - - def check_children_line_break(node, children, start = T.unsafe(nil)); end - def check_method_line_break(node, children); end - def first_by_line(nodes); end - def last_by_line(nodes); end - def method_uses_parens?(node, limit); end -end - -class RuboCop::Cop::ForToEachCorrector - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(for_node); end - - def call(corrector); end - - private - - def collection_end; end - def collection_node; end - def collection_source; end - def correction; end - def end_position; end - def for_node; end - def keyword_begin; end - def offending_range; end - def replacement_range(end_pos); end - def requires_parentheses?; end - def variable_node; end -end - -RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Force - def initialize(cops); end - - def cops; end - def investigate(_processed_source); end - def name; end - def run_hook(method_name, *args); end - - class << self - def all; end - def force_name; end - def inherited(subclass); end - end -end - -module RuboCop::Cop::FrozenStringLiteral - private - - def frozen_heredoc?(node); end - def frozen_string_literal?(node); end - def frozen_string_literal_comment_exists?; end - def frozen_string_literal_specified?; end - def frozen_string_literals_disabled?; end - def frozen_string_literals_enabled?; end - def leading_comment_lines; end - def uninterpolated_string?(node); end - - class << self - def frozen_string_literal_comment_exists?; end - end -end - -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL = T.let(T.unsafe(nil), String) -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::GemDeclaration - extend ::RuboCop::AST::NodePattern::Macros - - def gem_declaration?(param0 = T.unsafe(nil)); end -end - -module RuboCop::Cop::Gemspec; end - -class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::GemspecHelp - - def add_dependency_method_declarations(param0); end - def includes_commit_reference?(param0 = T.unsafe(nil)); end - def includes_version_specification?(param0 = T.unsafe(nil)); end - def on_new_investigation; end - - private - - def add_dependency_method?(method_name); end - def add_dependency_method_nodes; end - def allowed_gem?(node); end - def allowed_gems; end - def forbidden_offense?(node); end - def forbidden_style?; end - def match_block_variable_name?(receiver_name); end - def message(range); end - def offense?(node); end - def required_offense?(node); end - def required_style?; end - def version_specification?(expression); end -end - -RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def gem_specification(param0 = T.unsafe(nil)); end - def on_block(block_node); end - - private - - def format_message_from; end - def node_and_method_name(node, attribute); end - def use_deprecated_attributes?(node, block_parameter); end -end - -RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::GemspecHelp - - def assignment_method_declarations(param0); end - def on_new_investigation; end - - private - - def duplicated_assignment_method_nodes; end - def match_block_variable_name?(receiver_name); end - def register_offense(node, assignment, line_of_first_occurrence); end -end - -RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::AutoCorrector - - def dependency_declarations(param0); end - def on_new_investigation; end - - private - - def get_dependency_name(node); end - def previous_declaration(node); end -end - -RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - extend ::RuboCop::Cop::AutoCorrector - - def metadata(param0 = T.unsafe(nil)); end - def on_block(node); end - def rubygems_mfa_required(param0); end - def true_string?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node, block_var, metadata); end - def change_value(corrector, value); end - def correct_metadata(corrector, metadata); end - def insert_mfa_required(corrector, node, block_var); end - def mfa_value(metadata_value); end -end - -RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def defined_ruby_version(param0 = T.unsafe(nil)); end - def on_new_investigation; end - def on_send(node); end - def required_ruby_version?(param0); end - - private - - def dynamic_version?(node); end - def extract_ruby_version(required_ruby_version); end - def not_equal_message(required_ruby_version, target_ruby_version); end -end - -RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::GemspecHelp - - def on_const(node); end - def ruby_version?(param0 = T.unsafe(nil)); end - - private - - def gem_spec_with_ruby_version?(node); end -end - -RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::GemspecHelp - extend ::RuboCop::AST::NodePattern::Macros - - def gem_specification(param0); end - def gem_specification?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Generator - def initialize(name, output: T.unsafe(nil)); end - - def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end - def inject_require(root_file_path: T.unsafe(nil)); end - def todo; end - def write_source; end - def write_spec; end - - private - - def badge; end - def generate(template); end - def generated_source; end - def generated_spec; end - def output; end - def snake_case(camel_case_string); end - def source_path; end - def spec_path; end - def write_unless_file_exists(path, contents); end -end - -RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Generator::ConfigurationInjector - def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end - - def inject; end - - private - - def badge; end - def configuration_entries; end - def configuration_file_path; end - def cop_name_line?(yaml); end - def find_target_line; end - def new_configuration_entry; end - def output; end - def version_added; end -end - -RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Generator::RequireFileInjector - def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end - - def inject; end - - private - - def injectable_require_directive; end - def output; end - def require_entries; end - def require_exists?; end - def require_path; end - def require_path_fragments(require_directove); end - def root_file_path; end - def source_path; end - def target_line; end - def updated_directives; end -end - -RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) -module RuboCop::Cop::HashAlignmentStyles; end - -class RuboCop::Cop::HashAlignmentStyles::KeyAlignment - def checkable_layout?(_node); end - def deltas(first_pair, current_pair); end - def deltas_for_first_pair(first_pair, _node); end - - private - - def separator_delta(pair); end - def value_delta(pair); end -end - -class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment - def deltas(first_pair, current_pair); end -end - -class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - def deltas_for_first_pair(*_nodes); end - - private - - def hash_rocket_delta(first_pair, current_pair); end - def key_delta(first_pair, current_pair); end - def value_delta(first_pair, current_pair); end -end - -class RuboCop::Cop::HashAlignmentStyles::TableAlignment - include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment - - def initialize; end - - def deltas_for_first_pair(first_pair, node); end - - private - - def hash_rocket_delta(first_pair, current_pair); end - def key_delta(first_pair, current_pair); end - def max_key_width; end - def max_key_width=(_arg0); end - def value_delta(first_pair, current_pair); end -end - -module RuboCop::Cop::HashAlignmentStyles::ValueAlignment - def checkable_layout?(node); end - def deltas(first_pair, current_pair); end - - private - - def separator_delta(first_pair, current_pair, key_delta); end -end - -module RuboCop::Cop::HashShorthandSyntax - def on_pair(node); end - - private - - def enforced_shorthand_syntax; end - def ignore_hash_shorthand_syntax?(pair_node); end - def register_offense(node, message, replacement); end - def require_hash_value?(hash_key_source, node); end - def require_hash_value_for_around_hash_literal?(node); end - def use_element_of_hash_literal_as_receiver?(ancestor, parent); end - def use_modifier_form_without_parenthesized_method_call?(ancestor); end - def without_parentheses_call_expr_follows?(ancestor); end -end - -RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::HashTransformMethod - extend ::RuboCop::AST::NodePattern::Macros - - def array_receiver?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_csend(node); end - def on_send(node); end - - private - - def execute_correction(corrector, node, correction); end - def extract_captures(_match); end - def handle_possible_offense(node, match, match_desc); end - def new_method_name; end - def on_bad_each_with_object(_node); end - def on_bad_hash_brackets_map(_node); end - def on_bad_map_to_h(_node); end - def on_bad_to_h(_node); end - def prepare_correction(node); end -end - -class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct - def block_node; end - def block_node=(_); end - def leading; end - def leading=(_); end - def match; end - def match=(_); end - def set_new_arg_name(transformed_argname, corrector); end - def set_new_body_expression(transforming_body_expr, corrector); end - def set_new_method_name(new_method_name, corrector); end - def strip_prefix_and_suffix(node, corrector); end - def trailing; end - def trailing=(_); end - - class << self - def [](*_arg0); end - def from_each_with_object(node, match); end - def from_hash_brackets_map(node, match); end - def from_map_to_h(node, match); end - def from_to_h(node, match); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::HashTransformMethod::Captures < ::Struct - def noop_transformation?; end - def transformation_uses_both_args?; end - def transformed_argname; end - def transformed_argname=(_); end - def transforming_body_expr; end - def transforming_body_expr=(_); end - def unchanged_body_expr; end - def unchanged_body_expr=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Heredoc - def on_dstr(node); end - def on_heredoc(_node); end - def on_str(node); end - def on_xstr(node); end - - private - - def delimiter_string(node); end - def heredoc_type(node); end - def indent_level(str); end -end - -RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::IfThenCorrector - def initialize(if_node, indentation: T.unsafe(nil)); end - - def call(corrector); end - - private - - def branch_body_indentation; end - def if_node; end - def indentation; end - def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end - def rewrite_else_branch(else_branch, indentation); end -end - -RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods - -module RuboCop::Cop::IgnoredNode - def ignore_node(node); end - def ignored_node?(node); end - def part_of_ignored_node?(node); end - - private - - def ignored_nodes; end -end - -RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern - -module RuboCop::Cop::IntegerNode - private - - def integer_part(node); end -end - -module RuboCop::Cop::Interpolation - def on_dstr(node); end - def on_dsym(node); end - def on_node_with_interpolations(node); end - def on_regexp(node); end - def on_xstr(node); end -end - -class RuboCop::Cop::LambdaLiteralToMethodCorrector - def initialize(block_node); end - - def call(corrector); end - - private - - def arg_to_unparenthesized_call?; end - def arguments; end - def arguments_begin_pos; end - def arguments_end_pos; end - def block_begin; end - def block_end; end - def block_node; end - def insert_arguments(corrector); end - def insert_separating_space(corrector); end - def lambda_arg_string; end - def method; end - def needs_separating_space?; end - def remove_arguments(corrector); end - def remove_leading_whitespace(corrector); end - def remove_trailing_whitespace(corrector); end - def remove_unparenthesized_whitespace(corrector); end - def replace_delimiters(corrector); end - def replace_selector(corrector); end - def selector_end; end - def separating_space?; end -end - -module RuboCop::Cop::Layout; end - -class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - - private - - def autocorrect(corrector, node); end - def check_body(body, node); end - def check_modifier(send_node, end_range); end - def expected_indent_offset; end - def message(range); end - def unexpected_indent_offset; end -end - -RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def arguments_or_first_arg_pairs(node); end - def arguments_with_last_arg_pairs(node); end - def autocorrect(corrector, node); end - def autocorrect_incompatible_with_other_cops?; end - def base_column(node, first_argument); end - def enforce_hash_argument_with_separator?; end - def fixed_indentation?; end - def flattened_arguments(node); end - def hash_argument_config; end - def message(_node); end - def multiple_arguments?(node); end - def target_method_lineno(node); end - def with_first_argument_style?; end -end - -RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def autocorrect(corrector, node); end - def base_column(node, args); end - def fixed_indentation?; end - def message(_range); end - def target_method_lineno(node); end -end - -RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - private - - def autocorrect(corrector, node); end - def check_assignment(node, rhs); end - def leftmost_multiple_assignment(node); end -end - -RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_kwbegin(node); end - - private - - def alignment_node(node); end - def autocorrect(corrector, node); end - def check_begin_alignment(node); end -end - -RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_end_align_target?(param0 = T.unsafe(nil), param1); end - def on_block(node); end - def style_parameter_name; end - - private - - def add_space_before(corrector, loc, delta); end - def alt_start_msg(start_loc, source_line_column); end - def autocorrect(corrector, node); end - def block_end_align_target(node); end - def check_block_alignment(start_node, block_node); end - def compute_do_source_line_column(node, end_loc); end - def compute_start_col(ancestor_node, node); end - def disqualified_parent?(parent, node); end - def end_align_target?(node, parent); end - def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - def format_source_line_column(source_line_column); end - def loc_to_source_line_column(loc); end - def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - def remove_space_before(corrector, end_pos, delta); end - def start_for_block_node(block_node); end -end - -RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def end_of_method_chain(node); end - def last_heredoc_argument(node); end - def message(node); end - def offense_range(node); end - def register_offense(node); end -end - -RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(case_node); end - def on_case_match(case_match_node); end - - private - - def base_column(case_node, base); end - def check_when(when_node, branch_type); end - def detect_incorrect_style(when_node); end - def end_and_last_conditional_same_line?(node); end - def enforced_style_end?; end - def incorrect_style(when_node, branch_type); end - def indent_one_step?; end - def indentation_width; end - def replacement(node); end - def whitespace_range(node); end -end - -RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - def dynamic_constant?(param0 = T.unsafe(nil)); end - def on_class(class_node); end - - private - - def autocorrect(corrector, node); end - def begin_pos_with_comment(node); end - def buffer; end - def categories; end - def class_elements(class_node); end - def classify(node); end - def end_position_for(node); end - def expected_order; end - def find_category(node); end - def find_heredoc(node); end - def humanize_node(node); end - def ignore?(classification); end - def ignore_for_autocorrect?(node, sibling); end - def source_range_with_comment(node); end - def start_line_position(node); end - def walk_over_nested_class_definition(class_node); end - def whole_line_comment_at_line?(line); end -end - -RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def argument_indentation_correct?(node); end - def closing_indentation(node); end - def find_node_used_heredoc_argument(node); end - def heredoc_closing(node); end - def heredoc_opening(node); end - def indent_level(source_line); end - def indented_end(node); end - def message(node); end - def opening_indentation(node); end -end - -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_begin(node); end - def on_csend(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def all_elements_aligned?(elements); end - def autocorrect(corrector, node); end - def check(node, elements); end - def check_for_elements(node, elements); end - def check_for_no_elements(node); end - def correct_column_candidates(node, left_paren); end - def expected_column(left_paren, elements); end - def first_argument_line(elements); end - def indentation_width; end - def line_break_after_left_paren?(left_paren, elements); end - def message(correct_column, left_paren, right_paren); end -end - -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, comment); end - def autocorrect_one(corrector, comment); end - def autocorrect_preceding_comments(corrector, comment); end - def check(comment, comment_index); end - def correct_indentation(next_line); end - def correctly_aligned_with_preceding_comment?(comment_index, column); end - def less_indented?(line); end - def line_after_comment(comment); end - def message(column, correct_comment_indentation); end - def own_line_comment?(comment); end - def should_correct?(preceding_comment, reference_comment); end - def two_alternatives?(line); end -end - -RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def check(node); end - def message(condition); end -end - -RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def ampersand_dot?(node); end - def autocorrect(corrector, dot, node); end - def correct_dot_position_style?(dot_line, selector_line); end - def end_range(node); end - def heredoc?(node); end - def last_heredoc_line(node); end - def line_between?(first_line, second_line); end - def message(dot); end - def proper_dot_position?(node); end - def receiver_end_line(node); end - def selector_range(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_case_match(node); end - def on_if(node, base = T.unsafe(nil)); end - def on_rescue(node); end - - private - - def assignment_node(node); end - def autocorrect(corrector, node); end - def base_for_method_definition(node); end - def base_range_of_if(node, base); end - def base_range_of_rescue(node); end - def check_alignment(base_range, else_range); end - def check_assignment(node, rhs); end - def check_nested(node, base); end -end - -RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def allow_border_comment?; end - def allow_margin_comment?; end - def autocorrect(corrector, node); end - def comment_text(comment); end - def concat_consecutive_comments(comments); end - def current_token(comment); end - def empty_comment_only?(comment_text); end - def investigate(comments); end - def previous_token(node); end -end - -RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - def on_if(node); end - - private - - def autocorrect(corrector, node); end - def contains_guard_clause?(node); end - def correct_style?(node); end - def heredoc?(node); end - def heredoc_line(node, heredoc_node); end - def last_heredoc_argument(node); end - def last_heredoc_argument_node(node); end - def multiple_statements_on_line?(node); end - def next_line_empty?(line); end - def next_line_empty_or_enable_directive_comment?(line); end - def next_line_enable_directive_comment?(line); end - def next_line_rescue_or_ensure?(node); end - def next_sibling_empty_or_guard_clause?(node); end - def next_sibling_parent_empty_or_else?(node); end - def offense_location(node); end -end - -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def last_magic_comment(source); end - def offending_range(last_magic_comment); end -end - -RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_if(node); end - def on_rescue(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def autocorrect(node); end - def check_condition(condition); end - def multiline_rescue_exceptions?(exception_nodes); end - def multiline_when_condition?(when_node); end - def next_line_empty?(line); end -end - -RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, prev_def, node, count); end - def check_defs(nodes); end - def on_begin(node); end - - private - - def allowance_range?; end - def autocorrect_insert_lines(corrector, newline_pos, count); end - def autocorrect_remove_lines(corrector, newline_pos, count); end - def blank_lines_count_between(first_def_node, second_def_node); end - def candidate?(node); end - def class_candidate?(node); end - def def_end(node); end - def def_start(node); end - def end_loc(node); end - def expected_lines; end - def line_count_allowed?(count); end - def lines_between_defs(first_def_node, second_def_node); end - def maximum_empty_lines; end - def message(node, count: T.unsafe(nil)); end - def method_candidate?(node); end - def minimum_empty_lines; end - def module_candidate?(node); end - def multiple_blank_lines_groups?(first_def_node, second_def_node); end - def node_type(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def each_extra_empty_line(lines); end - def exceeds_line_offset?(line_diff); end - def previous_and_current_lines_empty?(line); end -end - -RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_block(node); end - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - def on_send(node); end - - private - - def allowed_only_before_style?(node); end - def block_start?(line); end - def body_end?(line); end - def class_def?(line); end - def correct_next_line_if_denied_style(corrector, node, line); end - def empty_lines_around?(node); end - def expected_empty_lines?(node); end - def message(node); end - def message_for_around_style(node); end - def message_for_only_before_style(node); end - def next_empty_line_range(node); end - def next_line_empty?(last_send_line); end - def previous_line_empty?(send_line); end - def previous_line_ignoring_comments(processed_source, send_line); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def empty_lines(node); end - def extra_lines(node); end - def inner_lines(node); end - def line_numbers(node); end - def outer_lines(node); end - def processed_lines(node); end - def receiver_and_method_call_on_different_lines?(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def allow_alias?(node); end - def allow_alias_syntax?; end - def attribute_or_allowed_method?(node); end - def autocorrect(corrector, node); end - def next_line_empty?(line); end - def next_line_empty_or_enable_directive_comment?(line); end - def next_line_enable_directive_comment?(line); end - def next_line_node(node); end - def require_empty_line?(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_kwbegin(node); end - - private - - def style; end -end - -RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Layout::EmptyLinesAroundBody - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::AST::NodePattern::Macros - - def constant_definition?(param0 = T.unsafe(nil)); end - def empty_line_required?(param0 = T.unsafe(nil)); end - - private - - def check(node, body, adjusted_first_line: T.unsafe(nil)); end - def check_beginning(style, first_line); end - def check_both(style, first_line, last_line); end - def check_deferred_empty_line(body); end - def check_empty_lines_except_namespace(body, first_line, last_line); end - def check_empty_lines_special(body, first_line, last_line); end - def check_ending(style, last_line); end - def check_line(style, line, msg); end - def check_source(style, line_no, desc); end - def deferred_message(node); end - def first_child_requires_empty_line?(body); end - def first_empty_line_required_child(body); end - def message(type, desc); end - def namespace?(body, with_one_child: T.unsafe(nil)); end - def previous_line_ignoring_comments(send_line); end - def valid_body_style?(body); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_sclass(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def on_kwbegin(node); end - - private - - def check_body(body, line_of_def_or_kwbegin); end - def keyword_locations(node); end - def keyword_locations_in_ensure(node); end - def keyword_locations_in_rescue(node); end - def last_rescue_and_end_on_same_line(body); end - def message(location, keyword); end - def style; end -end - -RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def style; end -end - -RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Layout::EmptyLinesAroundBody - extend ::RuboCop::Cop::AutoCorrector - - def on_module(node); end -end - -RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_class(node); end - def on_if(node); end - def on_module(node); end - def on_until(node); end - def on_while(node); end - - private - - def alignment_node(node); end - def alignment_node_for_variable_style(node); end - def asgn_variable_align_with(outer_node, inner_node); end - def assignment_or_operator_method(node); end - def autocorrect(corrector, node); end - def check_asgn_alignment(outer_node, inner_node); end - def check_assignment(node, rhs); end - def check_other_alignment(node); end -end - -class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - def offense_message(line); end - def on_new_investigation; end - def unimportant_missing_cr?(index, last_line, line); end - - private - - def last_line(processed_source); end -end - -RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def align_column(asgn_token); end - def align_equal_sign(corrector, token, align_to); end - def align_equal_signs(range, corrector); end - def aligned_locations(locs); end - def aligned_tok?(token); end - def all_relevant_assignment_lines(line_number); end - def allow_for_trailing_comments?; end - def check_assignment(token); end - def check_other(token1, token2, ast); end - def check_tokens(ast, token1, token2); end - def extra_space_range(token1, token2); end - def force_equal_sign_alignment?; end - def ignored_range?(ast, start_pos); end - def ignored_ranges(ast); end -end - -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def eligible_method_call?(param0 = T.unsafe(nil)); end - def on_csend(node); end - def on_send(node); end - - private - - def argument_alignment_config; end - def autocorrect(corrector, node); end - def bare_operator?(node); end - def base_indentation(node); end - def base_range(send_node, arg_node); end - def column_of(range); end - def comment_lines; end - def enable_layout_first_method_argument_line_break?; end - def enforce_first_argument_with_fixed_indentation?; end - def message(arg_node); end - def on_new_investigation; end - def previous_code_line(line_number); end - def special_inner_call_indentation?(node); end -end - -RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_csend(node); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def base_description(indent_base_type); end - def brace_alignment_style; end - def check(array_node, left_parenthesis); end - def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - def message(base_description); end - def message_for_right_bracket(indent_base_type); end -end - -RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def assignment_on_same_line?(node); end -end - -RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_hash(node); end - def on_send(node); end - - private - - def argument_alignment_config; end - def autocorrect(corrector, node); end - def base_description(indent_base_type); end - def brace_alignment_style; end - def check(hash_node, left_parenthesis); end - def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end - def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end - def enforce_first_argument_with_fixed_indentation?; end - def message(base_description); end - def message_for_right_brace(indent_base_type); end - def separator_style?(first_pair); end -end - -RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end -end - -RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - def on_super(node); end -end - -RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FirstElementLineBreak - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineElementIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def autocorrect(corrector, node); end - def base_description(_); end - def brace_alignment_style; end - def check(def_node); end - def message(base_description); end -end - -RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashAlignmentStyles - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def column_deltas; end - def column_deltas=(_arg0); end - def offenses_by; end - def offenses_by=(_arg0); end - def on_hash(node); end - def on_send(node); end - def on_super(node); end - def on_yield(node); end - - private - - def add_offenses; end - def adjust(corrector, delta, range); end - def alignment_for(pair); end - def alignment_for_colons; end - def alignment_for_hash_rockets; end - def argument_alignment_config; end - def argument_before_hash(hash_node); end - def autocorrect_incompatible_with_other_cops?(node); end - def check_delta(delta, node:, alignment:); end - def check_pairs(node); end - def correct_key_value(corrector, delta, key, value, separator); end - def correct_no_value(corrector, key_delta, key); end - def correct_node(corrector, node, delta); end - def double_splat?(node); end - def enforce_first_argument_with_fixed_indentation?; end - def good_alignment?(column_deltas); end - def ignore_hash_argument?(node); end - def new_alignment(key); end - def register_offenses_with_format(offenses, format); end - def reset!; end -end - -RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def add_correct_closing_paren(node, corrector); end - def add_correct_external_trailing_comma(node, corrector); end - def autocorrect(corrector, node); end - def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end - def external_trailing_comma?(node); end - def external_trailing_comma_offset_from_loc_end(node); end - def extract_heredoc(node); end - def extract_heredoc_argument(node); end - def find_most_bottom_of_heredoc_end(arguments); end - def fix_closing_parenthesis(node, corrector); end - def fix_external_trailing_comma(node, corrector); end - def heredoc_node?(node); end - def incorrect_parenthesis_removal_begin(node); end - def incorrect_parenthesis_removal_end(node); end - def internal_trailing_comma?(node); end - def internal_trailing_comma_offset_from_last_arg(node); end - def outermost_send_on_same_line(heredoc); end - def remove_incorrect_closing_paren(node, corrector); end - def remove_incorrect_external_trailing_comma(node, corrector); end - def remove_internal_trailing_comma(node, corrector); end - def safe_to_remove_line_containing_closing_paren?(node); end - def send_missing_closing_parens?(parent, child, heredoc); end - def single_line_send_with_heredoc_receiver?(node); end - def space?(pos); end - def subsequent_closing_parentheses_in_same_line?(outermost_send); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def adjust_minus(corrector, node); end - def adjust_squiggly(corrector, node); end - def base_indent_level(node); end - def heredoc_body(node); end - def heredoc_end(node); end - def heredoc_indent_type(node); end - def indentation_width; end - def indented_body(node); end - def indented_end(node); end - def line_too_long?(node); end - def longest_line(lines); end - def max_line_length; end - def message(heredoc_indent_type); end - def register_offense(node, heredoc_indent_type); end - def type_message(indentation_width, current_indent_type); end - def unlimited_heredoc_length?; end - def width_message(indentation_width); end -end - -RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_begin(node); end - def on_kwbegin(node); end - - private - - def autocorrect(corrector, node); end - def bare_access_modifier?(node); end - def base_column_for_normal_style(node); end - def check(node); end - def check_indented_internal_methods_style(node); end - def check_normal_style(node); end -end - -RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, range); end - def autocorrect_lambda_for_spaces(corrector, range); end - def autocorrect_lambda_for_tabs(corrector, range); end - def find_offense(line, lineno); end - def in_string_literal?(ranges, tabs_range); end - def message(_node); end - def string_literal_ranges(ast); end -end - -RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def access_modifier?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_case(case_node); end - def on_case_match(case_match); end - def on_class(node); end - def on_csend(node); end - def on_def(node); end - def on_defs(node); end - def on_ensure(node); end - def on_for(node); end - def on_if(node, base = T.unsafe(nil)); end - def on_kwbegin(node); end - def on_module(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_sclass(node); end - def on_send(node); end - def on_until(node, base = T.unsafe(nil)); end - def on_while(node, base = T.unsafe(nil)); end - - private - - def access_modifier_indentation_style; end - def autocorrect(corrector, node); end - def check_assignment(node, rhs); end - def check_if(node, body, else_clause, base_loc); end - def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - def check_members(base, members); end - def check_members_for_indented_internal_methods_style(members); end - def check_members_for_normal_style(base, members); end - def check_rescue?(rescue_node); end - def configured_indentation_width; end - def each_member(members); end - def indentation_consistency_style; end - def indentation_to_check?(base_loc, body_node); end - def indented_internal_methods_style?; end - def leftmost_modifier_of(node); end - def message(configured_indentation_width, indentation, name); end - def offending_range(body_node, indentation); end - def offense(body_node, indentation, style); end - def other_offense_in_same_range?(node); end - def select_check_member(member); end - def skip_check?(base_loc, body_node); end - def special_modifier?(node); end - def starts_with_access_modifier?(body_node); end -end - -RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def first_token; end - def space_before(token); end -end - -RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def allow_doxygen_comment?; end - def allow_gemfile_ruby_comment?; end - def allowed_on_first_line?(comment); end - def doxygen_comment_style?(comment); end - def gemfile?; end - def gemfile_ruby_comment?(comment); end - def hash_mark(expr); end - def rackup_config_file?; end - def rackup_options?(comment); end - def ruby_comment_in_gemfile?(comment); end - def shebang?(comment); end -end - -RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end -end - -RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_dstr(node); end - - private - - def continuation?(line); end - def enforced_style_leading?; end - def investigate_leading_style(first_line, end_of_first_line); end - def investigate_trailing_style(second_line, end_of_first_line); end - def leading_offense_range(end_of_first_line, matches); end - def message(_range); end - def raw_lines(node); end - def trailing_offense_range(end_of_first_line, matches); end -end - -class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, range); end - def comment_ranges(comments); end - def find_offensive_spacing(line); end - def ignore_range?(backtick_range); end - def investigate(line, line_number); end - def last_line(processed_source); end - def message(_range); end - def no_space_style?; end - def space_style?; end - def string_literal_ranges(ast); end -end - -class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def on_dstr(node); end - - private - - def add_offense_and_correction(node, message); end - def always_indented?(dstr_node); end - def base_column(child); end - def check_aligned(children, start_index); end - def check_indented(children); end - def strings_concatenated_with_backslash?(dstr_node); end -end - -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckLineBreakable - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::LineLengthHelp - extend ::RuboCop::Cop::AutoCorrector - - def max=(value); end - def on_array(node); end - def on_block(node); end - def on_def(node); end - def on_hash(node); end - def on_investigation_end; end - def on_new_investigation; end - def on_potential_breakable_node(node); end - def on_send(node); end - - private - - def allow_heredoc?; end - def allowed_heredoc; end - def allowed_line?(line, line_index); end - def breakable_block_range(block_node); end - def breakable_range; end - def breakable_range=(_arg0); end - def breakable_range_after_semicolon(semicolon_token); end - def breakable_range_by_line_index; end - def check_directive_line(line, line_index); end - def check_for_breakable_block(block_node); end - def check_for_breakable_node(node); end - def check_for_breakable_semicolons(processed_source); end - def check_line(line, line_index); end - def check_uri_line(line, line_index); end - def excess_range(uri_range, line, line_index); end - def extract_heredocs(ast); end - def heredocs; end - def highlight_start(line); end - def line_in_heredoc?(line_number); end - def line_in_permitted_heredoc?(line_number); end - def max; end - def register_offense(loc, line, line_index, length: T.unsafe(nil)); end - def shebang?(line, line_index); end -end - -RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end -end - -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end -end - -RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def check_assignment(node, rhs); end - def check_by_enforced_style(node, rhs); end - def check_new_line_offense(node, rhs); end - def check_same_line_offense(node, rhs); end - - private - - def supported_types; end -end - -RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def add_offense_for_expression(node, expr, msg); end - def args_on_beginning_line?(node); end - def autocorrect(corrector, node); end - def autocorrect_arguments(corrector, node); end - def autocorrect_body(corrector, node, block_body); end - def block_arg_string(node, args); end - def characters_needed_for_space_and_pipes(node); end - def include_trailing_comma?(args); end - def line_break_necessary_in_args?(node); end - def needed_length_for_args(node); end -end - -RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) - -class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end -end - -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - - private - - def starts_with_curly_brace?(node); end -end - -RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def children(node); end - def ignored_literal?(node); end - def single_line_ignoring_receiver?(node); end -end - -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - def validate_config; end - - private - - def align_with_base_message(rhs); end - def alignment_base(node, rhs, given_style); end - def autocorrect(corrector, node); end - def base_source; end - def extra_indentation(given_style, parent); end - def first_call_has_a_dot(node); end - def get_dot_right_above(node); end - def message(node, lhs, rhs); end - def no_base_message(lhs, rhs, node); end - def offending_range(node, lhs, rhs, given_style); end - def operation_rhs(node); end - def operator_rhs?(node, receiver); end - def receiver_alignment_base(node); end - def relative_to_receiver_message(rhs); end - def relevant_node?(send_node); end - def right_hand_side(send_node); end - def semantic_alignment_base(node, rhs); end - def semantic_alignment_node(node); end - def should_align_with_base?; end - def should_indent_relative_to_receiver?; end - def syntactic_alignment_base(lhs, rhs); end -end - -class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MultilineElementLineBreaks - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end -end - -RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::MultilineExpressionIndentation - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_or(node); end - def validate_config; end - - private - - def autocorrect(corrector, node); end - def check_and_or(node); end - def message(node, lhs, rhs); end - def offending_range(node, lhs, rhs, given_style); end - def relevant_node?(node); end - def right_hand_side(send_node); end - def should_align?(node, rhs, given_style); end -end - -class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def autocorrect(corrector, node); end - def base_column(node, args); end - def fixed_indentation?; end - def message(_node); end - def target_method_lineno(node); end -end - -RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CheckAssignment - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def check_assignment(node, _rhs); end - def comment_within?(node); end - def configured_to_not_be_inspected?(node); end - def convertible_block?(node); end - def max_line_length; end - def offense?(node); end - def other_cop_takes_precedence?(node); end - def register_offense(node); end - def single_line_block_chain_enabled?; end - def suitable_as_single_line?(node); end - def to_single_line(source); end - def too_long?(node); end -end - -RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::EndKeywordAlignment - extend ::RuboCop::Cop::AutoCorrector - - def on_ensure(node); end - def on_new_investigation; end - def on_resbody(node); end - - private - - def access_modifier?(node); end - def access_modifier_node(node); end - def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end - def aligned_with_line_break_method?(ancestor_node, node); end - def alignment_location(alignment_node); end - def alignment_node(node); end - def alignment_source(node, starting_loc); end - def ancestor_node(node); end - def assignment_node(node); end - def autocorrect(corrector, node, alignment_location); end - def begin_end_alignment_style; end - def check(node); end - def format_message(alignment_node, alignment_loc, kw_loc); end - def modifier?(node); end - def whitespace_range(node); end -end - -RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end - def offending_range(node); end - def selector_range(node); end -end - -RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_kwoptarg(node); end - def on_pair(node); end - - private - - def followed_by_space?(colon); end - def register_offense(colon); end -end - -RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end - def space_style_before_rcurly; end -end - -class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def whitespace_after_operator?(node); end -end - -RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SpaceAfterPunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end - def space_style_before_rcurly; end -end - -class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def check_after_closing_pipe(arguments); end - def check_arg(arg); end - def check_closing_pipe_space(arguments, closing_pipe); end - def check_each_arg(args); end - def check_inside_pipes(arguments); end - def check_no_space(space_begin_pos, space_end_pos, msg); end - def check_no_space_style_inside_pipes(arguments); end - def check_opening_pipe_space(arguments, opening_pipe); end - def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end - def check_space_style_inside_pipes(arguments); end - def last_end_pos_inside_pipes(arguments, range); end - def pipes(arguments); end - def pipes?(arguments); end - def style_parameter_name; end -end - -class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_optarg(node); end - - private - - def autocorrect(corrector, range); end - def check_optarg(arg, equals, value); end - def incorrect_style_detected(arg, value); end - def message(_node); end - def no_surrounding_space?(arg, equals); end - def space_on_both_sides?(arg, equals); end -end - -RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_block(node); end - def on_break(node); end - def on_case(node); end - def on_case_match(node); end - def on_defined?(node); end - def on_ensure(node); end - def on_for(node); end - def on_if(node); end - def on_if_guard(node); end - def on_in_pattern(node); end - def on_kwbegin(node); end - def on_match_pattern(node); end - def on_match_pattern_p(node); end - def on_next(node); end - def on_or(node); end - def on_postexe(node); end - def on_preexe(node); end - def on_resbody(node); end - def on_rescue(node); end - def on_return(node); end - def on_send(node); end - def on_super(node); end - def on_unless_guard(node); end - def on_until(node); end - def on_when(node); end - def on_while(node); end - def on_yield(node); end - def on_zsuper(node); end - - private - - def accept_left_parenthesis?(range); end - def accept_left_square_bracket?(range); end - def accept_namespace_operator?(range); end - def accepted_opening_delimiter?(range, char); end - def check(node, locations, begin_keyword = T.unsafe(nil)); end - def check_begin(node, range, begin_keyword); end - def check_end(node, range, begin_keyword); end - def check_keyword(node, range); end - def do?(node); end - def namespace_operator?(range, pos); end - def preceded_by_operator?(node, _range); end - def safe_navigation_call?(range, pos); end - def space_after_missing?(range); end - def space_before_missing?(range); end -end - -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_const(node); end - def on_csend(node); end - def on_send(node); end - - private - - def check_space(begin_pos, end_pos); end - def check_space_after_dot(node); end - def check_space_after_double_colon(node); end - def check_space_before_dot(node); end -end - -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RationalLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_and_asgn(node); end - def on_assignment(node); end - def on_binary(node); end - def on_casgn(node); end - def on_class(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_if(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_match_pattern(node); end - def on_op_asgn(node); end - def on_or(node); end - def on_or_asgn(node); end - def on_pair(node); end - def on_resbody(node); end - def on_sclass(node); end - def on_send(node); end - def on_special_asgn(node); end - - private - - def align_hash_cop_config; end - def autocorrect(corrector, range); end - def check_operator(type, operator, right_operand); end - def enclose_operator_with_space(corrector, range); end - def excess_leading_space?(type, operator, with_space); end - def excess_trailing_space?(right_operand, with_space); end - def force_equal_sign_alignment?; end - def hash_table_style?; end - def offense(type, operator, with_space, right_operand); end - def offense_message(type, operator, with_space, right_operand); end - def operator_with_regular_syntax?(send_node); end - def regular_operator?(send_node); end - def should_not_have_surrounding_space?(operator); end - def space_around_exponent_operator?; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, range); end - def block_delimiters_style; end - def check_empty(left_brace, space_plus_brace, used_style); end - def check_non_empty(left_brace, space_plus_brace, used_style); end - def conflict_with_block_delimiters?(node); end - def empty_braces?(loc); end - def space_detected(left_brace, space_plus_brace); end - def space_missing(left_brace); end - def style_for_empty_braces; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def dot_before_brackets?(node, receiver_end_pos, selector_begin_pos); end - def offense_range(node, begin_pos); end - def offense_range_for_assignment(node, begin_pos); end - def reference_variable_with_brackets?(node); end - def register_offense(range); end -end - -RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end -end - -class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end -end - -RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base - include ::RuboCop::Cop::PrecedingFollowingAlignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def expect_params_after_method_name?(node); end - def no_space_between_method_name_and_first_argument?(node); end - def regular_method_call_with_arguments?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SpaceBeforePunctuation - extend ::RuboCop::Cop::AutoCorrector - - def kind(token); end -end - -class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def arrow_lambda_with_args?(node); end - def lambda_arguments(node); end - def range_of_offense(node); end - def space_after_arrow(lambda_node); end - def space_after_arrow?(lambda_node); end -end - -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def array_brackets(node); end - def autocorrect(corrector, node); end - def compact(corrector, bracket, side); end - def compact_corrections(corrector, node, left, right); end - def compact_offense(node, token, side: T.unsafe(nil)); end - def compact_offenses(node, left, right, start_ok, end_ok); end - def empty_config; end - def end_has_own_line?(token); end - def index_for(node, token); end - def issue_offenses(node, left, right, start_ok, end_ok); end - def left_array_bracket(node); end - def line_and_column_for(token); end - def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end - def next_to_bracket?(token, side: T.unsafe(nil)); end - def next_to_comment?(node, token); end - def next_to_newline?(node, token); end - def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end - def right_array_bracket(node); end -end - -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - - private - - def each_unnecessary_space_match(node, &blk); end -end - -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_numblock(node); end - - private - - def adjacent_braces(left_brace, right_brace); end - def aligned_braces?(left_brace, right_brace); end - def braces_with_contents_inside(node, inner); end - def check_inside(node, left_brace, right_brace); end - def check_left_brace(inner, left_brace, args_delimiter); end - def check_right_brace(inner, left_brace, right_brace, single_line); end - def multiline_block?(left_brace, right_brace); end - def no_space(begin_pos, end_pos, msg); end - def no_space_inside_left_brace(left_brace, args_delimiter); end - def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end - def pipe?(args_delimiter); end - def space(begin_pos, end_pos, msg); end - def space_inside_left_brace(left_brace, args_delimiter); end - def space_inside_right_brace(right_brace); end - def style_for_empty_braces; end -end - -class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - - private - - def ambiguous_or_unexpected_style_detected(style, is_match); end - def autocorrect(corrector, range); end - def check(token1, token2); end - def expect_space?(token1, token2); end - def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end - def message(brace, is_empty_braces, expect_space); end - def offense?(token1, expect_space); end - def range_of_space_to_the_left(range); end - def range_of_space_to_the_right(range); end - def space_range(token_range); end -end - -RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def can_be_ignored?(token1, token2); end - def correct_extaneus_space_between_consecutive_parens(token1, token2); end - def correct_extraneous_space(tokens); end - def correct_extraneous_space_in_empty_parens(token1, token2); end - def correct_missing_space(token1, token2); end - def left_parens?(token1, token2); end - def parens?(token1, token2); end - def process_with_compact_style(tokens); end - def process_with_space_style(tokens); end - def right_parens?(token1, token2); end -end - -RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::MatchRange - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - def on_xstr(node); end - - private - - def add_offenses_for_unnecessary_spaces(node); end - def regex_matches(node, &blk); end -end - -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_erange(node); end - def on_irange(node); end - - private - - def check(node); end -end - -RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def closing_bracket(tokens, opening_bracket); end - def empty_config; end - def left_ref_bracket(node, tokens); end - def previous_token(current_token); end - def reference_brackets(node); end -end - -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end - - private - - def autocorrect(corrector, begin_node); end - def delimiters(begin_node); end -end - -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::NO_SPACE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::SPACE_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def ends_in_end?(processed_source); end - def message(wanted_blank_lines, blank_lines); end - def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end -end - -class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::Heredoc - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(_node); end - def on_new_investigation; end - - private - - def extract_heredocs(ast); end - def find_heredoc(line_number); end - def offense_range(lineno, line); end - def process_line(line, lineno); end - def process_line_in_heredoc(corrector, range, heredoc); end - def skip_heredoc?; end - def static?(heredoc); end - def whitespace_is_indentation?(range, level); end - def whitespace_only?(range); end -end - -RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) -module RuboCop::Cop::Legacy; end - -class RuboCop::Cop::Legacy::CorrectionsProxy - def initialize(corrector); end - - def <<(callable); end - def concat(corrections); end - def empty?; end - - protected - - def corrector; end - - private - - def suppress_clobbering; end -end - -class RuboCop::Cop::LineBreakCorrector - extend ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::TrailingBody - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end - def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end - def move_comment(eol_comment:, node:, corrector:); end - def processed_source; end - - private - - def remove_semicolon(node, corrector); end - def semicolon(node); end - def trailing_class_definition?(token, body); end - end -end - -module RuboCop::Cop::LineLengthHelp - private - - def allow_uri?; end - def allowed_uri_position?(line, uri_range); end - def directive_on_source_line?(line_index); end - def extend_uri_end_position(line, end_position); end - def find_excessive_uri_range(line); end - def ignore_cop_directives?; end - def indentation_difference(line); end - def line_length(line); end - def line_length_without_directive(line); end - def match_uris(string); end - def tab_indentation_width; end - def uri_regexp; end - def valid_uri?(uri_ish_string); end -end - -module RuboCop::Cop::Lint; end - -class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - - private - - def rhs(node); end -end - -RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - def on_csend(node); end - def on_send(node); end - - private - - def allowed_method_pattern?(node); end - def ambiguous_block_association?(send_node); end - def message(send_node); end -end - -RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def find_offense_node_by(diagnostic); end - def message(diagnostic); end - def offense_node(node); end - def offense_position?(node, diagnostic); end - def unary_operator?(node, diagnostic); end -end - -RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_new_investigation; end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def greater_precedence?(node1, node2); end - def operator?(node); end - def operator_name(node); end - def precedence(node); end -end - -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_erange(node); end - def on_irange(node); end - - private - - def acceptable?(node); end - def acceptable_call?(node); end - def each_boundary(range); end - def require_parentheses_for_method_chain?; end -end - -RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def find_offense_node(node, regexp_receiver); end - def find_offense_node_by(diagnostic); end - def first_argument_is_regexp?(node); end - def method_chain_to_regexp_receiver?(node, regexp_receiver); end -end - -RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def allowed_construct?(asgn_node); end - def conditional_assignment?(asgn_node); end - def message(_node); end - def skip_children?(asgn_node); end - def traverse_node(node, &block); end -end - -RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def big_decimal_new(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base - def on_and(node); end - def on_or(node); end - def on_send(node); end -end - -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::ALLOWED_MATH_OPERATORS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def boolean_symbol?(param0 = T.unsafe(nil)); end - def on_sym(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - def on_kwoptarg(node); end - def on_optarg(node); end - - private - - def check_for_circular_argument_references(arg_name, arg_value); end -end - -RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - def constant_assigned_in_block?(param0 = T.unsafe(nil)); end - def module_defined_in_block?(param0 = T.unsafe(nil)); end - def on_casgn(node); end - def on_class(node); end - def on_module(node); end - - private - - def method_name(node); end -end - -RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - def overwritten_constant(param0 = T.unsafe(nil)); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base - def on_const(node); end - def unqualified_const?(param0 = T.unsafe(nil)); end - - private - - def allowed_names; end - def const_name?(name); end - def ignored_names; end -end - -RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - def kernel?(param0 = T.unsafe(nil)); end - def on_send(node); end - def valid_receiver?(param0 = T.unsafe(nil), param1); end - - private - - def debugger_method?(send_node); end - def debugger_methods; end - def message(node); end -end - -RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def check(node); end - def replacement(deprecated); end -end - -RuboCop::Cop::Lint::DeprecatedClassMethods::CLASS_METHOD_DELIMETER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedClassMethods::DEPRECATED_METHODS_OBJECT = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Lint::DeprecatedClassMethods::DeprecatedClassMethod - include ::RuboCop::AST::Sexp - - def initialize(method, class_constant: T.unsafe(nil), correctable: T.unsafe(nil)); end - - def class_constant; end - def class_nodes; end - def correctable?; end - def method; end - def to_s; end - - private - - def delimiter; end -end - -RuboCop::Cop::Lint::DeprecatedClassMethods::INSTANCE_METHOD_DELIMETER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::DeprecatedClassMethods::Replacement - def initialize(method, class_constant: T.unsafe(nil), instance_method: T.unsafe(nil)); end - - def class_constant; end - def method; end - def to_s; end - - private - - def delimiter; end - def instance_method?; end -end - -class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_const(node); end - - private - - def constant_name(node, nested_constant_name); end - def deprecated_constants; end - def message(good, bad, deprecated_version); end -end - -RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def algorithm_const(param0 = T.unsafe(nil)); end - def digest_const?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def algorithm_name(node); end - def autocorrect(corrector, node); end - def build_cipher_arguments(node, algorithm_name, no_arguments); end - def correction_range(node); end - def message(node); end - def openssl_class(node); end - def replacement_args(node); end - def sanitize_arguments(arguments); end -end - -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - - private - - def check(node); end - def check_body(body); end - def check_body_lines(lines); end - def check_disjunctive_assignment(node); end -end - -RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - - def on_branching_statement(node); end - def on_case(node); end - def on_case_match(node); end - def on_if(node); end - def on_rescue(node); end - - private - - def branches(node); end - def consider_branch?(branch); end - def const_branch?(branch); end - def ignore_constant_branches?; end - def ignore_literal_branches?; end - def literal_branch?(branch); end - def offense_range(duplicate_branch); end -end - -RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - def on_case(case_node); end -end - -RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base - def on_if(node); end -end - -RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Duplication - - def on_hash(node); end -end - -RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def alias_method?(param0 = T.unsafe(nil)); end - def method_alias?(param0 = T.unsafe(nil)); end - def on_alias(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def sym_name(param0 = T.unsafe(nil)); end - - private - - def check_const_receiver(node, name, const_name); end - def check_self_receiver(node, name); end - def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - def found_instance_method(node, name); end - def found_method(node, method_name); end - def lookup_constant(node, const_name); end - def message_for_dup(node, method_name); end - def on_attr(node, attr_name, args); end - def possible_dsl?(node); end - def qualified_name(enclosing, namespace, mod_name); end - def source_location(node); end -end - -RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def each_repeated_character_class_element_loc(node); end - def on_regexp(node); end - - private - - def interpolation_locs(node); end - def within_interpolation?(node, child); end -end - -RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - def on_send(node); end - def require_call?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - - def on_rescue(node); end -end - -RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - def each_with_object?(param0 = T.unsafe(nil)); end - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def autocorrect(corrector, node, first_else); end - def check(node); end - def check_else(node); end - def indentation_width; end -end - -RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base - def on_block(node); end - - private - - def allow_comment?(node); end - def allow_empty_lambdas?; end - def comment_disables_cop?(comment); end - def lambda_or_proc?(node); end -end - -RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base - def on_class(node); end - def on_sclass(node); end - - private - - def body_or_allowed_comment_lines?(node); end -end - -RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def autocorrect(corrector, node); end - def branch_range(node); end - def correct_other_branches(corrector, node); end - def deletion_range(range); end - def remove_comments(corrector, node); end - def remove_empty_branch(corrector, node); end -end - -RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_ensure(node); end -end - -RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base - def on_begin(node); end - - private - - def empty_expression?(begin_node); end -end - -RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def contains_only_comments?; end - def empty_file?; end - def offending?; end -end - -RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - extend ::RuboCop::Cop::TargetRubyVersion - - def on_case_match(node); end -end - -RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end -end - -RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - - def on_case(node); end -end - -RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_ensure(node); end -end - -RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def arguments_range(node); end - def autocorrect(corrector, node); end - def build_kwargs(node); end - def correct_arguments?(arguments); end - def override_by_legacy_args(kwargs, node); end -end - -RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base - def on_eflipflop(node); end - def on_iflipflop(node); end -end - -RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - def on_send(node); end - - private - - def check_numeric_returning_method(node); end - def check_send(node); end - def float?(node); end -end - -RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - def on_float(node); end -end - -RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - def called_on_string?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def count_format_matches(node); end - def count_matches(node); end - def count_percent_matches(node); end - def countable_format?(node); end - def countable_percent?(node); end - def expected_fields_count(node); end - def format?(node); end - def format_method?(name, node); end - def format_string?(node); end - def heredoc?(node); end - def invalid_format_string?(node); end - def matched_arguments_count?(expected, passed); end - def message(node); end - def method_with_format_args?(node); end - def offending_node?(node); end - def percent?(node); end - def splat_args?(node); end - def sprintf?(node); end -end - -RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base - def id_as_hash_key?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def all_on_same_line?(nodes); end - def autocorrect(corrector, node, heredoc); end - def call_after_heredoc_range(heredoc); end - def call_end_pos(node); end - def call_line_range(node); end - def call_range_to_safely_reposition(node, heredoc); end - def calls_on_multiple_lines?(node, _heredoc); end - def correctly_positioned?(node, heredoc); end - def heredoc_begin_line_range(heredoc); end - def heredoc_end_pos(heredoc); end - def heredoc_node?(node); end - def heredoc_node_descendent_receiver(node); end - def send_node?(node); end - def trailing_comma?(call_source, call_line_source); end -end - -RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def compare_between_object_id_by_double_equal?(node); end - def object_id_method?(node); end -end - -RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - def on_dstr(node); end - - private - - def display_str(node); end - def each_bad_cons(node); end - def ending_delimiter(str); end - def str_content(node); end - def string_literal?(node); end - def string_literals?(node1, node2); end -end - -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def io_select(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def preferred_method(read, write, timeout); end - def scheduler_compatible?(io1, io2); end -end - -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - def on_class(node); end - def on_module(node); end - def private_class_methods(param0); end - - private - - def access_modifier?(node); end - def check_node(node); end - def correct_visibility?(node, modifier, ignored_methods); end - def format_message(modifier); end - def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - def private_class_method_names(node); end -end - -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def class_new_call?(param0 = T.unsafe(nil)); end - def on_class(node); end - def on_send(node); end - - private - - def exception_class?(class_node); end - def message(node); end - def preferred_base_class; end -end - -RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_str(node); end - - private - - def autocorrect(corrector, node); end - def heredoc?(node); end -end - -RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def message(node); end - def on_case(case_node); end - def on_case_match(case_match_node); end - def on_if(node); end - def on_send(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def basic_literal?(node); end - def check_case(case_node); end - def check_for_literal(node); end - def check_node(node); end - def condition(node); end - def handle_node(node); end - def primitive_array?(node); end - def when_conditions_range(when_node); end -end - -RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end - - private - - def autocorrected_value(node); end - def autocorrected_value_for_array(node); end - def autocorrected_value_for_string(node); end - def autocorrected_value_for_symbol(node); end - def ends_heredoc_line?(node); end - def in_array_percent_literal?(node); end - def offending?(node); end - def prints_as_self?(node); end - def space_literal?(node); end - def special_keyword?(node); end -end - -RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_until_post(node); end - def on_while_post(node); end - - private - - def build_break_line(node); end - def keyword_and_condition_range(node); end - def register_offense(node); end -end - -RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def department_enabled?(cop, comment); end - def each_missing_enable; end - def max_range; end - def message(cop, comment, type = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end - - private - - def callback_method_def?(node); end - def contains_super?(node); end - def inside_class_with_stateful_parent?(node); end - def offender?(node); end - def stateless_class?(node); end -end - -RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base - def on_regexp(node); end -end - -RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def multiple_compare?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base - def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end - def eval_call?(param0 = T.unsafe(nil)); end - def exec_call?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - - private - - def scoping_method_call?(child); end -end - -RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - - def on_array(node); end - def on_percent_literal(node); end - - private - - def contains_percent_literals?(node); end -end - -RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - def on_block(node); end - def on_body_of_reduce(param0 = T.unsafe(nil)); end - - private - - def parent_block_node(node); end -end - -RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - def on_lvasgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end -end - -RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def explicit_not_force?(param0); end - def force?(param0); end - def on_send(node); end - def receiver_and_method_name(param0 = T.unsafe(nil)); end - def send_exist_node(param0); end - - private - - def allowable_use_with_if?(if_node); end - def autocorrect(corrector, node, range); end - def autocorrect_replace_method(corrector, node); end - def force_method?(node); end - def force_method_name?(node); end - def force_option?(node); end - def if_node_child?(node); end - def message_remove_file_exist_check(node); end - def register_offense(node, exist_node); end - def replacement_method(node); end -end - -RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def loop_variable(param0 = T.unsafe(nil)); end - def method_require?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_block_pass(node); end - def unsorted_dir_block?(param0 = T.unsafe(nil)); end - def unsorted_dir_each?(param0 = T.unsafe(nil)); end - def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end - def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end - def var_is_required?(param0, param1); end - - private - - def correct_block(corrector, node); end - def correct_block_pass(corrector, node); end - def last_arg_range(node); end - def unsorted_dir_loop?(node); end - def unsorted_dir_pass?(node); end -end - -RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base - def chained_send?(param0 = T.unsafe(nil)); end - def define_method?(param0 = T.unsafe(nil)); end - def on_return(return_node); end - - private - - def return_value?(return_node); end - def scoped_node?(node); end -end - -RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def to_method(param0 = T.unsafe(nil)); end - def to_method_symbol(param0 = T.unsafe(nil)); end - - private - - def allow_receiver?(receiver); end - def allowed_method_name?(name); end - def conversion_method?(method_name); end - def correct_method(node, receiver); end - def correct_sym_method(to_method); end - def handle_as_symbol(node); end - def handle_conversion_method(node); end - def ignored_class?(name); end - def ignored_classes; end - def remove_parentheses(corrector, node); end - def top_receiver(node); end -end - -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base - def on_lvasgn(node); end -end - -RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) -RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_or_asgn(node); end -end - -RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, encoding_line, frozen_string_literal_line); end - def magic_comment_lines; end - def magic_comments; end -end - -RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base - def after_send(node); end - def on_match_with_lvasgn(node); end - def on_new_investigation; end - def on_nth_ref(node); end - def on_when(node); end - - private - - def check_regexp(node); end - def nth_ref_receiver?(send_node); end - def regexp_first_argument?(send_node); end - def regexp_receiver?(send_node); end -end - -RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def chained_calls?(node); end - def first_argument_starts_with_left_parenthesis?(node); end - def space_range(expr, space_length); end - def spaces_before_left_parenthesis(node); end - def ternary_expression?(node); end - def valid_context?(node); end - def valid_first_argument?(first_arg); end -end - -RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - - private - - def contains_quotes_or_commas?(node); end -end - -RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_percent_literal(node); end - - private - - def autocorrect(corrector, node); end - def contains_colons_or_commas?(node); end - def non_alphanumeric_literal?(literal); end -end - -RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def exception?(param0 = T.unsafe(nil)); end - def exception_new_with_message?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allow_implicit_namespaces; end - def check(node); end - def implicit_namespace?(node); end -end - -RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - def on_send(node); end - def rand_one?(param0 = T.unsafe(nil)); end - - private - - def message(node); end -end - -RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end - - def offenses_to_check; end - def offenses_to_check=(_arg0); end - def on_new_investigation; end - - private - - def add_department_marker(department); end - def add_offense_for_entire_comment(comment, cops); end - def add_offense_for_some_cops(comment, cops); end - def add_offenses(redundant_cops); end - def all_cop_names; end - def all_disabled?(comment); end - def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end - def cop_disabled_line_ranges; end - def cop_range(comment, cop); end - def department_disabled?(cop, comment); end - def department_marker?(department); end - def describe(cop); end - def directive_count(comment); end - def directive_range_in_list(range, ranges); end - def disabled_ranges; end - def each_already_disabled(cop, line_ranges); end - def each_line_range(cop, line_ranges); end - def each_redundant_disable(&block); end - def ends_its_line?(range); end - def find_redundant_all(range, next_range); end - def find_redundant_cop(cop, range); end - def find_redundant_department(cop, range); end - def followed_ranges?(range, next_range); end - def ignore_offense?(line_range); end - def matching_range(haystack, needle); end - def message(cop_names); end - def previous_line_blank?(range); end - def range_with_offense?(range, offenses = T.unsafe(nil)); end - def remove_department_marker(department); end - def trailing_range?(ranges, range); end -end - -RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def all_or_name(name); end - def comment_start(comment); end - def cop_name_indention(comment, name); end - def department?(directive, name); end - def range_of_offense(comment, name); end - def range_to_remove(begin_pos, end_pos, comment); end - def range_with_comma(comment, name); end - def range_with_comma_after(comment, start, begin_pos, end_pos); end - def range_with_comma_before(start, begin_pos, end_pos); end - def register_offense(comment, cop_names); end -end - -RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end -end - -RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end - def unnecessary_require_statement?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end - - private - - def check?(node); end - def condition?(parent, node); end -end - -RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def array_new?(param0 = T.unsafe(nil)); end - def literal_expansion(param0 = T.unsafe(nil)); end - def on_splat(node); end - - private - - def allow_percent_literal_array_argument?; end - def array_new_inside_array_literal?(array_new_node); end - def array_splat?(node); end - def autocorrect(corrector, node); end - def method_argument?(node); end - def part_of_an_array?(node); end - def redundant_brackets?(node); end - def redundant_splat_expansion(node); end - def remove_brackets(array); end - def replacement_range_and_content(node); end - def use_percent_literal_array_argument?(node); end -end - -RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - def on_interpolation(begin_node); end - def to_s_without_args?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def redundant_with_index?(param0 = T.unsafe(nil)); end - - private - - def message(node); end - def with_index_range(send); end -end - -RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def redundant_with_object?(param0 = T.unsafe(nil)); end - - private - - def message(node); end - def with_object_range(send); end -end - -RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end -end - -RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_match_current_line(node); end -end - -RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_csend(node); end - def on_send(node); end - - private - - def check_predicate(predicate, node); end - def check_ternary(ternary, node); end -end - -RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base - def on_erange(node); end - def on_irange(node); end -end - -RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def remove_ext(file_path); end - def same_file?(file_path, required_feature); end -end - -RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - def on_resbody(node); end - def targets_exception?(rescue_arg_node); end -end - -RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def on_resbody(node); end - - private - - def correction(*exceptions); end - def invalid_exceptions(exceptions); end - def valid_exceptions(exceptions); end -end - -RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - def on_return(return_node); end - - private - - def non_void_context(return_node); end -end - -RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def bad_method?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def add_safe_navigation_operator(offense_range:, send_node:); end - def autocorrect(corrector, offense_range:, send_node:); end - def method_chain(node); end -end - -RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - extend ::RuboCop::Cop::AutoCorrector - - def check(node); end - def on_csend(node); end - - private - - def autocorrect(corrector, node); end - def location(node, unsafe_method_call); end - def top_conditional_ancestor(node); end - def unsafe_method_calls(method_calls, safe_nav_receiver); end -end - -RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(comment); end - def executable?(processed_source); end - def format_message_from(processed_source); end -end - -RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - def on_and_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_or_asgn(node); end - - private - - def multiple_self_assignment?(node); end - def rhs_matches_lhs?(rhs, lhs); end -end - -RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def send_with_mixin_argument?(param0 = T.unsafe(nil)); end - - private - - def bad_location(node); end - def message(method, module_name, bad_method); end - def mixin_method?(node); end -end - -RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base - def after_leaving_scope(scope, _variable_table); end - def uses_var?(param0, param1); end - - private - - def argument_references(argument); end - def assignment_without_argument_usage(argument); end - def check_argument(argument); end - def ignore_implicit_references?; end - def node_within_block_or_conditional?(node, stop_search_node); end - def reference_pos(node); end - def shadowing_assignment(argument); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::RangeHelp - - def on_rescue(node); end - - private - - def compare_exceptions(exception, other_exception); end - def contains_multiple_levels_of_exceptions?(group); end - def evaluate_exceptions(group); end - def find_shadowing_rescue(rescues); end - def offense_range(rescues); end - def rescued_exceptions(rescue_group); end - def rescued_groups_for(rescues); end - def sorted?(rescued_groups); end - def system_call_err?(error); end -end - -RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - def before_declaring_variable(variable, variable_table); end - def ractor_block?(param0 = T.unsafe(nil)); end - def same_conditions_node_different_branch?(variable, outer_local_variable); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base - def on_send(node); end - def struct_new(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base - def on_resbody(node); end - - private - - def comment_between_rescue_and_end?(node); end - def nil_body?(node); end -end - -RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - def on_send(node); end - def on_sym(node); end - - private - - def correct_hash_key(node); end - def correct_inconsistent_hash_keys(keys); end - def in_alias?(node); end - def in_percent_literal_array?(node); end - def properly_quoted?(source, value); end - def register_offense(node, correction:, message: T.unsafe(nil)); end - def requires_quotes?(sym_node); end -end - -RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base - def on_other_file; end - - private - - def add_offense_from_diagnostic(diagnostic, ruby_version); end - def add_offense_from_error(error); end - def beautify_message(message); end -end - -class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base - def enum_conversion_call?(param0 = T.unsafe(nil)); end - def method_name?(param0 = T.unsafe(nil), param1); end - def on_send(node); end - def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end - - private - - def argument_match?(send_arg, def_arg); end - def arguments_match?(arguments, def_node); end -end - -RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end -end - -RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base - def on_return(return_node); end - - private - - def ancestors_valid?(return_node); end -end - -RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def trailing_comma_range(node); end -end - -RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::TripleQuotes < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - - private - - def empty_str_nodes(node); end -end - -RuboCop::Cop::Lint::TripleQuotes::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnderscorePrefixedVariableName < ::RuboCop::Cop::Base - def after_leaving_scope(scope, _variable_table); end - def check_variable(variable); end - - private - - def allowed_keyword_block_argument?(variable); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::UnderscorePrefixedVariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base - def on_block(node); end - def on_numblock(node); end - - private - - def acceptable?(node); end - def arg_count(node); end - def expected_arity(method); end - def included_method?(name); end - def methods; end -end - -RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - def on_const(node); end -end - -RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base - def accumulator_index?(param0 = T.unsafe(nil), param1); end - def element_modified?(param0, param1); end - def expression_values(param0); end - def lvar_used?(param0 = T.unsafe(nil), param1); end - def on_block(node); end - def on_numblock(node); end - def reduce_with_block?(param0 = T.unsafe(nil)); end - - private - - def acceptable_return?(return_val, element_name); end - def allowed_type?(parent_node); end - def block_arg_name(node, index); end - def check_return_values(block_node); end - def potential_offense?(return_values, block_body, element_name, accumulator_name); end - def return_values(block_body_node); end - def returned_accumulator_index(return_values, accumulator_name, element_name); end - def returns_accumulator_anywhere?(return_values, accumulator_name); end -end - -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - def flow_command?(param0 = T.unsafe(nil)); end - def on_begin(node); end - def on_kwbegin(node); end - - private - - def check_case(node); end - def check_if(node); end - def flow_expression?(node); end -end - -RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedPattern - - def break_command?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_for(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def break_statement?(node); end - def check(node); end - def check_case(node); end - def check_if(node); end - def conditional_continue_keyword?(break_statement); end - def loop_method?(node); end - def preceded_by_continue_statement?(break_statement); end - def statements(node); end -end - -RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::AST::NodePattern::Macros - - def after_leaving_scope(scope, _variable_table); end - - private - - def check_argument(variable); end -end - -class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - private - - def allow_unused_keyword_arguments?; end - def allowed_block?(variable); end - def allowed_keyword_argument?(variable); end - def augment_message(message, variable); end - def autocorrect(corrector, node); end - def check_argument(variable); end - def define_method_call?(variable); end - def empty_block?(variable); end - def ignore_empty_blocks?; end - def message(variable); end - def message_for_lambda(variable, all_arguments); end - def message_for_normal_block(variable, all_arguments); end - def message_for_underscore_prefix(variable); end - def used_block_local?(variable); end - def variable_type(variable); end - - class << self - def joining_forces; end - end -end - -class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - def not_implemented?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def check_argument(variable); end - def ignored_method?(body); end - def message(variable); end - - class << self - def joining_forces; end - end -end - -class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base - def on_send(node); end - def uri_escape_unescape?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def class_or_instance_eval?(param0 = T.unsafe(nil)); end - def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end - def dynamic_method_definition?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - def static_method_definition?(param0 = T.unsafe(nil)); end - - private - - def access_modifier?(node); end - def any_context_creating_methods?(child); end - def any_method_definition?(child); end - def autocorrect(corrector, node); end - def check_child_nodes(node, unused, cur_vis); end - def check_new_visibility(node, unused, new_vis, cur_vis); end - def check_node(node); end - def check_scope(node); end - def check_send_node(node, cur_vis, unused); end - def eval_call?(child); end - def method_definition?(child); end - def start_of_new_scope?(child); end -end - -RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base - def after_leaving_scope(scope, _variable_table); end - def check_for_unused_assignments(variable); end - def collect_variable_like_names(scope); end - def message_for_useless_assignment(assignment); end - def message_specification(assignment, variable); end - def multiple_assignment_message(variable_name); end - def operator_assignment_message(scope, assignment); end - def return_value_node_of_scope(scope); end - def similar_name_message(variable); end - def variable_like_method_invocation?(node); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - def on_new_investigation; end -end - -RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def delegating?(node, def_node); end - def optional_args?(node); end -end - -RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base - def method_definition(param0 = T.unsafe(nil), param1); end - def on_send(node); end - - private - - def allowed_arguments(arguments); end - def inspect_def(node, def_node); end - def inspect_sym(node, sym_node); end -end - -RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end - - private - - def last_expression(body); end -end - -RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker - def initialize(body_node); end - - def constructor?(node); end - def contain_local_object?(variable_name); end - def process_assignment(asgn_node, rhs_node); end - def process_assignment_node(node); end - def process_binary_operator_assignment(op_asgn_node); end - def process_logical_operator_assignment(asgn_node); end - def process_multiple_assignment(masgn_node); end - def scan(node, &block); end -end - -class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_arg(param0 = T.unsafe(nil)); end - def block_reassigns_arg?(param0, param1); end - def on_send(node); end - def times_call?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, count, node, proc_name); end - def autocorrect_block(corrector, node); end - def autocorrect_block_pass(corrector, node, proc_name); end - def fix_indentation(source, range); end - def never_process?(count, node); end - def own_line?(node); end - def remove_node(corrector, node); end -end - -RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base - def on_begin(node); end - def on_block(node); end - def on_kwbegin(node); end - - private - - def check_begin(node); end - def check_defined(node); end - def check_expression(expr); end - def check_literal(node); end - def check_nonmutating(node); end - def check_self(node); end - def check_var(node); end - def check_void_op(node); end - def in_void_context?(node); end -end - -RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::DEFINED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::MatchRange - include ::RuboCop::Cop::RangeHelp - - private - - def each_match_range(range, regex); end - def match_range(range, match); end -end - -class RuboCop::Cop::MessageAnnotator - def initialize(config, cop_name, cop_config, options); end - - def annotate(message); end - def config; end - def cop_config; end - def cop_name; end - def options; end - def urls; end - - private - - def debug?; end - def details; end - def display_cop_names?; end - def display_style_guide?; end - def extra_details?; end - def reference_urls; end - def style_guide_base_url; end - def style_guide_url; end - - class << self - def style_guide_urls; end - end -end - -module RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::ExcludeLimit - - def define_method?(param0 = T.unsafe(nil)); end - def max=(value); end - def on_block(node); end - def on_def(node); end - def on_defs(node); end - - private - - def check_complexity(node, method_name); end - def complexity(body); end -end - -module RuboCop::Cop::MethodPreference - private - - def default_cop_config; end - def preferred_method(method); end - def preferred_methods; end -end - -module RuboCop::Cop::Metrics; end - -class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - - private - - def complexity(node); end -end - -RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - def on_block(node); end - def on_numblock(node); end - - private - - def cop_label; end - def method_receiver_excluded?(node); end -end - -RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base - def max=(value); end - def on_new_investigation; end - - private - - def check_nesting_level(node, max, current_level); end - def consider_node?(node); end - def count_blocks?; end - def message(max); end -end - -RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - def on_casgn(node); end - def on_class(node); end - - private - - def message(length, max_length); end -end - -class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - include ::RuboCop::Cop::MethodComplexity - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - - private - - def complexity_score_for(node); end - def count_block?(block); end -end - -RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - - def on_block(node); end - def on_def(node); end - def on_defs(node); end - def on_numblock(node); end - - private - - def cop_label; end -end - -RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CodeLength - - def module_definition?(param0 = T.unsafe(nil)); end - def on_casgn(node); end - def on_module(node); end - - private - - def message(length, max_length); end -end - -class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base - def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end - def max=(value); end - def max_optional_parameters=(value); end - def on_args(node); end - def on_def(node); end - def on_defs(node); end - - private - - def args_count(node); end - def count_keyword_args?; end - def max_optional_parameters; end - def max_params; end -end - -RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity - private - - def complexity_score_for(node); end -end - -RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) -module RuboCop::Cop::Metrics::Utils; end - -class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator - include ::RuboCop::AST::Sexp - include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::Cop::Metrics::Utils::IteratingBlock - include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - - def calculate; end - def else_branch?(node); end - def evaluate_condition_node(node); end - - private - - def argument?(node); end - def assignment?(node); end - def branch?(node); end - def capturing_variable?(name); end - def compound_assignment(node); end - def condition?(node); end - def simple_assignment?(node); end - def visit_depth_last(node, &block); end - - class << self - def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end - end -end - -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end - - def calculate; end - - private - - def another_args?(node); end - def build_foldable_checks(types); end - def classlike_code_length(node); end - def classlike_node?(node); end - def code_length(node); end - def count_comments?; end - def each_top_level_descendant(node, types, &block); end - def extract_body(node); end - def foldable_node?(node); end - def heredoc_length(node); end - def heredoc_node?(node); end - def irrelevant_line?(source_line); end - def line_numbers_of_inner_nodes(node, *types); end - def namespace_module?(node); end - def normalize_foldable_types(types); end - def omit_length(descendant); end - def parenthesized?(node); end -end - -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Metrics::Utils::IteratingBlock - def block_method_name(node); end - def iterating_block?(node); end - def iterating_method?(name); end -end - -RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) - -module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount - include ::RuboCop::AST::Sexp - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - - def attribute_call?(param0 = T.unsafe(nil)); end - def calculate_node(node); end - def discount_repeated_attributes?; end - def evaluate_branch_nodes(node); end - def root_node?(param0 = T.unsafe(nil)); end - - private - - def discount_repeated_attribute?(send_node); end - def find_attributes(node, &block); end - def setter_to_getter(node); end - def update_repeated_attribute(node); end -end - -RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) - -module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount - def discount_for_repeated_csend?(csend_node); end - def reset_on_lvasgn(node); end - def reset_repeated_csend; end -end - -module RuboCop::Cop::Migration; end - -class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def check_cop_name(name, comment, offset); end - def contain_unexpected_character_for_department_name?(name); end - def disable_comment_offset; end - def qualified_legacy_cop_name(cop_name); end - def valid_content_token?(content_token); end -end - -RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::MinBodyLength - private - - def min_body_length; end - def min_body_length?(node); end -end - -module RuboCop::Cop::MultilineElementIndentation - private - - def check_expected_style(styles); end - def check_first(first, left_brace, left_parenthesis, offset); end - def detected_styles(actual_column, offset, left_parenthesis, left_brace); end - def detected_styles_for_column(column, left_parenthesis, left_brace); end - def each_argument_node(node, type); end - def hash_pair_where_value_beginning_with(left_brace, first); end - def incorrect_style_detected(styles, first, base_column_type); end - def indent_base(left_brace, first, left_parenthesis); end - def key_and_value_begin_on_same_line?(pair); end - def right_sibling_begins_on_subsequent_line?(pair); end -end - -module RuboCop::Cop::MultilineElementLineBreaks - private - - def all_on_same_line?(nodes); end - def check_line_breaks(_node, children); end -end - -module RuboCop::Cop::MultilineExpressionIndentation - def on_send(node); end - - private - - def argument_in_method_call(node, kind); end - def assignment_rhs(node); end - def check(range, node, lhs, rhs); end - def correct_indentation(node); end - def disqualified_rhs?(candidate, ancestor); end - def grouped_expression?(node); end - def incorrect_style_detected(range, node, lhs, rhs); end - def indentation(node); end - def indented_keyword_expression(node); end - def inside_arg_list_parentheses?(node, ancestor); end - def keyword_message_tail(node); end - def kw_node_with_special_indentation(node); end - def left_hand_side(lhs); end - def not_for_this_cop?(node); end - def operation_description(node, rhs); end - def part_of_assignment_rhs(node, candidate); end - def part_of_block_body?(candidate, block_node); end - def postfix_conditional?(node); end - def valid_method_rhs_candidate?(candidate, node); end - def valid_rhs?(candidate, ancestor); end - def valid_rhs_candidate?(candidate, node); end - def within_node?(inner, outer); end -end - -RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) -RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) -RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::MultilineLiteralBraceCorrector - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::RangeHelp - - def initialize(corrector, node, processed_source); end - - def call; end - - private - - def content_if_comment_present(corrector, node); end - def correct_next_line_brace(corrector); end - def correct_same_line_brace(corrector); end - def corrector; end - def last_element_range_with_trailing_comma(node); end - def last_element_trailing_comma_range(node); end - def node; end - def processed_source; end - def remove_trailing_content_of_comment(corrector, range); end - def select_content_to_be_inserted_after_last_element(corrector, node); end - - class << self - def correct(corrector, node, processed_source); end - end -end - -module RuboCop::Cop::MultilineLiteralBraceLayout - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - private - - def check(node); end - def check_brace_layout(node); end - def check_new_line(node); end - def check_same_line(node); end - def check_symmetrical(node); end - def children(node); end - def closing_brace_on_same_line?(node); end - def empty_literal?(node); end - def ignored_literal?(node); end - def implicit_literal?(node); end - def last_line_heredoc?(node, parent = T.unsafe(nil)); end - def new_line_needed_before_closing_brace?(node); end - def opening_brace_on_same_line?(node); end -end - -module RuboCop::Cop::Naming; end - -class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end - - private - - def bad_reader_name?(node); end - def bad_writer_name?(node); end - def message(node); end -end - -RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def first_non_ascii_chars(string); end - def first_offense_range(identifier); end - def should_check?(token); end -end - -RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def op_method_candidate?(param0 = T.unsafe(nil)); end - - private - - def op_method?(name); end -end - -RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_def(node); end - def on_defs(node); end - - private - - def anonymous_block_argument?(node); end - def block_forwarding_name; end - def expected_block_forwarding_style?(node, last_argument); end - def explicit_block_argument?(node); end - def register_offense(block_argument, node); end - def use_block_argument_as_local_variable?(node, last_argument); end - def use_kwarg_in_method_definition?(node); end -end - -RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - def on_block(node); end -end - -class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base - def on_class(node); end - def on_module(node); end -end - -RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base - def class_or_struct_return_method?(param0 = T.unsafe(nil)); end - def literal_receiver?(param0 = T.unsafe(nil)); end - def on_casgn(node); end - - private - - def allowed_assignment?(value); end - def allowed_conditional_expression_on_rhs?(node); end - def allowed_method_call_on_rhs?(node); end - def contains_contant?(node); end -end - -RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - def struct_definition(param0 = T.unsafe(nil)); end - - private - - def allowed_acronyms; end - def bad_filename_allowed?; end - def check_definition_path_hierarchy?; end - def defined_struct(node); end - def definition_path_hierarchy_roots; end - def expect_matching_definition?; end - def filename_good?(basename); end - def find_class_or_module(node, namespace); end - def find_definition(node); end - def for_bad_filename(file_path); end - def ignore_executable_scripts?; end - def match?(expected); end - def match_acronym?(expected, name); end - def match_namespace(node, namespace, expected); end - def matching_class?(file_name); end - def matching_definition?(file_path); end - def no_definition_message(basename, file_path); end - def other_message(basename); end - def partial_matcher!(expected); end - def perform_class_and_module_naming_checks(file_path, basename); end - def regex; end - def to_module_name(basename); end - def to_namespace(path); end -end - -RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def correct_case_delimiters?(node); end - def correct_delimiters(source); end - def message(_node); end -end - -RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - - def on_heredoc(node); end - - private - - def forbidden_delimiters; end - def meaningful_delimiters?(node); end -end - -RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_new_investigation; end - - private - - def add_offenses_for_token(token, word_locations); end - def add_to_flagged_term_hash(regex_string, term, term_definition); end - def array_to_ignorecase_regex(strings); end - def check_token?(type); end - def create_message(word, message = T.unsafe(nil)); end - def create_multiple_word_message_for_file(words); end - def create_single_word_message_for_file(word); end - def ensure_regex_string(regex); end - def extract_regexp(term, term_definition); end - def find_flagged_term(word); end - def format_suggestions(suggestions); end - def investigate_filepath; end - def investigate_tokens; end - def mask_input(str); end - def preprocess_check_config; end - def preprocess_flagged_terms; end - def preprocess_suggestions(suggestions); end - def process_allowed_regex(allowed); end - def scan_for_words(input); end - def set_regexes(flagged_term_strings, allowed_strings); end -end - -RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct - def position; end - def position=(_); end - def word; end - def word=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def defined_memoized?(param0 = T.unsafe(nil), param1); end - def method_definition?(param0 = T.unsafe(nil)); end - def on_defined?(node); end - def on_or_asgn(node); end - - private - - def find_definition(node); end - def matches?(method_name, ivar_assign); end - def message(variable); end - def style_parameter_name; end - def suggested_var(method_name); end - def variable_name_candidates(method_name); end -end - -RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def str_name(param0 = T.unsafe(nil)); end - def sym_name(param0 = T.unsafe(nil)); end - - private - - def attr_name(name_item); end - def message(style); end - def range_position(node); end -end - -RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::UncommunicativeName - - def on_def(node); end - def on_defs(node); end -end - -class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - def dynamic_method_define(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def allowed_method_name?(method_name, prefix); end - def expected_name(method_name, prefix); end - def forbidden_prefixes; end - def message(method_name, new_name); end - def method_definition_macros(macro_name); end - def predicate_prefixes; end -end - -class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - - private - - def correct_node(corrector, node, offending_name, preferred_name); end - def correct_reassignment(corrector, node, offending_name, preferred_name); end - def message(node); end - def offense_range(resbody); end - def preferred_name(variable_name); end - def shadowed_variable_name?(node); end - def variable_name(node); end - def variable_name_matches?(node, name); end -end - -RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - - def on_arg(node); end - def on_blockarg(node); end - def on_cvasgn(node); end - def on_ivasgn(node); end - def on_kwarg(node); end - def on_kwoptarg(node); end - def on_kwrestarg(node); end - def on_lvar(node); end - def on_lvasgn(node); end - def on_optarg(node); end - def on_restarg(node); end - def valid_name?(node, name, given_style = T.unsafe(nil)); end - - private - - def message(style); end -end - -RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedIdentifiers - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNumbering - include ::RuboCop::Cop::AllowedPattern - - def on_arg(node); end - def on_cvasgn(node); end - def on_def(node); end - def on_defs(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_sym(node); end - def valid_name?(node, name, given_style = T.unsafe(nil)); end - - private - - def message(style); end -end - -RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::NegativeConditional - extend ::RuboCop::AST::NodePattern::Macros - - def empty_condition?(param0 = T.unsafe(nil)); end - def single_negative?(param0 = T.unsafe(nil)); end - - private - - def check_negative_conditional(node, message:, &block); end -end - -RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::NilMethods - include ::RuboCop::Cop::AllowedMethods - - private - - def nil_methods; end - def other_stdlib_methods; end -end - -class RuboCop::Cop::Offense - include ::Comparable - - def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end - - def <=>(other); end - def ==(other); end - def column; end - def column_length; end - def column_range; end - def cop_name; end - def correctable?; end - def corrected?; end - def corrected_with_todo?; end - def corrector; end - def disabled?; end - def eql?(other); end - def first_line; end - def hash; end - def highlighted_area; end - def last_column; end - def last_line; end - def line; end - def location; end - def message; end - def real_column; end - def severity; end - def source_line; end - def status; end - def to_s; end -end - -RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) - -class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct - def begin_pos; end - def begin_pos=(_); end - def column; end - def column=(_); end - def column_range; end - def end_pos; end - def end_pos=(_); end - def first_line; end - def last_column; end - def last_line; end - def length; end - def line; end - def line=(_); end - def size; end - def source_line; end - def source_line=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module RuboCop::Cop::OnNormalIfUnless - def on_if(node); end -end - -class RuboCop::Cop::OrderedGemCorrector - extend ::RuboCop::Cop::OrderedGemNode - extend ::RuboCop::Cop::RangeHelp - - class << self - def comments_as_separators; end - def correct(processed_source, node, previous_declaration, comments_as_separators); end - def processed_source; end - - private - - def declaration_with_comment(node); end - def swap_range(corrector, range1, range2); end - end -end - -module RuboCop::Cop::OrderedGemNode - private - - def case_insensitive_out_of_order?(string_a, string_b); end - def consecutive_lines(previous, current); end - def find_gem_name(gem_node); end - def gem_canonical_name(name); end - def gem_name(declaration_node); end - def get_source_range(node, comments_as_separators); end - def register_offense(previous, current); end - def treat_comments_as_separators; end -end - -module RuboCop::Cop::Parentheses - private - - def parens_required?(node); end -end - -class RuboCop::Cop::ParenthesesCorrector - class << self - def correct(corrector, node); end - - private - - def next_char_is_question_mark?(node); end - def ternary_condition?(node); end - end -end - -module RuboCop::Cop::PercentArray - private - - def allowed_bracket_array?(node); end - def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end - def build_message_for_bracketed_array(preferred_array_code); end - def check_bracketed_array(node, literal_prefix); end - def check_percent_array(node); end - def comments_in_array?(node); end - def invalid_percent_array_contents?(_node); end - def invalid_percent_array_context?(node); end - def whitespace_between(node); end - def whitespace_leading(node); end - def whitespace_trailing(node); end -end - -module RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::RangeHelp - - private - - def begin_source(node); end - def percent_literal?(node); end - def process(node, *types); end - def type(node); end -end - -class RuboCop::Cop::PercentLiteralCorrector - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - - def initialize(config, preferred_delimiters); end - - def config; end - def correct(corrector, node, char); end - def preferred_delimiters; end - - private - - def autocorrect_multiline_words(node, escape, delimiters); end - def autocorrect_words(node, escape, delimiters); end - def delimiters_for(type); end - def end_content(source); end - def escape_words?(node); end - def first_line?(node, previous_line_num); end - def fix_escaped_content(word_node, escape, delimiters); end - def line_breaks(node, source, previous_line_num, base_line_num, node_indx); end - def new_contents(node, escape, delimiters); end - def process_lines(node, previous_line_num, base_line_num, source_in_lines); end - def process_multiline_words(node, escape, delimiters); end - def substitute_escaped_delimiters(content, delimiters); end - def wrap_contents(corrector, node, contents, char, delimiters); end -end - -module RuboCop::Cop::PrecedingFollowingAlignment - private - - def aligned_assignment?(range, line); end - def aligned_char?(range, line); end - def aligned_comment_lines; end - def aligned_identical?(range, line); end - def aligned_operator?(range, line); end - def aligned_token?(range, line); end - def aligned_with_adjacent_line?(range, predicate); end - def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end - def aligned_with_any_line_range?(line_ranges, range, &predicate); end - def aligned_with_append_operator?(range, line); end - def aligned_with_assignment(token, line_range); end - def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end - def aligned_with_operator?(range); end - def aligned_with_preceding_assignment(token); end - def aligned_with_something?(range); end - def aligned_with_subsequent_assignment(token); end - def aligned_words?(range, line); end - def allow_for_alignment?; end - def assignment_lines; end - def assignment_tokens; end - def relevant_assignment_lines(line_range); end - def remove_optarg_equals(asgn_tokens, processed_source); end -end - -class RuboCop::Cop::PreferredDelimiters - def initialize(type, config, preferred_delimiters); end - - def config; end - def delimiters; end - def type; end - - private - - def ensure_valid_preferred_delimiters; end - def preferred_delimiters; end - def preferred_delimiters_config; end -end - -RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::PunctuationCorrector - class << self - def add_space(corrector, token); end - def remove_space(corrector, space_before); end - def swap_comma(corrector, range); end - end -end - -module RuboCop::Cop::RangeHelp - private - - def column_offset_between(base_range, range); end - def contents_range(node); end - def directions(side); end - def effective_column(range); end - def final_pos(src, pos, increment, continuations, newlines, whitespace); end - def move_pos(src, pos, step, condition, regexp); end - def move_pos_str(src, pos, step, condition, needle); end - def range_between(start_pos, end_pos); end - def range_by_whole_lines(range, include_final_newline: T.unsafe(nil)); end - def range_with_surrounding_comma(range, side = T.unsafe(nil)); end - def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil)); end - def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end -end - -RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) -module RuboCop::Cop::RangeHelp::NOT_GIVEN; end - -module RuboCop::Cop::RationalLiteral - extend ::RuboCop::AST::NodePattern::Macros - - def rational_literal?(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Registry - include ::Enumerable - - def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end - - def ==(other); end - def contains_cop_matching?(names); end - def cops; end - def department?(name); end - def department_missing?(badge, name); end - def departments; end - def dismiss(cop); end - def each(&block); end - def enabled(config, only = T.unsafe(nil), only_safe: T.unsafe(nil)); end - def enabled?(cop, config, only_safe); end - def enabled_pending_cop?(cop_cfg, config); end - def enlist(cop); end - def find_by_cop_name(cop_name); end - def freeze; end - def length; end - def names; end - def names_for_department(department); end - def options; end - def print_warning(name, path); end - def qualified_cop_name(name, path, warn: T.unsafe(nil)); end - def select(&block); end - def sort!; end - def to_h; end - def unqualified_cop_names; end - def with_department(department); end - def without_department(department); end - - private - - def clear_enrollment_queue; end - def initialize_copy(reg); end - def qualify_badge(badge); end - def registered?(badge); end - def resolve_badge(given_badge, real_badge, source_path); end - def with(cops); end - - class << self - def all; end - def global; end - def qualified_cop_name(name, origin); end - def reset!; end - def with_temporary_global(temp_global = T.unsafe(nil)); end - end -end - -module RuboCop::Cop::RequireLibrary - extend ::RuboCop::AST::NodePattern::Macros - - def ensure_required(corrector, node, library_name); end - def on_send(node); end - def remove_subsequent_requires(corrector, node, library_name); end - def require_any_library?(param0 = T.unsafe(nil)); end - def require_library_name?(param0 = T.unsafe(nil), param1); end - - private - - def on_new_investigation; end -end - -class RuboCop::Cop::RequireLibraryCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - def correct(corrector, node, library_name); end - def require_statement(library_name); end - end -end - -module RuboCop::Cop::RescueNode - def on_new_investigation; end - - private - - def rescue_modifier?(node); end - def rescued_exceptions(resbody); end -end - -module RuboCop::Cop::SafeAssignment - extend ::RuboCop::AST::NodePattern::Macros - - def empty_condition?(param0 = T.unsafe(nil)); end - def safe_assignment?(param0 = T.unsafe(nil)); end - def setter_method?(param0 = T.unsafe(nil)); end - - private - - def safe_assignment_allowed?; end -end - -module RuboCop::Cop::Security; end - -class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base - def bad_hash_combinator?(param0 = T.unsafe(nil)); end - def contained_in_hash_method?(node, &block); end - def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end - def hash_method_definition?(param0 = T.unsafe(nil)); end - def monuple_hash?(param0 = T.unsafe(nil)); end - def on_op_asgn(node); end - def on_send(node); end - def outer_bad_hash_combinator?(node); end - def redundant_hash?(param0 = T.unsafe(nil)); end - def static_hash_method_definition?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base - def eval?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def json_load(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base - def marshal_load(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base - def on_send(node); end - def open?(param0 = T.unsafe(nil)); end - - private - - def composite_string?(node); end - def concatenated_string?(node); end - def interpolated_string?(node); end - def safe?(node); end - def safe_argument?(argument); end - def simple_string?(node); end -end - -RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def yaml_load(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Severity - include ::Comparable - - def initialize(name_or_code); end - - def <=>(other); end - def ==(other); end - def code; end - def hash; end - def level; end - def name; end - def to_s; end - - class << self - def name_from_code(code); end - end -end - -RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::SpaceAfterPunctuation - def on_new_investigation; end - - private - - def allowed_type?(token); end - def each_missing_space(tokens); end - def offset; end - def space_forbidden_before_rcurly?; end - def space_missing?(token1, token2); end - def space_required_before?(token); end -end - -RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::SpaceBeforePunctuation - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def each_missing_space(tokens); end - def space_missing?(token1, token2); end - def space_required_after?(token); end - def space_required_after_lcurly?; end -end - -RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::SpaceCorrector - extend ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::SurroundingSpace - - class << self - def add_space(processed_source, corrector, left_token, right_token); end - def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end - def processed_source; end - def remove_space(processed_source, corrector, left_token, right_token); end - end -end - -module RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::LineLengthHelp - - private - - def code_after(node); end - def comment_disables_cop?(comment); end - def first_line_comment(node); end - def length_in_modifier_form(node); end - def max_line_length; end - def modifier_fits_on_single_line?(node); end - def non_eligible_body?(body); end - def non_eligible_condition?(condition); end - def non_eligible_node?(node); end - def parenthesize?(node); end - def single_line_as_modifier?(node); end - def to_modifier_form(node); end -end - -module RuboCop::Cop::StringHelp - def on_regexp(node); end - def on_str(node); end - - private - - def inside_interpolation?(node); end -end - -class RuboCop::Cop::StringLiteralCorrector - extend ::RuboCop::PathUtil - extend ::RuboCop::Cop::Util - - class << self - def correct(corrector, node, style); end - end -end - -module RuboCop::Cop::StringLiteralsHelp - private - - def wrong_quotes?(src_or_node); end -end - -module RuboCop::Cop::Style; end - -class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def access_modifier_is_inlined?(node); end - def access_modifier_is_not_inlined?(node); end - def allow_modifiers_on_symbols?(node); end - def group_style?; end - def inline_style?; end - def message(range); end - def offense?(node); end -end - -RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::VisibilityHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - def on_sclass(node); end - - private - - def accessor?(send_node); end - def autocorrect(corrector, node); end - def check(send_node); end - def class_send_elements(class_node); end - def group_accessors(node, accessors); end - def grouped_style?; end - def message(send_node); end - def preferred_accessors(node); end - def previous_line_comment?(node); end - def separate_accessors(node); end - def separated_style?; end - def sibling_accessors(send_node); end -end - -RuboCop::Cop::Style::AccessorGrouping::ACCESSOR_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def identifier(param0 = T.unsafe(nil)); end - def on_alias(node); end - def on_send(node); end - - private - - def add_offense_for_args(node, &block); end - def alias_keyword_possible?(node); end - def alias_method_possible?(node); end - def autocorrect(corrector, node); end - def bareword?(sym_node); end - def correct_alias_method_to_alias(corrector, send_node); end - def correct_alias_to_alias_method(corrector, node); end - def correct_alias_with_symbol_args(corrector, node); end - def lexical_scope_type(node); end - def scope_type(node); end -end - -RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_and(node); end - def on_if(node); end - def on_or(node); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def correct_not(node, receiver, corrector); end - def correct_other(node, corrector); end - def correct_send(node, corrector); end - def correct_setter(node, corrector); end - def correctable_send?(node); end - def keep_operator_precedence(corrector, node); end - def message(node); end - def on_conditionals(node); end - def process_logical_operator(node); end - def whitespace_before_arg(node); end -end - -RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def forwarding_method_arguments?(param0 = T.unsafe(nil), param1, param2, param3); end - def on_def(node); end - def on_defs(node); end - def only_rest_arguments?(param0 = T.unsafe(nil), param1); end - def use_rest_arguments?(param0 = T.unsafe(nil)); end - - private - - def all_lvars_as_forwarding_method_arguments?(def_node, forwarding_method); end - def allow_only_rest_arguments?; end - def arguments_range(node); end - def extract_argument_names_from(args); end - def forwarding_method?(node, rest_arg, kwargs, block_arg); end - def register_offense_to_forwarding_method_arguments(forwarding_method); end - def register_offense_to_method_definition_arguments(method_definition); end -end - -RuboCop::Cop::Style::ArgumentsForwarding::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def array_splat?(param0 = T.unsafe(nil)); end - def on_array(node); end - def on_if(node); end - def unless_array?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def join_candidate?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_new_investigation; end - - private - - def allowed_non_ascii_chars; end - def first_non_ascii_chars(string); end - def first_offense_range(comment); end - def only_allowed_non_ascii_chars?(string); end -end - -RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def class_eval?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def autocorrect(corrector, node); end - def message(node); end - def replacement_method(node); end -end - -RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base - def on_send(node); end - - private - - def cleanup?(node); end -end - -RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::AutoResourceCleanup::TARGET_METHODS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - def on_str(node); end - - private - - def add_offense_for_wrong_style(node, good, bad); end - def check(node); end - def requires_bare_percent?(source); end - def requires_percent_q?(source); end -end - -RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base - def on_preexe(node); end -end - -RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def after_class(class_node); end - def after_module(class_node); end - def after_sclass(class_node); end - def on_class(class_node); end - def on_module(class_node); end - def on_new_investigation; end - def on_sclass(class_node); end - - private - - def correct_reader(corrector, macro, node, range); end - def correct_writer(corrector, macro, node, range); end - def find_bisection(macros); end - def find_macros(class_def); end - def register_offense(attr); end -end - -RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BisectedAttrAccessor::Macro - include ::RuboCop::Cop::VisibilityHelp - - def initialize(node); end - - def all_bisected?; end - def attr_names; end - def attrs; end - def bisect(*names); end - def bisected_names; end - def bisection; end - def node; end - def reader?; end - def rest; end - def visibility; end - def writer?; end - - class << self - def macro?(node); end - end -end - -class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def eq_end_part(comment, expr); end - def parts(comment); end -end - -RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_numblock(node); end - def on_send(node); end - - private - - def array_or_range?(node); end - def autocorrect(corrector, node); end - def begin_required?(block_node); end - def braces_for_chaining_message(node); end - def braces_for_chaining_style?(node); end - def braces_required_message(node); end - def braces_required_method?(method_name); end - def braces_required_methods; end - def braces_style?(node); end - def conditional?(node); end - def correction_would_break_code?(node); end - def end_of_chain(node); end - def functional_block?(node); end - def functional_method?(method_name); end - def get_blocks(node, &block); end - def line_count_based_block_style?(node); end - def line_count_based_message(node); end - def message(node); end - def move_comment_before_block(corrector, comment, block_node, closing_brace); end - def procedural_method?(method_name); end - def procedural_oneliners_may_have_braces?; end - def proper_block_style?(node); end - def replace_braces_with_do_end(corrector, loc); end - def replace_do_end_with_braces(corrector, node); end - def return_value_of_scope?(node); end - def return_value_used?(node); end - def semantic_block_style?(node); end - def semantic_message(node); end - def special_method?(method_name); end - def special_method_proper_block_style?(node); end - def whitespace_after?(range, length = T.unsafe(nil)); end - def whitespace_before?(range); end - def with_block?(node); end -end - -RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CaseCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - def correct(corrector, cop, node); end - def move_assignment_inside_condition(corrector, node); end - - private - - def extract_branches(case_node); end - def extract_tail_branches(node); end - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def case_equality?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def const?(node); end - def replacement(lhs, rhs); end -end - -RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def autocorrect(corrector, node); end - def branch_conditions(node); end - def class_reference?(node); end - def collect_conditions(node, target, conditions); end - def condition_from_binary_op(lhs, rhs, target); end - def condition_from_equality_node(node, target); end - def condition_from_include_or_cover_node(node, target); end - def condition_from_match_node(node, target); end - def condition_from_send_node(node, target); end - def const_reference?(node); end - def correction_range(node); end - def deparenthesize(node); end - def find_target(node); end - def find_target_in_equality_node(node); end - def find_target_in_include_or_cover_node(node); end - def find_target_in_match_node(node); end - def find_target_in_send_node(node); end - def regexp_with_named_captures?(node); end - def regexp_with_working_captures?(node); end - def should_check?(node); end -end - -RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - def correct_style_detected; end - def offense?(node); end - def opposite_style_detected; end -end - -RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - - private - - def add_trailing_end(corrector, node, padding); end - def autocorrect(corrector, node); end - def check_compact_style(node, body); end - def check_nested_style(node); end - def check_style(node, body); end - def compact_definition(corrector, node); end - def compact_identifier_name(node); end - def compact_node(corrector, node); end - def compact_node_name?(node); end - def compact_replacement(node); end - def configured_indentation_width; end - def indent_width; end - def leading_spaces(node); end - def needs_compacting?(body); end - def nest_definition(corrector, node); end - def nest_or_compact(corrector, node); end - def remove_end(corrector, body); end - def replace_namespace_keyword(corrector, node); end - def split_on_double_colon(corrector, node, padding); end - def unindent(corrector, node); end -end - -RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def message(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def class_comparison_candidate?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def class_name(class_node, node); end - def offense_range(receiver_node, node); end -end - -RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - - private - - def check_defs(name, node); end -end - -RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_defs(node); end - def on_sclass(node); end - - private - - def all_methods_public?(sclass_node); end - def autocorrect_sclass(node, corrector); end - def def_nodes(sclass_node); end - def def_self_style?; end - def extract_def_from_sclass(def_node, sclass_node); end - def indentation_diff(node1, node2); end - def sclass_only_has_methods?(node); end -end - -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base - def on_cvasgn(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def reject_method?(param0 = T.unsafe(nil)); end - def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - def select_method?(param0 = T.unsafe(nil)); end - - private - - def good_method_name(node); end - def offense_range(node); end - def range(begin_pos_node, end_pos_node); end -end - -RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_send(node); end - - private - - def check_method_node(node); end - def implicit_block?(node); end - def message(node); end - def methods_accepting_symbol; end -end - -RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def java_type_node?(param0 = T.unsafe(nil)); end - def on_send(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_defs(node); end -end - -RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base - def on_block(node); end - def on_for(node); end - - private - - def collection_looping_method?(node); end - def same_collection_looping?(node, sibling); end -end - -RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_xstr(node); end - - private - - def allow_inner_backticks?; end - def allowed_backtick_literal?(node); end - def allowed_percent_x_literal?(node); end - def autocorrect(corrector, node); end - def backtick_literal?(node); end - def check_backtick_literal(node, message); end - def check_percent_x_literal(node, message); end - def command_delimiter; end - def contains_backtick?(node); end - def contains_disallowed_backtick?(node); end - def default_delimiter; end - def node_body(node); end - def preferred_delimiter; end - def preferred_delimiters_config; end -end - -RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def annotation_range(annotation); end - def correct_offense(corrector, range, keyword); end - def first_comment_line?(comments, index); end - def inline_comment?(comment); end - def keywords; end - def register_offense(annotation); end - def requires_colon?; end -end - -RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def offensive?(comment); end - def register_offense(comment, matched_keyword); end - def source_line(comment); end -end - -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Style::ConditionalAssignmentHelper - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def assignment_type?(param0 = T.unsafe(nil)); end - def candidate_condition?(param0 = T.unsafe(nil)); end - def on_and_asgn(node); end - def on_case(node); end - def on_case_match(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_if(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end - def on_send(node); end - - private - - def allowed_single_line?(branches); end - def allowed_statements?(branches); end - def allowed_ternary?(assignment); end - def assignment_node(node); end - def assignment_types_match?(*nodes); end - def autocorrect(corrector, node); end - def candidate_node?(node); end - def check_assignment_to_condition(node); end - def check_node(node, branches); end - def correction_exceeds_line_limit?(node, branches); end - def include_ternary?; end - def indentation_width; end - def lhs_all_match?(branches); end - def line_length_cop_enabled?; end - def longest_line(node, assignment); end - def longest_line_exceeds_line_limit?(node, assignment); end - def max_line_length; end - def move_assignment_inside_condition(corrector, node); end - def move_assignment_outside_condition(corrector, node); end - def single_line_conditions_only?; end - def ternary_condition?(node); end -end - -RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::INDENTATION_WIDTH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::LINE_LENGTH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::MAX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::ConditionalAssignment::WIDTH = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::AST::NodePattern::Macros - - def end_with_eq?(sym); end - def expand_elses(branch); end - def expand_when_branches(when_branches); end - def indent(cop, source); end - def lhs(node); end - def tail(branch); end - - private - - def assignment_rhs_exist?(node); end - def expand_elsif(node, elsif_branches = T.unsafe(nil)); end - def lhs_for_casgn(node); end - def lhs_for_send(node); end - def setter_method?(method_name); end -end - -RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style::ConditionalCorrectorHelper - def assignment(node); end - def correct_branches(corrector, branches); end - def correct_if_branches(corrector, cop, node); end - def remove_whitespace_in_branches(corrector, branch, condition, column); end - def replace_branch_assignment(corrector, branch); end - def white_space_range(node, column); end -end - -class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base - def on_casgn(node); end - def visibility_declaration_for?(param0 = T.unsafe(nil), param1); end - - private - - def class_or_module_scope?(node); end - def ignore_modules?; end - def match_name?(name, constant_name); end - def message(node); end - def module?(node); end - def visibility_declaration?(node); end -end - -RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect_notice; end - def encoding_token?(processed_source, token_index); end - def insert_notice_before(processed_source); end - def notice; end - def notice_found?(processed_source); end - def offense_range; end - def shebang_token?(processed_source, token_index); end - def verify_autocorrect_notice!; end -end - -RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def date_time?(param0 = T.unsafe(nil)); end - def historic_date?(param0 = T.unsafe(nil)); end - def on_send(node); end - def to_datetime?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def disallow_coercion?; end -end - -RuboCop::Cop::Style::DateTime::CLASS_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def dir_replacement?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def file_keyword?(node); end -end - -RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def allowed_cops; end - def any_cops_allowed?; end - def directive_cops(comment); end - def register_offense(comment, directive_cops, disallowed_cops); end -end - -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base - def on_send(node); end - - private - - def comment_block_docs?(arg_node); end - def comment_regexp(arg_node); end - def heredoc_comment_blocks(heredoc_body); end - def inline_comment_docs?(node); end - def interpolated?(arg_node); end - def merge_adjacent_comments(line, index, hash); end - def preceding_comment_blocks(node); end - def source_to_regexp(source); end -end - -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::RangeHelp - - def constant_definition?(param0 = T.unsafe(nil)); end - def constant_visibility_declaration?(param0 = T.unsafe(nil)); end - def on_class(node); end - def on_module(node); end - def outer_module(param0); end - - private - - def allowed_constants; end - def check(node, body); end - def compact_namespace?(node); end - def constant_allowed?(node); end - def constant_declaration?(node); end - def identifier(node); end - def macro_only?(body); end - def namespace?(node); end - def nodoc(node); end - def nodoc?(comment, require_all: T.unsafe(nil)); end - def nodoc_comment?(node, require_all: T.unsafe(nil)); end - def nodoc_self_or_outer_module?(node); end - def qualify_const(node); end -end - -RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::DocumentationComment - include ::RuboCop::Cop::VisibilityHelp - include ::RuboCop::Cop::DefNode - - def module_function_node?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - - private - - def check(node); end - def require_for_non_public_methods?; end -end - -RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end -end - -RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def double_negative?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_in_returns?(node); end - def define_mehod?(node); end - def double_negative_condition_return_value?(node, last_child, conditional_node); end - def end_of_method_definition?(node); end - def find_conditional_node_from_ascendant(node); end - def find_def_node_from_ascendant(node); end - def find_last_child(node); end - def find_parent_not_enumerable(node); end -end - -RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def offending_each_range(param0 = T.unsafe(nil)); end - def on_block(node); end -end - -RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def each_with_object_candidate?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def accumulator_param_assigned_to?(body, args); end - def autocorrect(corrector, node, return_value); end - def first_argument_returned?(args, return_value); end - def return_value(body); end - def return_value_occupies_whole_line?(node); end - def simple_method_arg?(method_arg); end - def whole_line_expression(node); end -end - -RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(case_node); end - - private - - def autocorrect(corrector, case_node); end - def correct_case_when(corrector, case_node, when_nodes); end - def correct_when_conditions(corrector, when_nodes); end - def keep_first_when_comment(case_range, corrector); end - def replace_then_with_line_break(corrector, conditions, when_node); end -end - -RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_normal_if_unless(node); end - - private - - def autocorrect(corrector, node); end - def autocorrect_forbidden?(type); end - def base_node(node); end - def check(node); end - def comment_in_else?(loc); end - def empty_check(node); end - def empty_style?; end - def missing_else_style; end - def nil_check(node); end - def nil_style?; end -end - -RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyHeredoc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Heredoc - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_heredoc(node); end - - private - - def enforce_double_quotes?; end - def preferred_string_literal; end - def string_literals_config; end -end - -RuboCop::Cop::Style::EmptyHeredoc::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::EmptyParameter - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def array_node(param0 = T.unsafe(nil)); end - def array_with_block(param0 = T.unsafe(nil)); end - def hash_node(param0 = T.unsafe(nil)); end - def hash_with_block(param0 = T.unsafe(nil)); end - def on_send(node); end - def str_node(param0 = T.unsafe(nil)); end - - private - - def correction(node); end - def enforce_double_quotes?; end - def first_argument_unparenthesized?(node); end - def frozen_strings?; end - def offense_array_node?(node); end - def offense_hash_node?(node); end - def offense_message(node); end - def preferred_string_literal; end - def replacement_range(node); end - def string_literals_config; end -end - -RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def compact?(node); end - def compact_style?; end - def correct_style?(node); end - def corrected(node); end - def expanded?(node); end - def expanded_style?; end - def joint(node); end - def max_line_length; end - def message(_range); end -end - -RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def comments; end - def offense?(comment); end - def register_offense(line_number, comment); end -end - -RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_postexe(node); end -end - -RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - - private - - def arguments(node, missing = T.unsafe(nil)); end - def correct_to_multiline(corrector, node); end - def handle_allow_style(node); end - def handle_disallow_style(node); end -end - -RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::EnvHome < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def env_home?(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - def on_send(node); end - def valid_eval_receiver?(param0 = T.unsafe(nil)); end - - private - - def add_offense_for_different_line(node, line_node, line_diff); end - def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - def add_offense_for_missing_line(node, code); end - def add_offense_for_missing_location(node, code); end - def add_offense_for_same_line(node, line_node); end - def check_file(node, file_node); end - def check_line(node, code); end - def check_location(node, code); end - def expected_line(sign, line_diff); end - def file_and_line(node); end - def line_difference(line_node, code); end - def missing_line(node, code); end - def register_offense(node, &block); end - def special_file_keyword?(node); end - def special_line_keyword?(node); end - def string_first_line(str_node); end - def with_binding?(node); end - def with_lineno?(node); end -end - -RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def even_odd_candidate?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def replacement_method(arg, method); end -end - -RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def file_expand_path(param0 = T.unsafe(nil)); end - def on_send(node); end - def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end - def pathname_parent_expand_path(param0 = T.unsafe(nil)); end - - private - - def arguments_range(node); end - def autocorrect(corrector, node); end - def autocorrect_expand_path(corrector, current_path, default_dir); end - def depth(current_path); end - def inspect_offense_for_expand_path(node, current_path, default_dir); end - def parent_path(current_path); end - def remove_parent_method(corrector, default_dir); end - def strip_surrounded_quotes!(path_string); end - def unrecommended_argument?(default_dir); end -end - -RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_yield(node); end - def yielding_block?(param0 = T.unsafe(nil)); end - - private - - def add_block_argument(node, corrector, block_name); end - def block_body_range(block_node, send_node); end - def call_like?(node); end - def correct_call_node(node, corrector, block_name); end - def empty_arguments?(node); end - def extract_block_name(def_node); end - def insert_argument(node, corrector, block_name); end - def yielding_arguments?(block_args, yield_args); end -end - -RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def on_float(node); end - - private - - def engineering?(node); end - def integral(node); end - def message(_node); end - def offense?(node); end - def scientific?(node); end -end - -RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::FetchEnvVar < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def env_with_bracket?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowable_use?(node); end - def allowed_var?(node); end - def assigned?(node); end - def message_chained_with_dot?(node); end - def new_code(name_node); end - def offensive?(node); end - def or_lhs?(node); end - def partial_matched?(node, condition); end - def used_as_flag?(node); end - def used_if_condition_in_body(node); end - def used_in_condition?(node, condition); end -end - -RuboCop::Cop::Style::FetchEnvVar::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_read?(param0 = T.unsafe(nil)); end - def file_open?(param0 = T.unsafe(nil)); end - def on_send(node); end - def send_read?(param0 = T.unsafe(nil)); end - - private - - def evidence(node); end - def file_open_read?(node); end - def read_method(mode); end - def read_node?(node, block_pass); end -end - -RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def block_write?(param0 = T.unsafe(nil)); end - def evidence(node); end - def file_open?(param0 = T.unsafe(nil)); end - def on_send(node); end - def send_write?(param0 = T.unsafe(nil)); end - - private - - def file_open_write?(node); end - def heredoc?(write_node); end - def heredoc_range(first_argument); end - def replacement(mode, filename, content, write_node); end - def write_method(mode); end -end - -RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def any_coerce?(param0 = T.unsafe(nil)); end - def both_coerce?(param0 = T.unsafe(nil)); end - def left_coerce?(param0 = T.unsafe(nil)); end - def on_send(node); end - def right_coerce?(param0 = T.unsafe(nil)); end - - private - - def add_to_f_method(corrector, node); end - def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end - def extract_receiver_source(node); end - def message(_node); end - def offense_condition?(node); end - def remove_to_f_method(corrector, send_node); end -end - -RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_for(node); end - - private - - def suspect_enumerable?(node); end -end - -RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def formatter(param0 = T.unsafe(nil)); end - def on_send(node); end - def variable_argument?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def autocorrect_from_percent(corrector, node); end - def autocorrect_to_percent(corrector, node); end - def format_single_parameter(arg); end - def message(detected_style); end - def method_name(style_name); end -end - -RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def format_string_in_typical_context?(param0 = T.unsafe(nil)); end - def on_str(node); end - - private - - def allowed_unannotated?(detections); end - def autocorrect_sequence(corrector, detected_sequence, token_range); end - def check_sequence(detected_sequence, token_range); end - def collect_detections(node); end - def correctable_sequence?(detected_type); end - def format_string_token?(node); end - def max_unannotated_placeholders_allowed; end - def message(detected_style); end - def message_text(style); end - def str_contents(source_map); end - def token_ranges(contents); end - def tokens(str_node, &block); end - def unannotated_format?(node, detected_style); end - def use_allowed_method?(node); end -end - -class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_new_investigation; end - - private - - def disabled_offense(processed_source); end - def enable_comment(corrector); end - def ensure_comment(processed_source); end - def ensure_enabled_comment(processed_source); end - def ensure_no_comment(processed_source); end - def following_comment; end - def frozen_string_literal_comment(processed_source); end - def insert_comment(corrector); end - def last_special_comment(processed_source); end - def line_range(line); end - def missing_offense(processed_source); end - def missing_true_offense(processed_source); end - def preceding_comment; end - def remove_comment(corrector, node); end - def unnecessary_comment_offense(processed_source); end -end - -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end - def on_const(node); end - - private - - def gvar_name(const_name); end - def message(const_name); end -end - -RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base - def allowed_var?(global_var); end - def check(node); end - def on_gvar(node); end - def on_gvasgn(node); end - def user_vars; end -end - -RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - - def on_def(node); end - def on_defs(node); end - def on_if(node); end - - private - - def accepted_form?(node, ending: T.unsafe(nil)); end - def accepted_if?(node, ending); end - def allowed_consecutive_conditionals?; end - def check_ending_if(node); end - def consecutive_conditionals?(parent, node); end - def guard_clause_source(guard_clause); end - def register_offense(node, scope_exiting_keyword, conditional_keyword); end - def too_long_for_single_line?(node, example); end - def trivial?(node); end -end - -RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end - - private - - def braces_style?; end - def check_braces(node); end - def check_no_braces(node); end - def containing_array(hash_node); end - def explicit_array?(array); end - def last_array_item?(array, node); end - def remove_last_element_trailing_comma(corrector, node); end -end - -class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def hash_from_array?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def allowed_splat_argument?; end - def args_to_hash(args); end - def multi_argument(node); end - def register_offense_for_hash(node, hash_argument); end - def register_offense_for_zip_method(node, zip_method); end - def requires_parens?(node); end - def single_argument(node); end - def use_zip_method_without_argument?(first_argument); end -end - -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Lint::UnusedArgument - extend ::RuboCop::Cop::AutoCorrector - - def kv_each(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def allowed_receiver?(receiver); end - def allowed_receivers; end - def check_argument(variable); end - def correct_args(node, corrector); end - def correct_implicit(node, corrector, method_name); end - def correct_key_value_each(node, corrector); end - def kv_range(outer_node); end - def register_kv_offense(node); end - def used?(arg); end -end - -RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::TargetRubyVersion - extend ::RuboCop::Cop::AutoCorrector - - def bad_method_with_active_support?(param0 = T.unsafe(nil)); end - def bad_method_with_poro?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def bad_method?(block); end - def decorate_source(value); end - def except_key(node); end - def except_key_source(key); end - def extract_body_if_nagated(body); end - def included?(negated, body); end - def not_included?(negated, body); end - def offense_range(node); end - def safe_to_register_offense?(block, except_key); end - def semantically_except_method?(send, block); end -end - -RuboCop::Cop::Style::HashExcept::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashExcept::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base - def hash_like_case?(param0 = T.unsafe(nil)); end - def on_case(node); end - - private - - def min_branches_count; end - def nodes_of_same_type?(nodes); end -end - -RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::HashShorthandSyntax - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def alternative_style; end - def hash_rockets_check(pairs); end - def no_mixed_keys_check(pairs); end - def on_hash(node); end - def ruby19_check(pairs); end - def ruby19_no_mixed_keys_check(pairs); end - - private - - def acceptable_19_syntax_symbol?(sym_name); end - def argument_without_space?(node); end - def autocorrect(corrector, node); end - def autocorrect_hash_rockets(corrector, pair_node); end - def autocorrect_no_mixed_keys(corrector, pair_node); end - def autocorrect_ruby19(corrector, pair_node); end - def check(pairs, delim, msg); end - def force_hash_rockets?(pairs); end - def range_for_autocorrect_ruby19(pair_node); end - def sym_indices?(pairs); end - def word_symbol_pair?(pair); end -end - -RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - def extract_captures(match); end - def new_method_name; end -end - -class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::HashTransformMethod - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_bad_each_with_object(param0 = T.unsafe(nil)); end - def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end - def on_bad_map_to_h(param0 = T.unsafe(nil)); end - def on_bad_to_h(param0 = T.unsafe(nil)); end - - private - - def extract_captures(match); end - def new_method_name; end -end - -class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_case(node); end - def on_case_match(node); end - def on_if(node); end - - private - - def check_branches(node, branches); end - def check_expressions(node, expressions, insert_position); end - def duplicated_expressions?(node, expressions); end - def expand_elses(branch); end - def head(node); end - def message(node); end - def tail(node); end -end - -RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - def correct(corrector, cop, node); end - def move_assignment_inside_condition(corrector, node); end - - private - - def extract_tail_branches(node); end - def move_branch_inside_condition(corrector, branch, condition, assignment, column); end - end -end - -class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def allow_if_modifier?; end - def allow_if_modifier_in_else_branch?(else_branch); end - def autocorrect(corrector, node); end - def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - def correct_to_elsif_from_modifier_form(corrector, node); end - def find_end_range(node); end - def if_condition_range(node, condition); end - def then?(node); end -end - -RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def allowed_patterns; end - def another_statement_on_same_line?(node); end - def autocorrect(corrector, node); end - def extract_heredoc_from(last_argument); end - def line_length_enabled_at_line?(line); end - def named_capture_in_condition?(node); end - def non_eligible_node?(node); end - def non_simple_if_unless?(node); end - def remove_heredoc(corrector, heredoc); end - def to_normal_form(node, indentation); end - def to_normal_form_with_heredoc(node, indentation, heredoc); end - def too_long_due_to_modifier?(node); end - def too_long_line_based_on_allow_uri?(line); end - def too_long_line_based_on_config?(range, line); end - def too_long_line_based_on_ignore_cop_directives?(range, line); end - def too_long_single_line?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end -end - -RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def double_negative?(param0 = T.unsafe(nil)); end - def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - def on_if(node); end - - private - - def assume_boolean_value?(condition); end - def message(node, keyword); end - def offense_range_with_keyword(node, condition); end - def opposite_condition?(node); end - def replacement_condition(node, condition); end - def require_parentheses?(condition); end - def return_boolean_value?(condition); end -end - -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - def on_normal_if_unless(node); end - - private - - def autocorrect(node); end - def build_else_branch(second_condition); end - def correct_elsif(node); end -end - -RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base - def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::ImplicitRuntimeError::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ImplicitRuntimeError::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_in_pattern(node); end - - private - - def alternative_pattern_source(pattern); end -end - -RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def after_leaving_scope(scope, _variable_table); end - def on_until(node); end - def on_until_post(node); end - def on_while(node); end - def on_while_post(node); end - - private - - def assigned_before_loop?(var, range); end - def assigned_inside_loop?(var, range); end - def autocorrect(corrector, node); end - def configured_indent; end - def modifier_replacement(node); end - def non_modifier_range(node); end - def referenced_after_loop?(var, range); end - def replace_begin_end_with_modifier(corrector, node); end - def replace_source(corrector, range, replacement); end - def while_or_until(node); end - - class << self - def joining_forces; end - end -end - -RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base - def on_new_investigation; end -end - -RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def inverse_block?(param0 = T.unsafe(nil)); end - def inverse_candidate?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_send(node); end - - private - - def camel_case_constant?(node); end - def correct_inverse_block(corrector, node); end - def correct_inverse_method(corrector, node); end - def correct_inverse_selector(block, corrector); end - def dot_range(loc); end - def end_parentheses(node, method_call); end - def inverse_blocks; end - def inverse_methods; end - def message(method, inverse); end - def negated?(node); end - def not_to_receiver(node, method_call); end - def possible_class_hierarchy_check?(lhs, rhs, method); end - def remove_end_parenthesis(corrector, node, method, method_call); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::StringHelp - - def correct_style_detected; end - def offense?(node); end - def opposite_style_detected; end - - private - - def allowed_addresses; end - def could_be_ip?(str); end - def starts_with_hex_or_colon?(str); end - def too_long?(str); end -end - -RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_kwoptarg(node); end - - private - - def append_newline_to_last_kwoptarg(arguments, corrector); end - def remove_kwargs(kwarg_nodes, corrector); end -end - -RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_numblock(node); end - - private - - def arguments_with_whitespace(node); end - def autocorrect_method_to_literal(corrector, node); end - def lambda_arg_string(args); end - def message(node, selector); end - def message_line_modifier(node); end - def offending_selector?(node, selector); end -end - -RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def explicit_style?; end - def implicit_style?; end - def offense?(node); end - def prefer(node); end -end - -RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - - private - - def autocorrect(corrector, operator_range); end - def check_token_set(index); end - def eligible_next_successor?(next_successor); end - def eligible_operator?(operator); end - def eligible_predecessor?(predecessor); end - def eligible_successor?(successor); end - def eligible_token_set?(predecessor, operator, successor); end - def standard_string_literal?(token); end - def token_after_last_string(successor, base_index); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def map_and_compact?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def range(node); end - def returns_block_argument?(block_argument_node, return_value_node); end - def truthy_branch?(node); end - def truthy_branch_for_guard?(node); end - def truthy_branch_for_if?(node); end -end - -RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def map_to_h?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def autocorrect(corrector, to_h, map); end -end - -RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - def on_super(node); end - def on_yield(node); end - - private - - def args_begin(node); end - def args_end(node); end - def args_parenthesized?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses - private - - def allowed_camel_case_method_call?(node); end - def allowed_chained_call_with_parentheses?(node); end - def allowed_multiline_call_with_parentheses?(node); end - def allowed_string_interpolation_method_call?(node); end - def ambigious_literal?(node); end - def assigned_before?(node, target); end - def autocorrect(corrector, node); end - def call_as_argument_or_chain?(node); end - def call_in_literals?(node); end - def call_in_logical_operators?(node); end - def call_in_optional_arguments?(node); end - def call_in_single_line_inheritance?(node); end - def call_with_ambiguous_arguments?(node); end - def call_with_braced_block?(node); end - def exist_next_line_expression?(node); end - def hash_literal?(node); end - def hash_literal_in_arguments?(node); end - def inside_endless_method_def?(node); end - def inside_string_interpolation?(node); end - def legitimate_call_with_parentheses?(node); end - def logical_operator?(node); end - def modifier_form?(node); end - def offense_range(node); end - def omit_parentheses(node); end - def parentheses_at_the_end_of_multiline_call?(node); end - def regexp_slash_literal?(node); end - def require_parentheses_for_hash_value_omission?(node); end - def splat?(node); end - def super_call_without_arguments?(node); end - def syntax_like_method_call?(node); end - def ternary_if?(node); end - def unary_literal?(node); end -end - -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) - -module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses - private - - def allowed_method_name?(name); end - def eligible_for_parentheses_omission?(node); end - def ignored_macro?(node); end - def included_macros_list; end - def require_parentheses(node); end -end - -RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def allowed_method_name?(name); end - def any_assignment?(node); end - def default_argument?(node); end - def ineligible_node?(node); end - def offense_range(node); end - def register_offense(node); end - def same_name_assignment?(node); end - def variable_in_mass_assignment?(variable_name, node); end -end - -RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_block(node); end - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def anonymous_block_arg?(node); end - def arguments_without_parentheses?(node); end - def correct_arguments(arg_node, corrector); end - def forced_parentheses?(node); end - def missing_parentheses(node); end - def require_parentheses?(args); end - def unwanted_parentheses(args); end -end - -RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def min_max_candidate(param0 = T.unsafe(nil)); end - def on_array(node); end - def on_return(node); end - - private - - def argument_range(node); end - def message(offender, receiver); end - def offending_range(node); end -end - -RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def on_case(node); end - def on_case_match(node); end - def on_normal_if_unless(node); end - - private - - def case_style?; end - def check(node); end - def empty_else_config; end - def empty_else_cop_enabled?; end - def empty_else_style; end - def if_style?; end - def message_template; end - def unless_else_config; end - def unless_else_cop_enabled?; end -end - -RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base - def on_def(node); end - def on_defs(node); end - - private - - def implements_respond_to_missing?(node); end -end - -RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def on_module(node); end - - private - - def check(send_node); end - def check_grouped_style(send_node); end - def check_separated_style(send_node); end - def group_mixins(node, mixins); end - def grouped_style?; end - def range_to_remove_for_subsequent_mixin(mixins, node); end - def separate_mixins(node); end - def separated_style?; end - def sibling_mixins(send_node); end -end - -RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base - def in_top_level_scope?(param0 = T.unsafe(nil)); end - def include_statement(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def extend_self_node?(param0 = T.unsafe(nil)); end - def module_function_node?(param0 = T.unsafe(nil)); end - def on_module(node); end - def private_directive?(param0 = T.unsafe(nil)); end - - private - - def check_extend_self(nodes); end - def check_forbidden(nodes); end - def check_module_function(nodes); end - def each_wrong_style(nodes, &block); end - def message(_range); end -end - -RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - def on_block(node); end -end - -RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def configured_indentation_width; end - def indented_body(body, node); end - def to_normal_if(node); end -end - -RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::OnNormalIfUnless - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_normal_if_unless(node); end - - private - - def non_modifier_then?(node); end -end - -RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MultilineIfThen::NON_MODIFIER_THEN = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_in_pattern(node); end - - private - - def require_then?(in_pattern_node); end -end - -RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def message(_node); end - def on_or_asgn(node); end - - private - - def bad_rhs?(rhs); end - def keyword_autocorrect(node, corrector); end - def keyword_begin_str(node, node_buf); end - def keyword_end_str(node, node_buf); end -end - -RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def arguments_range(node); end - def autocorrect(corrector, node); end - def closing_line(node); end - def correction_exceeds_max_line_length?(node); end - def definition_width(node); end - def indentation_width(node); end - def last_line_source_of_arguments(arguments); end - def max_line_length; end - def opening_line(node); end -end - -RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def enforce_single_line_ternary_operator?(node); end - def offense?(node); end - def replacement(node); end - def use_assignment_method?(node); end -end - -RuboCop::Cop::Style::MultilineTernaryOperator::MSG_IF = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MultilineTernaryOperator::MSG_SINGLE_LINE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::MultilineTernaryOperator::SINGLE_LINE_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_when(node); end - - private - - def accept_node_type?(node); end - def require_then?(when_node); end -end - -RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - def on_or(node); end - def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - def simple_double_comparison?(param0 = T.unsafe(nil)); end - - private - - def allow_method_comparison?; end - def comparison?(node); end - def nested_comparison?(node); end - def nested_variable_comparison?(node); end - def reset_comparison; end - def root_of_or_node(or_node); end - def switch_comparison?(node); end - def variable_name(node); end - def variables_in_node(node); end - def variables_in_simple_node(node); end -end - -RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour - include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_casgn(node); end - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end - def splat_value(param0 = T.unsafe(nil)); end - def t_let(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def check(value); end - def correct_splat_expansion(corrector, expr, splat_value); end - def frozen_regexp_or_range_literals?(node); end - def immutable_literal?(node); end - def mutable_literal?(value); end - def requires_parentheses?(node); end - def shareable_constant_value?(node); end - def strict_check(value); end -end - -RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue - private - - def magic_comment_in_scope(node); end - def processed_source_till_node(node); end - def recent_shareable_value?(node); end - def shareable_constant_value_enabled?(value); end - - class << self - def magic_comment_in_scope(node); end - def recent_shareable_value?(node); end - end -end - -class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def correct_style?(node); end - def message(node); end -end - -class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def double_negation?(param0 = T.unsafe(nil)); end - def on_if(node); end - def on_new_investigation; end - - private - - def correct_negated_condition(corrector, node); end - def corrected_ancestor?(node); end - def else_range(node); end - def if_else?(node); end - def if_range(node); end - def negated_condition?(node); end - def swap_branches(corrector, node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def correct_style?(node); end - def message(node); end -end - -class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base - include ::RuboCop::Cop::NegativeConditional - extend ::RuboCop::Cop::AutoCorrector - - def on_until(node); end - def on_while(node); end -end - -class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def file_dirname?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def offense_range(node); end - def path_with_dir_level(node, level); end -end - -RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def add_parentheses_to_method_arguments(send_node); end - def autocorrect(corrector, node); end - def check(node); end - def left_hand_operand(node, operator); end - def modifier?(node); end - def new_expression(inner_node); end - def replacement_operator(keyword); end - def requires_parens?(node); end - def right_hand_operand(node, left_hand_keyword); end -end - -RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def allowed?(send_node); end - def allowed_omission?(send_node); end - def autocorrect(corrector, nested); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def autocorrect(corrector, if_node); end - def if_node(node); end - def remove_parentheses(source); end - def replace_loc_and_whitespace(corrector, range, replacement); end -end - -RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::MinBodyLength - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_for(node); end - def on_new_investigation; end - def on_until(node); end - def on_while(node); end - - private - - def actual_indent(lines, buffer); end - def allowed_modifier_if?(node); end - def autocorrect_block(corrector, node); end - def autocorrect_modifier(corrector, node); end - def check(node); end - def cond_range(node, cond); end - def end_followed_by_whitespace_only?(source_buffer, end_pos); end - def end_range(node); end - def ends_with_condition?(body); end - def exit_body_type?(node); end - def heredoc_lines(node); end - def if_else_children?(node); end - def if_without_else?(node); end - def offense_location(offense_node); end - def offense_node(body); end - def reindent(lines, node, corrector); end - def reindent_line(corrector, lineno, delta, buffer); end - def reindentable_lines(node); end - def simple_if_without_break?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def nil_check?(param0 = T.unsafe(nil)); end - def nil_comparison?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def message(_node); end - def prefer_comparison?; end - def style_check?(node, &block); end -end - -RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def nil_return?(param0 = T.unsafe(nil)); end - def on_block(node); end - - private - - def autocorrect(corrector, node); end -end - -RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def nil_check?(param0 = T.unsafe(nil)); end - def not_and_nil_check?(param0 = T.unsafe(nil)); end - def not_equal_to_nil?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - def unless_check?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def autocorrect_comparison(corrector, node); end - def autocorrect_non_nil(corrector, node, inner_node); end - def autocorrect_unless_nil(corrector, node, receiver); end - def include_semantic_changes?; end - def message(node); end - def nil_comparison_style; end - def register_offense?(node); end - def unless_and_nil_check?(send_node); end -end - -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def correct_opposite_method(corrector, range, child); end - def correct_with_parens(corrector, range, node); end - def correct_without_parens(corrector, range); end - def opposite_method?(child); end - def requires_parens?(child); end -end - -RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::TargetRubyVersion - - def on_numblock(node); end -end - -RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::TargetRubyVersion - - def max=(value); end - def on_numblock(node); end - - private - - def max_count; end -end - -RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) -RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - extend ::RuboCop::Cop::AutoCorrector - - def on_int(node); end - - private - - def format_binary(source); end - def format_decimal(source); end - def format_hex(source); end - def format_octal(source); end - def format_octal_zero_only(source); end - def hex_bin_dec_literal_type(literal); end - def literal_type(node); end - def message(node); end - def octal_literal_type(literal); end - def octal_zero_only?; end -end - -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::IntegerNode - extend ::RuboCop::Cop::AutoCorrector - - def min_digits=(value); end - def on_float(node); end - def on_int(node); end - - private - - def allowed_numbers; end - def check(node); end - def format_int_part(int_part); end - def format_number(node); end - def min_digits; end - def register_offense(node, &_block); end - def short_group_regex; end -end - -RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def comparison(param0 = T.unsafe(nil)); end - def inverted_comparison(param0 = T.unsafe(nil)); end - def on_send(node); end - def predicate(param0 = T.unsafe(nil)); end - - private - - def allowed_method_name?(name); end - def check(node); end - def invert; end - def parenthesized_source(node); end - def replacement(numeric, operation); end - def replacement_supported?(operator); end - def require_parentheses?(node); end -end - -RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def on_send(node); end - - private - - def check_method_node(node); end - def message(node); end - def preferred_method(node); end -end - -RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::OnNormalIfUnless - extend ::RuboCop::Cop::AutoCorrector - - def on_normal_if_unless(node); end - - private - - def always_multiline?; end - def autocorrect(corrector, node); end - def cannot_replace_to_ternary?(node); end - def expr_replacement(node); end - def indentation_width; end - def keyword_with_changed_precedence?(node); end - def message(node); end - def method_call_with_changed_precedence?(node); end - def requires_parentheses?(node); end - def ternary_correction(node); end - def ternary_replacement(node); end -end - -RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base - def on_const(node); end - def uses_open_struct?(param0 = T.unsafe(nil)); end - - private - - def custom_class_or_module_definition?(node); end -end - -RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base - def on_args(node); end - def option_hash(param0 = T.unsafe(nil)); end - - private - - def allowlist; end - def super_used?(node); end - def suspicious_name?(arg_name); end -end - -RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base - def on_def(node); end - - private - - def argument_positions(arguments); end - def each_misplaced_optional_arg(arguments); end -end - -RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - - def on_def(node); end - def on_defs(node); end - - private - - def format_message(argument); end -end - -RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_if(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def ternary_assignment?(param0 = T.unsafe(nil)); end - def unless_assignment?(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def take_variable_and_default_from_ternary(node); end - def take_variable_and_default_from_unless(node); end -end - -RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - extend ::RuboCop::Cop::AutoCorrector - - def implicit_self_getter?(param0 = T.unsafe(nil)); end - def on_masgn(node); end - - private - - def add_self_to_getters(right_elements); end - def allowed_lhs?(node); end - def allowed_masign?(lhs_elements, rhs_elements); end - def allowed_rhs?(node); end - def assignment_corrector(node, order); end - def autocorrect(corrector, node); end - def find_valid_order(left_elements, right_elements); end - def modifier_statement?(node); end - def return_of_method_call?(node); end -end - -class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter - include ::TSort - extend ::RuboCop::AST::NodePattern::Macros - - def initialize(assignments); end - - def accesses?(rhs, lhs); end - def dependency?(lhs, rhs); end - def matching_calls(param0, param1, param2); end - def tsort_each_child(assignment); end - def tsort_each_node(&block); end - def uses_var?(param0, param1); end - def var_name(param0 = T.unsafe(nil)); end -end - -class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - include ::RuboCop::Cop::Alignment - - def initialize(node, config, new_elements); end - - def config; end - def correction; end - def correction_range; end - def node; end - - protected - - def assignment; end - - private - - def cop_config; end - def extract_sources(node); end - def source(node); end -end - -RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - def correction; end - def correction_range; end - - private - - def modifier_range(node); end -end - -class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - def correction; end - def correction_range; end - - private - - def begin_correction(rescue_result); end - def def_correction(rescue_result); end -end - -class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::Parentheses - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def control_op_condition(param0 = T.unsafe(nil)); end - def on_if(node); end - def on_until(node); end - def on_while(node); end - - private - - def allow_multiline_conditions?; end - def message(node); end - def modifier_op?(node); end - def parens_allowed?(node); end - def process_control_op(node); end - def semicolon_separated_expressions?(first_exp, rest_exps); end -end - -class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - def on_dstr(node); end - def on_regexp(node); end - def on_str(node); end - def on_sym(node); end - def on_xstr(node); end - - private - - def contains_delimiter?(node, delimiters); end - def contains_preferred_delimiter?(node, type); end - def include_same_character_as_used_for_delimiter?(node, type); end - def matchpairs(begin_delimiter); end - def message(type); end - def on_percent_literal(node); end - def preferred_delimiters_for(type); end - def string_source(node); end - def uses_preferred_delimiter?(node, type); end -end - -class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_str(node); end - - private - - def correct_literal_style?(node); end - def corrected(src); end - def message(_range); end - def on_percent_literal(node); end -end - -RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_back_ref(node); end - def on_gvar(node); end - def on_nth_ref(node); end - - private - - def derived_from_braceless_interpolation?(node); end - def format_message(node:, preferred_expression:); end - def on_back_ref_or_gvar_or_nth_ref(node); end - def original_expression_of(node); end - def preferred_expression_to(node); end -end - -RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end - - private - - def message(method_name); end - def offending_selector?(method_name); end - def proper_method_name(method_name); end -end - -RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def proc_new?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::SymbolHelp - include ::RuboCop::Cop::StringLiteralsHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_sym(node); end - - private - - def alternative_style; end - def autocorrect(corrector, node); end - def correct_quotes(str); end - def hash_colon_key?(node); end - def invalid_double_quotes?(source); end - def quoted?(sym_node); end - def style; end - def wrong_quotes?(node); end -end - -RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def acceptable_exploded_args?(args); end - def allowed_non_exploded_type?(arg); end - def check_compact(node); end - def check_exploded(node); end - def correction_compact_to_exploded(node); end - def correction_exploded_to_compact(node); end - def requires_parens?(parent); end - def use_new_method?(first_arg); end -end - -RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def integer_op_rand?(param0 = T.unsafe(nil)); end - def on_send(node); end - def rand_modified?(param0 = T.unsafe(nil)); end - def rand_op_integer?(param0 = T.unsafe(nil)); end - def random_call(param0 = T.unsafe(nil)); end - def to_int(param0 = T.unsafe(nil)); end - - private - - def autocorrect(corrector, node); end - def boundaries_from_random_node(random_node); end - def corrected_integer_op_rand(node); end - def corrected_rand_modified(node); end - def corrected_rand_op_integer(node); end - def prefix_from_prefix_node(node); end -end - -RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def argument_range(node); end - def redundant_arg_for_method(method_name); end - def redundant_argument?(node); end -end - -RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - def redundant_assignment?(param0 = T.unsafe(nil)); end - - private - - def check_begin_node(node); end - def check_branch(node); end - def check_case_node(node); end - def check_ensure_node(node); end - def check_if_node(node); end - def check_rescue_node(node); end -end - -RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def offensive_kwbegins(param0); end - def on_block(node); end - def on_def(node); end - def on_defs(node); end - def on_kwbegin(node); end - - private - - def allowable_kwbegin?(node); end - def begin_block_has_multiline_statements?(node); end - def condition_range(node); end - def contain_rescue_or_ensure?(node); end - def correct_modifier_form_after_multiline_begin_block(corrector, node); end - def empty_begin?(node); end - def register_offense(node); end - def replace_begin_with_statement(corrector, offense_range, node); end - def restore_removed_comments(corrector, offense_range, node, first_child); end - def use_modifier_form_after_multiline_begin_block?(node); end - def valid_begin_assignment?(node); end - def valid_context_using_only_begin?(node); end -end - -RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def on_percent_literal(node); end - def requires_interpolation?(node); end -end - -RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def asgn_type?(node); end - def branches_have_assignment?(node); end - def branches_have_method?(node); end - def correct_ternary(corrector, node); end - def else_source(else_branch, arithmetic_operation); end - def else_source_if_has_assignment(else_branch); end - def else_source_if_has_method(else_branch); end - def if_source(if_branch, arithmetic_operation); end - def make_ternary_form(node); end - def message(node); end - def offense?(node); end - def range_of_offense(node); end - def redundant_condition?(node); end - def require_braces?(node); end - def require_parentheses?(node); end - def same_method?(if_branch, else_branch); end - def synonymous_condition_and_branch?(node); end - def use_arithmetic_operation?(node); end - def use_hash_key_access?(node); end - def use_hash_key_assignment?(else_branch); end - def use_if_branch?(else_branch); end - def without_argument_parentheses_method?(node); end -end - -RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def redundant_condition?(param0 = T.unsafe(nil)); end - def redundant_condition_inverted?(param0 = T.unsafe(nil)); end - - private - - def configured_indentation_width; end - def indented_else_node(expression, node); end - def invert_expression?(node); end - def message(node); end - def offense?(node); end - def replacement_condition(node); end -end - -RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def compact?(param0 = T.unsafe(nil)); end - def exploded?(param0 = T.unsafe(nil)); end - def fix_compact(node); end - def fix_exploded(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def rails_cache?(param0 = T.unsafe(nil)); end - def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end - - private - - def basic_literal?(node); end - def build_bad_method(send, body); end - def build_good_method(send, body); end - def check_for_constant?; end - def check_for_string?; end - def const_type?(node); end - def fetch_range(send, node); end - def should_not_check?(send, body); end -end - -RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def require_call?(param0 = T.unsafe(nil)); end - - private - - def extension_range(name_node); end -end - -RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base - include ::RuboCop::Cop::FrozenStringLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end - - private - - def immutable_literal?(node); end - def strip_parenthesis(node); end -end - -RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def initialize_forwards?(param0 = T.unsafe(nil)); end - def on_def(node); end - - private - - def acceptable?(node); end - def allow_comments?(node); end - def forwards?(node); end - def register_offense(node, message); end - def same_args?(super_node, args); end -end - -RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::PercentLiteral - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - - private - - def autocorrect_other(corrector, embedded_node, node); end - def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end - def autocorrect_variable_interpolation(corrector, embedded_node, node); end - def embedded_in_percent_array?(node); end - def implicit_concatenation?(node); end - def interpolation?(node); end - def require_parentheses?(node); end - def single_interpolation?(node); end - def single_variable_interpolation?(node); end - def variable_interpolation?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Parentheses - extend ::RuboCop::Cop::AutoCorrector - - def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - def first_send_argument?(param0 = T.unsafe(nil)); end - def first_super_argument?(param0 = T.unsafe(nil)); end - def first_yield_argument?(param0 = T.unsafe(nil)); end - def interpolation?(param0 = T.unsafe(nil)); end - def method_node_and_args(param0 = T.unsafe(nil)); end - def on_begin(node); end - def range_end?(param0 = T.unsafe(nil)); end - def rescue?(param0 = T.unsafe(nil)); end - def square_brackets?(param0 = T.unsafe(nil)); end - - private - - def allowed_ancestor?(node); end - def allowed_array_or_hash_element?(node); end - def allowed_expression?(node); end - def allowed_method_call?(node); end - def allowed_multiple_expression?(node); end - def call_chain_starts_with_int?(begin_node, send_node); end - def check(begin_node); end - def check_send(begin_node, node); end - def check_unary(begin_node, node); end - def disallowed_literal?(begin_node, node); end - def empty_parentheses?(node); end - def first_arg_begins_with_hash_literal?(node); end - def first_argument?(node); end - def hash_or_array_element?(node); end - def ignore_syntax?(node); end - def keyword_ancestor?(node); end - def keyword_with_redundant_parentheses?(node); end - def like_method_argument_parentheses?(node); end - def method_call_with_redundant_parentheses?(node); end - def method_chain_begins_with_hash_literal?(node); end - def offense(node, msg); end - def only_begin_arg?(args); end - def only_closing_paren_before_comma?(node); end - def parens_allowed?(node); end - def raised_to_power_negative_numeric?(begin_node, node); end - def suspect_unary?(node); end -end - -class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - def on_str(node); end - - private - - def acceptable_capital_q?(node); end - def acceptable_q?(node); end - def allowed_percent_q?(node); end - def check(node); end - def interpolated_quotes?(node); end - def message(node); end - def start_with_percent_q_variant?(string); end - def string_literal?(node); end -end - -RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_regexp(node); end - - private - - def backslash_b?(elem); end - def each_redundant_character_class(node); end - def each_single_element_character_class(node); end - def multiple_codepoins?(expression); end - def redundant_single_element_character_class?(node, char_class); end - def requires_escape_outside_char_class?(elem); end - def whitespace_in_free_space_mode?(node, elem); end - def without_character_class(loc); end -end - -RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_regexp(node); end - - private - - def allowed_escape?(node, char, within_character_class); end - def delimiter?(node, char); end - def each_escape(node); end - def escape_range_at_index(node, index); end -end - -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def add_braces(corrector, node); end - def add_brackets(corrector, node); end - def allow_multiple_return_values?; end - def check_begin_node(node); end - def check_branch(node); end - def check_case_node(node); end - def check_ensure_node(node); end - def check_if_node(node); end - def check_resbody_node(node); end - def check_rescue_node(node); end - def check_return_node(node); end - def correct_with_arguments(return_node, corrector); end - def correct_without_arguments(return_node, corrector); end - def hash_without_braces?(node); end - def message(node); end -end - -RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - def on_and_asgn(node); end - def on_args(node); end - def on_block(node); end - def on_blockarg(node); end - def on_def(node); end - def on_defs(node); end - def on_if(node); end - def on_in_pattern(node); end - def on_lvasgn(node); end - def on_masgn(node); end - def on_op_asgn(node); end - def on_or_asgn(node); end - def on_send(node); end - def on_until(node); end - def on_while(node); end - - private - - def add_lhs_to_local_variables_scopes(rhs, lhs); end - def add_masgn_lhs_variables(rhs, lhs); end - def add_match_var_scopes(in_pattern_node); end - def add_scope(node, local_variables = T.unsafe(nil)); end - def allow_self(node); end - def allowed_send_node?(node); end - def on_argument(node); end - def regular_method_call?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - def on_send(node); end - def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end - def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end - - private - - def correction_range(node); end - def method_returning_self?(method_name); end - def redundant_assignment?(node); end -end - -RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def bad_method?(param0 = T.unsafe(nil)); end - def on_lvasgn(node); end - - private - - def inconvertible_to_modifier?(if_branch, else_branch); end - def multiple_statements?(branch); end - def register_offense(if_node, offense_branch, opposite_branch, keyword); end - def self_assign?(variable, branch); end - def use_if_and_else_branch?(expression); end -end - -RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def redundant_sort?(param0 = T.unsafe(nil)); end - - private - - def accessor_start(node); end - def arg_node(node); end - def arg_value(node); end - def autocorrect(corrector, node, sort_node, sorter, accessor); end - def base(accessor, arg); end - def find_redundant_sort(*nodes); end - def message(node, sorter, accessor); end - def offense_range(sort_node, node); end - def register_offense(node, sort_node, sorter, accessor); end - def replace_with_logical_operator(corrector, node); end - def suffix(sorter); end - def suggestion(sorter, accessor, arg); end - def with_logical_operator?(node); end -end - -RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - def redundant_sort_by(param0 = T.unsafe(nil)); end - - private - - def sort_by_range(send, node); end -end - -RuboCop::Cop::Style::RedundantSortBy::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_regexp(node); end - - private - - def allow_inner_slashes?; end - def allowed_mixed_percent_r?(node); end - def allowed_mixed_slash?(node); end - def allowed_omit_parentheses_with_percent_r_literal?(node); end - def allowed_percent_r_literal?(node); end - def allowed_slash_literal?(node); end - def calculate_replacement(node); end - def contains_disallowed_slash?(node); end - def contains_slash?(node); end - def correct_delimiters(node, corrector); end - def correct_inner_slashes(node, corrector); end - def inner_slash_after_correction(node); end - def inner_slash_before_correction(node); end - def inner_slash_for(opening_delimiter); end - def inner_slash_indices(node); end - def node_body(node, include_begin_nodes: T.unsafe(nil)); end - def preferred_delimiters; end - def slash_literal?(node); end -end - -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RescueNode - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - - private - - def correct_rescue_block(corrector, node, parenthesized); end - def indentation_and_offset(node, parenthesized); end - def parenthesized?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RescueNode - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_resbody(node); end - def rescue_standard_error?(param0 = T.unsafe(nil)); end - def rescue_without_error_class?(param0 = T.unsafe(nil)); end - - private - - def offense_for_explicit_enforced_style(node); end - def offense_for_implicit_enforced_style(node, error); end -end - -RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def chained_send?(param0 = T.unsafe(nil)); end - def define_method?(param0 = T.unsafe(nil)); end - def on_return(node); end - def return_nil_node?(param0 = T.unsafe(nil)); end - def return_node?(param0 = T.unsafe(nil)); end - - private - - def correct_style?(node); end - def message(_node); end - def scoped_node?(node); end -end - -RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::NilMethods - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def check_node(node); end - def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end - def not_nil_check?(param0 = T.unsafe(nil)); end - def on_and(node); end - def on_if(node); end - def use_var_only_in_unless_modifier?(node, variable); end - - private - - def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end - def allowed_if_condition?(node); end - def autocorrect(corrector, node); end - def begin_range(node, method_call); end - def chain_length(method_chain, method); end - def comments(node); end - def end_range(node, method_call); end - def extract_common_parts(method_chain, checked_variable); end - def extract_parts(node); end - def extract_parts_from_and(node); end - def extract_parts_from_if(node); end - def find_matching_receiver_invocation(method_chain, checked_variable); end - def handle_comments(corrector, node, method_call); end - def max_chain_length; end - def method_call(node); end - def method_called?(send_node); end - def negated?(send_node); end - def relevant_comment_ranges(node); end - def unsafe_method?(send_node); end - def unsafe_method_used?(method_chain, method); end -end - -RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def sample_candidate?(param0 = T.unsafe(nil)); end - - private - - def correction(shuffle_arg, method, method_args); end - def extract_source(args); end - def message(shuffle_arg, method, method_args, range); end - def offensive?(method, method_args); end - def range_size(range_node); end - def sample_arg(method, method_args); end - def sample_size(method_args); end - def sample_size_for_one_arg(arg); end - def sample_size_for_two_args(first, second); end - def source_range(shuffle_node, node); end -end - -RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def calls_lvar?(param0 = T.unsafe(nil), param1); end - def creates_hash?(param0 = T.unsafe(nil)); end - def env_const?(param0 = T.unsafe(nil)); end - def on_send(node); end - def regexp_match?(param0 = T.unsafe(nil)); end - - private - - def extract_send_node(block_node); end - def find_regexp(node, block); end - def match_predicate_without_receiver?(node); end - def receiver_allowed?(node); end - def register_offense(node, block_node, regexp); end -end - -RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::SelectByRegexp::REPLACEMENTS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_cvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - - private - - def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end - def autocorrect(corrector, node); end - def autocorrect_boolean_node(corrector, node, rhs); end - def autocorrect_send_node(corrector, node, rhs); end - def check(node, var_type); end - def check_boolean_node(node, rhs, var_name, var_type); end - def check_send_node(node, rhs, var_name, var_type); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_begin(node); end - def on_new_investigation; end - - private - - def check_for_line_terminator_or_opener; end - def each_semicolon; end - def expressions_per_line(exprs); end - def find_range_node(token_before_semicolon); end - def find_semicolon_positions(line); end - def range_nodes; end - def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end - def tokens_for_lines; end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def custom_fail_methods(param0); end - def kernel_call?(param0 = T.unsafe(nil), param1); end - def on_new_investigation; end - def on_rescue(node); end - def on_send(node); end - - private - - def allow(method_name, node); end - def autocorrect(corrector, node); end - def check_scope(method_name, node); end - def check_send(method_name, node); end - def command_or_kernel_call?(name, node); end - def each_command_or_kernel_call(method_name, node); end - def message(method_name); end -end - -RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def single_argument_dig?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SingleLineBlockParams < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def args_match?(method_name, args); end - def autocorrect(corrector, node, preferred_block_arguments, joined_block_arguments); end - def build_preferred_arguments_map(node, preferred_arguments); end - def eligible_arguments?(node); end - def eligible_method?(node); end - def method_name(method); end - def method_names; end - def methods; end - def target_args(method_name); end -end - -RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end - - private - - def allow_empty?; end - def autocorrect(corrector, node); end - def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end - def correct_to_endless(corrector, node); end - def correct_to_endless?(body_node); end - def correct_to_multiline(corrector, node); end - def disallow_endless_method_style?; end - def each_part(body); end - def method_body_source(method_body); end - def move_comment(node, corrector); end - def require_parentheses?(method_body); end -end - -RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end - def range_till_minus_one?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - - private - - def allow_modifier?; end - def arguments_range(node); end - def assigned_variables(condition); end - def autocorrect(corrector, node, if_branch); end - def autocorrect_outer_condition_basic(corrector, node, if_branch); end - def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end - def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - def correct_for_comment(corrector, node, if_branch); end - def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end - def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end - def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - def correct_outer_condition(corrector, condition); end - def insert_bang(corrector, node, is_modify_form); end - def insert_bang_for_and(corrector, node); end - def offending_branch?(node, branch); end - def outer_condition_modify_form?(node, if_branch); end - def replace_condition(condition); end - def require_parentheses?(condition); end - def use_variable_assignment_in_condition?(condition, if_branch); end - def wrap_condition?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RequireLibrary - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node, global_var); end - def message(global_var); end - def on_gvar(node); end - def on_new_investigation; end - - private - - def add_require_english?; end - def english_name_replacement(preferred_name, node); end - def format_english_message(global_var); end - def format_list(items); end - def format_message(english, regular, global); end - def matching_styles(global); end - def preferred_names(global); end - def replacement(node, global_var); end - def should_require_english?(global_var); end -end - -RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - - private - - def message(_node); end - def missing_parentheses?(node); end - def missing_parentheses_corrector(corrector, node); end - def parentheses?(node); end - def redundant_parentheses?(node); end - def stabby_lambda_with_args?(node); end - def unwanted_parentheses_corrector(corrector, node); end -end - -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::VisibilityHelp - - def on_class(class_node); end - - private - - def class_convertible_to_module?(class_node); end - def class_elements(class_node); end - def extend_call?(node); end - def sclass_convertible_to_module?(node); end -end - -RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end - def stderr_puts?(param0 = T.unsafe(nil)); end - - private - - def message(node); end - def stderr_gvar?(sym); end - def stderr_puts_range(send); end -end - -RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_send(node); end -end - -RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_new_investigation; end - def on_send(node); end - def string_concatenation?(param0 = T.unsafe(nil)); end - - private - - def collect_parts(node, parts = T.unsafe(nil)); end - def corrected_ancestor?(node); end - def find_topmost_plus_node(node); end - def handle_quotes(parts); end - def heredoc?(node); end - def line_end_concatenation?(node); end - def mode; end - def plus_node?(node); end - def register_offense(topmost_plus_node, parts); end - def replacement(parts); end - def single_quoted?(str_node); end - def uncorrectable?(part); end -end - -RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_pair(node); end - def receive_environments_method?(param0 = T.unsafe(nil)); end - def string_hash_key?(param0 = T.unsafe(nil)); end -end - -RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::StringLiteralsHelp - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_dstr(node); end - - private - - def accept_child_double_quotes?(nodes); end - def all_string_literals?(nodes); end - def autocorrect(corrector, node); end - def check_multiline_quote_style(node, quote); end - def consistent_multiline?; end - def detect_quote_styles(node); end - def message(_node); end - def offense?(node); end - def register_offense(node, message: T.unsafe(nil)); end - def unexpected_double_quotes?(quote); end - def unexpected_single_quotes?(quote); end -end - -RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::StringLiteralsHelp - include ::RuboCop::Cop::StringHelp - extend ::RuboCop::Cop::AutoCorrector - - def autocorrect(corrector, node); end - - private - - def message(_node); end - def offense?(node); end -end - -class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end -end - -RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def lstrip_rstrip(param0 = T.unsafe(nil)); end - def on_send(node); end -end - -RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end - def struct_constructor?(param0 = T.unsafe(nil)); end - - private - - def correct_parent(parent, corrector); end - def range_for_empty_class_body(class_node, struct_new); end -end - -RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_asgn(node); end - def on_casgn(node); end - def on_cvasgn(node); end - def on_gvasgn(node); end - def on_ivasgn(node); end - def on_lvasgn(node); end - - private - - def allowed_assignment?(node); end - def correction_range(tmp_assign, y_assign); end - def lhs(node); end - def message(x_assign, y_assign); end - def replacement(x_assign); end - def rhs(node); end - def simple_assignment?(node); end - def swapping_values?(tmp_assign, x_assign, y_assign); end -end - -RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_array(node); end - - private - - def build_bracketed_array(node); end - def symbol_without_quote?(string); end - def symbols_contain_spaces?(node); end - def to_symbol_literal(string); end - - class << self - def largest_brackets; end - def largest_brackets=(_arg0); end - end -end - -RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_sym(node); end -end - -RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::CommentsHelp - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::AllowedPattern - extend ::RuboCop::Cop::AutoCorrector - - def destructuring_block_argument?(argument_node); end - def on_block(node); end - def on_numblock(node); end - def proc_node?(param0 = T.unsafe(nil)); end - def symbol_proc?(param0 = T.unsafe(nil)); end - def symbol_proc_receiver?(param0 = T.unsafe(nil)); end - - private - - def allow_comments?; end - def allow_if_method_has_argument?(send_node); end - def allowed_method_name?(name); end - def autocorrect(corrector, node); end - def autocorrect_with_args(corrector, node, args, method_name); end - def autocorrect_without_args(corrector, node); end - def begin_pos_for_replacement(node); end - def block_range_with_space(node); end - def register_offense(node, method_name, block_method_name); end - def unsafe_hash_usage?(node); end - - class << self - def autocorrect_incompatible_with; end - end -end - -RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::TernaryCorrector - extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper - extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper - - class << self - def correct(corrector, node); end - def move_assignment_inside_condition(corrector, node); end - - private - - def correction(node); end - def element_assignment?(node); end - def extract_branches(node); end - def move_branch_inside_condition(corrector, branch, assignment); end - def remove_parentheses(corrector, node); end - def ternary(node); end - end -end - -class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base - include ::RuboCop::Cop::SafeAssignment - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def method_name(param0 = T.unsafe(nil)); end - def on_if(node); end - - private - - def autocorrect(corrector, node); end - def below_ternary_precedence?(child); end - def complex_condition?(condition); end - def condition_as_parenthesized_one_line_pattern_matching?(condition); end - def correct_parenthesized(corrector, condition); end - def correct_unparenthesized(corrector, condition); end - def infinite_loop?; end - def message(node); end - def non_complex_expression?(condition); end - def non_complex_send?(node); end - def offense?(node); end - def only_closing_parenthesis_is_last_line?(condition); end - def parenthesized?(node); end - def redundant_parentheses_enabled?; end - def require_parentheses?; end - def require_parentheses_when_complex?; end - def unparenthesized_method_call?(child); end - def unsafe_autocorrect?(condition); end - def whitespace_after?(node); end -end - -RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) - -class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base - def define_method_block?(param0 = T.unsafe(nil)); end - def on_block(node); end - def on_def(node); end - def on_defs(node); end - def on_send(node); end - - private - - def top_level_method_definition?(node); end -end - -RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - def on_class(node); end -end - -RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - def on_defs(node); end -end - -RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::TrailingBody - extend ::RuboCop::Cop::AutoCorrector - - def on_module(node); end -end - -RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - def on_csend(node); end - def on_send(node); end -end - -class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end -end - -class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_block(node); end - - private - - def arg_count(node); end - def argument_tokens(node); end - def last_comma(node); end - def trailing_comma?(node); end - def useless_trailing_comma?(node); end -end - -RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::TrailingComma - extend ::RuboCop::Cop::AutoCorrector - - def on_hash(node); end -end - -class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_def(node); end - - private - - def body_and_end_on_same_line?(node); end - def trailing_end?(node); end -end - -RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SurroundingSpace - extend ::RuboCop::Cop::AutoCorrector - - def on_masgn(node); end - - private - - def allow_named_underscore_variables; end - def children_offenses(variables); end - def find_first_offense(variables); end - def find_first_possible_offense(variables); end - def main_node_offense(node); end - def range_for_parentheses(offense, left); end - def reverse_index(collection, item); end - def splat_variable_before?(first_offense, variables); end - def unneeded_ranges(node); end - def unused_range(node_type, mlhs_node, right); end - def unused_variables_only?(offense, variables); end -end - -RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base - include ::RuboCop::Cop::AllowedMethods - extend ::RuboCop::Cop::AutoCorrector - - def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end - def on_def(node); end - def on_defs(node); end - - private - - def accessor(kind, method_name); end - def allow_dsl_writers?; end - def allow_predicates?; end - def allowed_method_name?(node); end - def allowed_method_names; end - def allowed_reader?(node); end - def allowed_writer?(node); end - def autocorrect(corrector, node); end - def autocorrect_class(corrector, node); end - def autocorrect_instance(corrector, node); end - def dsl_writer?(node); end - def exact_name_match?; end - def ignore_class_methods?; end - def in_module_or_instance_eval?(node); end - def looks_like_trivial_reader?(node); end - def names_match?(node); end - def on_method_def(node); end - def top_level_node?(node); end - def trivial_accessor_kind(node); end - def trivial_reader?(node); end - def trivial_writer?(node); end -end - -RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def on_if(node); end - def range_between_condition_and_else(node, condition); end - def range_between_else_and_end(node); end -end - -RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - def and_with_or?(param0 = T.unsafe(nil)); end - def logical_operator?(param0 = T.unsafe(nil)); end - def on_if(node); end - def or_with_and?(param0 = T.unsafe(nil)); end - - private - - def mixed_logical_operator?(node); end - def mixed_precedence_and?(node); end - def mixed_precedence_or?(node); end -end - -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - def on_send(node); end - def unpack_and_first_element?(param0 = T.unsafe(nil)); end - - private - - def first_element_range(node, unpack_call); end -end - -RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Interpolation - extend ::RuboCop::Cop::AutoCorrector - - def on_node_with_interpolations(node); end - - private - - def message(range); end - def var_nodes(nodes); end -end - -RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_when(node); end -end - -RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def on_until(node); end - def on_while(node); end -end - -RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base - include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::StatementModifier - extend ::RuboCop::Cop::AutoCorrector - - def on_until(node); end - def on_while(node); end -end - -RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ArrayMinSize - include ::RuboCop::Cop::ArraySyntax - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::PercentArray - extend ::RuboCop::Cop::AutoCorrector - - def on_array(node); end - - private - - def build_bracketed_array(node); end - def complex_content?(strings, complex_regex: T.unsafe(nil)); end - def invalid_percent_array_contents?(node); end - def word_regex; end - - class << self - def largest_brackets; end - def largest_brackets=(_arg0); end - end -end - -RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end - def on_send(node); end - - private - - def actual_code_range(node); end - def corrected_code(node); end - def enforce_yoda?; end - def equality_only?; end - def interpolation?(node); end - def message(node); end - def non_equality_operator?(node); end - def noncommutative_operator?(node); end - def program_name?(name); end - def reverse_comparison(operator); end - def source_file_path_constant?(node); end - def valid_yoda?(node); end - def yoda_compatible_condition?(node); end -end - -RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - def nonzero_length_predicate(param0 = T.unsafe(nil)); end - def on_send(node); end - def other_receiver(param0 = T.unsafe(nil)); end - def zero_length_predicate(param0 = T.unsafe(nil)); end - def zero_length_receiver(param0 = T.unsafe(nil)); end - - private - - def check_nonzero_length_predicate(node); end - def check_zero_length_predicate(node); end - def replacement(node); end -end - -RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::SurroundingSpace - include ::RuboCop::Cop::RangeHelp - - private - - def empty_brackets?(left_bracket_token, right_bracket_token); end - def empty_offense(node, range, message, command); end - def empty_offenses(node, left, right, message); end - def extra_space?(token, side); end - def no_space_between?(left_bracket_token, right_bracket_token); end - def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end - def offending_empty_no_space?(config, left_token, right_token); end - def offending_empty_space?(config, left_token, right_token); end - def on_new_investigation; end - def reposition(src, pos, step); end - def side_space_range(range:, side:); end - def space_between?(left_bracket_token, right_bracket_token); end - def space_offense(node, token, side, message, command); end - def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end -end - -RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) -RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::SymbolHelp - def hash_key?(node); end -end - -module RuboCop::Cop::TargetRubyVersion - def minimum_target_ruby_version(version); end - def required_minimum_ruby_version; end - def support_target_ruby_version?(version); end -end - -class RuboCop::Cop::Team - def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end - - def autocorrect?; end - def cops; end - def debug?; end - def errors; end - def external_dependency_checksum; end - def forces; end - def inspect_file(processed_source); end - def investigate(processed_source); end - def updated_source_file; end - def updated_source_file?; end - def warnings; end - - private - - def autocorrect(processed_source, report); end - def autocorrect_report(report); end - def be_ready; end - def collate_corrections(report); end - def each_corrector(report); end - def handle_error(error, location, cop); end - def handle_warning(error, location); end - def investigate_partial(cops, processed_source); end - def process_errors(file, errors); end - def reset; end - def roundup_relevant_cops(filename); end - def support_target_rails_version?(cop); end - def support_target_ruby_version?(cop); end - def suppress_clobbering; end - def validate_config; end - - class << self - def forces_for(cops); end - def mobilize(cop_classes, config, options = T.unsafe(nil)); end - def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end - def new(cop_or_classes, config, options = T.unsafe(nil)); end - end -end - -module RuboCop::Cop::TrailingBody - def body_on_first_line?(node, body); end - def first_part_of(body); end - def trailing_body?(node); end -end - -module RuboCop::Cop::TrailingComma - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - private - - def allowed_multiline_argument?(node); end - def any_heredoc?(items); end - def autocorrect_range(item); end - def avoid_comma(kind, comma_begin_pos, extra_info); end - def brackets?(node); end - def check(node, items, kind, begin_pos, end_pos); end - def check_comma(node, kind, comma_pos); end - def check_literal(node, kind); end - def comma_offset(items, range); end - def elements(node); end - def extra_avoid_comma_info; end - def heredoc?(node); end - def heredoc_send?(node); end - def inside_comment?(range, comma_offset); end - def method_name_and_arguments_on_same_line?(node); end - def multiline?(node); end - def no_elements_on_same_line?(node); end - def on_same_line?(range1, range2); end - def put_comma(items, kind); end - def should_have_comma?(style, node); end - def style_parameter_name; end -end - -RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::UncommunicativeName - def check(node, args); end - - private - - def allow_nums; end - def allowed_names; end - def arg_range(arg, length); end - def case_offense(node, range); end - def ends_with_num?(name); end - def forbidden_names; end - def forbidden_offense(node, range, name); end - def issue_offenses(node, range, name); end - def length_offense(node, range); end - def long_enough?(name); end - def min_length; end - def name_type(node); end - def num_offense(node, range); end - def uppercase?(name); end -end - -RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) -RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) - -class RuboCop::Cop::UnusedArgCorrector - extend ::RuboCop::Cop::RangeHelp - - class << self - def correct(corrector, processed_source, node); end - def correct_for_blockarg_type(corrector, node); end - def processed_source; end - end -end - -module RuboCop::Cop::Util - include ::RuboCop::PathUtil - - private - - def add_parentheses(node, corrector); end - def args_begin(node); end - def args_end(node); end - def begins_its_line?(range); end - def comment_line?(line_source); end - def comment_lines?(node); end - def compatible_external_encoding_for?(src); end - def double_quotes_required?(string); end - def escape_string(string); end - def first_part_of_call_chain(node); end - def indent(node, offset: T.unsafe(nil)); end - def interpret_string_escapes(string); end - def line(node_or_range); end - def line_range(node); end - def needs_escaping?(string); end - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - def parentheses?(node); end - def same_line?(node1, node2); end - def to_string_literal(string); end - def to_supported_styles(enforced_style); end - def trim_string_interporation_escape_character(str); end - - class << self - def add_parentheses(node, corrector); end - def args_begin(node); end - def args_end(node); end - def begins_its_line?(range); end - def comment_line?(line_source); end - def comment_lines?(node); end - def double_quotes_required?(string); end - def escape_string(string); end - def first_part_of_call_chain(node); end - def indent(node, offset: T.unsafe(nil)); end - def interpret_string_escapes(string); end - def line(node_or_range); end - def line_range(node); end - def needs_escaping?(string); end - def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - def parentheses?(node); end - def same_line?(node1, node2); end - def to_string_literal(string); end - def to_supported_styles(enforced_style); end - def trim_string_interporation_escape_character(str); end - end -end - -RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) -module RuboCop::Cop::Utils; end - -class RuboCop::Cop::Utils::FormatString - def initialize(string); end - - def format_sequences; end - def max_digit_dollar_num; end - def named_interpolation?; end - def valid?; end - - private - - def mixed_formats?; end - def parse; end -end - -RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::Utils::FormatString::FormatSequence - def initialize(match); end - - def annotated?; end - def arity; end - def begin_pos; end - def end_pos; end - def flags; end - def max_digit_dollar_num; end - def name; end - def percent?; end - def precision; end - def style; end - def template?; end - def type; end - def width; end -end - -RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) -RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) - -class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force - def investigate(processed_source); end - def process_node(node); end - def variable_table; end - - private - - def after_declaring_variable(arg); end - def after_entering_scope(arg); end - def after_leaving_scope(arg); end - def before_declaring_variable(arg); end - def before_entering_scope(arg); end - def before_leaving_scope(arg); end - def descendant_reference(node); end - def each_descendant_reference(loop_node); end - def find_variables_in_loop(loop_node); end - def inspect_variables_in_scope(scope_node); end - def mark_assignments_as_referenced_in_loop(node); end - def node_handler_method_name(node); end - def process_children(origin_node); end - def process_loop(node); end - def process_regexp_named_captures(node); end - def process_rescue(node); end - def process_scope(node); end - def process_send(node); end - def process_variable_assignment(node); end - def process_variable_declaration(node); end - def process_variable_multiple_assignment(node); end - def process_variable_operator_assignment(node); end - def process_variable_referencing(node); end - def process_zero_arity_super(node); end - def regexp_captured_names(node); end - def scanned_node?(node); end - def scanned_nodes; end - def skip_children!; end - def twisted_nodes(node); end -end - -RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::VariableForce::Assignment - include ::RuboCop::Cop::VariableForce::Branchable - - def initialize(node, variable); end - - def meta_assignment_node; end - def multiple_assignment?; end - def name; end - def node; end - def operator; end - def operator_assignment?; end - def reference!(node); end - def referenced; end - def referenced?; end - def references; end - def regexp_named_capture?; end - def scope; end - def used?; end - def variable; end - - private - - def multiple_assignment_node; end - def operator_assignment_node; end -end - -RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct - def assignment?; end - def node; end - def node=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -module RuboCop::Cop::VariableForce::Branch - class << self - def of(target_node, scope: T.unsafe(nil)); end - end -end - -class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - def left_body?; end - def right_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::Base < ::Struct - def ==(other); end - def always_run?; end - def branched?; end - def child_node; end - def child_node=(_); end - def control_node; end - def each_ancestor(include_self: T.unsafe(nil), &block); end - def eql?(other); end - def exclusive_with?(other); end - def hash; end - def may_jump_to_other_branch?; end - def may_run_incompletely?; end - def parent; end - def scope; end - def scope=(_); end - - private - - def scan_ancestors; end - - class << self - def [](*_arg0); end - def classes; end - def define_predicate(name, child_index: T.unsafe(nil)); end - def inherited(subclass); end - def inspect; end - def members; end - def new(*_arg0); end - def type; end - end -end - -RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) - -class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base - def always_run?; end - def else_body?; end - def target?; end - def when_clause?; end -end - -class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base - def always_run?; end - def else_body?; end - def in_pattern?; end - def target?; end -end - -class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - def always_run?; end - def ensure_body?; end - def main_body?; end -end - -module RuboCop::Cop::VariableForce::Branch::ExceptionHandler - def may_jump_to_other_branch?; end - def may_run_incompletely?; end -end - -class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base - def always_run?; end - def collection?; end - def element?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def falsey_body?; end - def truthy_body?; end -end - -module RuboCop::Cop::VariableForce::Branch::LogicalOperator - def always_run?; end -end - -class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::LogicalOperator - - def left_body?; end - def right_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler - - def always_run?; end - def else_body?; end - def main_body?; end - def rescue_clause?; end -end - -module RuboCop::Cop::VariableForce::Branch::SimpleConditional - def always_run?; end - def conditional_clause?; end -end - -class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base - include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional - - def conditional_clause?; end - def loop_body?; end -end - -module RuboCop::Cop::VariableForce::Branchable - def branch; end - def run_exclusively_with?(other); end -end - -RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::Reference - include ::RuboCop::Cop::VariableForce::Branchable - - def initialize(node, scope); end - - def explicit?; end - def node; end - def scope; end -end - -RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::Scope - def initialize(node); end - - def ==(other); end - def body_node; end - def each_node(&block); end - def include?(target_node); end - def naked_top_level; end - def naked_top_level?; end - def name; end - def node; end - def variables; end - - private - - def ancestor_node?(target_node); end - def belong_to_inner_scope?(target_node); end - def belong_to_outer_scope?(target_node); end - def scan_node(node, &block); end -end - -RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) -RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) -RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) - -class RuboCop::Cop::VariableForce::Variable - def initialize(name, declaration_node, scope); end - - def argument?; end - def assign(node); end - def assignments; end - def block_argument?; end - def capture_with_block!; end - def captured_by_block; end - def captured_by_block?; end - def declaration_node; end - def explicit_block_local_variable?; end - def in_modifier_if?(assignment); end - def keyword_argument?; end - def method_argument?; end - def name; end - def reference!(node); end - def referenced?; end - def references; end - def scope; end - def should_be_unused?; end - def used?; end -end - -RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) - -class RuboCop::Cop::VariableForce::VariableReference < ::Struct - def assignment?; end - def name; end - def name=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Cop::VariableForce::VariableTable - def initialize(hook_receiver = T.unsafe(nil)); end - - def accessible_variables; end - def assign_to_variable(name, node); end - def current_scope; end - def current_scope_level; end - def declare_variable(name, node); end - def find_variable(name); end - def invoke_hook(hook_name, *args); end - def pop_scope; end - def push_scope(scope_node); end - def reference_variable(name, node); end - def scope_stack; end - def variable_exist?(name); end - - private - - def mark_variable_as_captured_by_block_if_so(variable); end -end - -RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) - -module RuboCop::Cop::VisibilityHelp - extend ::RuboCop::AST::NodePattern::Macros - - def visibility_block?(param0 = T.unsafe(nil)); end - - private - - def find_visibility_end(node); end - def find_visibility_start(node); end - def node_visibility(node); end -end - -RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Array) - -class RuboCop::DirectiveComment - def initialize(comment, cop_registry = T.unsafe(nil)); end - - def all_cops?; end - def comment; end - def cop_names; end - def cop_registry; end - def cops; end - def department_names; end - def directive_count; end - def disabled?; end - def disabled_all?; end - def enabled?; end - def enabled_all?; end - def in_directive_department?(cop); end - def line_number; end - def match?(cop_names); end - def match_captures; end - def mode; end - def overridden_by_department?(cop); end - def range; end - def single_line?; end - - private - - def all_cop_names; end - def cop_names_for_department(department); end - def department?(name); end - def exclude_redundant_directive_cop(cops); end - def parsed_cop_names; end - def splitted_cops_string; end - - class << self - def before_comment(line); end - end -end - -RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP_DEPARTMENT = T.let(T.unsafe(nil), String) -class RuboCop::Error < ::StandardError; end - -class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error - def initialize(cause:, node:, cop:); end - - def cause; end - def column; end - def cop; end - def line; end - def message; end -end - -module RuboCop::ExcludeLimit - def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end - - private - - def transform(parameter_name); end -end - -module RuboCop::Ext; end - -module RuboCop::Ext::ProcessedSource - def comment_config; end - def disabled_line_ranges; end -end - -module RuboCop::Ext::RegexpNode - def assign_properties(*_arg0); end - def each_capture(named: T.unsafe(nil)); end - def parsed_tree; end - - private - - def with_interpolations_blanked; end -end - -RuboCop::Ext::RegexpNode::ANY = T.let(T.unsafe(nil), Object) -module RuboCop::Ext::RegexpParser; end -module RuboCop::Ext::RegexpParser::Expression; end - -module RuboCop::Ext::RegexpParser::Expression::Base - def expression; end - def loc; end - def origin; end - def origin=(_arg0); end - - private - - def build_location; end -end - -module RuboCop::Ext::RegexpParser::Expression::CharacterSet - def build_location; end -end - -class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map - def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end - - def begin; end - def body; end - def end; end - def quantifier; end -end - -module RuboCop::FileFinder - def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end - - private - - def traverse_files_upwards(filename, start_dir, stop_dir); end - - class << self - def root_level=(level); end - def root_level?(path, stop_dir); end - end -end - -module RuboCop::Formatter; end - -class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter - def finished(inspected_files); end -end - -class RuboCop::Formatter::BaseFormatter - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def file_started(file, options); end - def finished(inspected_files); end - def options; end - def output; end - def started(target_files); end -end - -class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter - def report_file(file, offenses); end - - private - - def report_highlighted_area(highlighted_area); end - def report_line(location); end - def report_offense(file, offense); end - def valid_line?(offense); end -end - -RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -module RuboCop::Formatter::Colorizable - def black(string); end - def blue(string); end - def colorize(string, *args); end - def cyan(string); end - def green(string); end - def magenta(string); end - def rainbow; end - def red(string); end - def white(string); end - def yellow(string); end -end - -class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def file_started(_file, _file_info); end - def finished(_inspected_files); end - - private - - def command; end - def cop_config_params(default_cfg, cfg); end - def default_config(cop_name); end - def excludes(offending_files, cop_name, parent); end - def merge_mode_for_exclude?(cfg); end - def output_cop(cop_name, offense_count); end - def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - def output_cop_config(output_buffer, cfg, cop_name); end - def output_cop_param_comments(output_buffer, params, default_cfg); end - def output_exclude_list(output_buffer, offending_files, cop_name); end - def output_exclude_path(output_buffer, exclude_path, parent); end - def output_offending_files(output_buffer, cfg, cop_name); end - def output_offenses; end - def safe_autocorrect?(config); end - def set_max(cfg, cop_name); end - def show_offense_counts?; end - def show_timestamp?; end - def supports_safe_autocorrect?(cop_class, default_cfg); end - def supports_unsafe_autocorrect?(cop_class, default_cfg); end - def timestamp; end - - class << self - def config_to_allow_offenses; end - def config_to_allow_offenses=(_arg0); end - def detected_styles; end - def detected_styles=(_arg0); end - end -end - -RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end - - private - - def message(offense); end -end - -class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end -end - -class RuboCop::Formatter::FormatterSet < ::Array - def initialize(options = T.unsafe(nil)); end - - def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - def close_output_files; end - def file_finished(file, offenses); end - def file_started(file, options); end - def finished(*args); end - def started(*args); end - - private - - def builtin_formatter_class(specified_key); end - def custom_formatter_class(specified_class_name); end - def formatter_class(formatter_type); end -end - -RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) -RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) - -class RuboCop::Formatter::FuubarStyleFormatter < ::RuboCop::Formatter::ClangStyleFormatter - def initialize(*output); end - - def count_stats(offenses); end - def file_finished(file, offenses); end - def progressbar_color; end - def started(target_files); end - def with_color; end -end - -RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end - def finished(_inspected_files); end - def started(_target_files); end - - private - - def github_escape(string); end - def github_severity(offense); end - def minimum_severity_to_fail; end - def report_offense(file, offense); end -end - -RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) - -class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def files; end - def finished(inspected_files); end - def render_html; end - def started(target_files); end - def summary; end -end - -class RuboCop::Formatter::HTMLFormatter::Color < ::Struct - def alpha; end - def alpha=(_); end - def blue; end - def blue=(_); end - def fade_out(amount); end - def green; end - def green=(_); end - def red; end - def red=(_); end - def to_s; end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::HTMLFormatter::ERBContext - include ::RuboCop::PathUtil - include ::RuboCop::Formatter::TextUtil - - def initialize(files, summary); end - - def base64_encoded_logo_image; end - def binding; end - def decorated_message(offense); end - def escape(string); end - def files; end - def highlighted_source_line(offense); end - def hightlight_source_tag(offense); end - def possible_ellipses(location); end - def source_after_highlight(offense); end - def source_before_highlight(offense); end - def summary; end -end - -RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) -RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - -class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct - def offenses; end - def offenses=(_); end - def path; end - def path=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct - def inspected_files; end - def inspected_files=(_); end - def offense_count; end - def offense_count=(_); end - def target_files; end - def target_files=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def members; end - def new(*_arg0); end - end -end - -RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::PathUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def finished(inspected_files); end - def hash_for_file(file, offenses); end - def hash_for_location(offense); end - def hash_for_offense(offense); end - def metadata_hash; end - def output_hash; end - def started(target_files); end -end - -class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter - def initialize(output, options = T.unsafe(nil)); end - - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - def classname_attribute_value(file); end - def file_finished(file, offenses); end - def finished(_inspected_files); end - def offenses_for_cop(all_offenses, cop); end - def relevant_for_output?(options, target_offenses); end - - private - - def add_failure_to(testcase, offenses, cop_name); end - def reset_count; end -end - -class RuboCop::Formatter::MarkdownFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::TextUtil - include ::RuboCop::PathUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def files; end - def finished(inspected_files); end - def started(target_files); end - def summary; end - - private - - def possible_ellipses(location); end - def render_markdown; end - def write_code(offense); end - def write_context(offense); end - def write_file_messages; end - def write_heading(file); end -end - -class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(_file, offenses); end - def finished(_inspected_files); end - def offense_counts; end - def ordered_offense_counts(offense_counts); end - def report_summary(offense_counts); end - def started(target_files); end - def total_offense_count(offense_counts); end -end - -class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - def initialize(output, options = T.unsafe(nil)); end - - def cols; end - def file_finished(file, offenses); end - def file_started(_file, _options); end - def next_step(offenses); end - def pacdots(number); end - def progress_line; end - def progress_line=(_arg0); end - def started(target_files); end - def step(character); end - def update_progress_line; end -end - -RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) -RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) -RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::Presenter) -RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::Presenter) - -class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter - include ::RuboCop::Formatter::TextUtil - - def initialize(output, options = T.unsafe(nil)); end - - def file_finished(file, offenses); end - def finished(inspected_files); end - def report_file_as_mark(offenses); end - def started(target_files); end -end - -RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) - -class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter - def report_summary(file_count, offense_count, correction_count, correctable_count); end -end - -class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::PathUtil - - def file_finished(file, offenses); end - def finished(inspected_files); end - def report_file(file, offenses); end - def report_summary(file_count, offense_count, correction_count, correctable_count); end - def started(_target_files); end - - private - - def annotate_message(msg); end - def colored_severity_code(offense); end - def count_stats(offenses); end - def message(offense); end -end - -RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) - -class RuboCop::Formatter::SimpleTextFormatter::Report - include ::RuboCop::Formatter::Colorizable - include ::RuboCop::Formatter::TextUtil - - def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_autocorrect: T.unsafe(nil)); end - - def summary; end - - private - - def correctable; end - def corrections; end - def files; end - def offenses; end - def rainbow; end -end - -class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter - def file_finished(file, offenses); end - def started(target_files); end - - private - - def annotate_message(msg); end - def message(offense); end - def report_highlighted_area(highlighted_area); end - def report_line(location); end - def report_offense(file, offense); end -end - -module RuboCop::Formatter::TextUtil - private - - def pluralize(number, thing, options = T.unsafe(nil)); end - - class << self - def pluralize(number, thing, options = T.unsafe(nil)); end - end -end - -class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter - def file_finished(file, offenses); end - def finished(_inspected_files); end - def offense_counts; end - def ordered_offense_counts(offense_counts); end - def report_summary(offense_counts); end - def started(target_files); end - def total_offense_count(offense_counts); end -end - -class RuboCop::IncorrectCopNameError < ::StandardError; end - -class RuboCop::Lockfile - def dependencies; end - def gems; end - def includes_gem?(name); end - - private - - def parser; end -end - -class RuboCop::MagicComment - def initialize(comment); end - - def any?; end - def encoding_specified?; end - def frozen_string_literal; end - def frozen_string_literal?; end - def frozen_string_literal_specified?; end - def shareable_constant_value; end - def shareable_constant_value_specified?; end - def typed; end - def typed_specified?; end - def valid?; end - def valid_literal_value?; end - def valid_shareable_constant_value?; end - - private - - def extract(pattern); end - def specified?(value); end - - class << self - def parse(comment); end - end -end - -class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment - def encoding; end - def without(type); end - - private - - def match(keyword); end - def tokens; end -end - -class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment - private - - def extract_frozen_string_literal; end - def extract_shareable_constant_value; end - def extract_typed; end -end - -RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) - -class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment - def encoding; end - def without(type); end - - private - - def extract_frozen_string_literal; end - def extract_shareable_constant_value; end - def extract_typed; end -end - -RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp) - -class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment - def encoding; end - def extract_typed; end - def frozen_string_literal; end - def shareable_constant_value; end -end - -RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) -RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) -RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) -RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) - -module RuboCop::NameSimilarity - private - - def find_similar_name(target_name, names); end - def find_similar_names(target_name, names); end - - class << self - def find_similar_name(target_name, names); end - def find_similar_names(target_name, names); end - end -end - -RuboCop::NodePattern = RuboCop::AST::NodePattern -class RuboCop::OptionArgumentError < ::StandardError; end - -class RuboCop::Options - def initialize; end - - def parse(command_line_args); end - - private - - def add_additional_modes(opts); end - def add_autocorrection_options(opts); end - def add_cache_options(opts); end - def add_check_options(opts); end - def add_config_generation_options(opts); end - def add_cop_selection_csv_option(option, opts); end - def add_general_options(opts); end - def add_output_options(opts); end - def add_server_options(opts); end - def add_severity_option(opts); end - def args_from_env; end - def args_from_file; end - def define_options; end - def handle_deprecated_option(old_option, new_option); end - def long_opt_symbol(args); end - def option(opts, *args); end - def rainbow; end - def require_feature(file); end - def section(opts, heading, &_block); end -end - -RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) -RuboCop::Options::EXITING_OPTIONS = T.let(T.unsafe(nil), Array) -RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) -module RuboCop::OptionsHelp; end -RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) -RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) -RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) - -class RuboCop::OptionsValidator - def initialize(options); end - - def boolean_or_empty_cache?; end - def disable_parallel_when_invalid_option_combo; end - def display_only_fail_level_offenses_with_autocorrect?; end - def except_syntax?; end - def incompatible_options; end - def invalid_arguments_for_parallel; end - def only_includes_redundant_disable?; end - def validate_auto_gen_config; end - def validate_autocorrect; end - def validate_cache_enabled_for_cache_root; end - def validate_compatibility; end - def validate_cop_options; end - def validate_display_only_correctable_and_autocorrect; end - def validate_display_only_failed; end - def validate_display_only_failed_and_display_only_correctable; end - def validate_exclude_limit_option; end - - class << self - def validate_cop_list(names); end - - private - - def format_message_from(name, cop_names); end - end -end - -module RuboCop::PathUtil - private - - def absolute?(path); end - def hidden_dir?(path); end - def hidden_file?(path); end - def hidden_file_in_not_hidden_dir?(pattern, path); end - def match_path?(pattern, path); end - def maybe_hidden_file?(path); end - def relative_path(path, base_dir = T.unsafe(nil)); end - def smart_path(path); end - - class << self - def absolute?(path); end - def hidden_dir?(path); end - def hidden_file?(path); end - def hidden_file_in_not_hidden_dir?(pattern, path); end - def match_path?(pattern, path); end - def maybe_hidden_file?(path); end - def relative_path(path, base_dir = T.unsafe(nil)); end - def smart_path(path); end - end -end - -module RuboCop::Platform - class << self - def windows?; end - end -end - -RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -class RuboCop::RemoteConfig - def initialize(url, base_dir); end - - def file; end - def inherit_from_remote(file, path); end - def uri; end - - private - - def cache_name_from_uri; end - def cache_path; end - def cache_path_exists?; end - def cache_path_expired?; end - def cloned_url; end - def generate_request(uri); end - def handle_response(response, limit, &block); end - def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end -end - -RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) - -class RuboCop::ResultCache - def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end - - def debug?; end - def load; end - def path; end - def save(offenses); end - def valid?; end - - private - - def any_symlink?(path); end - def context_checksum(team, options); end - def digest(path); end - def file_checksum(file, config_store); end - def relevant_options_digest(options); end - def rubocop_checksum; end - def rubocop_extra_features; end - def symlink_protection_triggered?(path); end - def team_checksum(team); end - - class << self - def allow_symlinks_in_cache_location?(config_store); end - def cache_root(config_store); end - def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end - def inhibit_cleanup; end - def inhibit_cleanup=(_arg0); end - def rubocop_required_features; end - def rubocop_required_features=(_arg0); end - def source_checksum; end - def source_checksum=(_arg0); end - - private - - def remove_files(files, dirs, remove_count); end - def remove_oldest_files(files, dirs, cache_root, verbose); end - def requires_file_removal?(file_count, config_store); end - end -end - -RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) -RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) - -class RuboCop::Runner - def initialize(options, config_store); end - - def aborting=(_arg0); end - def aborting?; end - def errors; end - def run(paths); end - def warnings; end - - private - - def add_redundant_disables(file, offenses, source); end - def cached_result(file, team); end - def cached_run?; end - def check_for_infinite_loop(processed_source, offenses_by_iteration); end - def check_for_redundant_disables?(source); end - def considered_failure?(offense); end - def default_config(cop_name); end - def do_inspection_loop(file); end - def each_inspected_file(files); end - def file_finished(file, offenses); end - def file_offense_cache(file); end - def file_offenses(file); end - def file_started(file); end - def filter_cop_classes(cop_classes, config); end - def filtered_run?; end - def find_target_files(paths); end - def formatter_set; end - def get_processed_source(file); end - def inspect_file(processed_source, team = T.unsafe(nil)); end - def inspect_files(files); end - def iterate_until_no_changes(source, offenses_by_iteration); end - def list_files(paths); end - def mark_as_safe_by_config?(config); end - def minimum_severity_to_fail; end - def mobilize_team(processed_source); end - def mobilized_cop_classes(config); end - def offenses_to_report(offenses); end - def process_file(file); end - def qualify_option_cop_names; end - def redundant_cop_disable_directive(file); end - def save_in_cache(cache, offenses); end - def standby_team(config); end - def style_guide_cops_only?(config); end - def supports_safe_autocorrect?(offense); end - def team_for_redundant_disables(file, offenses, source); end - def warm_cache(target_files); end -end - -class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError - def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end - - def offenses; end -end - -RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) - -class RuboCop::StringInterpreter - class << self - def interpret(string); end - - private - - def interpret_hex(escape); end - def interpret_octal(escape); end - def interpret_string_escape(escape); end - def interpret_unicode(escape); end - end -end - -RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) -RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) - -class RuboCop::TargetFinder - def initialize(config_store, options = T.unsafe(nil)); end - - def all_cops_include; end - def combined_exclude_glob_patterns(base_dir); end - def configured_include?(file); end - def debug?; end - def fail_fast?; end - def find(args, mode); end - def find_files(base_dir, flags); end - def force_exclusion?; end - def included_file?(file); end - def process_explicit_path(path, mode); end - def ruby_executable?(file); end - def ruby_extension?(file); end - def ruby_extensions; end - def ruby_file?(file); end - def ruby_filename?(file); end - def ruby_filenames; end - def ruby_interpreters(file); end - def stdin?; end - def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end - def target_files_in_dir(base_dir = T.unsafe(nil)); end - def to_inspect?(file, hidden_files, base_dir_config); end - def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - - private - - def order; end -end - -RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) - -class RuboCop::TargetRuby - def initialize(config); end - - def rubocop_version_with_support; end - def source; end - def supported?; end - def version; end - - class << self - def supported_versions; end - end -end - -class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source - def name; end - - private - - def bundler_lock_file_path; end - def find_version; end -end - -RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) - -class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source - def name; end - - private - - def find_version; end -end - -class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source - extend ::RuboCop::AST::NodePattern::Macros - - def gem_requirement?(param0 = T.unsafe(nil)); end - def name; end - def required_ruby_version(param0); end - - private - - def find_default_minimal_known_ruby(right_hand_side); end - def find_version; end - def gemspec_filename; end - def gemspec_filepath; end - def version_from_array(array); end - def version_from_gemspec_file(file); end - def version_from_right_hand_side(right_hand_side); end -end - -RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) -RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) -RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) - -class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source - def name; end - - private - - def find_version; end -end - -class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source - def name; end - - private - - def filename; end - def find_version; end - def pattern; end - def version_file; end -end - -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) -RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) - -class RuboCop::TargetRuby::Source - def initialize(config); end - - def name; end - def to_s; end - def version; end -end - -class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile - def name; end - - private - - def filename; end - def pattern; end -end - -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) -RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) -RuboCop::Token = RuboCop::AST::Token - -module RuboCop::Util - class << self - def silence_warnings; end - end -end - -class RuboCop::ValidationError < ::RuboCop::Error; end - -module RuboCop::Version - class << self - def document_version; end - def extension_versions(env); end - def feature_version(feature); end - def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end - end -end - -RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) -RuboCop::Version::MSG = T.let(T.unsafe(nil), String) -RuboCop::Version::STRING = T.let(T.unsafe(nil), String) -class RuboCop::Warning < ::StandardError; end - -module RuboCop::YAMLDuplicationChecker - class << self - def check(yaml_string, filename, &on_duplicated); end - - private - - def traverse(tree, &on_duplicated); end - end -end - -class String - include ::Comparable - include ::JSON::Ext::Generator::GeneratorMethods::String - extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend -end - -String::BLANK_RE = T.let(T.unsafe(nil), Regexp) -String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) diff --git a/sorbet/rbi/gems/rubocop@1.85.1.rbi b/sorbet/rbi/gems/rubocop@1.85.1.rbi new file mode 100644 index 0000000..7cb8e29 --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.85.1.rbi @@ -0,0 +1,66130 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop` gem. +# Please instead update this file by running `bin/tapioca gem rubocop`. + + +class Parser::Source::Comment + include ::RuboCop::Ext::Comment +end + +class Parser::Source::Range + include ::RuboCop::Ext::Range +end + +class Regexp::Expression::Base + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression + include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet +end + +class Regexp::Expression::Quantifier + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + +# source://rubocop//lib/rubocop/version.rb#3 +module RuboCop; end + +class RuboCop::AST::ProcessedSource + include ::RuboCop::Ext::ProcessedSource +end + +class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node + include ::RuboCop::Ext::RegexpNode +end + +# This is a class that reads optional command line arguments to rubocop from environment variable. +# +# @api private +# +# source://rubocop//lib/rubocop/arguments_env.rb#6 +class RuboCop::ArgumentsEnv + class << self + # @api private + # + # source://rubocop//lib/rubocop/arguments_env.rb#7 + def read_as_arguments; end + end +end + +# This is a class that reads optional command line arguments to rubocop from .rubocop file. +# +# @api private +# +# source://rubocop//lib/rubocop/arguments_file.rb#6 +class RuboCop::ArgumentsFile + class << self + # @api private + # + # source://rubocop//lib/rubocop/arguments_file.rb#7 + def read_as_arguments; end + end +end + +# The CLI is a class responsible of handling all the command line interface +# logic. +# +# source://rubocop//lib/rubocop/cli.rb#8 +class RuboCop::CLI + # @return [CLI] a new instance of CLI + # + # source://rubocop//lib/rubocop/cli.rb#24 + def initialize; end + + # Returns the value of attribute config_store. + # + # source://rubocop//lib/rubocop/cli.rb#22 + def config_store; end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cli.rb#22 + def options; end + + # Entry point for the application logic. Here we + # do the command line arguments processing and inspect + # the target files. + # + # + # @api public + # @param args [Array] command line arguments + # @return [Integer] UNIX exit code + # + # source://rubocop//lib/rubocop/cli.rb#39 + def run(args = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cli.rb#164 + def act_on_options; end + + # source://rubocop//lib/rubocop/cli.rb#216 + def apply_default_formatter; end + + # source://rubocop//lib/rubocop/cli.rb#133 + def execute_runners; end + + # source://rubocop//lib/rubocop/cli.rb#199 + def handle_editor_mode; end + + # @raise [Finished] + # + # source://rubocop//lib/rubocop/cli.rb#204 + def handle_exiting_options; end + + # source://rubocop//lib/rubocop/cli.rb#152 + def parallel_by_default!; end + + # source://rubocop//lib/rubocop/cli.rb#88 + def profile_if_needed; end + + # source://rubocop//lib/rubocop/cli.rb#230 + def report_pending_cops; end + + # source://rubocop//lib/rubocop/cli.rb#121 + def require_gem(name); end + + # source://rubocop//lib/rubocop/cli.rb#129 + def run_command(name); end + + # source://rubocop//lib/rubocop/cli.rb#186 + def set_options_to_config_loader; end + + # source://rubocop//lib/rubocop/cli.rb#194 + def set_options_to_pending_cops_reporter; end + + # source://rubocop//lib/rubocop/cli.rb#141 + def suggest_extensions; end + + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/cli.rb#145 + def validate_options_vs_config; end + + # source://rubocop//lib/rubocop/cli.rb#234 + def warn_if_cache_root_changed(early, desired); end +end + +# Home of subcommands in the CLI. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command.rb#7 +module RuboCop::CLI::Command + class << self + # Find the command with a given name and run it in an environment. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/command.rb#10 + def run(env, name); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command.rb#16 + def class_for(name); end + end +end + +# Generate a configuration file acting as a TODO list. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#8 +class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#25 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#107 + def add_formatter; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#115 + def add_inheritance_from_auto_generated_file(config_file); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#111 + def execute_runner; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#136 + def existing_configuration(config_file); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#65 + def line_length_cop(config); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#53 + def line_length_enabled?(config); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#61 + def max_line_length(config); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#34 + def maybe_run_line_length_cop; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 + def only_exclude?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#69 + def options_has_only_flag?; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 + def relative_path_to_todo_from_options_config; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#100 + def reset_config_and_auto_gen_file; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 + def run_all_cops(line_length_contents); end + + # Do an initial run with only Layout/LineLength so that cops that + # depend on Layout/LineLength:Max get the correct value for that + # parameter. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#80 + def run_line_length_cop; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#57 + def same_max_line_length?(config1, config2); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 + def skip_line_length_cop(reason); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 + def write_config_file(file_name, file_string, rubocop_yml_contents); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#11 +RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 +RuboCop::CLI::Command::AutoGenerateConfig::YAML_OPTIONAL_DOC_START = T.let(T.unsafe(nil), Regexp) + +# A subcommand in the CLI. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/base.rb#8 +class RuboCop::CLI::Command::Base + # @api private + # @return [Base] a new instance of Base + # + # source://rubocop//lib/rubocop/cli/command/base.rb#26 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#9 + def env; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#21 + def by_command_name(name); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#14 + def command_name; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#14 + def command_name=(_arg0); end + + # @api private + # @private + # + # source://rubocop//lib/rubocop/cli/command/base.rb#16 + def inherited(subclass); end + end +end + +# Run all the selected cops and report the result. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#8 +class RuboCop::CLI::Command::ExecuteRunner < ::RuboCop::CLI::Command::Base + include ::RuboCop::Formatter::TextUtil + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#16 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#85 + def bug_tracker_uri; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#69 + def display_error_summary(errors); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#56 + def display_summary(runner); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#61 + def display_warning_summary(warnings); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#22 + def execute_runner(paths); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#91 + def maybe_print_corrected_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/execute_runner.rb#42 + def with_redirect; end +end + +# Combination of short and long formatter names. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/execute_runner.rb#12 +RuboCop::CLI::Command::ExecuteRunner::INTEGRATION_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Generate a .rubocop.yml file in the current directory. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#8 +class RuboCop::CLI::Command::InitDotfile < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#13 + def run; end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#9 +RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) + +# Start Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/lsp.rb#8 +class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/lsp.rb#11 + def run; end +end + +# Start Model Context Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/mcp.rb#8 +class RuboCop::CLI::Command::MCP < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/mcp.rb#11 + def run; end +end + +# Shows the given cops, or all cops by default, and their configurations +# for the current directory. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#9 +class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base + # @api private + # @return [ShowCops] a new instance of ShowCops + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#24 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#39 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#89 + def config_lines(cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#85 + def cops_of_department(cops, department); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#45 + def print_available_cops; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#68 + def print_cop_details(cops); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#56 + def print_cops_of_department(registry, department, show_all); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#77 + def selected_cops_of_department(cops, department); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 +class RuboCop::CLI::Command::ShowCops::ExactMatcher < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#13 + def match?(name); end + + # Returns the value of attribute pattern + # + # @return [Object] the current value of pattern + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def pattern; end + + # Sets the attribute pattern + # + # @param value [Object] the value to set the attribute pattern to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def pattern=(_); end + + class << self + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def inspect; end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def members; end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + def new(*_arg0); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 +class RuboCop::CLI::Command::ShowCops::WildcardMatcher < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 + def match?(name); end + + # Returns the value of attribute pattern + # + # @return [Object] the current value of pattern + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def pattern; end + + # Sets the attribute pattern + # + # @param value [Object] the value to set the attribute pattern to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def pattern=(_); end + + class << self + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def inspect; end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def members; end + + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 + def new(*_arg0); end + end +end + +# Prints out url to documentation of provided cops +# or documentation base url by default. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#9 +class RuboCop::CLI::Command::ShowDocsUrl < ::RuboCop::CLI::Command::Base + # @api private + # @return [ShowDocsUrl] a new instance of ShowDocsUrl + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#12 + def initialize(env); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#18 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#38 + def cops_array; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#24 + def print_documentation_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/show_docs_url.rb#42 + def registry_hash; end +end + +# Suggest RuboCop extensions to install based on Gemfile dependencies. +# Only primary dependencies are evaluated, so if a dependency depends on a +# gem with an extension, it is not suggested. However, if an extension is +# a transitive dependency, it will not be suggested. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11 +class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#17 + def run; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#73 + def all_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#69 + def current_formatter; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#117 + def dependent_gems; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#87 + def extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#109 + def installed_and_not_loaded_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#91 + def installed_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#121 + def installed_gems; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#99 + def loaded_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#113 + def lockfile; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#95 + def not_installed_extensions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#41 + def print_install_suggestions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#51 + def print_load_suggestions; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#60 + def print_opt_out_instruction; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#125 + def puts(*args); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#30 + def skip?; end +end + +# Combination of short and long formatter names. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#13 +RuboCop::CLI::Command::SuggestExtensions::INCLUDED_FORMATTERS = T.let(T.unsafe(nil), Array) + +# Display version. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/version.rb#8 +class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/version.rb#11 + def run; end +end + +# source://rubocop//lib/rubocop/cli.rb#13 +RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array) + +# Execution environment for a CLI command. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/environment.rb#7 +class RuboCop::CLI::Environment + # @api private + # @return [Environment] a new instance of Environment + # + # source://rubocop//lib/rubocop/cli/environment.rb#10 + def initialize(options, config_store, paths); end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def config_store; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def options; end + + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#8 + def paths; end + + # Run a command in this environment. + # + # @api private + # + # source://rubocop//lib/rubocop/cli/environment.rb#17 + def run(name); end +end + +# source://rubocop//lib/rubocop/cli.rb#20 +class RuboCop::CLI::Finished < ::StandardError; end + +# source://rubocop//lib/rubocop/cli.rb#11 +RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#12 +RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#10 +RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cli.rb#9 +RuboCop::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) + +# This class represents the cache config of the caching RuboCop runs. +# +# @api private +# +# source://rubocop//lib/rubocop/cache_config.rb#6 +class RuboCop::CacheConfig + class << self + # @api private + # + # source://rubocop//lib/rubocop/cache_config.rb#7 + def root_dir; end + + # Lightweight cache root computation that reads CacheRootDirectory from + # the toplevel config file and environment variables without going through + # the full ConfigStore/ConfigLoader. This method can be used, for example, + # before loading configuration files. Please note that this method doesn't + # take into account any `inherit_from` dependencies. + # + # @api private + # + # source://rubocop//lib/rubocop/cache_config.rb#34 + def root_dir_from_toplevel_config(cache_root_override = T.unsafe(nil)); end + end +end + +# Converts RuboCop objects to and from the serialization format JSON. +# +# @api private +# +# source://rubocop//lib/rubocop/cached_data.rb#8 +class RuboCop::CachedData + # @api private + # @return [CachedData] a new instance of CachedData + # + # source://rubocop//lib/rubocop/cached_data.rb#9 + def initialize(filename); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#13 + def from_json(text); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#17 + def to_json(offenses); end + + private + + # Restore an offense object loaded from a JSON file. + # + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#47 + def deserialize_offenses(offenses); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#54 + def location_from_source_buffer(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#40 + def message(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#23 + def serialize_offense(offense); end + + # Delay creation until needed. Some type of offenses will have no buffer associated with them + # and be global only. For these, trying to create the buffer will likely fail, for example + # because of unknown encoding comments. + # + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#67 + def source_buffer; end +end + +# and provides a way to check if each cop is enabled at arbitrary line. +# +# source://rubocop//lib/rubocop/comment_config.rb#6 +class RuboCop::CommentConfig + extend ::RuboCop::SimpleForwardable + + # @return [CommentConfig] a new instance of CommentConfig + # + # source://rubocop//lib/rubocop/comment_config.rb#34 + def initialize(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#64 + def comment_only_line?(line_number); end + + # source://rubocop//lib/rubocop/comment_config.rb#32 + def config(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/comment_config.rb#52 + def cop_disabled_line_ranges; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#40 + def cop_enabled_at_line?(cop, line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/comment_config.rb#48 + def cop_opted_in?(cop); end + + # source://rubocop//lib/rubocop/comment_config.rb#56 + def extra_enabled_comments; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://rubocop//lib/rubocop/comment_config.rb#32 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # source://rubocop//lib/rubocop/comment_config.rb#98 + def analyze; end + + # source://rubocop//lib/rubocop/comment_config.rb#177 + def analyze_cop(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#195 + def analyze_disabled(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#202 + def analyze_rest(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#188 + def analyze_single_line(analysis, directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#147 + def apply_cop_op(analyses, operation, cop, line); end + + # source://rubocop//lib/rubocop/comment_config.rb#141 + def apply_push(analyses, resolved_cops, line); end + + # source://rubocop//lib/rubocop/comment_config.rb#209 + def cop_line_ranges(analysis); end + + # source://rubocop//lib/rubocop/comment_config.rb#215 + def each_directive; end + + # source://rubocop//lib/rubocop/comment_config.rb#135 + def expand_cop_name(name); end + + # source://rubocop//lib/rubocop/comment_config.rb#70 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop//lib/rubocop/comment_config.rb#235 + def handle_enable_all(directive, names, extras); end + + # Collect cops that have been disabled or enabled by name in a directive comment + # so that `Lint/RedundantCopEnableDirective` can register offenses correctly. + # + # source://rubocop//lib/rubocop/comment_config.rb#249 + def handle_switch(directive, names, extras); end + + # source://rubocop//lib/rubocop/comment_config.rb#168 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop//lib/rubocop/comment_config.rb#228 + def non_comment_token_line_numbers; end + + # source://rubocop//lib/rubocop/comment_config.rb#85 + def opt_in_cops; end + + # source://rubocop//lib/rubocop/comment_config.rb#157 + def pop_state(analyses, line); end + + # source://rubocop//lib/rubocop/comment_config.rb#224 + def qualified_cop_name(cop_name); end + + # source://rubocop//lib/rubocop/comment_config.rb#129 + def resolve_push_cops(directive); end + + # source://rubocop//lib/rubocop/comment_config.rb#125 + def snapshot_cops(analyses, cop_names); end +end + +# source://rubocop//lib/rubocop/comment_config.rb#9 +RuboCop::CommentConfig::CONFIG_DISABLED_LINE_RANGE_MIN = T.let(T.unsafe(nil), Float) + +# This class provides an API compatible with RuboCop::DirectiveComment +# to be used for cops that are disabled in the config file +# +# source://rubocop//lib/rubocop/comment_config.rb#13 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment + include ::RuboCop::Ext::Comment + + # @return [ConfigDisabledCopDirectiveComment] a new instance of ConfigDisabledCopDirectiveComment + # + # source://rubocop//lib/rubocop/comment_config.rb#21 + def initialize(cop_name); end + + # Returns the value of attribute line_number. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def line_number; end + + # Returns the value of attribute loc. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def loc; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/comment_config.rb#16 + def text; end +end + +# source://rubocop//lib/rubocop/comment_config.rb#19 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Expression < ::Struct + # Returns the value of attribute line + # + # @return [Object] the current value of line + # + # source://rubocop//lib/rubocop/comment_config.rb#19 + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/comment_config.rb#19 + def line=(_); end + + class << self + # source://rubocop//lib/rubocop/comment_config.rb#19 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/comment_config.rb#19 + def inspect; end + + # source://rubocop//lib/rubocop/comment_config.rb#19 + def keyword_init?; end + + # source://rubocop//lib/rubocop/comment_config.rb#19 + def members; end + + # source://rubocop//lib/rubocop/comment_config.rb#19 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/comment_config.rb#18 +class RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment::Loc < ::Struct + # Returns the value of attribute expression + # + # @return [Object] the current value of expression + # + # source://rubocop//lib/rubocop/comment_config.rb#18 + def expression; end + + # Sets the attribute expression + # + # @param value [Object] the value to set the attribute expression to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/comment_config.rb#18 + def expression=(_); end + + class << self + # source://rubocop//lib/rubocop/comment_config.rb#18 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/comment_config.rb#18 + def inspect; end + + # source://rubocop//lib/rubocop/comment_config.rb#18 + def keyword_init?; end + + # source://rubocop//lib/rubocop/comment_config.rb#18 + def members; end + + # source://rubocop//lib/rubocop/comment_config.rb#18 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/comment_config.rb#28 +class RuboCop::CommentConfig::CopAnalysis < ::Struct + # Returns the value of attribute line_ranges + # + # @return [Object] the current value of line_ranges + # + # source://rubocop//lib/rubocop/comment_config.rb#28 + def line_ranges; end + + # Sets the attribute line_ranges + # + # @param value [Object] the value to set the attribute line_ranges to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/comment_config.rb#28 + def line_ranges=(_); end + + # Returns the value of attribute start_line_number + # + # @return [Object] the current value of start_line_number + # + # source://rubocop//lib/rubocop/comment_config.rb#28 + def start_line_number; end + + # Sets the attribute start_line_number + # + # @param value [Object] the value to set the attribute start_line_number to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/comment_config.rb#28 + def start_line_number=(_); end + + class << self + # source://rubocop//lib/rubocop/comment_config.rb#28 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/comment_config.rb#28 + def inspect; end + + # source://rubocop//lib/rubocop/comment_config.rb#28 + def keyword_init?; end + + # source://rubocop//lib/rubocop/comment_config.rb#28 + def members; end + + # source://rubocop//lib/rubocop/comment_config.rb#28 + def new(*_arg0); end + end +end + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# source://rubocop//lib/rubocop/config.rb#12 +class RuboCop::Config + include ::RuboCop::PathUtil + include ::RuboCop::FileFinder + extend ::RuboCop::SimpleForwardable + + # @return [Config] a new instance of Config + # + # source://rubocop//lib/rubocop/config.rb#31 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config.rb#97 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#97 + def []=(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#212 + def active_support_extensions_enabled?; end + + # source://rubocop//lib/rubocop/config.rb#127 + def add_excludes_from_higher_level(highest_config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#239 + def allowed_camel_case_file?(file); end + + # Paths specified in configuration files starting with .rubocop are + # relative to the directory where that file is. Paths in other config files + # are relative to the current directory. This is so that paths in + # config/default.yml, for example, are not relative to RuboCop's config + # directory since that wouldn't work. + # + # source://rubocop//lib/rubocop/config.rb#283 + def base_dir_for_path_parameters; end + + # @return [String, nil] + # + # source://rubocop//lib/rubocop/config.rb#313 + def bundler_lock_file_path; end + + # source://rubocop//lib/rubocop/config.rb#85 + def check; end + + # @api private + # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys + # + # source://rubocop//lib/rubocop/config.rb#180 + def clusivity_config_for_badge?(badge); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#200 + def cop_enabled?(name); end + + # source://rubocop//lib/rubocop/config.rb#97 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#139 + def deprecation_check; end + + # source://rubocop//lib/rubocop/config.rb#97 + def dig(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#204 + def disabled_new_cops?; end + + # source://rubocop//lib/rubocop/config.rb#97 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#97 + def each_key(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#208 + def enabled_new_cops?; end + + # source://rubocop//lib/rubocop/config.rb#97 + def fetch(*_arg0, **_arg1, &_arg2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#261 + def file_to_exclude?(file); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#220 + def file_to_include?(file); end + + # source://rubocop//lib/rubocop/config.rb#196 + def for_all_cops; end + + # Note: the 'Enabled' attribute is same as that returned by `for_cop` + # + # @return [Config] for the given cop merged with that of its department (if any) + # + # source://rubocop//lib/rubocop/config.rb#166 + def for_badge(badge); end + + # Note: the 'Enabled' attribute is calculated according to the department's + # and 'AllCops' configuration; other attributes are not inherited. + # + # @return [Config] for the given cop / cop name. + # + # source://rubocop//lib/rubocop/config.rb#153 + def for_cop(cop); end + + # Note: the 'Enabled' attribute will be present only if specified + # at the department's level + # + # @return [Config] for the given department name. + # + # source://rubocop//lib/rubocop/config.rb#191 + def for_department(department_name); end + + # If the given cop is enabled, returns its configuration hash. + # Otherwise, returns an empty hash. + # + # @return [Config, Hash] for the given cop / cop name. + # + # source://rubocop//lib/rubocop/config.rb#160 + def for_enabled_cop(cop); end + + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/config.rb#338 + def gem_versions_in_target; end + + # source://rubocop//lib/rubocop/config.rb#342 + def inspect; end + + # True if this is a config file that is shipped with RuboCop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#110 + def internal?; end + + # source://rubocop//lib/rubocop/config.rb#97 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#97 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#81 + def loaded_features; end + + # Returns the value of attribute loaded_path. + # + # source://rubocop//lib/rubocop/config.rb#21 + def loaded_path; end + + # source://rubocop//lib/rubocop/config.rb#77 + def loaded_plugins; end + + # source://rubocop//lib/rubocop/config.rb#115 + def make_excludes_absolute; end + + # source://rubocop//lib/rubocop/config.rb#97 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#97 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#293 + def parser_engine; end + + # source://rubocop//lib/rubocop/config.rb#274 + def path_relative_to_config(path); end + + # source://rubocop//lib/rubocop/config.rb#270 + def patterns_to_exclude; end + + # source://rubocop//lib/rubocop/config.rb#266 + def patterns_to_include; end + + # source://rubocop//lib/rubocop/config.rb#324 + def pending_cops; end + + # Returns true if there's a chance that an Include pattern matches hidden + # files, false if that's definitely not possible. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#253 + def possibly_include_hidden?; end + + # source://rubocop//lib/rubocop/config.rb#97 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#105 + def signature; end + + # source://rubocop//lib/rubocop/config.rb#308 + def smart_loaded_path; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#216 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/config.rb#297 + def target_rails_version; end + + # source://rubocop//lib/rubocop/config.rb#99 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#97 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#97 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#101 + def to_s; end + + # source://rubocop//lib/rubocop/config.rb#97 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#99 + def validate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config.rb#92 + def validate_after_resolution; end + + private + + # source://rubocop//lib/rubocop/config.rb#392 + def department_of(qualified_cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#380 + def enable_cop?(qualified_cop_name, cop_options); end + + # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` + # @return [Float] The major and minor version, like `7.1` + # + # source://rubocop//lib/rubocop/config.rb#367 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop//lib/rubocop/config.rb#373 + def read_gem_versions_from_target_lockfile; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#354 + def read_rails_version_from_bundler_lock_file; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#349 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop//lib/rubocop/config.rb#23 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +# source://rubocop//lib/rubocop/config.rb#17 +class RuboCop::Config::CopConfig < ::Struct + # Returns the value of attribute metadata + # + # @return [Object] the current value of metadata + # + # source://rubocop//lib/rubocop/config.rb#17 + def metadata; end + + # Sets the attribute metadata + # + # @param value [Object] the value to set the attribute metadata to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/config.rb#17 + def metadata=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + # + # source://rubocop//lib/rubocop/config.rb#17 + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/config.rb#17 + def name=(_); end + + class << self + # source://rubocop//lib/rubocop/config.rb#17 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/config.rb#17 + def inspect; end + + # source://rubocop//lib/rubocop/config.rb#17 + def keyword_init?; end + + # source://rubocop//lib/rubocop/config.rb#17 + def members; end + + # source://rubocop//lib/rubocop/config.rb#17 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/config.rb#20 +RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) + +# source://rubocop//lib/rubocop/config.rb#19 +RuboCop::Config::EMPTY_CONFIG = T.let(T.unsafe(nil), Hash) + +# This class has methods related to finding configuration path. +# +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#8 +class RuboCop::ConfigFinder + extend ::RuboCop::FileFinder + + class << self + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#19 + def find_config_path(target_dir); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#26 + def project_root; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#17 + def project_root=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#69 + def expand_path(path); end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#40 + def find_project_dotfile(target_dir); end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#32 + def find_project_root; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#44 + def find_project_root_dot_config; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#54 + def find_user_dotfile; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#62 + def find_user_xdg_config; end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#12 +RuboCop::ConfigFinder::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#9 +RuboCop::ConfigFinder::DOTFILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#11 +RuboCop::ConfigFinder::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_finder.rb#10 +RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) + +# This class represents the configuration of the RuboCop application +# and all its cops. A Config is associated with a YAML configuration +# file from which it was read. Several different Configs can be used +# during a run of the rubocop program, if files in several +# directories are inspected. +# +# source://rubocop//lib/rubocop/config_loader.rb#18 +class RuboCop::ConfigLoader + extend ::RuboCop::FileFinder + + class << self + # source://rubocop//lib/rubocop/config_loader.rb#138 + def add_excludes_from_files(config, config_file); end + + # Used to add features that were required inside a config or from + # the CLI using `--require`. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader.rb#203 + def add_loaded_features(loaded_features); end + + # Used to add plugins that were required inside a config or from + # the CLI using `--plugin`. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader.rb#196 + def add_loaded_plugins(loaded_plugins); end + + # source://rubocop//lib/rubocop/config_loader.rb#91 + def add_missing_namespaces(path, hash); end + + # source://rubocop//lib/rubocop/config_loader.rb#34 + def cache_root(cache_root_override = T.unsafe(nil)); end + + # Sets the attribute cache_root + # + # @param value the value to set the attribute cache_root to. + # + # source://rubocop//lib/rubocop/config_loader.rb#28 + def cache_root=(_arg0); end + + # source://rubocop//lib/rubocop/config_loader.rb#38 + def clear_options; end + + # Returns the path of .rubocop.yml searching upwards in the + # directory structure starting at the given directory where the + # inspected file is. If no .rubocop.yml is found there, the + # user's home directory is checked. If there's no .rubocop.yml + # there either, the path to the default file is returned. + # + # source://rubocop//lib/rubocop/config_loader.rb#119 + def configuration_file_for(target_dir); end + + # source://rubocop//lib/rubocop/config_loader.rb#123 + def configuration_from_file(config_file, check: T.unsafe(nil)); end + + # Returns the value of attribute debug. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def debug; end + + # Sets the attribute debug + # + # @param value the value to set the attribute debug to. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def debug=(_arg0); end + + # Returns the value of attribute debug. + # + # source://rubocop//lib/rubocop/config_loader.rb#31 + def debug?; end + + # source://rubocop//lib/rubocop/config_loader.rb#148 + def default_configuration; end + + # Sets the attribute default_configuration + # + # @param value the value to set the attribute default_configuration to. + # + # source://rubocop//lib/rubocop/config_loader.rb#28 + def default_configuration=(_arg0); end + + # Returns the value of attribute disable_pending_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def disable_pending_cops; end + + # Sets the attribute disable_pending_cops + # + # @param value the value to set the attribute disable_pending_cops to. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def disable_pending_cops=(_arg0); end + + # Returns the value of attribute enable_pending_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def enable_pending_cops; end + + # Sets the attribute enable_pending_cops + # + # @param value the value to set the attribute enable_pending_cops to. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def enable_pending_cops=(_arg0); end + + # Returns the value of attribute ignore_parent_exclusion. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def ignore_parent_exclusion; end + + # Sets the attribute ignore_parent_exclusion + # + # @param value the value to set the attribute ignore_parent_exclusion to. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def ignore_parent_exclusion=(_arg0); end + + # Returns the value of attribute ignore_parent_exclusion. + # + # source://rubocop//lib/rubocop/config_loader.rb#32 + def ignore_parent_exclusion?; end + + # Returns the value of attribute ignore_unrecognized_cops. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def ignore_unrecognized_cops; end + + # Sets the attribute ignore_unrecognized_cops + # + # @param value the value to set the attribute ignore_unrecognized_cops to. + # + # source://rubocop//lib/rubocop/config_loader.rb#26 + def ignore_unrecognized_cops=(_arg0); end + + # This API is primarily intended for testing and documenting plugins. + # When testing a plugin using `rubocop/rspec/support`, the plugin is loaded automatically, + # so this API is usually not needed. It is intended to be used only when implementing tests + # that do not use `rubocop/rspec/support`. + # + # source://rubocop//lib/rubocop/config_loader.rb#159 + def inject_defaults!(config_yml_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#51 + def load_file(file, check: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config_loader.rb#76 + def load_yaml_configuration(absolute_path); end + + # Returns the value of attribute loaded_features. + # + # source://rubocop//lib/rubocop/config_loader.rb#29 + def loaded_features; end + + # Returns the value of attribute loaded_plugins. + # + # source://rubocop//lib/rubocop/config_loader.rb#29 + def loaded_plugins; end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # source://rubocop//lib/rubocop/config_loader.rb#110 + def merge(base_hash, derived_hash); end + + # Merges the given configuration with the default one. + # + # source://rubocop//lib/rubocop/config_loader.rb#189 + def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end + + # Returns the path RuboCop inferred as the root of the project. No file + # searches will go past this directory. + # + # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. + # + # source://rubocop//lib/rubocop/config_loader.rb#179 + def project_root; end + + private + + # source://rubocop//lib/rubocop/config_loader.rb#217 + def check_duplication(yaml_code, absolute_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#209 + def file_path(file); end + + # Read the specified file, or exit with a friendly, concise message on + # stderr. Care is taken to use the standard OS exit code for a "file not + # found" error. + # + # source://rubocop//lib/rubocop/config_loader.rb#237 + def read_file(absolute_path); end + + # source://rubocop//lib/rubocop/config_loader.rb#213 + def resolver; end + + # source://rubocop//lib/rubocop/config_loader.rb#243 + def yaml_tree_to_hash(yaml_tree); end + + # source://rubocop//lib/rubocop/config_loader.rb#253 + def yaml_tree_to_hash!(yaml_tree); end + end +end + +# source://rubocop//lib/rubocop/config_loader.rb#21 +RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/config_loader.rb#19 +RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/config_loader.rb#20 +RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) + +# A help class for ConfigLoader that handles configuration resolution. +# +# @api private +# +# source://rubocop//lib/rubocop/config_loader_resolver.rb#10 +class RuboCop::ConfigLoaderResolver + # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the + # base configuration are relative to the directory where the base configuration file is. For the + # derived configuration, we need to make those paths relative to where the derived configuration + # file is. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#64 + def fix_include_paths(base_config_path, hash, path, key, value); end + + # Return a recursive merge of two hashes. That is, a normal hash merge, + # with the addition that any value that is a hash, and occurs in both + # arguments, will also be merged. And so on. + # + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#118 + def merge(base_hash, derived_hash, **opts); end + + # Merges the given configuration with the default one. If + # AllCops:DisabledByDefault is true, it changes the Enabled params so that + # only cops from user configuration are enabled. If + # AllCops:EnabledByDefault is true, it changes the Enabled params so that + # only cops explicitly disabled in user configuration are disabled. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#94 + def merge_with_default(config, config_file, unset_nil:); end + + # An `Enabled: true` setting in user configuration for a cop overrides an + # `Enabled: false` setting for its department. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#138 + def override_department_setting_for_cops(base_hash, derived_hash); end + + # If a cop was previously explicitly enabled, but then superseded by the + # department being disabled, disable it. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#155 + def override_enabled_for_disabled_departments(base_hash, derived_hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#38 + def resolve_inheritance(path, hash, file, debug); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#74 + def resolve_inheritance_from_gems(hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#11 + def resolve_plugins(rubocop_config, plugins); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#18 + def resolve_requires(path, hash); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#234 + def base_configs(path, inherit_from, file); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#202 + def determine_inherit_mode(hash, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#171 + def disabled?(hash, department); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#175 + def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 + def duplicate_setting_warning(opts, key); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#293 + def gem_config_path(gem_name, relative_config_path); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#271 + def handle_disabled_by_default(config, new_default_configuration); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 + def inherited_file(path, inherit_from, file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#230 + def merge_hashes?(base_hash, derived_hash, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 + def remote_config?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#222 + def should_merge?(mode, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#226 + def should_override?(mode, key); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 + def should_union?(derived_hash, base_hash, root_mode, key); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#289 + def transform(config, &block); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#184 + def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end +end + +# Raised when a RuboCop configuration file is not found. +# +# source://rubocop//lib/rubocop/config_loader.rb#10 +class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end + +# This class handles obsolete configuration. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#4 +class RuboCop::ConfigObsoletion + # @api private + # @return [ConfigObsoletion] a new instance of ConfigObsoletion + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#66 + def initialize(config); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#84 + def deprecated_cop_name?(name); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#79 + def legacy_cop_names; end + + # @api private + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#72 + def reject_obsolete!; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 + def rules; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 + def warnings; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#151 + def cop_rules; end + + # Cop rules are keyed by the name of the original cop + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#112 + def load_cop_rules(rules); end + + # Parameter rules may apply to multiple cops and multiple parameters + # and are given as an array. Each combination is turned into a separate + # rule object. + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#125 + def load_parameter_rules(rules); end + + # Default rules for obsoletions are in config/obsoletion.yml + # Additional rules files can be added with `RuboCop::ConfigObsoletion.files << filename` + # + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#92 + def load_rules; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#138 + def obsoletions; end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#45 + def deprecated_cop_name?(name); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#49 + def deprecated_names_for(cop); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + def files; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + def files=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#26 + def global; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#40 + def legacy_cop_names; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#30 + def reset!; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion.rb#36 + def rules_cache_key; end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#8 +RuboCop::ConfigObsoletion::COP_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#7 +class RuboCop::ConfigObsoletion::ChangedEnforcedStyles < ::RuboCop::ConfigObsoletion::ParameterRule + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#14 + def message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#10 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#28 + def value; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_enforced_styles.rb#8 +RuboCop::ConfigObsoletion::ChangedEnforcedStyles::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for changing a parameter +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#7 +class RuboCop::ConfigObsoletion::ChangedParameter < ::RuboCop::ConfigObsoletion::ParameterRule + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#10 + def message; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/changed_parameter.rb#8 +RuboCop::ConfigObsoletion::ChangedParameter::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Base class for ConfigObsoletion rules relating to cops +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#7 +class RuboCop::ConfigObsoletion::CopRule < ::RuboCop::ConfigObsoletion::Rule + # @api private + # @return [CopRule] a new instance of CopRule + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#10 + def initialize(config, old_name); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#15 + def cop_rule?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#19 + def message; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#8 + def old_name; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#28 + def violated?; end + + # Cop rules currently can only be failures, not warnings + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/cop_rule.rb#24 + def warning?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#7 +RuboCop::ConfigObsoletion::DEFAULT_RULES_FILE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#8 +class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [ExtractedCop] a new instance of ExtractedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#11 + def initialize(config, old_name, gem); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 + def department; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#9 + def gem; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#23 + def rule_message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#17 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#32 + def affected_cops; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/extracted_cop.rb#41 + def plugin_loaded?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#18 +RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#14 +RuboCop::ConfigObsoletion::PARAMETER_RULE_CLASSES = T.let(T.unsafe(nil), Hash) + +# Base class for ConfigObsoletion rules relating to parameters +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#7 +class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Rule + # @api private + # @return [ParameterRule] a new instance of ParameterRule + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#10 + def initialize(config, cop, parameter, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def cop; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#8 + def parameter; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#17 + def parameter_rule?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#21 + def violated?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#25 + def warning?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 + def alternative; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 + def alternatives; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + def applies_to_current_ruby_version?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 + def reason; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 + def severity; end +end + +# Encapsulation of a ConfigObsoletion rule for removing +# a previously defined cop. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#8 +class RuboCop::ConfigObsoletion::RemovedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [RemovedCop] a new instance of RemovedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#13 + def initialize(config, old_name, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#9 + def old_name; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#18 + def rule_message; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#36 + def alternatives; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#32 + def reason; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/removed_cop.rb#11 +RuboCop::ConfigObsoletion::RemovedCop::BASE_MESSAGE = T.let(T.unsafe(nil), String) + +# Encapsulation of a ConfigObsoletion rule for renaming +# a cop or moving it to a new department. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#8 +class RuboCop::ConfigObsoletion::RenamedCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [RenamedCop] a new instance of RenamedCop + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#11 + def initialize(config, old_name, name_or_hash); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#9 + def new_name; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#23 + def rule_message; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#27 + def warning?; end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#33 + def moved?; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#44 + def severity; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/renamed_cop.rb#40 + def verb; end +end + +# Abstract base class for ConfigObsoletion rules +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/rule.rb#7 +class RuboCop::ConfigObsoletion::Rule + # @api private + # @return [Rule] a new instance of Rule + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#8 + def initialize(config); end + + # Does this rule relate to cops? + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#13 + def cop_rule?; end + + # Does this rule relate to parameters? + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#18 + def parameter_rule?; end + + # @api private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#22 + def violated?; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#28 + def config; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#36 + def smart_loaded_path; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/rule.rb#30 + def to_sentence(collection, connector: T.unsafe(nil)); end +end + +# Encapsulation of a ConfigObsoletion rule for splitting a cop's +# functionality into multiple new cops. +# +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#8 +class RuboCop::ConfigObsoletion::SplitCop < ::RuboCop::ConfigObsoletion::CopRule + # @api private + # @return [SplitCop] a new instance of SplitCop + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#11 + def initialize(config, old_name, metadata); end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#9 + def metadata; end + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#16 + def rule_message; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_obsoletion/split_cop.rb#22 + def alternatives; end +end + +# This class handles collecting the options for regenerating a TODO file. +# +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#6 +class RuboCop::ConfigRegeneration + # Get options from the comment in the TODO file, and parse them as options + # + # @api private + # + # source://rubocop//lib/rubocop/config_regeneration.rb#12 + def options; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/config_regeneration.rb#29 + def generation_command; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_regeneration.rb#25 + def todo_exists?; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#7 +RuboCop::ConfigRegeneration::AUTO_GENERATED_FILE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#8 +RuboCop::ConfigRegeneration::COMMAND_REGEX = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/config_regeneration.rb#9 +RuboCop::ConfigRegeneration::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# Handles caching of configurations and association of inspected +# ruby files to configurations. +# +# source://rubocop//lib/rubocop/config_store.rb#6 +class RuboCop::ConfigStore + # @return [ConfigStore] a new instance of ConfigStore + # + # source://rubocop//lib/rubocop/config_store.rb#10 + def initialize; end + + # source://rubocop//lib/rubocop/config_store.rb#28 + def apply_options!(options); end + + # If type (file/dir) is known beforehand, + # prefer using #for_file or #for_dir for improved performance + # + # source://rubocop//lib/rubocop/config_store.rb#57 + def for(file_or_dir); end + + # source://rubocop//lib/rubocop/config_store.rb#66 + def for_dir(dir); end + + # source://rubocop//lib/rubocop/config_store.rb#47 + def for_file(file); end + + # source://rubocop//lib/rubocop/config_store.rb#51 + def for_pwd; end + + # source://rubocop//lib/rubocop/config_store.rb#38 + def force_default_config!; end + + # source://rubocop//lib/rubocop/config_store.rb#33 + def options_config=(options_config); end + + # source://rubocop//lib/rubocop/config_store.rb#42 + def unvalidated; end + + # Returns the value of attribute validated. + # + # source://rubocop//lib/rubocop/config_store.rb#7 + def validated; end + + # Returns the value of attribute validated. + # + # source://rubocop//lib/rubocop/config_store.rb#8 + def validated?; end +end + +# Handles validation of configuration, for example cop names, parameter +# names, and Ruby versions. +# +# source://rubocop//lib/rubocop/config_validator.rb#7 +class RuboCop::ConfigValidator + extend ::RuboCop::SimpleForwardable + + # @return [ConfigValidator] a new instance of ConfigValidator + # + # source://rubocop//lib/rubocop/config_validator.rb#28 + def initialize(config); end + + # source://rubocop//lib/rubocop/config_validator.rb#26 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config_validator.rb#26 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/config_validator.rb#65 + def target_ruby_version; end + + # source://rubocop//lib/rubocop/config_validator.rb#34 + def validate; end + + # Validations that should only be run after all config resolving has + # taken place: + # * The target ruby version is only checked once the entire inheritance + # chain has been loaded so that only the final value is validated, and + # any obsolete but overridden values are ignored. + # + # source://rubocop//lib/rubocop/config_validator.rb#61 + def validate_after_resolution; end + + private + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#100 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#263 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/config_validator.rb#73 + def check_obsoletions; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#80 + def check_target_ruby; end + + # source://rubocop//lib/rubocop/config_validator.rb#205 + def each_invalid_parameter(cop_name); end + + # source://rubocop//lib/rubocop/config_validator.rb#116 + def list_unknown_cops(invalid_cop_names); end + + # FIXME: Handling colors in exception messages like this is ugly. + # + # source://rubocop//lib/rubocop/config_validator.rb#284 + def param_error_message(parent, key, value, supposed_values); end + + # source://rubocop//lib/rubocop/config_validator.rb#252 + def reject_conflicting_safe_settings; end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#243 + def reject_mutually_exclusive_defaults; end + + # source://rubocop//lib/rubocop/config_validator.rb#139 + def suggestion(name); end + + # Returns the value of attribute target_ruby. + # + # source://rubocop//lib/rubocop/config_validator.rb#71 + def target_ruby; end + + # source://rubocop//lib/rubocop/config_validator.rb#217 + def validate_enforced_styles(valid_cop_names); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#166 + def validate_new_cops_parameter; end + + # source://rubocop//lib/rubocop/config_validator.rb#191 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#177 + def validate_parameter_shape(valid_cop_names); end + + # source://rubocop//lib/rubocop/config_validator.rb#237 + def validate_support_and_has_list(name, formats, valid); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/config_validator.rb#155 + def validate_syntax_cop; end +end + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#11 +RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/config_validator.rb#23 +RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/config_validator.rb#22 +RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#21 +RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#14 +RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/config_validator.rb#18 +RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/util.rb#4 +module RuboCop::Cop; end + +# This module checks for nodes that should be aligned to the left or right. +# This amount is determined by the instance variable @column_delta. +# +# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#7 +module RuboCop::Cop::Alignment + private + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#26 + def check_alignment(items, base_column = T.unsafe(nil)); end + + # Returns the value of attribute column_delta. + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#12 + def column_delta; end + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#14 + def configured_indentation_width; end + + # @api public + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#58 + def display_column(range); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 + def each_bad_alignment(items, base_column); end + + # @deprecated Use processed_source.line_with_comment?(line) + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 + def end_of_line_comment(line); end + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#18 + def indentation(node); end + + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#22 + def offset(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78 + def register_offense(offense_node, message_node); end + + # @api public + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#64 + def within?(inner, outer); end +end + +# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#8 +RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) + +# This class does autocorrection of nodes that should just be moved to +# the left or to the right, amount being determined by the instance +# variable column_delta. +# +# source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#8 +class RuboCop::Cop::AlignmentCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::Alignment + + class << self + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#32 + def align_end(corrector, processed_source, node, align_to); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#15 + def correct(corrector, processed_source, node, column_delta); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#13 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#118 + def alignment_column(align_to); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#47 + def autocorrect_line(corrector, line_begin_pos, expr, column_delta, taboo_ranges); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#86 + def block_comment_within?(expr); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#92 + def calculate_range(expr, line_begin_pos, column_delta); end + + # Some special kinds of string literals are not composed of literal + # characters between two delimiters: + # - The source map of `?a` responds to :begin and :end but its end is + # nil. + # - The source map of `__FILE__` responds to neither :begin nor :end. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#82 + def delimited_string_literal?(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#104 + def each_line(expr); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#128 + def indentation_string(column); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#67 + def inside_string_range(node); end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#61 + def inside_string_ranges(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#136 + def using_tabs?; end + + # source://rubocop//lib/rubocop/cop/correctors/alignment_corrector.rb#112 + def whitespace_range(node); end + end +end + +# This module encapsulates the ability to allow certain identifiers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#6 +module RuboCop::Cop::AllowedIdentifiers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#9 + def allowed_identifier?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#13 + def allowed_identifiers; end +end + +# if a variable starts with a sigil it will be removed +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_identifiers.rb#7 +RuboCop::Cop::AllowedIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to allow certain methods when +# parsing. Even if the code is in offense, if it contains methods +# that are allowed. This module is equivalent to the IgnoredMethods module, +# which will be deprecated in RuboCop 2.0. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#9 +module RuboCop::Cop::AllowedMethods + private + + # @api public + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 + def allowed_method?(name); end + + # @api public + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#35 + def cop_config_allowed_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39 + def cop_config_deprecated_values; end + + # @deprecated Use allowed_method? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#18 + def ignored_method?; end +end + +# This module encapsulates the ability to ignore certain lines when +# parsing. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#7 +module RuboCop::Cop::AllowedPattern + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 + def allowed_line?(line); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42 + def allowed_patterns; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#58 + def cop_config_deprecated_methods_values; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#52 + def cop_config_patterns_values; end + + # @deprecated Use allowed_line? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 + def ignored_line?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29 + def matches_allowed_pattern?(line); end + + # @deprecated Use matches_allowed_pattern? instead + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 + def matches_ignored_pattern?(line); end +end + +# This module encapsulates the ability to allow certain receivers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6 +module RuboCop::Cop::AllowedReceivers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7 + def allowed_receiver?(receiver); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29 + def allowed_receivers; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13 + def receiver_name(receiver); end +end + +# Error raised when an unqualified cop name is used that could +# refer to two or more cops under different departments +# +# source://rubocop//lib/rubocop/cop/registry.rb#7 +class RuboCop::Cop::AmbiguousCopName < ::RuboCop::Error + # @return [AmbiguousCopName] a new instance of AmbiguousCopName + # + # source://rubocop//lib/rubocop/cop/registry.rb#11 + def initialize(name, origin, badges); end +end + +# source://rubocop//lib/rubocop/cop/registry.rb#8 +RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) + +# Representation of an annotation comment in source code (eg. `# TODO: blah blah blah`). +# +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 +class RuboCop::Cop::AnnotationComment + # @param comment [Parser::Source::Comment] + # @param keywords [Array] + # @return [AnnotationComment] a new instance of AnnotationComment + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 + def initialize(comment, keywords); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 + def annotation?; end + + # Returns the range bounds for just the annotation + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 + def bounds; end + + # Returns the value of attribute colon. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def colon; end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def comment; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 + def correct?(colon:); end + + # Returns the value of attribute keyword. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def keyword; end + + # Returns the value of attribute margin. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def margin; end + + # Returns the value of attribute note. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def note; end + + # Returns the value of attribute space. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 + def space; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 + def just_keyword_of_sentence?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 + def keyword_appearance?; end + + # Returns the value of attribute keywords. + # + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 + def keywords; end + + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 + def regex; end + + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + def split_comment(comment); end +end + +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 +RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) + +# Handles the `MinSize` configuration option for array-based cops +# `Style/SymbolArray` and `Style/WordArray`, which check for use of the +# relevant percent literal syntax such as `%i[...]` and `%w[...]` +# +# source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#8 +module RuboCop::Cop::ArrayMinSize + private + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#19 + def array_style_detected(style, ary_size); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#11 + def below_array_length?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#38 + def largest_brackets_size(style, ary_size); end + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#15 + def min_size_config; end + + # source://rubocop//lib/rubocop/cop/mixin/array_min_size.rb#48 + def smallest_percent_size(style, ary_size); end +end + +# Common code for ordinary arrays with [] that can be written with % +# syntax. +# +# source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#7 +module RuboCop::Cop::ArraySyntax + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/array_syntax.rb#10 + def bracketed_array_of?(element_type, node); end +end + +# extend this module to signal autocorrection support +# +# source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#6 +module RuboCop::Cop::AutoCorrector + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/auto_corrector.rb#7 + def support_autocorrect?; end +end + +# This module encapsulates the logic for autocorrect behavior for a cop. +# +# source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#6 +module RuboCop::Cop::AutocorrectLogic + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#7 + def autocorrect?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#31 + def autocorrect_enabled?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#15 + def autocorrect_requested?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#11 + def autocorrect_with_disable_uncorrectable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#19 + def correctable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#23 + def disable_uncorrectable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#27 + def safe_autocorrect?; end + + private + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#51 + def disable_offense(offense_range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#143 + def disable_offense_at_end_of_line(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#151 + def disable_offense_before_and_after(range_by_lines); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#77 + def disable_offense_with_eol_or_surround_comment(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#147 + def eol_comment; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#85 + def eol_comment_would_be_inside_literal?(offense_range, literal_range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#102 + def heredoc_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#92 + def line_with_eol_comment_too_long?(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#137 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#63 + def multiline_ranges(offense_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#114 + def multiline_string?(node); end + + # Expand the given range to include all of any lines it covers. Does not + # include newline at end of the last line. + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#127 + def range_by_lines(range); end + + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#118 + def range_of_first_line(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#110 + def string_continuation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#98 + def surrounding_heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#106 + def surrounding_percent_array?(node); end +end + +# Identifier of all cops containing a department and cop name. +# +# All cops are identified by their badge. For example, the badge for +# `RuboCop::Cop::Layout::IndentationStyle` is `Layout/IndentationStyle`. +# Badges can be parsed as either `Department/CopName` or just `CopName` to +# allow for badge references in source files that omit the department for +# RuboCop to infer. +# +# source://rubocop//lib/rubocop/cop/badge.rb#12 +class RuboCop::Cop::Badge + # @return [Badge] a new instance of Badge + # + # source://rubocop//lib/rubocop/cop/badge.rb#34 + def initialize(class_name_parts); end + + # source://rubocop//lib/rubocop/cop/badge.rb#41 + def ==(other); end + + # Returns the value of attribute cop_name. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def cop_name; end + + # Returns the value of attribute department. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def department; end + + # Returns the value of attribute department_name. + # + # source://rubocop//lib/rubocop/cop/badge.rb#13 + def department_name; end + + # source://rubocop//lib/rubocop/cop/badge.rb#44 + def eql?(other); end + + # source://rubocop//lib/rubocop/cop/badge.rb#46 + def hash; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/badge.rb#51 + def match?(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/badge.rb#59 + def qualified?; end + + # source://rubocop//lib/rubocop/cop/badge.rb#55 + def to_s; end + + # source://rubocop//lib/rubocop/cop/badge.rb#63 + def with_department(department); end + + class << self + # source://rubocop//lib/rubocop/cop/badge.rb#27 + def camel_case(name_part); end + + # source://rubocop//lib/rubocop/cop/badge.rb#15 + def for(class_name); end + + # source://rubocop//lib/rubocop/cop/badge.rb#23 + def parse(identifier); end + end +end + +# A scaffold for concrete cops. +# +# The Cop::Base class is meant to be extended. +# +# Cops track offenses and can autocorrect them on the fly. +# +# A commissioner object is responsible for traversing the AST and invoking +# the specific callbacks on each cop. +# +# First the callback `on_new_investigation` is called; +# if a cop needs to do its own processing of the AST or depends on +# something else. +# +# Then callbacks like `on_def`, `on_send` (see AST::Traversal) are called +# with their respective nodes. +# +# Finally the callback `on_investigation_end` is called. +# +# Within these callbacks, cops are meant to call `add_offense` or +# `add_global_offense`. Use the `processed_source` method to +# get the currently processed source being investigated. +# +# In case of invalid syntax / unparsable content, +# the callback `on_other_file` is called instead of all the other +# `on_...` callbacks. +# +# Private methods are not meant for custom cops consumption, +# nor are any instance variables. +# +# source://rubocop//lib/rubocop/cop/base.rb#34 +class RuboCop::Cop::Base + include ::RuboCop::AST::Sexp + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + include ::RuboCop::Cop::IgnoredNode + include ::RuboCop::Cop::AutocorrectLogic + extend ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # @return [Base] a new instance of Base + # + # source://rubocop//lib/rubocop/cop/base.rb#156 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#278 + def active_support_extensions_enabled?; end + + # Adds an offense that has no particular location. + # No correction can be applied to global offenses + # + # source://rubocop//lib/rubocop/cop/base.rb#189 + def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end + + # Adds an offense on the specified range (or node with an expression) + # Unless that offense is disabled for this range, a corrector will be yielded + # to provide the cop the opportunity to autocorrect the offense. + # If message is not specified, the method `message` will be called. + # + # source://rubocop//lib/rubocop/cop/base.rb#201 + def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#357 + def always_autocorrect?; end + + # Called before any investigation + # + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#343 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#324 + def callbacks_needed; end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/base.rb#43 + def config; end + + # source://rubocop//lib/rubocop/cop/base.rb#252 + def config_to_allow_offenses; end + + # source://rubocop//lib/rubocop/cop/base.rb#256 + def config_to_allow_offenses=(hash); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#363 + def contextual_autocorrect?; end + + # Configuration Helpers + # + # source://rubocop//lib/rubocop/cop/base.rb#246 + def cop_config; end + + # source://rubocop//lib/rubocop/cop/base.rb#238 + def cop_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#295 + def excluded_file?(file); end + + # This method should be overridden when a cop's behavior depends + # on state that lives outside of these locations: + # + # (1) the file under inspection + # (2) the cop's source code + # (3) the config (eg a .rubocop.yml file) + # + # For example, some cops may want to look at other parts of + # the codebase being inspected to find violations. A cop may + # use the presence or absence of file `foo.rb` to determine + # whether a certain violation exists in `bar.rb`. + # + # Overriding this method allows the cop to indicate to RuboCop's + # ResultCache system when those external dependencies change, + # ie when the ResultCache should be invalidated. + # + # source://rubocop//lib/rubocop/cop/base.rb#234 + def external_dependency_checksum; end + + # source://rubocop//lib/rubocop/cop/base.rb#367 + def inspect; end + + # Gets called if no message is specified when calling `add_offense` or + # `add_global_offense` + # Cops are discouraged to override this; instead pass your message directly + # + # source://rubocop//lib/rubocop/cop/base.rb#183 + def message(_range = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/base.rb#242 + def name; end + + # @deprecated Make potential errors with previous API more obvious + # + # source://rubocop//lib/rubocop/cop/base.rb#315 + def offenses; end + + # Called after all on_... have been called + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#170 + def on_investigation_end; end + + # Called before all on_... have been called + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#164 + def on_new_investigation; end + + # Called instead of all on_... callbacks for unrecognized files / syntax errors + # When refining this method, always call `super` + # + # source://rubocop//lib/rubocop/cop/base.rb#176 + def on_other_file; end + + # There should be very limited reasons for a Cop to do it's own parsing + # + # source://rubocop//lib/rubocop/cop/base.rb#300 + def parse(source, path = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/base.rb#270 + def parser_engine; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/base.rb#43 + def processed_source; end + + # Called between investigations + # + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#306 + def ready; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#286 + def relevant_file?(file); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#282 + def string_literals_frozen_by_default?; end + + # Returns a gems locked versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/cop/base.rb#266 + def target_gem_version(gem_name); end + + # source://rubocop//lib/rubocop/cop/base.rb#274 + def target_rails_version; end + + # source://rubocop//lib/rubocop/cop/base.rb#260 + def target_ruby_version; end + + private + + # source://rubocop//lib/rubocop/cop/base.rb#485 + def annotate(message); end + + # source://rubocop//lib/rubocop/cop/base.rb#379 + def apply_correction(corrector); end + + # @return [Symbol] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#449 + def attempt_correction(range, corrector); end + + # Reserved for Cop::Cop + # + # source://rubocop//lib/rubocop/cop/base.rb#375 + def callback_argument(range); end + + # Called to complete an investigation + # + # source://rubocop//lib/rubocop/cop/base.rb#408 + def complete_investigation; end + + # @return [Symbol, Corrector] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#423 + def correct(range); end + + # source://rubocop//lib/rubocop/cop/base.rb#393 + def current_corrector; end + + # Reserved for Commissioner: + # + # source://rubocop//lib/rubocop/cop/base.rb#385 + def current_offense_locations; end + + # source://rubocop//lib/rubocop/cop/base.rb#397 + def current_offenses; end + + # source://rubocop//lib/rubocop/cop/base.rb#389 + def currently_disabled_lines; end + + # source://rubocop//lib/rubocop/cop/base.rb#513 + def custom_severity; end + + # source://rubocop//lib/rubocop/cop/base.rb#509 + def default_severity; end + + # source://rubocop//lib/rubocop/cop/base.rb#463 + def disable_uncorrectable(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#499 + def enabled_line?(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#491 + def file_name_matches_any?(file, parameter, default_result); end + + # source://rubocop//lib/rubocop/cop/base.rb#481 + def find_message(range, message); end + + # source://rubocop//lib/rubocop/cop/base.rb#505 + def find_severity(_range, severity); end + + # source://rubocop//lib/rubocop/cop/base.rb#526 + def range_for_original(range); end + + # source://rubocop//lib/rubocop/cop/base.rb#470 + def range_from_node_or_range(node_or_range); end + + # Actually private methods + # + # source://rubocop//lib/rubocop/cop/base.rb#418 + def reset_investigation; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#534 + def target_satisfies_all_gem_version_requirements?; end + + # @return [Symbol] offense status + # + # source://rubocop//lib/rubocop/cop/base.rb#438 + def use_corrector(range, corrector); end + + class << self + # List of cops that should not try to autocorrect at the same + # time as this cop + # + # @api public + # @return [Array] + # + # source://rubocop//lib/rubocop/cop/base.rb#59 + def autocorrect_incompatible_with; end + + # Naming + # + # source://rubocop//lib/rubocop/cop/base.rb#93 + def badge; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/base.rb#329 + def callbacks_needed; end + + # source://rubocop//lib/rubocop/cop/base.rb#97 + def cop_name; end + + # source://rubocop//lib/rubocop/cop/base.rb#101 + def department; end + + # Returns a url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. + # + # @api public + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/base.rb#70 + def documentation_url(config = T.unsafe(nil)); end + + # Call for abstract Cop classes + # + # source://rubocop//lib/rubocop/cop/base.rb#81 + def exclude_from_registry; end + + # Returns the value of attribute gem_requirements. + # + # source://rubocop//lib/rubocop/cop/base.rb#138 + def gem_requirements; end + + # @private + # + # source://rubocop//lib/rubocop/cop/base.rb#74 + def inherited(subclass); end + + # Override and return the Force class(es) you need to join + # + # source://rubocop//lib/rubocop/cop/base.rb#118 + def joining_forces; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#105 + def lint?; end + + # Returns true if the cop name or the cop namespace matches any of the + # given names. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#111 + def match?(given_names); end + + # Register a version requirement for the given gem name. + # This cop will be skipped unless the target satisfies *all* requirements. + # + # @api public + # @param gem_name [String] + # @param version_requirements [Array] The version requirements, + # using the same syntax as a Gemfile, e.g. ">= 1.2.3" + # + # If omitted, any version of the gem will be accepted. + # + # https://guides.rubygems.org/patterns/#declaring-dependencies + # + # source://rubocop//lib/rubocop/cop/base.rb#151 + def requires_gem(gem_name, *version_requirements); end + + # Returns if class supports autocorrect. + # It is recommended to extend AutoCorrector instead of overriding + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#87 + def support_autocorrect?; end + + # Override if your cop should be called repeatedly for multiple investigations + # Between calls to `on_new_investigation` and `on_investigation_end`, + # the result of `processed_source` will remain constant. + # You should invalidate any caches that depend on the current `processed_source` + # in the `on_new_investigation` callback. + # If your cop does autocorrections, be aware that your instance may be called + # multiple times with the same `processed_source.path` but different content. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#129 + def support_multiple_source?; end + + private + + # source://rubocop//lib/rubocop/cop/base.rb#401 + def restrict_on_send; end + end +end + +# source://rubocop//lib/rubocop/cop/base.rb#405 +RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) + +# Reports of an investigation. +# Immutable +# Consider creation API private +# +# source://rubocop//lib/rubocop/cop/base.rb#48 +class RuboCop::Cop::Base::InvestigationReport < ::Struct + # Returns the value of attribute cop + # + # @return [Object] the current value of cop + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def cop; end + + # Sets the attribute cop + # + # @param value [Object] the value to set the attribute cop to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def cop=(_); end + + # Returns the value of attribute corrector + # + # @return [Object] the current value of corrector + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def corrector; end + + # Sets the attribute corrector + # + # @param value [Object] the value to set the attribute corrector to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def corrector=(_); end + + # Returns the value of attribute offenses + # + # @return [Object] the current value of offenses + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def offenses; end + + # Sets the attribute offenses + # + # @param value [Object] the value to set the attribute offenses to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def offenses=(_); end + + # Returns the value of attribute processed_source + # + # @return [Object] the current value of processed_source + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def processed_source; end + + # Sets the attribute processed_source + # + # @param value [Object] the value to set the attribute processed_source to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/base.rb#48 + def processed_source=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/base.rb#48 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/base.rb#48 + def inspect; end + + # source://rubocop//lib/rubocop/cop/base.rb#48 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/base.rb#48 + def members; end + + # source://rubocop//lib/rubocop/cop/base.rb#48 + def new(*_arg0); end + end +end + +# List of methods names to restrict calls for `on_send` / `on_csend` +# +# source://rubocop//lib/rubocop/cop/base.rb#51 +RuboCop::Cop::Base::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#5 +module RuboCop::Cop::Bundler; end + +# A Gem's requirements should be listed only once in a Gemfile. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rubocop' +# +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :test do +# gem 'rubocop' +# end +# +# # good +# group :development, :test do +# gem 'rubocop' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# +# # good - conditional declaration +# if Dir.exist?(local) +# gem 'rubocop', path: local +# elsif ENV['RUBOCOP_VERSION'] == 'master' +# gem 'rubocop', git: 'https://github.com/rubocop/rubocop.git' +# else +# gem 'rubocop', '~> 0.90.0' +# end +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 +class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 + def gem_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 + def conditional_declaration?(nodes); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 + def duplicated_gem_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 + def register_offense(node, gem_name, line_of_first_occurrence); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 + def within_conditional?(node, conditional_node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 +RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) + +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 + def group_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 + def duplicated_group_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 + def find_source_key(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 + def group_attributes(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + +# Each gem in the Gemfile should have a comment explaining +# its purpose in the project, or the reason for its version +# or source. +# +# The optional "OnlyFor" configuration array +# can be used to only register offenses when the gems +# use certain options or have version specifiers. +# +# When "version_specifiers" is included, a comment +# will be enforced if the gem has any version specifier. +# +# When "restrictive_version_specifiers" is included, a comment +# will be enforced if the gem has a version specifier that +# holds back the version of the gem. +# +# For any other value in the array, a comment will be enforced for +# a gem if an option by the same name is present. +# A useful use case is to enforce a comment when using +# options that change the source of a gem: +# +# - `bitbucket` +# - `gist` +# - `git` +# - `github` +# - `source` +# +# For a full list of options supported by bundler, +# see https://bundler.io/man/gemfile.5.html +# . +# +# @example OnlyFor: ['restrictive_version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# gem 'foo', '>= 1.0' +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: ['version_specifiers', 'github'] +# # bad +# +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# gem 'bar', '< 2.1' +# +# # good +# +# # Using this fork because baz +# gem 'foo', github: 'some_account/some_fork_of_foo' +# +# # Version 2.1 introduces breaking change baz +# gem 'bar', '< 2.1' +# @example OnlyFor: ['version_specifiers'] +# # bad +# +# gem 'foo', '< 2.1' +# +# # good +# +# # Version 2.1 introduces breaking change baz +# gem 'foo', '< 2.1' +# @example OnlyFor: [] (default) +# # bad +# +# gem 'foo' +# +# # good +# +# # Helpers for the foo things. +# gem 'foo' +# +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#83 +class RuboCop::Cop::Bundler::GemComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + include ::RuboCop::Cop::GemDeclaration + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#94 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#135 + def checked_options_present?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#109 + def commented?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#105 + def commented_any_descendant?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#159 + def contains_checked_options?(node); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#163 + def gem_options(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#130 + def ignored_gem?(node); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#116 + def precede?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#126 + def preceding_comment?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#120 + def preceding_lines(node); end + + # Version specifications that restrict all updates going forward. This excludes versions + # like ">= 1.0" or "!= 2.0.3". + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#152 + def restrictive_version_specified_gem?(node); end + + # Besides the gem name, all other *positional* arguments to `gem` are version specifiers, + # as long as it has one we know there's at least one version specifier. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#145 + def version_specified_gem?(node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#88 +RuboCop::Cop::Bundler::GemComment::CHECKED_OPTIONS_CONFIG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#87 +RuboCop::Cop::Bundler::GemComment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#91 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#90 +RuboCop::Cop::Bundler::GemComment::RESTRICTIVE_VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#92 +RuboCop::Cop::Bundler::GemComment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_comment.rb#89 +RuboCop::Cop::Bundler::GemComment::VERSION_SPECIFIERS_OPTION = T.let(T.unsafe(nil), String) + +# Verifies that a project contains Gemfile or gems.rb file and correct +# associated lock file based on the configuration. +# +# @example EnforcedStyle: Gemfile (default) +# # bad +# Project contains gems.rb and gems.locked files +# +# # bad +# Project contains Gemfile and gems.locked file +# +# # good +# Project contains Gemfile and Gemfile.lock +# @example EnforcedStyle: gems.rb +# # bad +# Project contains Gemfile and Gemfile.lock files +# +# # bad +# Project contains gems.rb and Gemfile.lock file +# +# # good +# Project contains gems.rb and gems.locked files +# +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#28 +class RuboCop::Cop::Bundler::GemFilename < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#42 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#87 + def expected_gemfile?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#79 + def gemfile_offense?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#92 + def gemfile_required?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#83 + def gems_rb_offense?(basename); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#96 + def gems_rb_required?; end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#57 + def register_gemfile_offense(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#68 + def register_gems_rb_offense(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#52 + def register_offense(file_path, basename); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#39 +RuboCop::Cop::Bundler::GemFilename::GEMFILE_FILES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#40 +RuboCop::Cop::Bundler::GemFilename::GEMS_RB_FILES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#35 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_MISMATCHED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#31 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMFILE_REQUIRED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#37 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_MISMATCHED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_filename.rb#33 +RuboCop::Cop::Bundler::GemFilename::MSG_GEMS_RB_REQUIRED = T.let(T.unsafe(nil), String) + +# Enforce that Gem version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: forbidden +# # good +# gem 'rubocop' +# +# # bad +# gem 'rubocop', '~> 1.12' +# +# # bad +# gem 'rubocop', '>= 1.10.0' +# +# # bad +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # bad +# gem 'rubocop', branch: 'feature-branch' +# +# # bad +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # bad +# gem 'rubocop', tag: 'v1.17.0' +# @example EnforcedStyle: required (default) +# # bad +# gem 'rubocop' +# +# # good +# gem 'rubocop', '~> 1.12' +# +# # good +# gem 'rubocop', '>= 1.10.0' +# +# # good +# gem 'rubocop', '>= 1.5.0', '< 1.10.0' +# +# # good +# gem 'rubocop', branch: 'feature-branch' +# +# # good +# gem 'rubocop', ref: '74b5bfbb2c4b6fd6cdbbc7254bd7084b36e0c85b' +# +# # good +# gem 'rubocop', tag: 'v1.17.0' +# +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#53 +class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemDeclaration + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#68 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#63 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#72 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#86 + def allowed_gem?(node); end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#90 + def allowed_gems; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#112 + def forbidden_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#118 + def forbidden_style?; end + + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#94 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#102 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#106 + def required_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#122 + def required_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#126 + def version_specification?(expression); end +end + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#58 +RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#57 +RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 +RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#60 +RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Passing symbol arguments to `source` (e.g. `source :rubygems`) is +# deprecated because they default to using HTTP requests. Instead, specify +# `'https://rubygems.org'` if possible, or `'http://rubygems.org'` if not. +# +# When autocorrecting, this cop will replace symbol arguments with +# `'https://rubygems.org'`. +# +# This cop will not replace existing sources that use `http://`. This may +# be necessary where HTTPS is not available. For example, where using an +# internal gem server via an intranet, or where HTTPS is prohibited. +# However, you should strongly prefer `https://` where possible, as it is +# more secure. +# +# If you don't allow `http://`, please set `false` to `AllowHttpProtocol`. +# This option is `true` by default for safe autocorrection. +# +# @example +# # bad +# source :gemcutter +# source :rubygems +# source :rubyforge +# +# # good +# source 'https://rubygems.org' # strongly recommended +# @example AllowHttpProtocol: false +# +# # bad +# source 'http://rubygems.org' +# @example AllowHttpProtocol: true (default) +# +# # good +# source 'http://rubygems.org' # use only if HTTPS is unavailable +# +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#41 +class RuboCop::Cop::Bundler::InsecureProtocolSource < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#53 + def insecure_protocol_source?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#58 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#79 + def allow_http_protocol?; end +end + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#44 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#48 +RuboCop::Cop::Bundler::InsecureProtocolSource::MSG_HTTP_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/insecure_protocol_source.rb#50 +RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Gems should be alphabetically sorted within groups. +# +# @example +# # bad +# gem 'rubocop' +# gem 'rspec' +# +# # good +# gem 'rspec' +# gem 'rubocop' +# +# # good +# gem 'rubocop' +# +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 +class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#63 + def gem_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#56 + def previous_declaration(node); end +end + +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 +RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking assignment nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#6 +module RuboCop::Cop::CheckAssignment + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#17 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#13 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#11 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#12 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#10 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#7 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#14 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#15 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#16 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#19 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#27 + def extract_rhs(node); end + + class << self + # source://rubocop//lib/rubocop/cop/mixin/check_assignment.rb#27 + def extract_rhs(node); end + end +end + +# This mixin detects collections that are safe to "break" +# by inserting new lines. This is useful for breaking +# up long lines. +# +# Let's look at hashes as an example: +# +# We know hash keys are safe to break across lines. We can add +# linebreaks into hashes on lines longer than the specified maximum. +# Then in further passes cops can clean up the multi-line hash. +# For example, say the maximum line length is as indicated below: +# +# | +# v +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# In a LineLength autocorrection pass, a line is added before +# the first key that exceeds the column limit: +# +# {foo: "0000000000", bar: "0000000000", +# baz: "0000000000"} +# +# In a MultilineHashKeyLineBreaks pass, lines are inserted +# before all keys: +# +# {foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000"} +# +# Then in future passes FirstHashElementLineBreak, +# MultilineHashBraceLayout, and TrailingCommaInHashLiteral will +# manipulate as well until we get: +# +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# (Note: Passes may not happen exactly in this sequence.) +# +# source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#44 +module RuboCop::Cop::CheckLineBreakable + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#45 + def extract_breakable_node(node, max); end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#202 + def all_on_same_line?(nodes); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#222 + def already_on_multiple_lines?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#135 + def breakable_collection?(node, elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#228 + def chained_to_heredoc?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#189 + def children_could_be_broken_up?(children); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#152 + def contained_by_breakable_collection_on_same_line?(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#172 + def contained_by_multiline_collection_that_could_be_broken_up?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#62 + def extract_breakable_node_from_elements(node, elements, max); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#74 + def extract_first_element_over_column_limit(node, elements, max); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#94 + def first_argument_is_heredoc?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#209 + def process_args(args); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#119 + def safe_to_ignore?(node); end + + # If a `send` or `csend` node contains a heredoc argument, splitting cannot happen + # after the heredoc or else it will cause a syntax error. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#103 + def shift_elements_for_heredoc_arg(node, elements, index); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_line_breakable.rb#114 + def within_column_limit?(element, max, line); end +end + +# Checks for code on multiple lines that could be rewritten on a single line +# without changing semantics or exceeding the `Max` parameter of `Layout/LineLength`. +# +# source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#7 +module RuboCop::Cop::CheckSingleLineSuitability + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#8 + def suitable_as_single_line?(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#32 + def comment_within?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#40 + def safe_to_split?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#23 + def to_single_line(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/check_single_line_suitability.rb#16 + def too_long?(node); end +end + +# Common functionality for checking length of code segments. +# +# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#6 +module RuboCop::Cop::CodeLength + extend ::RuboCop::ExcludeLimit + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#11 + def max=(value); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#49 + def build_code_length_calculator(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#31 + def check_code_length(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#27 + def count_as_one; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#23 + def count_comments?; end + + # Returns true for lines that shall not be included in the count. + # + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 + def irrelevant_line(source_line); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58 + def location(node); end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 + def max_length; end + + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#15 + def message(length, max_length); end +end + +# source://rubocop//lib/rubocop/cop/mixin/code_length.rb#9 +RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String) + +# Help methods for working with nodes containing comments. +# +# source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#6 +module RuboCop::Cop::CommentsHelp + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#27 + def comments_contain_disables?(node, cop_name); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#18 + def comments_in_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#14 + def contains_comments?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#7 + def source_range_with_comment(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#46 + def begin_pos_with_comment(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#60 + def buffer; end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#41 + def end_position_for(node); end + + # Returns the end line of a node, which might be a comment and not part of the AST + # End line is considered either the line at which another node starts, or + # the line at which the parent node ends. + # + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#68 + def find_end_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/comments_help.rb#56 + def start_line_position(node); end +end + +# Commissioner class is responsible for processing the AST and delegating +# work to the specified cops. +# +# source://rubocop//lib/rubocop/cop/commissioner.rb#7 +class RuboCop::Cop::Commissioner + include ::RuboCop::AST::Traversal + + # @return [Commissioner] a new instance of Commissioner + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#44 + def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#42 + def errors; end + + # @return [InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#79 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on___ENCODING__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on___FILE__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on___LINE__(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_arg_expr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_array_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_array_pattern_with_tail(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_back_ref(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_blocknilarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_break(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_cbase(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_complex(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_const_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_cvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_dsym(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_eflipflop(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_empty_else(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_false(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_find_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_float(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_forward_arg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_forward_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_forwarded_args(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_forwarded_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_forwarded_restarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_hash_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_if_guard(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_iflipflop(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_in_match(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_index(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_indexasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_int(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_ivar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwargs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwnilarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_kwsplat(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_lambda(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_lvar(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_alt(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_as(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_current_line(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_nil_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_pattern(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_pattern_p(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_rest(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_var(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_with_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_match_with_trailing_comma(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_mlhs(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_next(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_nil(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_not(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_nth_ref(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_pin(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_postexe(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_preexe(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_procarg0(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_rational(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_redo(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_regopt(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_restarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_retry(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_self(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_shadowarg(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_splat(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_sym(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_true(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_undef(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_unless_guard(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_when(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_while_post(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_xstr(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#67 + def on_zsuper(node); end + + private + + # source://rubocop//lib/rubocop/cop/commissioner.rb#98 + def begin_investigation(processed_source, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#121 + def build_callbacks(cops); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#116 + def initialize_callbacks; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#159 + def invoke(callback, cops); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#163 + def invoke_with_argument(callback, cops, arg); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#112 + def reset; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#131 + def restrict_callbacks(callbacks); end + + # NOTE: mutates `callbacks` in place + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#149 + def restricted_map(callbacks); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#104 + def trigger_responding_cops(callback, node); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#139 + def trigger_restricted_cops(event, node); end + + # Allow blind rescues here, since we're absorbing and packaging or + # re-raising exceptions that can be raised from within the individual + # cops' `#investigate` methods. + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#170 + def with_cop_error_handling(cop, node = T.unsafe(nil)); end +end + +# How a Commissioner returns the results of the investigation +# as a list of Cop::InvestigationReport and any errors caught +# during the investigation. +# Immutable +# Consider creation API private +# +# source://rubocop//lib/rubocop/cop/commissioner.rb#18 +class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct + # Returns the value of attribute cop_reports + # + # @return [Object] the current value of cop_reports + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def cop_reports; end + + # Sets the attribute cop_reports + # + # @param value [Object] the value to set the attribute cop_reports to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def cop_reports=(_); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#19 + def cops; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#27 + def correctors; end + + # Returns the value of attribute errors + # + # @return [Object] the current value of errors + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def errors; end + + # Sets the attribute errors + # + # @param value [Object] the value to set the attribute errors to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def errors=(_); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#35 + def merge(investigation); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#31 + def offenses; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#23 + def offenses_per_cop; end + + # Returns the value of attribute processed_source + # + # @return [Object] the current value of processed_source + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def processed_source; end + + # Sets the attribute processed_source + # + # @param value [Object] the value to set the attribute processed_source to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def processed_source=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def inspect; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def members; end + + # source://rubocop//lib/rubocop/cop/commissioner.rb#18 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/commissioner.rb#10 +RuboCop::Cop::Commissioner::RESTRICTED_CALLBACKS = T.let(T.unsafe(nil), Array) + +# This class does condition autocorrection +# +# source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#6 +class RuboCop::Cop::ConditionCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#8 + def correct_negative_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/condition_corrector.rb#17 + def negated_condition(node); end + end +end + +# Handles `EnforcedStyle` configuration parameters. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#6 +module RuboCop::Cop::ConfigurableEnforcedStyle + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#88 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#96 + def alternative_styles; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#19 + def ambiguous_style_detected(*possibilities); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#72 + def conflicting_styles_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#11 + def correct_style_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#64 + def detected_style; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#68 + def detected_style=(style); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#60 + def no_acceptable_style!; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#56 + def no_acceptable_style?; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#7 + def opposite_style_detected; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#79 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#75 + def style_configured?; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#29 + def style_detected(detected); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#107 + def style_parameter_name; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#100 + def supported_styles; end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#15 + def unexpected_style_detected(unexpected); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#73 + def unrecognized_style_detected; end +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_enforced_style.rb#23 +RuboCop::Cop::ConfigurableEnforcedStyle::SYMBOL_TO_STRING_CACHE = T.let(T.unsafe(nil), Hash) + +# Shared functionality between mixins that enforce naming conventions +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#6 +module RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#9 + def check_name(node, name, name_range); end + + # A class emitter method is a singleton method in a class/module, where + # the method has the same name as a class defined in the class/module. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#30 + def class_emitter_method?(node, name); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#17 + def report_opposing_styles(node, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 + def valid_name?(node, name, given_style = T.unsafe(nil)); end +end + +# Handles `Max` configuration parameters, especially setting them to an +# appropriate value with --auto-gen-config. +# +# @deprecated Use `exclude_limit ` instead. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 +module RuboCop::Cop::ConfigurableMax + private + + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23 + def max_parameter_name; end +end + +# This module provides functionality for checking if names match the +# configured EnforcedStyle. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#7 +module RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_naming.rb#10 +RuboCop::Cop::ConfigurableNaming::FORMATS = T.let(T.unsafe(nil), Hash) + +# This module provides functionality for checking if numbering match the +# configured EnforcedStyle. +# +# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#7 +module RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting +end + +# source://rubocop//lib/rubocop/cop/mixin/configurable_numbering.rb#11 +RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) + +# Monkey-patch Cop for tests to provide easy access to messages and +# highlights. +# +# source://rubocop//lib/rubocop/cop/cop.rb#11 +class RuboCop::Cop::Cop < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/cop.rb#73 + def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + + # Called before any investigation + # + # @api private + # + # source://rubocop//lib/rubocop/cop/cop.rb#129 + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # @deprecated + # + # source://rubocop//lib/rubocop/cop/cop.rb#105 + def corrections; end + + # source://rubocop//lib/rubocop/cop/cop.rb#90 + def find_location(node, loc); end + + # Returns the value of attribute offenses. + # + # source://rubocop//lib/rubocop/cop/cop.rb#12 + def offenses; end + + # Called after all on_... have been called + # + # source://rubocop//lib/rubocop/cop/cop.rb#122 + def on_investigation_end; end + + # Called before all on_... have been called + # + # source://rubocop//lib/rubocop/cop/cop.rb#116 + def on_new_investigation; end + + # @deprecated Use class method + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/cop.rb#96 + def support_autocorrect?; end + + private + + # source://rubocop//lib/rubocop/cop/cop.rb#147 + def apply_correction(corrector); end + + # Override Base + # + # source://rubocop//lib/rubocop/cop/cop.rb#143 + def callback_argument(_range); end + + # source://rubocop//lib/rubocop/cop/cop.rb#164 + def correction_lambda; end + + # source://rubocop//lib/rubocop/cop/cop.rb#170 + def dedupe_on_node(node); end + + # Just for legacy + # + # @yield [corrector] + # + # source://rubocop//lib/rubocop/cop/cop.rb#152 + def emulate_v0_callsequence(corrector); end + + # source://rubocop//lib/rubocop/cop/cop.rb#183 + def range_for_original(range); end + + # source://rubocop//lib/rubocop/cop/cop.rb#177 + def suppress_clobbering; end + + class << self + # @deprecated Use Registry.all + # + # source://rubocop//lib/rubocop/cop/cop.rb#56 + def all; end + + # @private + # + # source://rubocop//lib/rubocop/cop/cop.rb#25 + def inherited(_subclass); end + + # source://rubocop//lib/rubocop/cop/cop.rb#37 + def joining_forces; end + + # @deprecated Use Registry.qualified_cop_name + # + # source://rubocop//lib/rubocop/cop/cop.rb#65 + def qualified_cop_name(name, origin); end + + # @deprecated Use Registry.global + # + # source://rubocop//lib/rubocop/cop/cop.rb#47 + def registry; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/cop.rb#33 + def support_autocorrect?; end + end +end + +# @deprecated +# +# source://rubocop//lib/rubocop/cop/cop.rb#17 +class RuboCop::Cop::Cop::Correction < ::Struct + # source://rubocop//lib/rubocop/cop/cop.rb#18 + def call(corrector); end + + # Returns the value of attribute cop + # + # @return [Object] the current value of cop + # + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def cop; end + + # Sets the attribute cop + # + # @param value [Object] the value to set the attribute cop to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def cop=(_); end + + # Returns the value of attribute lambda + # + # @return [Object] the current value of lambda + # + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def lambda; end + + # Sets the attribute lambda + # + # @param value [Object] the value to set the attribute lambda to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def lambda=(_); end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + # + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def node=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def inspect; end + + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def members; end + + # source://rubocop//lib/rubocop/cop/cop.rb#17 + def new(*_arg0); end + end +end + +# This class takes a source buffer and rewrite its source +# based on the different correction rules supplied. +# +# Important! +# The nodes modified by the corrections should be part of the +# AST of the source_buffer. +# +# source://rubocop//lib/rubocop/cop/corrector.rb#11 +class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter + # corrector = Corrector.new(cop) + # + # @param source [Parser::Source::Buffer, or anything + # leading to one via `(processed_source.)buffer`] + # @return [Corrector] a new instance of Corrector + # + # source://rubocop//lib/rubocop/cop/corrector.rb#32 + def initialize(source); end + + # Removes `size` characters from the beginning of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the end of `range`. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#63 + def remove_leading(node_or_range, size); end + + # Removes `size` characters prior to the source range. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#51 + def remove_preceding(node_or_range, size); end + + # Removes `size` characters from the end of the given range. + # If `size` is greater than the size of `range`, the removed region can + # overrun the beginning of `range`. + # + # @param range [Parser::Source::Range, RuboCop::AST::Node] or node + # @param size [Integer] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#75 + def remove_trailing(node_or_range, size); end + + # Legacy + # + # source://rubocop//lib/rubocop/cop/corrector.rb#45 + def rewrite; end + + # Swaps sources at the given ranges. + # + # @param node_or_range1 [Parser::Source::Range, RuboCop::AST::Node] + # @param node_or_range2 [Parser::Source::Range, RuboCop::AST::Node] + # + # source://rubocop//lib/rubocop/cop/corrector.rb#85 + def swap(node_or_range1, node_or_range2); end + + private + + # source://rubocop//lib/rubocop/cop/corrector.rb#119 + def check_range_validity(node_or_range); end + + # source://rubocop//lib/rubocop/cop/corrector.rb#104 + def to_range(node_or_range); end + + # source://rubocop//lib/rubocop/cop/corrector.rb#123 + def validate_buffer(buffer); end + + class << self + # Duck typing for get to a ::Parser::Source::Buffer + # + # source://rubocop//lib/rubocop/cop/corrector.rb#15 + def source_buffer(source); end + end +end + +# noop +# +# source://rubocop//lib/rubocop/cop/corrector.rb#12 +RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc) + +# Common functionality for checking def nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/def_node.rb#6 +module RuboCop::Cop::DefNode + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#21 + def non_public_modifier?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#12 + def non_public?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/def_node.rb#16 + def preceding_non_public_modifier?(node); end +end + +# Help methods for working with `Enumerable#dig` in cops. +# Used by `Style::DigChain` and `Style::SingleArgumentDig` +# +# source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#7 +module RuboCop::Cop::DigHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#11 + def dig?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#16 + def single_argument_dig?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/dig_help.rb#22 + def dig_chain_enabled?; end +end + +# Helpers for builtin documentation +# +# source://rubocop//lib/rubocop/cop/documentation.rb#6 +module RuboCop::Cop::Documentation + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#25 + def base_url_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#57 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#47 + def default_base_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#10 + def department_to_basename(department); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#15 + def url_for(cop_class, config = T.unsafe(nil)); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#25 + def base_url_for(cop_class, config); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/documentation.rb#57 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#47 + def default_base_url; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#10 + def department_to_basename(department); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#15 + def url_for(cop_class, config = T.unsafe(nil)); end + end +end + +# Common functionality for checking documentation. +# +# source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#6 +module RuboCop::Cop::DocumentationComment + extend ::RuboCop::AST::NodePattern::Macros + + private + + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#47 + def annotation_keywords; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#11 + def documentation_comment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#39 + def interpreter_directive_comment?(comment); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#31 + def precede?(node1, node2); end + + # The args node1 & node2 may represent a RuboCop::AST::Node + # or a Parser::Source::Comment. Both respond to #loc. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#25 + def preceding_comment?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#35 + def preceding_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/documentation_comment.rb#43 + def rubocop_directive_comment?(comment); end +end + +# Common functionality for dealing with duplication. +# +# source://rubocop//lib/rubocop/cop/mixin/duplication.rb#6 +module RuboCop::Cop::Duplication + private + + # Returns the consecutive duplicates, leaving out the first instance of + # the duplicated elements. + # + # @param collection [Array] an array to return consecutive duplicates for + # @return [Array] the consecutive duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#31 + def consecutive_duplicates(collection); end + + # Returns all duplicates, including the first instance of the duplicated + # elements. + # + # @param collection [Array] an array to return duplicates for + # @return [Array] all the duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#22 + def duplicates(collection); end + + # Whether the `collection` contains any duplicates. + # + # @param collection [Array] an array to check for duplicates + # @return [Boolean] whether the array contains any duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#13 + def duplicates?(collection); end + + # Returns a hash of grouped duplicates. The key will be the first + # instance of the element, and the value an `array` of the initial + # element and all duplicate instances. + # + # @param collection [Array] an array to group duplicates for + # @return [Array] the grouped duplicates + # + # source://rubocop//lib/rubocop/cop/mixin/duplication.rb#41 + def grouped_duplicates(collection); end +end + +# This class autocorrects `#each` enumeration to `for` iteration. +# +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#6 +class RuboCop::Cop::EachToForCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # @return [EachToForCorrector] a new instance of EachToForCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#12 + def initialize(block_node); end + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#18 + def call(corrector); end + + private + + # Returns the value of attribute argument_node. + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 + def argument_node; end + + # Returns the value of attribute block_node. + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 + def block_node; end + + # Returns the value of attribute collection_node. + # + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#24 + def collection_node; end + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#26 + def correction; end + + # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#36 + def offending_range; end +end + +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITHOUT_ARGUMENTS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#9 +RuboCop::Cop::EachToForCorrector::CORRECTION_WITH_ARGUMENTS = T.let(T.unsafe(nil), String) + +# This class does empty line autocorrection +# +# source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#6 +class RuboCop::Cop::EmptyLineCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#8 + def correct(corrector, node); end + + # source://rubocop//lib/rubocop/cop/correctors/empty_line_corrector.rb#19 + def insert_before(corrector, node); end + end +end + +# Common code for empty parameter cops. +# +# source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#6 +module RuboCop::Cop::EmptyParameter + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#12 + def empty_arguments?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/empty_parameter.rb#16 + def check(node); end +end + +# Functions for checking the alignment of the `end` keyword. +# +# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#6 +module RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#49 + def add_offense_for_misalignment(node, align_with); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#19 + def check_end_kw_alignment(node, align_ranges); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#15 + def check_end_kw_in_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#69 + def line_break_before_keyword?(whole_expression, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#34 + def matching_ranges(end_loc, align_ranges); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#40 + def start_line_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#59 + def style_parameter_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#63 + def variable_alignment?(whole_expression, rhs, end_alignment_style); end +end + +# source://rubocop//lib/rubocop/cop/mixin/end_keyword_alignment.rb#10 +RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for rewriting endless methods to normal method definitions +# +# source://rubocop//lib/rubocop/cop/mixin/endless_method_rewriter.rb#6 +module RuboCop::Cop::EndlessMethodRewriter + # source://rubocop//lib/rubocop/cop/mixin/endless_method_rewriter.rb#7 + def correct_to_multiline(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/endless_method_rewriter.rb#19 + def arguments(node, missing = T.unsafe(nil)); end +end + +# Common functionality for enforcing a specific superclass. +# +# IMPORTANT: RuboCop core depended on this module when it supported Rails department. +# Rails department has been extracted to RuboCop Rails gem. +# +# It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility +# with existing RuboCop Rails 2.8 or lower. +# +# @api private +# @deprecated This module is deprecated and will be removed by RuboCop 2.0. +# +# source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#15 +module RuboCop::Cop::EnforceSuperclass + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#35 + def on_class(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#39 + def on_send(node); end + + class << self + # @api private + # @private + # + # source://rubocop//lib/rubocop/cop/mixin/enforce_superclass.rb#16 + def included(base); end + end +end + +# Common functionality for checking for a line break before the first +# element in a multi-line collection. +# +# source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#7 +module RuboCop::Cop::FirstElementLineBreak + private + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#23 + def check_children_line_break(node, children, start = T.unsafe(nil), ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#10 + def check_method_line_break(node, children, ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#37 + def first_by_line(nodes); end + + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#41 + def last_line(nodes, ignore_last:); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/first_element_line_break.rb#18 + def method_uses_parens?(node, limit); end +end + +# This class autocorrects `for` iteration to `#each` enumeration. +# +# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#6 +class RuboCop::Cop::ForToEachCorrector + extend ::RuboCop::AST::NodePattern::Macros + + # @return [ForToEachCorrector] a new instance of ForToEachCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#11 + def initialize(for_node); end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#17 + def call(corrector); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#62 + def collection_end; end + + # Returns the value of attribute collection_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def collection_node; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#36 + def collection_source; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#27 + def correction; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#50 + def end_range; end + + # Returns the value of attribute for_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def for_node; end + + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#58 + def keyword_begin; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#44 + def requires_parentheses?; end + + # Returns the value of attribute variable_node. + # + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + def variable_node; end +end + +# source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#9 +RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain identifiers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#6 +module RuboCop::Cop::ForbiddenIdentifiers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#9 + def forbidden_identifier?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#15 + def forbidden_identifiers; end +end + +# if a variable starts with a sigil it will be removed +# +# source://rubocop//lib/rubocop/cop/mixin/forbidden_identifiers.rb#7 +RuboCop::Cop::ForbiddenIdentifiers::SIGILS = T.let(T.unsafe(nil), String) + +# This module encapsulates the ability to forbid certain patterns in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/forbidden_pattern.rb#6 +module RuboCop::Cop::ForbiddenPattern + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/forbidden_pattern.rb#7 + def forbidden_pattern?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/forbidden_pattern.rb#11 + def forbidden_patterns; end +end + +# A scaffold for concrete forces. +# +# source://rubocop//lib/rubocop/cop/force.rb#6 +class RuboCop::Cop::Force + # @return [Force] a new instance of Force + # + # source://rubocop//lib/rubocop/cop/force.rb#32 + def initialize(cops); end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/cop/force.rb#17 + def cops; end + + # source://rubocop//lib/rubocop/cop/force.rb#50 + def investigate(_processed_source); end + + # source://rubocop//lib/rubocop/cop/force.rb#36 + def name; end + + # source://rubocop//lib/rubocop/cop/force.rb#40 + def run_hook(method_name, *args); end + + class << self + # source://rubocop//lib/rubocop/cop/force.rb#19 + def all; end + + # source://rubocop//lib/rubocop/cop/force.rb#28 + def force_name; end + + # @private + # + # source://rubocop//lib/rubocop/cop/force.rb#23 + def inherited(subclass); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/force.rb#8 +class RuboCop::Cop::Force::HookError < ::StandardError + # @api private + # @return [HookError] a new instance of HookError + # + # source://rubocop//lib/rubocop/cop/force.rb#11 + def initialize(joining_cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/force.rb#9 + def joining_cop; end +end + +# Common functionality for dealing with frozen string literals. +# +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 +module RuboCop::Cop::FrozenStringLiteral + private + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 + def frozen_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#20 + def frozen_string_literal?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#14 + def frozen_string_literal_comment_exists?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#77 + def frozen_string_literal_specified?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#71 + def frozen_string_literals_disabled?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#43 + def frozen_string_literals_enabled?; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#87 + def leading_comment_lines; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#83 + def leading_magic_comments; end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#36 + def uninterpolated_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#30 + def uninterpolated_string?(node); end + + class << self + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#14 + def frozen_string_literal_comment_exists?; end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#10 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) + +# Common functionality for checking gem declarations. +# +# source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#6 +module RuboCop::Cop::GemDeclaration + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/gem_declaration.rb#10 + def gem_declaration?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#5 +module RuboCop::Cop::Gemspec; end + +# Prefer `add_dependency` over `add_runtime_dependency` as the latter is +# considered soft-deprecated. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('rubocop') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('rubocop') +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#21 +class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#28 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#24 +RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#26 +RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use consistent style for Gemspec attributes assignment. +# +# @example +# +# # bad +# # This example uses two styles for assignment of metadata attribute. +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value' } +# spec.metadata['another-key'] = 'another-value' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['key'] = 'value' +# spec.metadata['another-key'] = 'another-value' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value', 'another-key' => 'another-value' } +# end +# +# # bad +# # This example uses two styles for assignment of authors attribute. +# Gem::Specification.new do |spec| +# spec.authors = %w[author-0 author-1] +# spec.authors[2] = 'author-2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.authors = %w[author-0 author-1 author-2] +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.authors[0] = 'author-0' +# spec.authors[1] = 'author-1' +# spec.authors[2] = 'author-2' +# end +# +# # good +# # This example uses consistent assignment per attribute, +# # even though two different styles are used overall. +# Gem::Specification.new do |spec| +# spec.metadata = { 'key' => 'value' } +# spec.authors[0] = 'author-0' +# spec.authors[1] = 'author-1' +# spec.authors[2] = 'author-2' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/attribute_assignment.rb#57 +class RuboCop::Cop::Gemspec::AttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/attribute_assignment.rb#62 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/attribute_assignment.rb#77 + def source_assignments(ast); end + + # source://rubocop//lib/rubocop/cop/gemspec/attribute_assignment.rb#84 + def source_indexed_assignments(ast); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/attribute_assignment.rb#60 +RuboCop::Cop::Gemspec::AttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that gem dependency version specifications or a commit reference (branch, +# ref, or tag) are either required or forbidden. +# +# @example EnforcedStyle: forbidden +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# @example EnforcedStyle: required (default) +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#53 +class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#67 + def add_dependency_method_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#78 + def includes_commit_reference?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#73 + def includes_version_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#82 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 + def add_dependency_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#96 + def allowed_gem?(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#100 + def allowed_gems; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 + def forbidden_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 + def forbidden_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 + def match_block_variable_name?(receiver_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 + def required_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 + def required_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 + def version_specification?(expression); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#61 +RuboCop::Cop::Gemspec::DependencyVersion::ADD_DEPENDENCY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#58 +RuboCop::Cop::Gemspec::DependencyVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#57 +RuboCop::Cop::Gemspec::DependencyVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#64 +RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#59 +RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that deprecated attributes are not set in a gemspec file. +# Removing deprecated attributes allows the user to receive smaller packed gems. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files = Dir.glob('test/**/*') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# spec.test_files += Dir.glob('test/**/*') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'your_cool_gem_name' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#28 +class RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#35 + def gem_specification(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#43 + def on_block(block_node); end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#85 + def format_message_from; end + + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#63 + def node_and_method_name(node, attribute); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#71 + def use_deprecated_attributes?(node, block_parameter); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb#32 +RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment::MSG = T.let(T.unsafe(nil), String) + +# Enforce that development dependencies for a gem are specified in +# `Gemfile`, rather than in the `gemspec` using +# `add_development_dependency`. Alternatively, using `EnforcedStyle: +# gemspec`, enforce that all dependencies are specified in `gemspec`, +# rather than in `Gemfile`. +# +# @example EnforcedStyle: Gemfile (default) +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# @example EnforcedStyle: gems.rb +# # Specify runtime dependencies in your gemspec, +# # but all other dependencies in your Gemfile. +# # +# # Identical to `EnforcedStyle: Gemfile`, but with a different error message. +# # Rely on Bundler/GemFilename to enforce the use of `Gemfile` vs `gems.rb`. +# +# # bad +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good +# # Gemfile +# gem "foo" +# +# # good +# # gems.rb +# gem "foo" +# +# # good (with AllowedGems: ["bar"]) +# # example.gemspec +# s.add_development_dependency "bar" +# @example EnforcedStyle: gemspec +# # Specify all dependencies in your gemspec. +# +# # bad +# # Gemfile +# gem "foo" +# +# # good +# # example.gemspec +# s.add_development_dependency "foo" +# +# # good (with AllowedGems: ["bar"]) +# # Gemfile +# gem "bar" +# +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#70 +class RuboCop::Cop::Gemspec::DevelopmentDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#77 + def add_development_dependency?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#82 + def gem?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#86 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#97 + def forbidden_gem?(gem_name); end + + # source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#101 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#73 +RuboCop::Cop::Gemspec::DevelopmentDependencies::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/development_dependencies.rb#74 +RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# An attribute assignment method calls should be listed only once +# in a gemspec. +# +# Assigning to an attribute with the same name using `spec.foo =` or +# `spec.attribute#[]=` will be an unintended usage. On the other hand, +# duplication of methods such # as `spec.requirements`, +# `spec.add_runtime_dependency`, and others are permitted because it is +# the intended use of appending values. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# spec.name = 'rubocop2' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.name = 'rubocop' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.requirements << 'libmagick, v6.0' +# spec.requirements << 'A good graphics card' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('parallel', '~> 1.10') +# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata["key"] = "value" +# spec.metadata["key"] = "value" +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata["key"] = "value" +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#50 +class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#57 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#83 + def duplicated_assignment_method_nodes; end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#91 + def duplicated_indexed_assignment_method_nodes; end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#66 + def process_assignment_method_nodes; end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#74 + def process_indexed_assignment_method_nodes; end + + # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#98 + def register_offense(node, assignment, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#54 +RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) + +# Dependencies in the gemspec should be alphabetically sorted. +# +# @example +# # bad +# spec.add_dependency 'rubocop' +# spec.add_dependency 'rspec' +# +# # good +# spec.add_dependency 'rspec' +# spec.add_dependency 'rubocop' +# +# # good +# spec.add_dependency 'rubocop' +# +# spec.add_dependency 'rspec' +# +# # bad +# spec.add_development_dependency 'rubocop' +# spec.add_development_dependency 'rspec' +# +# # good +# spec.add_development_dependency 'rspec' +# spec.add_development_dependency 'rubocop' +# +# # good +# spec.add_development_dependency 'rubocop' +# +# spec.add_development_dependency 'rspec' +# +# # bad +# spec.add_runtime_dependency 'rubocop' +# spec.add_runtime_dependency 'rspec' +# +# # good +# spec.add_runtime_dependency 'rspec' +# spec.add_runtime_dependency 'rubocop' +# +# # good +# spec.add_runtime_dependency 'rubocop' +# +# spec.add_runtime_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 +class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#94 + def dependency_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#89 + def get_dependency_name(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#83 + def previous_declaration(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 +RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) + +# Requires a gemspec to have `rubygems_mfa_required` metadata set. +# +# This setting tells RubyGems that MFA (Multi-Factor Authentication) is +# required for accounts to be able perform privileged operations, such as +# (see RubyGems' documentation for the full list of privileged +# operations): +# +# * `gem push` +# * `gem yank` +# * `gem owner --add/remove` +# * adding or removing owners using gem ownership page +# +# This helps make your gem more secure, as users can be more +# confident that gem updates were pushed by maintainers. +# +# @example +# # bad +# Gem::Specification.new do |spec| +# # no `rubygems_mfa_required` metadata specified +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'false' +# } +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata = { +# 'rubygems_mfa_required' => 'true' +# } +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'false' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.metadata['rubygems_mfa_required'] = 'true' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#63 +class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#70 + def metadata(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#78 + def metadata_assignment(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#95 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#86 + def rubygems_mfa_required(param0); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#91 + def true_string?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#123 + def autocorrect(corrector, node, block_var, metadata); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#153 + def change_value(corrector, value); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#133 + def correct_metadata(corrector, metadata); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#141 + def insert_mfa_required(corrector, node, block_var); end + + # source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#116 + def mfa_value(metadata_value); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/require_mfa.rb#67 +RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) + +# Checks that `required_ruby_version` in a gemspec file is set to a valid +# value (non-blank) and matches `TargetRubyVersion` as set in RuboCop's +# configuration for the gem. +# +# This ensures that RuboCop is using the same Ruby version as the gem. +# +# @example +# # When `TargetRubyVersion` of .rubocop.yml is `2.5`. +# +# # bad +# Gem::Specification.new do |spec| +# # no `required_ruby_version` specified +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.4.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.6.0' +# end +# +# # bad +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5.0' +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '>= 2.5' +# end +# +# # accepted but not recommended +# Gem::Specification.new do |spec| +# spec.required_ruby_version = ['>= 2.5.0', '< 2.7.0'] +# end +# +# # accepted but not recommended, since +# # Ruby does not really follow semantic versioning +# Gem::Specification.new do |spec| +# spec.required_ruby_version = '~> 2.5' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#55 +class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#68 + def defined_ruby_version(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#76 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#63 + def required_ruby_version?(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#94 + def dynamic_version?(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#100 + def extract_ruby_version(required_ruby_version); end + + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#118 + def not_equal_message(required_ruby_version, target_ruby_version); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#60 +RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#57 +RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#56 +RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `RUBY_VERSION` and `Ruby::VERSION` constants are not used in gemspec. +# Using `RUBY_VERSION` and `Ruby::VERSION` are dangerous because value of the +# constant is determined by `rake release`. +# It's possible to have dependency based on ruby version used +# to execute `rake release` and not user's ruby version. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# if RUBY_VERSION >= '3.0' +# spec.add_dependency 'gem_a' +# else +# spec.add_dependency 'gem_b' +# end +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency 'gem_a' +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 +class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#41 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#34 + def ruby_version?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#49 + def gem_spec_with_ruby_version?(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#31 +RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking gem declarations. +# +# source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#6 +module RuboCop::Cop::GemspecHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#30 + def assignment_method_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#20 + def gem_specification(param0); end + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#10 + def gem_specification?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#36 + def indexed_assignment_method_declarations(param0); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/gemspec_help.rb#45 + def match_block_variable_name?(receiver_name); end +end + +# Source and spec generator for new cops +# +# This generator will take a cop name and generate a source file +# and spec file when given a valid qualified cop name. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#10 +class RuboCop::Cop::Generator + # @api private + # @raise [ArgumentError] + # @return [Generator] a new instance of Generator + # + # source://rubocop//lib/rubocop/cop/generator.rb#119 + def initialize(name, output: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#139 + def inject_config(config_file_path: T.unsafe(nil), version_added: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#135 + def inject_require(root_file_path: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#152 + def todo; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#127 + def write_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#131 + def write_spec; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#166 + def badge; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#189 + def generate(template); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#181 + def generated_source; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#185 + def generated_spec; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#166 + def output; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#214 + def snake_case(camel_case_string); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#204 + def source_path; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#194 + def spec_path; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/generator.rb#168 + def write_unless_file_exists(path, contents); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#115 +RuboCop::Cop::Generator::CONFIGURATION_ADDED_MESSAGE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#9 +class RuboCop::Cop::Generator::ConfigurationInjector + # @return [ConfigurationInjector] a new instance of ConfigurationInjector + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#17 + def initialize(configuration_file_path:, badge:, version_added: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#24 + def inject; end + + private + + # Returns the value of attribute badge. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def badge; end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#41 + def configuration_entries; end + + # Returns the value of attribute configuration_file_path. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def configuration_file_path; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#59 + def cop_name_line?(yaml); end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#49 + def find_target_line; end + + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#45 + def new_configuration_entry; end + + # Returns the value of attribute output. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def output; end + + # Returns the value of attribute version_added. + # + # source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#39 + def version_added; end +end + +# source://rubocop//lib/rubocop/cop/generator/configuration_injector.rb#10 +RuboCop::Cop::Generator::ConfigurationInjector::TEMPLATE = T.let(T.unsafe(nil), String) + +# A class that injects a require directive into the root RuboCop file. +# It looks for other directives that require files in the same (cop) +# namespace and injects the provided one in alpha +# +# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#9 +class RuboCop::Cop::Generator::RequireFileInjector + # @return [RequireFileInjector] a new instance of RequireFileInjector + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#12 + def initialize(source_path:, root_file_path:, output: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#19 + def inject; end + + private + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#64 + def injectable_require_directive; end + + # Returns the value of attribute output. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def output; end + + # Returns the value of attribute require_entries. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def require_entries; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#31 + def require_exists?; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#68 + def require_path; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#58 + def require_path_fragments(require_directive); end + + # Returns the value of attribute root_file_path. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def root_file_path; end + + # Returns the value of attribute source_path. + # + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#29 + def source_path; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#39 + def target_line; end + + # source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#35 + def updated_directives; end +end + +# source://rubocop//lib/rubocop/cop/generator/require_file_injector.rb#10 +RuboCop::Cop::Generator::RequireFileInjector::REQUIRE_PATH = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#11 +RuboCop::Cop::Generator::SOURCE_TEMPLATE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cop/generator.rb#91 +RuboCop::Cop::Generator::SPEC_TEMPLATE = T.let(T.unsafe(nil), String) + +# Common functionality for checking hash alignment. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#6 +module RuboCop::Cop::HashAlignmentStyles; end + +# Handles calculation of deltas when the enforced style is 'key'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#8 +class RuboCop::Cop::HashAlignmentStyles::KeyAlignment + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#9 + def checkable_layout?(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#20 + def deltas(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#13 + def deltas_for_first_pair(first_pair); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#34 + def separator_delta(pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#45 + def value_delta(pair); end +end + +# Handles calculation of deltas for `kwsplat` nodes. +# This is a special case that just ensures the kwsplat is aligned with the rest of the hash +# since a `kwsplat` does not have a key, separator or value. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#146 +class RuboCop::Cop::HashAlignmentStyles::KeywordSplatAlignment + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#147 + def deltas(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'separator'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#121 +class RuboCop::Cop::HashAlignmentStyles::SeparatorAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#124 + def deltas_for_first_pair(_first_pair); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#134 + def hash_rocket_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#130 + def key_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#138 + def value_delta(first_pair, current_pair); end +end + +# Handles calculation of deltas when the enforced style is 'table'. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#81 +class RuboCop::Cop::HashAlignmentStyles::TableAlignment + include ::RuboCop::Cop::HashAlignmentStyles::ValueAlignment + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#84 + def deltas_for_first_pair(first_pair); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#98 + def hash_rocket_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#94 + def key_delta(first_pair, current_pair); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#115 + def max_delimiter_width(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#111 + def max_key_width(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#103 + def value_delta(first_pair, current_pair); end +end + +# Common functionality for checking alignment of hash values. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#56 +module RuboCop::Cop::HashAlignmentStyles::ValueAlignment + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#57 + def checkable_layout?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#61 + def deltas(first_pair, current_pair); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_alignment_styles.rb#71 + def separator_delta(first_pair, current_pair, key_delta); end +end + +# This module checks for Ruby 3.1's hash value omission syntax. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#7 +module RuboCop::Cop::HashShorthandSyntax + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#32 + def on_hash_for_mixed_shorthand(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#44 + def on_pair(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#144 + def brackets?(method_dispatch_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#174 + def breakdown_value_types_of_hash(hash_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#121 + def def_node_that_require_parentheses(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#203 + def each_omittable_value_pair(hash_value_type_breakdown, &block); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 + def each_omitted_value_pair(hash_value_type_breakdown, &block); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99 + def enforced_shorthand_syntax; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#136 + def find_ancestor_method_dispatch_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#186 + def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#190 + def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#194 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 + def ignore_hash_shorthand_syntax?(pair_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#87 + def ignore_mixed_hash_shorthand_syntax?(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#159 + def last_expression?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207 + def mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#223 + def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#67 + def register_offense(node, message, replacement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 + def require_hash_value?(hash_key_source, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#112 + def require_hash_value_for_around_hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 + def requires_parentheses_context?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 + def use_element_of_hash_literal_as_receiver?(ancestor, parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#153 + def use_modifier_form_without_parenthesized_method_call?(ancestor); end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#12 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#10 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 +RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 +class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#23 + def first_argument; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#27 + def last_argument; end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def node=(_); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#15 + def selector; end + + class << self + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def inspect; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def members; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#9 +RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#8 +RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for Style/HashExcept and Style/HashSlice cops. +# It registers an offense on methods with blocks that are equivalent +# to Hash#except or Hash#slice. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#9 +module RuboCop::Cop::HashSubset + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#21 + def block_with_first_arg_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#36 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#181 + def decorate_source(value); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#189 + def except_key(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#168 + def except_key_source(key); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#160 + def extract_body_if_negated(body); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#59 + def extract_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#69 + def extracts_hash_subset?(block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#138 + def included?(body, negated); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#146 + def not_included?(body, negated); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#197 + def offense_range(node); end + + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#55 + def preferred_method_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#95 + def range_include?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#150 + def safe_to_register_offense?(block, except_key); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#123 + def semantically_except_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#134 + def semantically_slice_method?(node); end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#51 + def semantically_subset_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#88 + def slices_key?(send_node, method, key_arg, value_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#115 + def supported_subset_method?(method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#107 + def using_value_variable?(send_node, value_arg); end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#16 +RuboCop::Cop::HashSubset::ACTIVE_SUPPORT_SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#18 +RuboCop::Cop::HashSubset::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#13 +RuboCop::Cop::HashSubset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#15 +RuboCop::Cop::HashSubset::SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# Common functionality for Style/HashTransformKeys and +# Style/HashTransformValues +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#5 +module RuboCop::Cop::HashTransformMethod + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#33 + def hash_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#41 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#58 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#51 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#132 + def execute_correction(corrector, node, correction); end + + # @abstract + # @raise [NotImplementedError] + # @return [Captures] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#107 + def extract_captures(_match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#84 + def handle_possible_offense(node, match, match_desc); end + + # @abstract + # @raise [NotImplementedError] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#114 + def new_method_name; end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#65 + def on_bad_each_with_object(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#70 + def on_bad_hash_brackets_map(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#75 + def on_bad_map_to_h(_node); end + + # @abstract Implemented with `def_node_matcher` + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#80 + def on_bad_to_h(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#118 + def prepare_correction(node); end +end + +# Internal helper class to hold autocorrect data +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 +class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct + # Returns the value of attribute block_node + # + # @return [Object] the current value of block_node + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def block_node; end + + # Sets the attribute block_node + # + # @param value [Object] the value to set the attribute block_node to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def block_node=(_); end + + # Returns the value of attribute leading + # + # @return [Object] the current value of leading + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def leading; end + + # Sets the attribute leading + # + # @param value [Object] the value to set the attribute leading to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def leading=(_); end + + # Returns the value of attribute match + # + # @return [Object] the current value of match + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def match; end + + # Sets the attribute match + # + # @param value [Object] the value to set the attribute match to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def match=(_); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#48 + def set_new_arg_name(transformed_argname, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#52 + def set_new_body_expression(transforming_body_expr, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#38 + def set_new_method_name(new_method_name, corrector); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#32 + def strip_prefix_and_suffix(node, corrector); end + + # Returns the value of attribute trailing + # + # @return [Object] the current value of trailing + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def trailing; end + + # Sets the attribute trailing + # + # @param value [Object] the value to set the attribute trailing to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def trailing=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#8 + def from_each_with_object(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#12 + def from_hash_brackets_map(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#16 + def from_map_to_h(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#28 + def from_to_h(node, match); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def inspect; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def members; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb#7 + def new(*_arg0); end + end +end + +# Internal helper class to hold match data +# +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 +class RuboCop::Cop::HashTransformMethod::Captures < ::Struct + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#16 + def noop_transformation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#21 + def transformation_uses_both_args?; end + + # Returns the value of attribute transformed_argname + # + # @return [Object] the current value of transformed_argname + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def transformed_argname; end + + # Sets the attribute transformed_argname + # + # @param value [Object] the value to set the attribute transformed_argname to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def transformed_argname=(_); end + + # Returns the value of attribute transforming_body_expr + # + # @return [Object] the current value of transforming_body_expr + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def transforming_body_expr; end + + # Sets the attribute transforming_body_expr + # + # @param value [Object] the value to set the attribute transforming_body_expr to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def transforming_body_expr=(_); end + + # Returns the value of attribute unchanged_body_expr + # + # @return [Object] the current value of unchanged_body_expr + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def unchanged_body_expr; end + + # Sets the attribute unchanged_body_expr + # + # @param value [Object] the value to set the attribute unchanged_body_expr to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def unchanged_body_expr=(_); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#25 + def use_transformed_argname?; end + + class << self + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def inspect; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def members; end + + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#15 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#12 +RuboCop::Cop::HashTransformMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Common functionality for working with heredoc strings. +# +# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#6 +module RuboCop::Cop::Heredoc + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#14 + def on_dstr(node); end + + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#17 + def on_heredoc(_node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#9 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#15 + def on_xstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 + def delimiter_string(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 + def heredoc_type(node); end + + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 + def indent_level(str); end +end + +# source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#7 +RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# This class autocorrects `if...then` structures to a multiline `if` statement +# +# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#6 +class RuboCop::Cop::IfThenCorrector + # @return [IfThenCorrector] a new instance of IfThenCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#9 + def initialize(if_node, indentation: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#14 + def call(corrector); end + + private + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#50 + def branch_body_indentation; end + + # Returns the value of attribute if_node. + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 + def if_node; end + + # Returns the value of attribute indentation. + # + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#20 + def indentation; end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#22 + def replacement(node = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#36 + def rewrite_else_branch(else_branch, indentation); end +end + +# source://rubocop//lib/rubocop/cop/correctors/if_then_corrector.rb#7 +RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), Integer) + +# @deprecated IgnoredMethods class has been replaced with AllowedMethods. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46 +RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods + +# Handles adding and checking ignored nodes. +# +# source://rubocop//lib/rubocop/cop/ignored_node.rb#6 +module RuboCop::Cop::IgnoredNode + # source://rubocop//lib/rubocop/cop/ignored_node.rb#7 + def ignore_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/ignored_node.rb#24 + def ignored_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/ignored_node.rb#11 + def part_of_ignored_node?(node); end + + private + + # source://rubocop//lib/rubocop/cop/ignored_node.rb#31 + def ignored_nodes; end +end + +# @deprecated IgnoredPattern class has been replaced with AllowedPattern. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66 +RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern + +# Common functionality for checking integer nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#6 +module RuboCop::Cop::IntegerNode + private + + # source://rubocop//lib/rubocop/cop/mixin/integer_node.rb#9 + def integer_part(node); end +end + +# Common functionality for working with string interpolations. +# +# @abstract Subclasses are expected to implement {#on_interpolation}. +# +# source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#8 +module RuboCop::Cop::Interpolation + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#9 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#14 + def on_dsym(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#17 + def on_node_with_interpolations(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#15 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/mixin/interpolation.rb#13 + def on_xstr(node); end +end + +# This class autocorrects lambda literal to method notation. +# +# source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#6 +class RuboCop::Cop::LambdaLiteralToMethodCorrector + # @return [LambdaLiteralToMethodCorrector] a new instance of LambdaLiteralToMethodCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#7 + def initialize(block_node); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#13 + def call(corrector); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 + def arg_to_unparenthesized_call?; end + + # Returns the value of attribute arguments. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def arguments; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 + def arguments_begin_pos; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 + def arguments_end_pos; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 + def block_begin; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 + def block_end; end + + # Returns the value of attribute block_node. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def block_node; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 + def insert_arguments(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 + def insert_separating_space(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 + def lambda_arg_string; end + + # Returns the value of attribute method. + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 + def method; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 + def needs_separating_space?; end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 + def remove_arguments(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 + def remove_leading_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 + def remove_trailing_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 + def remove_unparenthesized_whitespace(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 + def replace_delimiters(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 + def replace_selector(corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 + def selector_end; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 + def separating_space?; end +end + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#5 +module RuboCop::Cop::Layout; end + +# Bare access modifiers (those not applying to specific methods) should be +# indented as deep as method definitions, or as deep as the `class`/`module` +# keyword, depending on configuration. +# +# @example EnforcedStyle: indent (default) +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# @example EnforcedStyle: outdent +# # bad +# class Plumbus +# private +# def smooth; end +# end +# +# # good +# class Plumbus +# private +# def smooth; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#35 +class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#50 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#43 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#49 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#48 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#54 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 + def check_body(body, node); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#69 + def check_modifier(send_node, end_range); end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#92 + def expected_indent_offset; end + + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 + def message(range); end + + # An offset that is not expected, but correct if the configuration is + # changed. + # + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#98 + def unexpected_indent_offset; end +end + +# source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 +RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks that the arguments on a multi-line method call are aligned. +# +# @example EnforcedStyle: with_first_argument (default) +# # good +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# foo( +# :bar, +# :baz, +# key: value +# ) +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# foo :bar, +# :baz, +# key: value +# +# # bad +# +# foo :bar, +# :baz, +# key: value +# +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#45 +class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#63 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#54 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#91 + def arguments_or_first_arg_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#79 + def arguments_with_last_arg_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#107 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#67 + def autocorrect_incompatible_with_other_cops?; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#123 + def base_column(node, first_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#143 + def enforce_hash_argument_with_separator?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#115 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#71 + def flattened_arguments(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#111 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#100 + def multiple_arguments?(node); end + + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#134 + def target_method_lineno(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#119 + def with_first_argument_style?; end +end + +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#49 +RuboCop::Cop::Layout::ArgumentAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/argument_alignment.rb#51 +RuboCop::Cop::Layout::ArgumentAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks that the elements of a multi-line array literal are +# aligned. +# +# @example EnforcedStyle: with_first_element (default) +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# array = ['run', +# 'forrest', +# 'run'] +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# # bad +# +# array = [1, 2, 3, +# 4, 5, 6] +# +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#36 +class RuboCop::Cop::Layout::ArrayAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#46 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#55 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#67 + def base_column(node, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#63 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#59 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#78 + def target_method_lineno(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#40 +RuboCop::Cop::Layout::ArrayAlignment::ALIGN_ELEMENTS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/array_alignment.rb#43 +RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first line of the +# right-hand-side of a multi-line assignment. +# +# The indentation of the remaining lines can be corrected with +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. +# +# @example +# # bad +# value = +# if foo +# 'bar' +# end +# +# # good +# value = +# if foo +# 'bar' +# end +# +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25 +class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + private + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47 + def leftmost_multiple_assignment(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30 +RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keyword of `begin` is aligned properly. +# +# Two modes are supported through the `EnforcedStyleAlignWith` configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `begin` +# keyword is. If it's set to `begin`, the `end` shall be aligned with the +# `begin` keyword. +# +# `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `||= begin` that this cop targets tends to +# align with the start of the line, it defaults to `EnforcedStyleAlignWith: start_of_line`. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: begin +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# foo ||= begin +# do_something +# end +# +# # good +# foo ||= begin +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#41 +class RuboCop::Cop::Layout::BeginEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#47 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#62 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#58 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#53 + def check_begin_alignment(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/begin_end_alignment.rb#45 +RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly for do +# end blocks. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# `start_of_block` : the `end` shall be aligned with the +# start of the line where the `do` appeared. +# +# `start_of_line` : the `end` shall be aligned with the +# start of the line where the expression started. +# +# `either` (which is the default) : the `end` is allowed to be in either +# location. The autocorrect will default to `start_of_line`. +# +# @example EnforcedStyleAlignWith: either (default) +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# @example EnforcedStyleAlignWith: start_of_block +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# foo.bar +# .each do +# baz +# end +# +# # good +# +# foo.bar +# .each do +# baz +# end +# +# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#66 +class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#74 + def block_end_align_target?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#84 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#89 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#88 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#91 + def style_parameter_name; end + + private + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#247 + def add_space_before(corrector, loc, delta); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#224 + def alt_start_msg(start_loc, source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#146 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#97 + def block_end_align_target(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + def check_block_alignment(start_node, block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + def compute_do_source_line_column(node, end_loc); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#239 + def compute_start_col(ancestor_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#111 + def disqualified_parent?(parent, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#107 + def end_align_target?(node, parent); end + + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#192 + def find_lhs_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#163 + def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#234 + def format_source_line_column(source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#216 + def loc_to_source_line_column(loc); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#128 + def register_offense(block_node, start_loc, end_loc, do_source_line_column); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#251 + def remove_space_before(corrector, end_pos, delta); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#173 + def start_for_block_node(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#180 + def start_for_line_node(block_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 +RuboCop::Cop::Layout::BlockAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end statement of a do..end block +# is on its own line. +# +# @example +# # bad +# blah do |i| +# foo(i) end +# +# # good +# blah do |i| +# foo(i) +# end +# +# # bad +# blah { |i| +# foo(i) } +# +# # good +# blah { |i| +# foo(i) +# } +# +# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#27 +class RuboCop::Cop::Layout::BlockEndNewline < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#33 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#46 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#45 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#67 + def last_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#63 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#77 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#50 + def register_offense(node, offense_range); end +end + +# source://rubocop//lib/rubocop/cop/layout/block_end_newline.rb#31 +RuboCop::Cop::Layout::BlockEndNewline::MSG = T.let(T.unsafe(nil), String) + +# Checks how the `when` and ``in``s of a `case` expression +# are indented in relation to its `case` or `end` keyword. +# +# It will register a separate offense for each misaligned `when` and `in`. +# +# @example +# # If Layout/EndAlignment is set to keyword style (default) +# # *case* and *end* should always be aligned to same depth, +# # and therefore *when* should always be aligned to both - +# # regardless of configuration. +# +# # bad for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good for all styles +# case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# @example EnforcedStyle: case (default) +# # if EndAlignment is set to other style such as +# # start_of_line (as shown below), then *when* alignment +# # configuration does have an effect. +# +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# @example EnforcedStyle: end +# # bad +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# # good +# a = case n +# when 0 +# x * 2 +# else +# y / 3 +# end +# +# a = case n +# in pattern +# x * 2 +# else +# y / 3 +# end +# +# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#112 +class RuboCop::Cop::Layout::CaseIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#120 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#127 + def on_case_match(case_match_node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#195 + def base_column(case_node, base); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#152 + def check_when(when_node, branch_type); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#184 + def detect_incorrect_style(when_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#138 + def end_and_last_conditional_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#148 + def enforced_style_end?; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#171 + def incorrect_style(when_node, branch_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#163 + def indent_one_step?; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#167 + def indentation_width; end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#209 + def replacement(node); end + + # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#202 + def whitespace_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#118 +RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks if the code style follows the `ExpectedOrder` configuration: +# +# `Categories` allows us to map macro names into a category. +# +# Consider an example of code style that covers the following order: +# +# * Module inclusion (`include`, `prepend`, `extend`) +# * Constants +# * Associations (`has_one`, `has_many`) +# * Public attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Other macros (`validates`, `validate`) +# * Public class methods +# * Initializer +# * Public instance methods +# * Protected attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Protected instance methods +# * Private attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Private instance methods +# +# NOTE: Simply enabling the cop with `Enabled: true` will not use +# the example order shown below. +# To enforce the order of macros like `attr_reader`, +# you must define both `ExpectedOrder` *and* `Categories`. +# +# You can configure the following order: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - module_inclusion +# - constants +# - association +# - public_attribute_macros +# - public_delegate +# - macros +# - public_class_methods +# - initializer +# - public_methods +# - protected_attribute_macros +# - protected_methods +# - private_attribute_macros +# - private_delegate +# - private_methods +# ---- +# +# Instead of putting all literals in the expected order, is also +# possible to group categories of macros. Visibility levels are handled +# automatically. +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Categories: +# association: +# - has_many +# - has_one +# attribute_macros: +# - attr_accessor +# - attr_reader +# - attr_writer +# macros: +# - validates +# - validate +# module_inclusion: +# - include +# - prepend +# - extend +# ---- +# +# If you only set `ExpectedOrder` +# without defining `Categories`, +# macros such as `attr_reader` or `has_many` +# will not be recognized as part of a category, and their order will not be validated. +# For example, the following will NOT raise any offenses, even if the order is incorrect: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# Enabled: true +# ExpectedOrder: +# - public_attribute_macros +# - initializer +# ---- +# +# To make it work as expected, you must also specify `Categories` like this: +# +# [source,yaml] +# ---- +# Layout/ClassStructure: +# ExpectedOrder: +# - public_attribute_macros +# - initializer +# Categories: +# attribute_macros: +# - attr_reader +# - attr_writer +# - attr_accessor +# ---- +# +# @example +# # bad +# # Expect extend be before constant +# class Person < ApplicationRecord +# has_many :orders +# ANSWER = 42 +# +# extend SomeModule +# include AnotherModule +# end +# +# # good +# class Person +# # extend and include go first +# extend SomeModule +# include AnotherModule +# +# # inner classes +# CustomError = Class.new(StandardError) +# +# # constants are next +# SOME_CONSTANT = 20 +# +# # afterwards we have public attribute macros +# attr_reader :name +# +# # followed by other macros (if any) +# validates :name +# +# # then we have public delegate macros +# delegate :to_s, to: :name +# +# # public class methods are next in line +# def self.some_method +# end +# +# # initialization goes between class methods and instance methods +# def initialize +# end +# +# # followed by other public instance methods +# def some_method +# end +# +# # protected attribute macros and methods go next +# protected +# +# attr_reader :protected_name +# +# def some_protected_method +# end +# +# # private attribute macros, delegate macros and methods +# # are grouped near the end +# private +# +# attr_reader :private_name +# +# delegate :some_private_delegate, to: :name +# +# def some_private_method +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#177 +class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#193 + def on_class(class_node); end + + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#204 + def on_sclass(class_node); end + + private + + # Autocorrect by swapping between two nodes autocorrecting them + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#209 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#347 + def begin_pos_with_comment(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#370 + def buffer; end + + # Setting categories hash allow you to group methods in group to match + # in the {expected_order}. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#382 + def categories; end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#276 + def class_elements(class_node); end + + # Classifies a node to match with something in the {expected_order} + # + # @param node to be analysed + # @return String when the node type is a `:block` then + # {classify} recursively with the first children + # @return String when the node type is a `:send` then {find_send_node_category} + # by method name + # @return String otherwise trying to {humanize_node} of the current node + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#229 + def classify(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#313 + def dynamic_constant?(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#337 + def end_position_for(node); end + + # Load expected order from `ExpectedOrder` config. + # Define new terms in the expected order by adding new {categories}. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#376 + def expected_order; end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#261 + def find_category(name); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#366 + def find_heredoc(node); end + + # Categorize a node according to the {expected_order} + # Try to match {categories} values against the node's method_name given + # also its visibility. + # + # @param node to be analysed. + # @return [String] with the key category or the `method_name` as string + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#248 + def find_send_node_category(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#304 + def humanize_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#288 + def ignore?(node, classification); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#295 + def ignore_for_autocorrect?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#331 + def marked_as_private_constant?(node, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#321 + def private_constant?(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#362 + def start_line_position(node); end + + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#267 + def walk_over_nested_class_definition(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#358 + def whole_line_comment_at_line?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#182 +RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#189 +RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of here document closings. +# +# @example +# +# # bad +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # good +# class Foo +# def bar +# <<~SQL +# 'Hi' +# SQL +# end +# end +# +# # bad +# +# # heredoc contents is before closing heredoc. +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# # good +# foo arg, +# <<~EOS +# Hi +# EOS +# +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48 +class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74 + def argument_indentation_correct?(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82 + def closing_indentation(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101 + def find_node_used_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90 + def heredoc_closing(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86 + def heredoc_opening(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117 + def indent_level(source_line); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94 + def indented_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70 + def opening_indentation(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54 +RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52 +RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) + +# Checks the indentation of hanging closing parentheses in +# method calls, method definitions, and grouped expressions. A hanging +# closing parenthesis means `)` preceded by a line break. +# +# @example +# +# # bad +# some_method( +# a, +# b +# ) +# +# some_method( +# a, b +# ) +# +# some_method(a, b, c +# ) +# +# some_method(a, +# b, +# c +# ) +# +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# # Scenario 1: When First Parameter Is On Its Own Line +# +# # good: when first param is on a new line, right paren is *always* +# # outdented by IndentationWidth +# some_method( +# a, +# b +# ) +# +# # good +# some_method( +# a, b +# ) +# +# # Scenario 2: When First Parameter Is On The Same Line +# +# # good: when all other params are also on the same line, outdent +# # right paren by IndentationWidth +# some_method(a, b, c +# ) +# +# # good: when all other params are on multiple lines, but are lined +# # up, align right paren with left paren +# some_method(a, +# b, +# c +# ) +# +# # good: when other params are not lined up on multiple lines, outdent +# # right paren by IndentationWidth +# some_method(a, +# x: 1, +# y: 2 +# ) +# +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#71 +class RuboCop::Cop::Layout::ClosingParenthesisIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#84 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#82 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#88 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#91 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#79 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#157 + def all_elements_aligned?(elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#95 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#99 + def check(node, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#107 + def check_for_elements(node, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#125 + def check_for_no_elements(node); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#171 + def correct_column_candidates(node, left_paren); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#144 + def expected_column(left_paren, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#167 + def first_argument_line(elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#187 + def line_break_after_left_paren?(left_paren, elements); end + + # source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#179 + def message(correct_column, left_paren, right_paren); end +end + +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#77 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/closing_parenthesis_indentation.rb#75 +RuboCop::Cop::Layout::ClosingParenthesisIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# Checks the indentation of comments. +# +# @example +# # bad +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# +# # good +# # comment here +# def method_name +# end +# +# # comment here +# a = 'hello' +# +# # yet another comment +# if true +# true +# end +# @example AllowForAlignment: false (default) +# # bad +# a = 1 # A really long comment +# # spanning two lines. +# +# # good +# # A really long comment spanning one line. +# a = 1 +# @example AllowForAlignment: true +# # good +# a = 1 # A really long comment +# # spanning two lines. +# +# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#48 +class RuboCop::Cop::Layout::CommentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#55 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#61 + def autocorrect(corrector, comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#88 + def autocorrect_one(corrector, comment); end + + # Corrects all comment lines that occur immediately before the given + # comment and have the same indentation. This is to avoid a long chain + # of correcting, saving the file, parsing and inspecting again, and + # then correcting one more line, and so on. + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#71 + def autocorrect_preceding_comments(corrector, comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#92 + def check(comment, comment_index); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#145 + def correct_indentation(next_line); end + + # Returns true if: + # a) the cop is configured to allow extra indentation for alignment, and + # b) the currently inspected comment is aligned with the nearest preceding end-of-line + # comment. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#121 + def correctly_aligned_with_preceding_comment?(comment_index, column); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#156 + def less_indented?(line); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#140 + def line_after_comment(comment); end + + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#131 + def message(column, correct_comment_indentation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#135 + def own_line_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#82 + def should_correct?(preceding_comment, reference_comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#162 + def two_alternatives?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/comment_indentation.rb#52 +RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for conditions that are not on the same line as +# if/while/until. +# +# @example +# +# # bad +# if +# some_condition +# do_something +# end +# +# # good +# if some_condition +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21 +class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#36 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54 + def message(condition); end +end + +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 +RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords of method definitions are +# aligned properly. +# +# Two modes are supported through the EnforcedStyleAlignWith configuration +# parameter. If it's set to `start_of_line` (which is the default), the +# `end` shall be aligned with the start of the line where the `def` +# keyword is. If it's set to `def`, the `end` shall be aligned with the +# `def` keyword. +# +# @example EnforcedStyleAlignWith: def +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# @example EnforcedStyleAlignWith: start_of_line (default) +# # bad +# +# private def foo +# end +# +# # good +# +# private def foo +# end +# +# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#36 +class RuboCop::Cop::Layout::DefEndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#46 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#48 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#63 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/layout/def_end_alignment.rb#41 +RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks the . position in multi-line method calls. +# +# @example EnforcedStyle: leading (default) +# # bad +# something. +# method +# +# # good +# something +# .method +# @example EnforcedStyle: trailing +# # bad +# something +# .method +# +# # good +# something. +# method +# +# source://rubocop//lib/rubocop/cop/layout/dot_position.rb#25 +class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#45 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#34 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 + def autocorrect(corrector, dot, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#99 + def correct_dot_position_style?(dot_line, selector_line); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#126 + def end_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#122 + def heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#114 + def last_heredoc_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#95 + def line_between?(first_line, second_line); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#64 + def message(dot); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#74 + def proper_dot_position?(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#106 + def receiver_end_line(node); end + + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#130 + def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#30 + def autocorrect_incompatible_with; end + end +end + +# Checks the alignment of else keywords. Normally they should +# be aligned with an if/unless/while/until/begin/def/rescue keyword, but there +# are special cases when they should follow the same rules as the +# alignment of end. +# +# @example +# # bad +# if something +# code +# else +# code +# end +# +# # bad +# if something +# code +# elsif something +# code +# end +# +# # good +# if something +# code +# else +# code +# end +# +# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#32 +class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#57 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#63 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#40 + def on_if(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#51 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#147 + def assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#106 + def base_for_method_definition(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#80 + def base_range_of_if(node, base); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#89 + def base_range_of_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#131 + def check_alignment(base_range, else_range); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#115 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#75 + def check_nested(node, base); end +end + +# source://rubocop//lib/rubocop/cop/layout/else_alignment.rb#38 +RuboCop::Cop::Layout::ElseAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks empty comment. +# +# @example +# # bad +# +# # +# class Foo +# end +# +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# @example AllowBorderComment: false +# # bad +# +# def foo +# end +# +# ################# +# +# def bar +# end +# @example AllowBorderComment: true (default) +# # good +# +# def foo +# end +# +# ################# +# +# def bar +# end +# @example AllowMarginComment: false +# # bad +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# @example AllowMarginComment: true (default) +# # good +# +# # +# # Description of `Foo` class. +# # +# class Foo +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#63 +class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#69 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 + def allow_border_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 + def allow_margin_comment?; end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 + def comment_text(comment); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 + def concat_consecutive_comments(comments); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 + def current_token(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 + def empty_comment_only?(comment_text); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 + def investigate(comments); end + + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 + def previous_token(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67 +RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after guard clause. +# +# This cop allows `# :nocov:` directive after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code +# +# @example +# +# # bad +# def foo +# return if need_return? +# bar +# end +# +# # good +# def foo +# return if need_return? +# +# bar +# end +# +# # good +# def foo +# return if something? +# return if something_different? +# +# bar +# end +# +# # also good +# def foo +# if something? +# do_something +# return if need_return? +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54 +class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106 + def contains_guard_clause?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99 + def correct_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#184 + def heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#177 + def heredoc_line(node, heredoc_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#149 + def last_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#165 + def last_heredoc_argument_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#202 + def multiple_statements_on_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121 + def next_line_allowed_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117 + def next_line_empty?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110 + def next_line_empty_or_allowed_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127 + def next_line_rescue_or_ensure?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141 + def next_sibling_empty_or_guard_clause?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132 + def next_sibling_parent_empty_or_else?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#194 + def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#211 + def simplecov_directive_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#188 + def use_heredoc_in_condition?(condition); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for a newline after the final magic comment. +# +# @example +# # good +# # frozen_string_literal: true +# +# # Some documentation for Person +# class Person +# # Some code +# end +# +# # bad +# # frozen_string_literal: true +# # Some documentation for Person +# class Person +# # Some code +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#23 +class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#29 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#61 + def comments_before_code(source); end + + # Find the last magic comment in the source file. + # + # Take all comments that precede the first line of code (or just take + # them all in the case when there is no code), select the + # magic comments, and return the last magic comment in the file. + # + # @return [Parser::Source::Comment] if magic comments exist before code + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#55 + def last_magic_comment(source); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#43 + def offending_range(last_magic_comment); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#27 +RuboCop::Cop::Layout::EmptyLineAfterMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Enforces empty line after multiline condition. +# +# @example +# # bad +# if multiline && +# condition +# do_something +# end +# +# # good +# if multiline && +# condition +# +# do_something +# end +# +# # bad +# case x +# when foo, +# bar +# do_something +# end +# +# # good +# case x +# when foo, +# bar +# +# do_something +# end +# +# # bad +# begin +# do_something +# rescue FooError, +# BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, +# BarError +# +# handle_error +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#54 +class RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#82 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#60 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#93 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#73 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#80 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#70 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#75 + def on_while_post(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#127 + def autocorrect(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#105 + def check_condition(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#120 + def multiline_rescue_exceptions?(exception_nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#116 + def multiline_when_condition?(when_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#112 + def next_line_empty?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb#58 +RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks whether class/module/method definitions are +# separated by one or more empty lines. +# +# `NumberOfEmptyLines` can be an integer (default is 1) or +# an array (e.g. [1, 2]) to specify a minimum and maximum +# number of empty lines permitted. +# +# `AllowAdjacentOneLineDefs` configures whether adjacent +# one-line definitions are considered an offense. +# +# @example AllowAdjacentOneLineDefs: false +# +# # bad +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# # bad - DefLikeMacros: [memoize] +# memoize :attribute_a +# memoize :attribute_b +# +# # good +# memoize :attribute_a +# +# memoize :attribute_b +# @example AllowAdjacentOneLineDefs: true (default) +# +# # good +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# # good - DefLikeMacros: [memoize] +# memoize :attribute_a +# memoize :attribute_b +# +# # good +# memoize :attribute_a +# +# memoize :attribute_b +# @example EmptyLineBetweenClassDefs: true (default) +# # checks for empty lines between class definitions. +# +# # bad +# class A +# end +# class B +# end +# def b +# end +# +# # good +# class A +# end +# +# class B +# end +# +# def b +# end +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. +# +# # bad +# def a +# end +# def b +# end +# +# # good +# def a +# end +# +# def b +# end +# @example EmptyLineBetweenModuleDefs: true (default) +# # checks for empty lines between module definitions. +# +# # bad +# module A +# end +# module B +# end +# def b +# end +# +# # good +# module A +# end +# +# module B +# end +# +# def b +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#114 +class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#151 + def autocorrect(corrector, prev_def, node, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#136 + def check_defs(nodes); end + + # We operate on `begin` nodes, instead of using `OnMethodDef`, + # so that we can walk over pairs of consecutive nodes and + # efficiently access a node's predecessor; #prev_node ends up + # doing a linear scan over siblings, so we don't want to call + # it on each def. + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#129 + def on_begin(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#305 + def allowance_range?; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#287 + def autocorrect_insert_lines(corrector, newline_pos, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#280 + def autocorrect_remove_lines(corrector, newline_pos, count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#242 + def blank_lines_count_between(first_def_node, second_def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#180 + def candidate?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 + def class_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#272 + def def_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#170 + def def_location(correction_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#262 + def def_start(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 + def empty_line_between_macros; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#276 + def end_loc(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#220 + def expected_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#238 + def line_count_allowed?(count); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#254 + def lines_between_defs(first_def_node, second_def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 + def macro_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#250 + def maximum_empty_lines; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 + def message(node, count: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#202 + def method_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#246 + def minimum_empty_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#210 + def module_candidate?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#229 + def multiple_blank_lines_groups?(first_def_node, second_def_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#294 + def node_type(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#120 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#118 +RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) + +# Checks for two or more consecutive blank lines. +# +# @example +# +# # bad - It has two empty lines. +# some_method +# # one empty line +# # two empty lines +# some_method +# +# # good +# some_method +# # one empty line +# some_method +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#21 +class RuboCop::Cop::Layout::EmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#28 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#45 + def each_extra_empty_line(lines); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#63 + def exceeds_line_offset?(line_diff); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#67 + def previous_and_current_lines_empty?(line); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#26 +RuboCop::Cop::Layout::EmptyLines::LINE_OFFSET = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines.rb#25 +RuboCop::Cop::Layout::EmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks for an empty line after a module inclusion method (`extend`, +# `include` and `prepend`), or a group of them. +# +# @example +# # bad +# class Foo +# include Bar +# attr_reader :baz +# end +# +# # good +# class Foo +# include Bar +# +# attr_reader :baz +# end +# +# # also good - multiple module inclusions grouped together +# class Foo +# extend Bar +# include Baz +# prepend Qux +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#30 +class RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#85 + def allowed_method?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#54 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#69 + def enable_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#75 + def line_empty?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#65 + def next_line_empty_or_enable_directive_comment?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#93 + def next_line_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#79 + def require_empty_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#36 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::MODULE_INCLUSION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#34 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb#38 +RuboCop::Cop::Layout::EmptyLinesAfterModuleInclusion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Access modifiers should be surrounded by blank lines. +# +# @example EnforcedStyle: around (default) +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# +# def baz; end +# end +# @example EnforcedStyle: only_before +# +# # bad +# class Foo +# def bar; end +# private +# def baz; end +# end +# +# # good +# class Foo +# def bar; end +# +# private +# def baz; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#43 +class RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [EmptyLinesAroundAccessModifier] a new instance of EmptyLinesAroundAccessModifier + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#56 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#81 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#62 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#86 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#71 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#85 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#76 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#88 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#116 + def allowed_only_before_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#171 + def block_start?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#177 + def body_end?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#165 + def class_def?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#125 + def correct_next_line_if_denied_style(corrector, node, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#161 + def empty_lines_around?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#105 + def expected_empty_lines?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#230 + def inside_block?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#187 + def message(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#196 + def message_for_around_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#206 + def message_for_only_before_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#183 + def next_empty_line_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#151 + def next_line_empty?(last_send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#157 + def next_line_empty_and_exists?(last_send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#234 + def no_empty_lines_around_block_body?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#144 + def previous_line_empty?(send_line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#140 + def previous_line_ignoring_comments(processed_source, send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#224 + def should_insert_line_after?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#216 + def should_insert_line_before?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#48 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#52 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_AFTER_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#49 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_AND_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#51 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::MSG_BEFORE_FOR_ONLY_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb#54 +RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if empty lines exist around the arguments +# of a method invocation. +# +# @example +# # bad +# do_something( +# foo +# +# ) +# +# process(bar, +# +# baz: qux, +# thud: fred) +# +# some_method( +# +# [1,2,3], +# x: y +# ) +# +# # good +# do_something( +# foo +# ) +# +# process(bar, +# baz: qux, +# thud: fred) +# +# some_method( +# [1,2,3], +# x: y +# ) +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#41 +class RuboCop::Cop::Layout::EmptyLinesAroundArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#57 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#47 + def on_send(node); end + + private + + # @yield [range.source_buffer.line_range(range.last_line - 1).adjust(end_pos: 1)] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#73 + def empty_range_for_starting_point(start); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#65 + def extra_lines(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#61 + def receiver_and_method_call_on_different_lines?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_arguments.rb#45 +RuboCop::Cop::Layout::EmptyLinesAroundArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for a newline after an attribute accessor or a group of them. +# `alias` syntax and `alias_method`, `public`, `protected`, and `private` methods are allowed +# by default. These are customizable with `AllowAliasSyntax` and `AllowedMethods` options. +# +# @example +# # bad +# attr_accessor :foo +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# attr_reader :bar +# attr_writer :baz +# attr :qux +# +# def do_something +# end +# @example AllowAliasSyntax: false +# # bad +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# +# # good +# attr_accessor :foo +# +# alias :foo? :foo +# +# def do_something +# end +# @example AllowAliasSyntax: true (default) +# # good +# attr_accessor :foo +# alias :foo? :foo +# +# def do_something +# end +# @example AllowedMethods: ['private'] +# # good +# attr_accessor :foo +# private :foo +# +# def do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#63 +class RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#123 + def allow_alias?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#133 + def allow_alias_syntax?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#127 + def attribute_or_allowed_method?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#83 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#107 + def next_line_empty?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#94 + def next_line_empty_or_enable_directive_comment?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#101 + def next_line_enable_directive_comment?(line); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#117 + def next_line_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#111 + def require_empty_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb#68 +RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of begin-end +# blocks. +# +# @example +# +# # bad +# begin +# +# # ... +# +# end +# +# # good +# begin +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#23 +class RuboCop::Cop::Layout::EmptyLinesAroundBeginBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#29 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#35 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_begin_body.rb#27 +RuboCop::Cop::Layout::EmptyLinesAroundBeginBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of blocks match +# the configuration. +# +# @example EnforcedStyle: empty_lines +# # bad +# foo do |bar| +# # ... +# end +# +# # good +# foo do |bar| +# +# # ... +# +# end +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# foo do |bar| +# +# # ... +# +# end +# +# # good +# foo do |bar| +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#34 +class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#40 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#47 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#46 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_block_body.rb#38 +RuboCop::Cop::Layout::EmptyLinesAroundBlockBody::KIND = T.let(T.unsafe(nil), String) + +# Common functionality for checking if presence/absence of empty lines +# around some kind of body matches the configuration. +# +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#8 +module RuboCop::Cop::Layout::EmptyLinesAroundBody + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#20 + def constant_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#23 + def empty_line_required?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#26 + def check(node, body, adjusted_first_line: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#81 + def check_beginning(style, first_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#67 + def check_both(style, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#108 + def check_deferred_empty_line(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#43 + def check_empty_lines_except_namespace(body, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#51 + def check_empty_lines_special(body, first_line, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#85 + def check_ending(style, last_line); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#98 + def check_line(style, line, msg); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#89 + def check_source(style, line_no, desc); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#159 + def deferred_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#132 + def first_child_requires_empty_line?(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#140 + def first_empty_line_required_child(body); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#155 + def message(type, desc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#122 + def namespace?(body, with_one_child: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#148 + def previous_line_ignoring_comments(send_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#163 + def valid_body_style?(body); end +end + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#15 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_DEFERRED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#13 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_EXTRA = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/empty_lines_around_body.rb#14 +RuboCop::Cop::Layout::EmptyLinesAroundBody::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of classes match +# the configuration. +# +# @example EnforcedStyle: beginning_only +# # good +# +# class Foo +# +# def bar +# # ... +# end +# end +# @example EnforcedStyle: empty_lines +# # bad +# class Foo +# def bar +# # ... +# end +# end +# +# # good +# class Foo +# +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# class Foo +# class Bar +# +# # ... +# +# end +# end +# @example EnforcedStyle: empty_lines_special +# # good +# class Foo +# +# def bar; end +# +# end +# @example EnforcedStyle: ending_only +# # good +# +# class Foo +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# class Foo +# +# def bar +# # ... +# end +# +# end +# +# # good +# class Foo +# def bar +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#81 +class RuboCop::Cop::Layout::EmptyLinesAroundClassBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#87 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#93 + def on_sclass(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_class_body.rb#85 +RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of `begin` +# sections. This cop doesn't check empty lines at `begin` body +# beginning/end and around method definition body. +# `Layout/EmptyLinesAroundBeginBody` or `Layout/EmptyLinesAroundMethodBody` +# can be used for this purpose. +# +# @example +# +# # good +# +# begin +# do_something +# rescue +# do_something2 +# else +# do_something3 +# ensure +# do_something4 +# end +# +# # good +# +# def foo +# do_something +# rescue +# do_something2 +# end +# +# # bad +# +# begin +# do_something +# +# rescue +# +# do_something2 +# +# else +# +# do_something3 +# +# ensure +# +# do_something4 +# end +# +# # bad +# +# def foo +# do_something +# +# rescue +# +# do_something2 +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#61 +class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#71 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#70 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#74 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#72 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#80 + def check_body(body, line_of_def_or_kwbegin); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#112 + def keyword_locations(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#129 + def keyword_locations_in_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 + def keyword_locations_in_rescue(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#95 + def last_body_and_end_on_same_line?(body); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 + def message(location, keyword); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#65 +RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords::MSG = T.let(T.unsafe(nil), String) + +# Checks if empty lines exist around the bodies of methods. +# +# @example +# +# # good +# +# def foo +# # ... +# end +# +# # bad +# +# def bar +# +# # ... +# +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#23 +class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#29 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#39 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#47 + def offending_endless_method?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#52 + def register_offense_for_endless_method(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#43 + def style; end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#27 +RuboCop::Cop::Layout::EmptyLinesAroundMethodBody::KIND = T.let(T.unsafe(nil), String) + +# Checks if empty lines around the bodies of modules match +# the configuration. +# +# @example EnforcedStyle: empty_lines +# # bad +# module Foo +# def bar +# # ... +# end +# end +# +# # good +# module Foo +# +# def bar +# # ... +# end +# +# end +# @example EnforcedStyle: empty_lines_except_namespace +# # good +# +# module Foo +# module Bar +# +# # ... +# +# end +# end +# @example EnforcedStyle: empty_lines_special +# # good +# module Foo +# +# def bar; end +# +# end +# @example EnforcedStyle: no_empty_lines (default) +# # bad +# module Foo +# +# def bar +# # ... +# end +# +# end +# +# # good +# module Foo +# def bar +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#61 +class RuboCop::Cop::Layout::EmptyLinesAroundModuleBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Layout::EmptyLinesAroundBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#67 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/empty_lines_around_module_body.rb#65 +RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), String) + +# Checks whether the end keywords are aligned properly. +# +# Three modes are supported through the `EnforcedStyleAlignWith` +# configuration parameter: +# +# If it's set to `keyword` (which is the default), the `end` +# shall be aligned with the start of the keyword (if, class, etc.). +# +# If it's set to `variable` the `end` shall be aligned with the +# left-hand-side of the variable assignment, if there is one. +# +# If it's set to `start_of_line`, the `end` shall be aligned with the +# start of the line where the matching keyword appears. +# +# This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) +# by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with +# `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends +# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with +# `EnforcedStyleAlignWith: start_of_line` by default. +# These style can be configured by each cop. +# +# @example EnforcedStyleAlignWith: keyword (default) +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# @example EnforcedStyleAlignWith: start_of_line +# # bad +# +# variable = if true +# end +# +# puts(if true +# end) +# +# # good +# +# variable = if true +# end +# +# puts(if true +# end) +# +# variable = +# if true +# end +# @example EnforcedStyleAlignWith: variable +# # bad +# +# variable = if true +# end +# +# # good +# +# variable = if true +# end +# +# variable = +# if true +# end +# +# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#77 +class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#118 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#83 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#99 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#95 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#87 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#107 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#103 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#171 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#188 + def alignment_node_for_variable_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#152 + def asgn_variable_align_with(outer_node, inner_node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#206 + def assignment_or_operator_method(node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#122 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#141 + def check_asgn_alignment(outer_node, inner_node); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#126 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#162 + def check_other_alignment(node); end +end + +# Checks for Windows-style line endings in the source code. +# +# @example EnforcedStyle: crlf +# # The `crlf` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on all platforms. +# +# # bad +# puts 'Hello' # Return character is LF on all platforms. +# +# # good +# puts 'Hello' # Return character is CR+LF on all platforms. +# @example EnforcedStyle: lf +# # The `lf` style means that LF (Line Feed) is enforced on +# # all platforms. +# +# # bad +# puts 'Hello' # Return character is CR+LF on all platforms. +# +# # good +# puts 'Hello' # Return character is LF on all platforms. +# @example EnforcedStyle: native (default) +# # The `native` style means that CR+LF (Carriage Return + Line Feed) is +# # enforced on Windows, and LF is enforced on other platforms. +# +# # bad +# puts 'Hello' # Return character is LF on Windows. +# puts 'Hello' # Return character is CR+LF on other than Windows. +# +# # good +# puts 'Hello' # Return character is CR+LF on Windows. +# puts 'Hello' # Return character is LF on other than Windows. +# +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#40 +class RuboCop::Cop::Layout::EndOfLine < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#71 + def offense_message(line); end + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#47 + def on_new_investigation; end + + # If there is no LF on the last line, we don't care if there's no CR. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#67 + def unimportant_missing_cr?(index, last_line, line); end + + private + + # source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#85 + def last_line(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#44 +RuboCop::Cop::Layout::EndOfLine::MSG_DETECTED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/end_of_line.rb#45 +RuboCop::Cop::Layout::EndOfLine::MSG_MISSING = T.let(T.unsafe(nil), String) + +# Checks for extra/unnecessary whitespace. +# +# @example +# +# # good if AllowForAlignment is true +# name = "RuboCop" +# # Some comment and an empty line +# +# website += "/rubocop/rubocop" unless cond +# puts "rubocop" if debug +# +# # bad for any configuration +# set_app("RuboCop") +# website = "https://github.com/rubocop/rubocop" +# +# # good only if AllowBeforeTrailingComments is true +# object.method(arg) # this is a comment +# +# # good even if AllowBeforeTrailingComments is false or not set +# object.method(arg) # this is a comment +# +# # good with either AllowBeforeTrailingComments or AllowForAlignment +# object.method(arg) # this is a comment +# another_object.method(arg) # this is another comment +# some_object.method(arg) # this is some comment +# +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#31 +class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#170 + def align_column(asgn_token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#147 + def align_equal_sign(corrector, token, align_to); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#137 + def align_equal_signs(range, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#52 + def aligned_locations(locs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103 + def aligned_tok?(token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#159 + def all_relevant_assignment_lines(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#179 + def allow_for_trailing_comments?; end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72 + def check_assignment(token); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#81 + def check_other(token1, token2, ast); end + + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#62 + def check_tokens(ast, token1, token2); end + + # @yield [range_between(start_pos, end_pos)] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#91 + def extra_space_range(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#133 + def force_equal_sign_alignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#111 + def ignored_range?(ast, start_pos); end + + # Returns an array of ranges that should not be reported. It's the + # extra spaces between the keys and values in a multiline hash, + # since those are handled by the Layout/HashAlignment cop. + # + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#118 + def ignored_ranges(ast); end +end + +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#37 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#36 +RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first argument in a method call. +# Arguments after the first one are checked by `Layout/ArgumentAlignment`, +# not by this cop. +# +# For indenting the first parameter of method _definitions_, check out +# `Layout/FirstParameterIndentation`. +# +# This cop will respect `Layout/ArgumentAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArgumentAlignment`. +# +# @example +# +# # bad +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: consistent +# # The first argument should always be indented one step more than the +# # preceding line. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: consistent_relative_to_receiver +# # The first argument should always be indented one level relative to +# # the parent that is receiving the argument +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_params +# @example EnforcedStyle: special_for_inner_method_call +# # The first argument should normally be indented one step more than +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument +# # should be indented relative to the inner method. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# @example EnforcedStyle: special_for_inner_method_call_in_parentheses (default) +# # Same as `special_for_inner_method_call` except that the special rule +# # only applies if the outer method call encloses its arguments in +# # parentheses. +# +# # good +# some_method( +# first_param, +# second_param) +# +# foo = some_method( +# first_param, +# second_param) +# +# foo = some_method(nested_call( +# nested_first_param), +# second_param) +# +# foo = some_method( +# nested_call( +# nested_first_param), +# second_param) +# +# some_method nested_call( +# nested_first_param), +# second_param +# +# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#147 +class RuboCop::Cop::Layout::FirstArgumentIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#255 + def eligible_method_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#165 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#155 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#166 + def on_super(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#174 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#211 + def bare_operator?(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#231 + def base_indentation(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#259 + def base_range(send_node, arg_node); end + + # Returns the column of the given range. For single line ranges, this + # is simple. For ranges with line breaks, we look a the last code line. + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#271 + def column_of(range); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#292 + def comment_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#309 + def enable_layout_first_method_argument_line_break?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#304 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#201 + def find_top_level_send(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#195 + def inner_call?(top_level_send); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#215 + def message(arg_node); end + + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#300 + def on_new_investigation; end + + # Takes the line number of a given code line and returns a string + # containing the previous line that's not a comment line or a blank + # line. + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#283 + def previous_code_line(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#170 + def should_check?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#187 + def should_correct_entire_chain?(send_node, top_level_send); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#239 + def special_inner_call_indentation?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_argument_indentation.rb#153 +RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first element in an array literal +# where the opening bracket and the first element are on separate lines. +# The other elements' indentations are handled by `Layout/ArrayAlignment` cop. +# +# This cop will respect `Layout/ArrayAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`. +# +# By default, array literals that are arguments in a method call with +# parentheses, and where the opening square bracket of the array is on the +# same line as the opening parenthesis of the method call, shall have +# their first element indented one step (two spaces) more than the +# position inside the opening parenthesis. +# +# Other array literals shall have their first element indented one step +# more than the start of the line where the opening square bracket is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_brackets'. Here are examples: +# +# @example EnforcedStyle: align_brackets +# # The `align_brackets` style enforces that the opening and closing +# # brackets are indented to the same position. +# +# # bad +# and_now_for_something = [ +# :completely_different +# ] +# +# # good +# and_now_for_something = [ +# :completely_different +# ] +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first element in an array +# # literal where the opening bracket and the first element are on +# # separate lines is indented the same as an array literal which is not +# # defined inside a method call. +# +# # bad +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# # good +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first +# # element in an array literal where the opening bracket and first +# # element are on separate lines is indented one step (two spaces) more +# # than the position inside the opening parenthesis. +# +# # bad +# array = [ +# :value +# ] +# and_in_a_method_call([ +# :no_difference +# ]) +# +# # good +# array = [ +# :value +# ] +# but_in_a_method_call([ +# :its_like_this +# ]) +# +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 +class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#104 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#146 + def base_description(indent_base_type); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 + def check(array_node, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 + def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 + def message(base_description); end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 + def message_for_right_bracket(indent_base_type); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 +RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line array. +# +# @example +# +# # bad +# [ :a, +# :b] +# +# # good +# [ +# :a, +# :b] +# +# # good +# [:a, :b] +# @example AllowImplicitArrayLiterals: false (default) +# +# # bad +# a = b, +# c +# +# # good +# a = +# b, +# c +# @example AllowImplicitArrayLiterals: true +# +# # good +# a = b, +# c +# +# a = +# b, +# c +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [ :a, { +# :b => :c +# }] +# +# # good +# [ +# :a, { +# :b => :c +# }] +# @example AllowMultilineFinalElement: true +# +# # good +# [:a, { +# :b => :c +# }] +# +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#64 +class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#70 + def on_array(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#84 + def allow_implicit_array_brackets?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#79 + def assignment_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#88 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#68 +RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first key in a hash literal +# where the opening brace and the first key are on separate lines. The +# other keys' indentations are handled by the HashAlignment cop. +# +# By default, `Hash` literals that are arguments in a method call with +# parentheses, and where the opening curly brace of the hash is on the +# same line as the opening parenthesis of the method call, shall have +# their first key indented one step (two spaces) more than the position +# inside the opening parenthesis. +# +# Other hash literals shall have their first key indented one step more +# than the start of the line where the opening curly brace is. +# +# This default style is called 'special_inside_parentheses'. Alternative +# styles are 'consistent' and 'align_braces'. Here are examples: +# +# @example EnforcedStyle: align_braces +# # The `align_brackets` style enforces that the opening and closing +# # braces are indented to the same position. +# +# # bad +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# and_now_for_something = { +# completely: :different +# } +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# @example EnforcedStyle: consistent +# # The `consistent` style enforces that the first key in a hash +# # literal where the opening brace and the first key are on +# # separate lines is indented the same as a hash literal which is not +# # defined inside a method call. +# +# # bad +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# +# # good +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# @example EnforcedStyle: special_inside_parentheses (default) +# # The `special_inside_parentheses` style enforces that the first key +# # in a hash literal where the opening brace and the first key are on +# # separate lines is indented one step (two spaces) more than the +# # position inside the opening parentheses. +# +# # bad +# hash = { +# key: :value +# } +# and_in_a_method_call({ +# no: :difference +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# # good +# special_inside_parentheses +# hash = { +# key: :value +# } +# but_in_a_method_call({ +# its_like: :this +# }) +# takes_multi_pairs_hash(x: { +# a: 1, +# b: 2 +# }, +# y: { +# c: 1, +# d: 2 +# }) +# +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#113 +class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#133 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#122 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#126 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#137 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#197 + def base_description(indent_base_type); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#147 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#151 + def check(hash_node, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#190 + def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#170 + def check_right_brace(right_brace, first_pair, left_brace, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#233 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#210 + def message(base_description); end + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#218 + def message_for_right_brace(indent_base_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#184 + def separator_style?(first_pair); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_indentation.rb#119 +RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first element in a +# multi-line hash. +# +# @example +# +# # bad +# { a: 1, +# b: 2} +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { +# a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: true +# +# # bad +# { a: 1, +# b: { +# c: 3 +# }} +# +# # good +# { a: 1, b: { +# c: 3 +# }} +# +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#46 +class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#52 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#62 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#50 +RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first argument in a +# multi-line method call. +# +# @example +# +# # bad +# method(foo, bar, +# baz) +# +# # good +# method( +# foo, bar, +# baz) +# +# # ignored +# method foo, bar, +# baz +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, bar, { +# baz: "a", +# qux: "b", +# }) +# @example AllowMultilineFinalElement: true +# +# # bad +# method(foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# +# # good +# method(foo, bar, { +# baz: "a", +# qux: "b", +# }) +# +# # good +# method( +# foo, +# bar, +# { +# baz: "a", +# qux: "b", +# } +# ) +# @example AllowedMethods: ['some_method'] +# +# # good +# some_method(foo, bar, +# baz) +# +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#71 +class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#94 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#95 + def on_super(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#99 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#76 +RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks for a line break before the first parameter in a +# multi-line method parameter definition. +# +# @example +# +# # bad +# def method(foo, bar, +# baz) +# do_something +# end +# +# # good +# def method( +# foo, bar, +# baz) +# do_something +# end +# +# # ignored +# def method foo, +# bar +# do_something +# end +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# # good +# def method( +# foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# @example AllowMultilineFinalElement: true +# +# # good +# def method(foo, bar, baz = { +# :a => "b", +# }) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#56 +class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FirstElementLineBreak + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#65 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#69 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#60 +RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the first parameter in a method +# definition. Parameters after the first one are checked by +# `Layout/ParameterAlignment`, not by this cop. +# +# For indenting the first argument of method _calls_, check out +# `Layout/FirstArgumentIndentation`, which supports options related to +# nesting that are irrelevant for method _definitions_. +# +# @example +# +# # bad +# def some_method( +# first_param, +# second_param) +# 123 +# end +# @example EnforcedStyle: align_parentheses +# # The first parameter should always be indented one step more than the +# # opening parenthesis. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# @example EnforcedStyle: consistent (default) +# # The first parameter should always be indented one step more than the +# # preceding line. +# +# # good +# def some_method( +# first_param, +# second_param) +# 123 +# end +# +# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#44 +class RuboCop::Cop::Layout::FirstParameterIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineElementIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#53 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#59 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#63 + def autocorrect(corrector, node); end + + # Returns the description of what the correct indentation is based on. + # + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#83 + def base_description(_); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#67 + def brace_alignment_style; end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#71 + def check(def_node); end + + # source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#91 + def message(base_description); end +end + +# source://rubocop//lib/rubocop/cop/layout/first_parameter_indentation.rb#50 +RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks that the keys, separators, and values of a multi-line hash +# literal are aligned according to configuration. The configuration +# options are: +# +# * key (left align keys, one space before hash rockets and values) +# * separator (align hash rockets and colons, right align keys) +# * table (left align keys, hash rockets, and values) +# +# The treatment of hashes passed as the last argument to a method call +# can also be configured. The options are: +# +# * always_inspect +# * always_ignore +# * ignore_implicit (without curly braces) +# +# Alternatively you can specify multiple allowed styles. That's done by +# passing a list of styles to EnforcedHashRocketStyle and EnforcedColonStyle. +# +# @example EnforcedColonStyle: key (default) +# # bad +# { +# foo: bar, +# ba: baz +# } +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedColonStyle: separator +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedColonStyle: table +# # bad +# { +# foo: bar, +# ba: baz +# } +# +# # good +# { +# foo: bar, +# ba: baz +# } +# @example EnforcedHashRocketStyle: key (default) +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# @example EnforcedHashRocketStyle: separator +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# @example EnforcedHashRocketStyle: table +# # bad +# { +# :foo => bar, +# :ba => baz +# } +# +# # good +# { +# :foo => bar, +# :ba => baz +# } +# @example EnforcedLastArgumentHashStyle: always_ignore +# # Ignore both implicit and explicit hashes. +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# @example EnforcedLastArgumentHashStyle: always_inspect (default) +# # Inspect both implicit and explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something( +# foo: 1, +# bar: 2 +# ) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something({ +# foo: 1, +# bar: 2 +# }) +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# +# # bad +# do_something(foo: 1, +# bar: 2) +# +# # good +# do_something({foo: 1, +# bar: 2}) +# @example EnforcedLastArgumentHashStyle: ignore_implicit +# # Ignore only implicit hashes. +# +# # bad +# do_something({foo: 1, +# bar: 2}) +# +# # good +# do_something(foo: 1, +# bar: 2) +# +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 +class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashAlignmentStyles + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # Returns the value of attribute column_deltas. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def column_deltas; end + + # Sets the attribute column_deltas + # + # @param value the value to set the attribute column_deltas to. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def column_deltas=(_arg0); end + + # Returns the value of attribute offenses_by. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def offenses_by; end + + # Sets the attribute offenses_by + # + # @param value the value to set the attribute offenses_by to. + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#218 + def offenses_by=(_arg0); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#204 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#208 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#195 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#205 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#206 + def on_yield(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#264 + def add_offenses; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#370 + def adjust(corrector, delta, range); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#299 + def alignment_for(pair); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#313 + def alignment_for_colons; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#309 + def alignment_for_hash_rockets; end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#234 + def argument_before_hash(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#222 + def autocorrect_incompatible_with_other_cops?(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#282 + def check_delta(delta, node:, alignment:); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#245 + def check_pairs(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#336 + def correct_key_value(corrector, delta, key, value, separator); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#332 + def correct_no_value(corrector, key_delta, key); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#317 + def correct_node(corrector, node, delta); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#383 + def enforce_first_argument_with_fixed_indentation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#379 + def good_alignment?(column_deltas); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#290 + def ignore_hash_argument?(node); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#352 + def new_alignment(key); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#272 + def register_offenses_with_format(offenses, format); end + + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#240 + def reset!; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#388 + def same_line?(node1, node2); end +end + +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#183 +RuboCop::Cop::Layout::HashAlignment::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#193 +RuboCop::Cop::Layout::HashAlignment::SEPARATOR_ALIGNMENT_STYLES = T.let(T.unsafe(nil), Array) + +# Checks for the placement of the closing parenthesis +# in a method call that passes a HEREDOC string as an argument. +# It should be placed at the end of the line containing the +# opening HEREDOC tag. +# +# @example +# # bad +# +# foo(<<-SQL +# bar +# SQL +# ) +# +# foo(<<-SQL, 123, <<-NOSQL, +# bar +# SQL +# baz +# NOSQL +# ) +# +# foo( +# bar(<<-SQL +# baz +# SQL +# ), +# 123, +# ) +# +# # good +# +# foo(<<-SQL) +# bar +# SQL +# +# foo(<<-SQL, 123, <<-NOSQL) +# bar +# SQL +# baz +# NOSQL +# +# foo( +# bar(<<-SQL), +# baz +# SQL +# 123, +# ) +# +# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#53 +class RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#78 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#64 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#185 + def add_correct_closing_paren(node, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#272 + def add_correct_external_trailing_comma(node, corrector); end + + # Autocorrection note: + # + # Commas are a bit tricky to handle when the method call is + # embedded in another expression. Here's an example: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456, + # SELECT * FROM db + # SQL + # ), + # third_array_value, + # ] + # + # The "internal" trailing comma is after `456`. + # The "external" trailing comma is after `)`. + # + # To autocorrect, we remove the latter, and move the former up: + # + # [ + # first_array_value, + # foo(<<-SQL, 123, 456), + # SELECT * FROM db + # SQL + # third_array_value, + # ] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#108 + def autocorrect(corrector, node); end + + # Closing parenthesis helpers. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#163 + def end_keyword_before_closing_parenthesis?(parenthesized_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#223 + def exist_argument_between_heredoc_end_and_closing_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#290 + def external_trailing_comma?(node); end + + # Returns nil if no trailing external comma. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#295 + def external_trailing_comma_offset_from_loc_end(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#138 + def extract_heredoc(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#134 + def extract_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#231 + def find_most_bottom_of_heredoc_end(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#180 + def fix_closing_parenthesis(node, corrector); end + + # External trailing comma helpers. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#267 + def fix_external_trailing_comma(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#150 + def heredoc_node?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#198 + def incorrect_parenthesis_removal_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#214 + def incorrect_parenthesis_removal_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#245 + def internal_trailing_comma?(node); end + + # Returns nil if no trailing internal comma. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#250 + def internal_trailing_comma_offset_from_last_arg(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#116 + def outermost_send_on_same_line(heredoc); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#189 + def remove_incorrect_closing_paren(node, corrector); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#278 + def remove_incorrect_external_trailing_comma(node, corrector); end + + # Internal trailing comma helpers. + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#239 + def remove_internal_trailing_comma(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#208 + def safe_to_remove_line_containing_closing_paren?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#127 + def send_missing_closing_parens?(parent, child, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#154 + def single_line_send_with_heredoc_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#306 + def space?(pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#169 + def subsequent_closing_parentheses_in_same_line?(outermost_send); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#60 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb#57 +RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the here document bodies. The bodies +# are indented one step. +# +# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# this cop does not add any offenses for long here documents to +# avoid ``Layout/LineLength``'s offenses. +# +# @example +# # bad +# <<-RUBY +# something +# RUBY +# +# # good +# <<~RUBY +# something +# RUBY +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# <<-RUBY.squish +# something +# RUBY +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# <<-RUBY.squish +# something +# RUBY +# +# # good +# <<~RUBY.squish +# something +# RUBY +# +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#41 +class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#58 + def on_heredoc(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#54 + def squish_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#136 + def adjust_heredoc_squish(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#146 + def adjust_minus(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#141 + def adjust_squiggly(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#170 + def base_indent_level(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#181 + def heredoc_body(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#185 + def heredoc_end(node); end + + # Returns '~', '-' or nil + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#177 + def heredoc_indent_type(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#189 + def heredoc_squish?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#152 + def indented_body(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 + def indented_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 + def line_too_long?(node); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#128 + def longest_line(lines); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#93 + def message(heredoc_indent_type); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 + def register_offense(node, heredoc_indent_type); end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 + def type_message(indentation_width, current_indent_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#132 + def unlimited_heredoc_length?; end + + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 + def width_message(indentation_width); end +end + +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#49 +RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#51 +RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) + +# Checks for inconsistent indentation. +# +# The difference between `indented_internal_methods` and `normal` is +# that the `indented_internal_methods` style prescribes that in +# classes and modules the `protected` and `private` modifier keywords +# shall be indented the same as public methods and that protected and +# private members shall be indented one step more than the modifiers. +# Other than that, both styles mean that entities on the same logical +# depth shall have the same indentation. +# +# @example EnforcedStyle: indented_internal_methods +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# @example EnforcedStyle: normal (default) +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # bad +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# puts 'world' +# end +# +# protected +# +# def foo +# end +# +# private +# +# def bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#121 +class RuboCop::Cop::Layout::IndentationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#128 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#132 + def on_kwbegin(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#138 + def autocorrect(corrector, node); end + + # Not all nodes define `bare_access_modifier?` (for example, + # `RuboCop::AST::DefNode` does not), so we must check `send_type?` first + # to avoid a NoMethodError. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#145 + def bare_access_modifier?(node); end + + # Returns an integer representing the correct indentation, or nil to + # indicate that the correct indentation is that of the first child that + # is not an access modifier. + # + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#152 + def base_column_for_normal_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#172 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#187 + def check_indented_internal_methods_style(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#180 + def check_normal_style(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_consistency.rb#126 +RuboCop::Cop::Layout::IndentationConsistency::MSG = T.let(T.unsafe(nil), String) + +# Checks that the indentation method is consistent. +# Either tabs only or spaces only are used for indentation. +# +# @example EnforcedStyle: spaces (default) +# # bad +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# @example EnforcedStyle: tabs +# # bad +# # This example uses spaces to indent bar. +# def foo +# bar +# end +# +# # good +# # This example uses a tab to indent bar. +# def foo +# bar +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#34 +class RuboCop::Cop::Layout::IndentationStyle < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#58 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#82 + def autocorrect_lambda_for_spaces(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#77 + def autocorrect_lambda_for_tabs(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#66 + def find_offense(line, lineno); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#88 + def in_string_literal?(ranges, tabs_range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#109 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#92 + def string_literal_ranges(ast); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 +RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation that doesn't use the specified number of spaces. +# The indentation width can be configured using the `Width` setting. The default width is 2. +# The block body indentation for method chain blocks can be configured using the +# `EnforcedStyleAlignWith` setting. +# +# See also the `Layout/IndentationConsistency` cop which is the companion to this one. +# +# @example AllowedPatterns: ['^\s*module'] +# # bad +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# +# # good +# module A +# class B +# def test +# puts 'hello' +# end +# end +# end +# @example EnforcedStyleAlignWith: relative_to_receiver +# # good +# records.uniq { |el| el[:profile_id] } +# .map do |message| +# SomeJob.perform_later(message[:id]) +# end +# @example EnforcedStyleAlignWith: start_of_line (default) +# # good +# records.uniq { |el| el[:profile_id] } +# .map do |message| +# SomeJob.perform_later(message[:id]) +# end +# @example Width: 2 (default) +# # bad +# class A +# def test +# puts 'hello' +# end +# end +# +# # good +# class A +# def test +# puts 'hello' +# end +# end +# +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#60 +class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 + def access_modifier?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#98 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#158 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#166 + def on_case_match(case_match); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#115 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#139 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#141 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#86 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#84 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#176 + def on_if(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#113 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#90 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#122 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#112 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#77 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#124 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 + def on_until(node, base = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#148 + def on_while(node, base = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#249 + def access_modifier_indentation_style; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#185 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#475 + def block_body_indentation_base(node, end_loc); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#257 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#277 + def check_if(node, body, else_clause, base_loc); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#290 + def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#191 + def check_members(base, members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#215 + def check_members_for_indented_internal_methods_style(members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#221 + def check_members_for_normal_style(base, members); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#384 + def check_rescue?(rescue_node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#440 + def column_offset_between(base_range, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#426 + def contains_access_modifier?(body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#483 + def dot_on_new_line?(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#229 + def each_member(members); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#253 + def indentation_consistency_style; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#432 + def indentation_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#367 + def indentation_to_check?(base_loc, body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#241 + def indented_internal_methods_style?; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#469 + def leftmost_modifier_of(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#451 + def line_indentation(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#456 + def line_uses_tabs?(range); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#324 + def message(configured_indentation_width, indentation, name); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 + def message_for_spaces(configured_indentation_width, indentation, name); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#332 + def message_for_tabs(configured_indentation_width, indentation, name); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#403 + def offending_range(body_node, indentation); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#300 + def offense(body_node, indentation, style); end + + # Returns true if the given node is within another node that has + # already been marked for autocorrection by this cop. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#357 + def other_offense_in_same_range?(node); end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#203 + def select_check_member(member); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#388 + def skip_check?(base_loc, body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#245 + def special_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#417 + def starts_with_access_modifier?(body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#436 + def using_tabs?; end + + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#460 + def visual_column(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#69 +RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) + +# Checks for indentation of the first non-blank non-comment +# line in a file. +# +# @example +# # bad +# class A +# def foo; end +# end +# +# # good +# class A +# def foo; end +# end +# +# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#20 +class RuboCop::Cop::Layout::InitialIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#26 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#36 + def first_token; end + + # @yield [range_between(space_range.begin_pos, token.begin_pos)] + # + # source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#40 + def space_before(token); end +end + +# source://rubocop//lib/rubocop/cop/layout/initial_indentation.rb#24 +RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) + +# Checks whether comments have a leading space after the +# `#` denoting the start of the comment. The leading space is not +# required for some RDoc special syntax, like `#++`, `#--`, +# `#:nodoc`, `=begin`- and `=end` comments, "shebang" directives, +# or rackup options. +# +# @example +# +# # bad +# #Some comment +# +# # good +# # Some comment +# @example AllowDoxygenCommentStyle: false (default) +# +# # bad +# +# #** +# # Some comment +# # Another line of comment +# #* +# @example AllowDoxygenCommentStyle: true +# +# # good +# +# #** +# # Some comment +# # Another line of comment +# #* +# @example AllowGemfileRubyComment: false (default) +# +# # bad +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# @example AllowGemfileRubyComment: true +# +# # good +# +# #ruby=2.7.0 +# #ruby-gemset=myproject +# @example AllowRBSInlineAnnotation: false (default) +# +# # bad +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# #: ( +# #| Integer, +# #| String +# #| ) -> void +# def foo; end +# @example AllowRBSInlineAnnotation: true +# +# # good +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# #: ( +# #| Integer, +# #| String +# #| ) -> void +# def foo; end +# @example AllowSteepAnnotation: false (default) +# +# # bad +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String +# @example AllowSteepAnnotation: true +# +# # good +# +# [1, 2, 3].each_with_object([]) do |n, list| #$ Array[Integer] +# list << n +# end +# +# name = 'John' #: String +# +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#101 +class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#107 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#161 + def allow_doxygen_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#169 + def allow_gemfile_ruby_comment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#185 + def allow_rbs_inline_annotation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#193 + def allow_steep_annotation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#131 + def allowed_on_first_line?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#165 + def doxygen_comment_style?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#173 + def gemfile?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#181 + def gemfile_ruby_comment?(comment); end + + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#127 + def hash_mark(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#157 + def rackup_config_file?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#153 + def rackup_options?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#189 + def rbs_inline_annotation?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#177 + def ruby_comment_in_gemfile?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#135 + def shebang?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#139 + def shebang_continuation?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#197 + def steep_annotation?(comment); end +end + +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#105 +RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary leading blank lines at the beginning +# of a file. +# +# @example +# +# # bad +# # (start of file) +# +# class Foo +# end +# +# # bad +# # (start of file) +# +# # a comment +# +# # good +# # (start of file) +# class Foo +# end +# +# # good +# # (start of file) +# # a comment +# +# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#30 +class RuboCop::Cop::Layout::LeadingEmptyLines < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#35 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/layout/leading_empty_lines.rb#33 +RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) + +# Checks that strings broken over multiple lines (by a backslash) contain +# trailing spaces instead of leading spaces (default) or leading spaces +# instead of trailing spaces. +# +# @example EnforcedStyle: leading +# # bad +# 'this text contains a lot of ' \ +# 'spaces' +# +# # good +# 'this text contains a lot of' \ +# ' spaces' +# +# # bad +# 'this text is too ' \ +# 'long' +# +# # good +# 'this text is too' \ +# ' long' +# @example EnforcedStyle: trailing (default) +# # bad +# 'this text contains a lot of' \ +# ' spaces' +# +# # good +# 'this text contains a lot of ' \ +# 'spaces' +# +# # bad +# 'this text is too' \ +# ' long' +# +# # good +# 'this text is too ' \ +# 'long' +# +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#43 +class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#63 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122 + def autocorrect(corrector, offense_range, insert_pos, spaces); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#115 + def continuation?(line, line_num, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#147 + def enforced_style_leading?; end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#85 + def investigate(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#93 + def investigate_leading_style(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#104 + def investigate_trailing_style(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#127 + def leading_offense_range(end_of_first_line, matches); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#139 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#81 + def raw_lines(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#133 + def trailing_offense_range(end_of_first_line, matches); end + + class << self + # When both cops are activated and run in the same iteration of the correction loop, + # `Style/StringLiterals` undoes the moving of spaces that + # `Layout/LineContinuationLeadingSpace` performs. This is because `Style/StringLiterals` + # takes the original string content and transforms it, rather than just modifying the + # delimiters, in order to handle escaping for quotes within the string. + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#59 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#49 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LEADING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#47 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_1_ENDING = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#48 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::LINE_2_BEGINNING = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#50 +RuboCop::Cop::Layout::LineContinuationLeadingSpace::TRAILING_STYLE_OFFENSE = T.let(T.unsafe(nil), Regexp) + +# Checks that the backslash of a line continuation is separated from +# preceding text by exactly one space (default) or zero spaces. +# +# @example EnforcedStyle: no_space +# # bad +# 'a' \ +# 'b' \ +# 'c' +# +# # good +# 'a'\ +# 'b'\ +# 'c' +# @example EnforcedStyle: space (default) +# # bad +# 'a'\ +# 'b' \ +# 'c' +# +# # good +# 'a' \ +# 'b' \ +# 'c' +# +# source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#30 +class RuboCop::Cop::Layout::LineContinuationSpacing < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#34 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#81 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#111 + def comment_ranges(comments); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#65 + def find_offensive_spacing(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#121 + def ignore_range?(backtick_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#91 + def ignored_literal_ranges(ast); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#130 + def ignored_parent?(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#125 + def ignored_ranges; end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#49 + def investigate(line, line_number); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#115 + def last_line(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#73 + def message(_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#136 + def no_space_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_continuation_spacing.rb#140 + def space_style?; end +end + +# Checks the indentation of the next line after a line that ends with a string +# literal and a backslash. +# +# If `EnforcedStyle: aligned` is set, the concatenated string parts shall be aligned with the +# first part. There are some exceptions, such as implicit return values, where the +# concatenated string parts shall be indented regardless of `EnforcedStyle` configuration. +# +# If `EnforcedStyle: indented` is set, it's the second line that shall be indented one step +# more than the first line. Lines 3 and forward shall be aligned with line 2. +# +# @example +# # bad +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# def some_method +# 'x' \ +# 'y' \ +# 'z' +# end +# @example EnforcedStyle: aligned (default) +# # bad +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# puts 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# @example EnforcedStyle: indented +# # bad +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# # good +# result = 'x' \ +# 'y' +# +# my_hash = { +# first: 'a message' \ +# 'in two parts' +# } +# +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#74 +class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#97 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#83 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#137 + def add_offense_and_correction(node, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#109 + def always_indented?(dstr_node); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#128 + def base_column(child); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#113 + def check_aligned(children, start_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#122 + def check_indented(children); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#103 + def strings_concatenated_with_backslash?(dstr_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#79 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#80 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#81 +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) + +# Checks the length of lines in the source code. +# The maximum length is configurable. +# The tab size is configured in the `IndentationWidth` +# of the `Layout/IndentationStyle` cop. +# It also ignores a shebang line by default. +# +# This cop has some autocorrection capabilities. +# It can programmatically shorten certain long lines by +# inserting line breaks into expressions that can be safely +# split across lines. These include arrays, hashes, and +# method calls with argument lists. +# +# If autocorrection is enabled, the following cops +# are recommended to further format the broken lines. +# (Many of these are enabled by default.) +# +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout/ParameterAlignment` +# * `Style/BlockDelimiters` +# +# Together, these cops will pretty print hashes, arrays, +# method calls, etc. For example, let's say the max columns +# is 25: +# +# @example +# +# # bad +# {foo: "0000000000", bar: "0000000000", baz: "0000000000"} +# +# # good +# {foo: "0000000000", +# bar: "0000000000", baz: "0000000000"} +# +# # good (with recommended cops enabled) +# { +# foo: "0000000000", +# bar: "0000000000", +# baz: "0000000000", +# } +# +# source://rubocop//lib/rubocop/cop/layout/line_length.rb#63 +class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckLineBreakable + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#70 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#91 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#74 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#94 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#95 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#96 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#84 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#92 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#104 + def on_investigation_end; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#78 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#98 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#77 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#88 + def on_potential_breakable_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#93 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#80 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#316 + def allow_heredoc?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#324 + def allow_string_split?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#391 + def allowed_combination?(line, uri_range, qualified_name_range); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#320 + def allowed_heredoc; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#272 + def allowed_line?(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#182 + def breakable_block_range(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#403 + def breakable_dstr?(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#231 + def breakable_dstr_begin_position(node); end + + # Returns the value of attribute breakable_range. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#112 + def breakable_range; end + + # Sets the attribute breakable_range + # + # @param value the value to set the attribute breakable_range to. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#112 + def breakable_range=(_arg0); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#190 + def breakable_range_after_semicolon(semicolon_token); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#236 + def breakable_range_by_line_index; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#173 + def breakable_string?(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#240 + def breakable_string_delimiters; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#203 + def breakable_string_position(node); end + + # Locate where to break a string that is too long, ensuring that escape characters + # are not bisected. + # If the string contains spaces, use them to determine a place for a clean break; + # otherwise, the string will be broken at the line length limit. + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#215 + def breakable_string_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#358 + def check_directive_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#135 + def check_for_breakable_block(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#158 + def check_for_breakable_dstr(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#114 + def check_for_breakable_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#127 + def check_for_breakable_semicolons(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#146 + def check_for_breakable_str(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#256 + def check_line(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#375 + def check_line_for_exemptions(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#300 + def excess_range(uri_range, line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#328 + def extract_heredocs(ast); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#244 + def heredocs; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#248 + def highlight_start(line); end + + # Find the largest possible substring of a string node to retain before a break + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#417 + def largest_possible_string(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#347 + def line_in_heredoc?(line_number); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#338 + def line_in_permitted_heredoc?(line_number); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#311 + def max; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#314 + def max_line_length; end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#385 + def range_if_applicable(line, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#351 + def receiver_contains_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#282 + def register_offense(loc, line, line_index, length: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#278 + def shebang?(line, line_index); end + + # source://rubocop//lib/rubocop/cop/layout/line_length.rb#408 + def string_delimiter(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/line_length.rb#72 +RuboCop::Cop::Layout::LineLength::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in an array literal is either +# on the same line as the last array element or on a new line. +# +# When using the `symmetrical` (default) style: +# +# If an array's opening brace is on the same line as the first element +# of the array, then the closing brace should be on the same line as +# the last element of the array. +# +# If an array's opening brace is on the line above the first element +# of the array, then the closing brace should be on the line below +# the last element of the array. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line array literal must be on the line +# after the last element of the array. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line array literal must be on the same +# line as the last element of the array. +# +# @example EnforcedStyle: new_line +# # bad +# [ +# :a, +# :b ] +# +# # bad +# [ :a, +# :b ] +# +# # good +# [ :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b +# ] +# @example EnforcedStyle: same_line +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b +# ] +# +# # good +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# @example EnforcedStyle: symmetrical (default) +# # bad +# [ :a, +# :b +# ] +# +# # bad +# [ +# :a, +# :b ] +# +# # good +# [ :a, +# :b ] +# +# # good +# [ +# :a, +# :b +# ] +# +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineArrayBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#109 + def on_array(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each item in a multi-line array +# starts on a separate line. +# +# @example +# +# # bad +# [ +# a, b, +# c +# ] +# +# # good +# [ +# a, +# b, +# c +# ] +# +# # good +# [ +# a, +# b, +# foo( +# bar +# ) +# ] +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# [a, b, foo( +# bar +# )] +# @example AllowMultilineFinalElement: true +# +# # good +# [a, b, foo( +# bar +# )] +# +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#47 +class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#53 + def on_array(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#59 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#51 +RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the multiline assignments have a newline +# after the assignment operator. +# +# @example EnforcedStyle: new_line (default) +# # bad +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# begin +# compute +# rescue => e +# nil +# end +# @example EnforcedStyle: same_line +# # good +# foo = if expression +# 'bar' +# end +# @example SupportedTypes: ['block', 'case', 'class', 'if', 'kwbegin', 'module'] (default) +# # good +# foo = +# if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# i + 1 +# end +# @example SupportedTypes: ['block'] +# # good +# foo = if expression +# 'bar' +# end +# +# # good +# foo = +# [1].map do |i| +# 'bar' * i +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#60 +class RuboCop::Cop::Layout::MultilineAssignmentLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#75 + def check_assignment(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#85 + def check_by_enforced_style(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#94 + def check_new_line_offense(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#102 + def check_same_line_offense(node, rhs); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#115 + def supported_types; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#72 +RuboCop::Cop::Layout::MultilineAssignmentLayout::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#66 +RuboCop::Cop::Layout::MultilineAssignmentLayout::NEW_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_assignment_layout.rb#69 +RuboCop::Cop::Layout::MultilineAssignmentLayout::SAME_LINE_OFFENSE = T.let(T.unsafe(nil), String) + +# Checks whether the multiline do end blocks have a newline +# after the start of the block. Additionally, it checks whether the block +# arguments, if any, are on the same line as the start of the +# block. Putting block arguments on separate lines, because the whole +# line would otherwise be too long, is accepted. +# +# @example +# # bad +# blah do |i| foo(i) +# bar(i) +# end +# +# # bad +# blah do +# |i| foo(i) +# bar(i) +# end +# +# # good +# blah do |i| +# foo(i) +# bar(i) +# end +# +# # bad +# blah { |i| foo(i) +# bar(i) +# } +# +# # good +# blah { |i| +# foo(i) +# bar(i) +# } +# +# # good +# blah { | +# long_list, +# of_parameters, +# that_would_not, +# fit_on_one_line +# | +# foo(i) +# bar(i) +# } +# +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#51 +class RuboCop::Cop::Layout::MultilineBlockLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#59 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#72 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#71 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#101 + def add_offense_for_expression(node, expr, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#76 + def args_on_beginning_line?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#108 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#123 + def autocorrect_arguments(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#133 + def autocorrect_body(corrector, node, block_body); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#145 + def block_arg_string(node, args); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#93 + def characters_needed_for_space_and_pipes(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#157 + def include_trailing_comma?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#80 + def line_break_necessary_in_args?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#86 + def needed_length_for_args(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#56 +RuboCop::Cop::Layout::MultilineBlockLayout::ARG_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#55 +RuboCop::Cop::Layout::MultilineBlockLayout::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_block_layout.rb#57 +RuboCop::Cop::Layout::MultilineBlockLayout::PIPE_SIZE = T.let(T.unsafe(nil), Integer) + +# Checks that the closing brace in a hash literal is either +# on the same line as the last hash element, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a hash's opening brace is on the same line as the first element +# of the hash, then the closing brace should be on the same line as +# the last element of the hash. +# +# If a hash's opening brace is on the line above the first element +# of the hash, then the closing brace should be on the line below +# the last element of the hash. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line hash literal must be on the line +# after the last element of the hash. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line hash literal must be on the same +# line as the last element of the hash. +# +# @example EnforcedStyle: new_line +# # bad +# { +# a: 1, +# b: 2 } +# +# # bad +# { a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 +# } +# @example EnforcedStyle: same_line +# # bad +# { a: 1, +# b: 2 +# } +# +# # bad +# { +# a: 1, +# b: 2 +# } +# +# # good +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# @example EnforcedStyle: symmetrical (default) +# +# # bad +# { a: 1, +# b: 2 +# } +# # bad +# { +# a: 1, +# b: 2 } +# +# # good +# { a: 1, +# b: 2 } +# +# # good +# { +# a: 1, +# b: 2 +# } +# +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineHashBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#109 + def on_hash(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineHashBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineHashBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each key in a multi-line hash +# starts on a separate line. +# +# @example +# +# # bad +# { +# a: 1, b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: 2, +# c: 3 +# } +# +# # good +# { +# a: 1, +# b: { +# c: 3, +# } +# } +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# { a: 1, b: { +# c: 3, +# }} +# @example AllowMultilineFinalElement: true +# +# # good +# { a: 1, b: { +# c: 3, +# }} +# +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#46 +class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#52 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#68 + def ignore_last_element?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#64 + def starts_with_curly_brace?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#50 +RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Ensures that each argument in a multi-line method call +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. +# +# @example +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo(a, b, { +# foo: "bar", +# }) +# +# # good +# foo( +# a, +# b, +# c +# ) +# +# # good +# foo(a, b, c) +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# foo(a, b, +# c +# ) +# +# # bad +# foo( +# a, b, { +# foo: "bar", +# } +# ) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# @example AllowMultilineFinalElement: true +# +# # bad +# foo(a, b, +# c +# ) +# +# # good +# foo( +# a, b, { +# foo: "bar", +# } +# ) +# +# # good +# foo( +# a, +# b, +# { +# foo: "bar", +# } +# ) +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#80 +class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#102 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#86 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#106 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#84 +RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks that the closing brace in a method call is either +# on the same line as the last method argument, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method call's opening brace is on the same line as the first +# argument of the call, then the closing brace should be on the same +# line as the last argument of the call. +# +# If a method call's opening brace is on the line above the first +# argument of the call, then the closing brace should be on the line +# below the last argument of the call. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method call must be on the line +# after the last argument of the call. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method call must be on the same +# line as the last argument of the call. +# +# @example EnforcedStyle: new_line +# # bad +# foo( +# a, +# b) +# +# # bad +# foo(a, +# b) +# +# # good +# foo(a, +# b +# ) +# +# # good +# foo( +# a, +# b +# ) +# @example EnforcedStyle: same_line +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# @example EnforcedStyle: symmetrical (default) +# # bad +# foo(a, +# b +# ) +# +# # bad +# foo( +# a, +# b) +# +# # good +# foo(a, +# b) +# +# # good +# foo( +# a, +# b +# ) +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#91 +class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#112 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#116 + def children(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#120 + def ignored_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#124 + def single_line_ignoring_receiver?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#103 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#106 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#99 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#95 +RuboCop::Cop::Layout::MultilineMethodCallBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Checks the indentation of the method name part in method calls +# that span more than one line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# while myvariable +# .b +# # do something +# end +# +# # good +# while myvariable +# .b +# # do something +# end +# +# # good +# Thing.a +# .b +# .c +# @example EnforcedStyle: indented +# # good +# while myvariable +# .b +# +# # do something +# end +# @example EnforcedStyle: indented_relative_to_receiver +# # good +# while myvariable +# .a +# .b +# +# # do something +# end +# +# # good +# myvariable = Thing +# .a +# .b +# .c +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#50 +class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#57 + def validate_config; end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#230 + def align_with_base_message(rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#169 + def aligned_with_first_line_dot?(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#252 + def alignment_base(node, rhs, given_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#311 + def alignment_base_for_chained_receiver?(receiver_chain, base_receiver); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#83 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#234 + def base_source; end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#192 + def calculate_column_delta_offense(rhs, correct_column); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#154 + def check_hash_pair_indentation(node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#145 + def check_hash_pair_indented_style(rhs, pair_ancestor); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#179 + def check_regular_indentation(node, lhs, rhs, given_style); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#98 + def correct_block(corrector, block_node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#92 + def correct_selector_only(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#197 + def extra_indentation(given_style, parent); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#69 + def find_base_receiver(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#356 + def find_continuation_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#299 + def find_hash_method_base_in_receiver_chain(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#161 + def find_hash_pair_alignment_base(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#350 + def find_multiline_block_chain_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#75 + def find_pair_ancestor(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#324 + def first_call_alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#380 + def first_call_has_a_dot(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#341 + def get_dot_right_above(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#370 + def handle_descendant_block(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#137 + def hash_pair_aligned?(pair_ancestor, given_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#141 + def hash_pair_indented?(node, pair_ancestor, given_style); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#207 + def message(node, lhs, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#335 + def method_on_receiver_last_line?(node, base_receiver, type); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#238 + def no_base_message(lhs, rhs, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#120 + def offending_range(node, lhs, rhs, given_style); end + + # @yield [operation_rhs.first_argument] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#387 + def operation_rhs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#397 + def operator_rhs?(node, receiver); end + + # a + # .b + # .c + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#291 + def receiver_alignment_base(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#225 + def relative_to_receiver_message(rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#104 + def relevant_node?(send_node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#108 + def right_hand_side(send_node); end + + # a.b + # .c + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#279 + def semantic_alignment_base(node, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#316 + def semantic_alignment_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#221 + def should_align_with_base?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217 + def should_indent_relative_to_receiver?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#366 + def single_line_block_receiver?(receiver); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#261 + def syntactic_alignment_base(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#79 + def unwrap_block_node(node); end +end + +# Checks that the closing brace in a method definition is either +# on the same line as the last method parameter, or a new line. +# +# When using the `symmetrical` (default) style: +# +# If a method definition's opening brace is on the same line as the +# first parameter of the definition, then the closing brace should be +# on the same line as the last parameter of the definition. +# +# If a method definition's opening brace is on the line above the first +# parameter of the definition, then the closing brace should be on the +# line below the last parameter of the definition. +# +# When using the `new_line` style: +# +# The closing brace of a multi-line method definition must be on the line +# after the last parameter of the definition. +# +# When using the `same_line` style: +# +# The closing brace of a multi-line method definition must be on the same +# line as the last parameter of the definition. +# +# @example EnforcedStyle: new_line +# # bad +# def foo( +# a, +# b) +# end +# +# # bad +# def foo(a, +# b) +# end +# +# # good +# def foo(a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# @example EnforcedStyle: same_line +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b +# ) +# end +# +# # good +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# @example EnforcedStyle: symmetrical (default) +# # bad +# def foo(a, +# b +# ) +# end +# +# # bad +# def foo( +# a, +# b) +# end +# +# # good +# def foo(a, +# b) +# end +# +# # good +# def foo( +# a, +# b +# ) +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#103 +class RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#121 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#124 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#115 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#118 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::ALWAYS_SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#111 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::NEW_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb#107 +RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsafe(nil), String) + +# Ensures that each parameter in a multi-line method definition +# starts on a separate line. +# +# NOTE: This cop does not move the first argument, if you want that to +# be on a separate line, see `Layout/FirstMethodParameterLineBreak`. +# +# @example +# +# # bad +# def foo(a, b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b, +# c +# ) +# end +# +# # good +# def foo( +# a, +# b = { +# foo: "bar", +# } +# ) +# end +# +# # good +# def foo(a, b, c) +# end +# @example AllowMultilineFinalElement: false (default) +# +# # bad +# def foo(a, b = { +# foo: "bar", +# }) +# end +# @example AllowMultilineFinalElement: true +# +# # good +# def foo(a, b = { +# foo: "bar", +# }) +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#57 +class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MultilineElementLineBreaks + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#68 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#72 + def ignore_last_element?; end +end + +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#61 +RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) + +# Checks the indentation of the right hand side operand in binary operations that +# span more than one line. +# +# The `aligned` style checks that operators are aligned if they are part of an `if` or `while` +# condition, an explicit `return` statement, etc. In other contexts, the second operand should +# be indented regardless of enforced style. +# +# In both styles, operators should be aligned when an assignment begins on the next line. +# +# @example EnforcedStyle: aligned (default) +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# @example EnforcedStyle: indented +# # bad +# if a + +# b +# something && +# something_else +# end +# +# # good +# if a + +# b +# something && +# something_else +# end +# +# source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#45 +class RuboCop::Cop::Layout::MultilineOperationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::MultilineExpressionIndentation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#51 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#55 + def on_or(node); end + + # @raise [ValidationError] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#59 + def validate_config; end + + private + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#80 + def check_and_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#113 + def message(node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#85 + def offending_range(node, lhs, rhs, given_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#74 + def relevant_node?(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#124 + def right_hand_side(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/multiline_operation_indentation.rb#98 + def should_align?(node, rhs, given_style); end +end + +# Checks that the parameters on a multi-line method call or definition are aligned. +# +# To set the alignment of the first argument, use the +# `Layout/FirstParameterIndentation` cop. +# +# @example EnforcedStyle: with_first_parameter (default) +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# @example EnforcedStyle: with_fixed_indentation +# # good +# +# def foo(bar, +# baz) +# 123 +# end +# +# def foo( +# bar, +# baz +# ) +# 123 +# end +# +# # bad +# +# def foo(bar, +# baz) +# 123 +# end +# +# # bad +# +# def foo( +# bar, +# baz) +# 123 +# end +# +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#70 +class RuboCop::Cop::Layout::ParameterAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#80 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#85 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#89 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#101 + def base_column(node, args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#97 + def fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#93 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#112 + def target_method_lineno(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#74 +RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/parameter_alignment.rb#77 +RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String) + +# Checks whether certain expressions, e.g. method calls, that could fit +# completely on a single line, are broken up into multiple lines unnecessarily. +# +# @example +# # bad +# foo( +# a, +# b +# ) +# +# # good +# foo(a, b) +# +# # bad +# puts 'string that fits on ' \ +# 'a single line' +# +# # good +# puts 'string that fits on a single line' +# +# # bad +# things +# .select { |thing| thing.cond? } +# .join('-') +# +# # good +# things.select { |thing| thing.cond? }.join('-') +# @example InspectBlocks: false (default) +# # good +# foo(a) do |x| +# puts x +# end +# @example InspectBlocks: true +# # bad +# foo(a) do |x| +# puts x +# end +# +# # good +# foo(a) { |x| puts x } +# +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#49 +class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckAssignment + include ::RuboCop::Cop::CheckSingleLineSuitability + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#56 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#60 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#78 + def check_assignment(node, _rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#108 + def configured_to_not_be_inspected?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#125 + def convertible_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#74 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#102 + def index_access_call_chained?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#91 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#115 + def other_cop_takes_precedence?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#84 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#98 + def require_backslash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#121 + def single_line_block_chain_enabled?; end +end + +# source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#54 +RuboCop::Cop::Layout::RedundantLineBreak::MSG = T.let(T.unsafe(nil), String) + +# Checks whether the rescue and ensure keywords are aligned +# properly. +# +# @example +# +# # bad +# begin +# something +# rescue +# puts 'error' +# end +# +# # good +# begin +# something +# rescue +# puts 'error' +# end +# +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#24 +class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::EndKeywordAlignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#39 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#43 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#35 + def on_resbody(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#187 + def access_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#165 + def access_modifier_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#151 + def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#138 + def aligned_with_line_break_method?(ancestor_node, node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#196 + def alignment_location(alignment_node); end + + # We will use ancestor or wrapper with access modifier. + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#118 + def alignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#95 + def alignment_source(node, starting_loc); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#134 + def ancestor_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#157 + def assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#72 + def autocorrect(corrector, node, alignment_location); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#212 + def begin_end_alignment_style; end + + # Check alignment of node with rescue or ensure modifiers. + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#56 + def check(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#82 + def format_message(alignment_node, alignment_loc, kw_loc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#174 + def modifier?(node); end + + # source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#180 + def whitespace_range(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#33 +RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#32 +RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/rescue_ensure_alignment.rb#29 +RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String) + +# Checks if method calls are chained onto single line blocks. It considers that a +# line break before the dot improves the readability of the code. +# +# @example +# # bad +# example.select { |item| item.cond? }.join('-') +# +# # good +# example.select { |item| item.cond? } +# .join('-') +# +# # good (not a concern for this cop) +# example.select do |item| +# item.cond? +# end.join('-') +# +# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#22 +class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#36 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#56 + def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#40 + def offending_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#62 + def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 +RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for colon (`:`) not followed by some kind of space. +# N.B. this cop does not handle spaces after a ternary operator, which are +# instead handled by `Layout/SpaceAroundOperators`. +# +# @example +# # bad +# def f(a:, b:2); {a:3}; end +# +# # good +# def f(a:, b: 2); {a: 3}; end +# +# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#16 +class RuboCop::Cop::Layout::SpaceAfterColon < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#29 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#21 + def on_pair(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#43 + def followed_by_space?(colon); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#39 + def register_offense(colon); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#19 +RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) + +# Checks for comma (`,`) not followed by some kind of space. +# +# @example +# +# # bad +# [1,2] +# { foo:bar,} +# +# # good +# [1, 2] +# { foo:bar, } +# +# source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#17 +class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#26 + def kind(token, next_token); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 + def space_style_before_rcurly; end +end + +# Checks for space between a method name and a left parenthesis in defs. +# +# @example +# +# # bad +# def func (x) end +# def method= (y) end +# +# # good +# def func(x) end +# def method=(y) end +# +# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#17 +class RuboCop::Cop::Layout::SpaceAfterMethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#23 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#35 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_method_name.rb#21 +RuboCop::Cop::Layout::SpaceAfterMethodName::MSG = T.let(T.unsafe(nil), String) + +# Checks for space after `!`. +# +# @example +# # bad +# ! something +# +# # good +# !something +# +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#14 +class RuboCop::Cop::Layout::SpaceAfterNot < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#21 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#33 + def whitespace_after_operator?(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#18 +RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#19 +RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for semicolon (`;`) not followed by some kind of space. +# +# @example +# # bad +# x = 1;y = 2 +# +# # good +# x = 1; y = 2 +# +# source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#14 +class RuboCop::Cop::Layout::SpaceAfterSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SpaceAfterPunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#23 + def kind(token, _next_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#27 + def space_missing?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#18 + def space_style_before_rcurly; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_semicolon.rb#33 + def semicolon_sequence?(token, next_token); end +end + +# Checks the spacing inside and after block parameters pipes. Line breaks +# inside parameter pipes are checked by `Layout/MultilineBlockLayout` and +# not by this cop. +# +# @example EnforcedStyleInsidePipes: no_space (default) +# # bad +# {}.each { | x, y |puts x } +# ->( x, y ) { puts x } +# +# # good +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# @example EnforcedStyleInsidePipes: space +# # bad +# {}.each { |x, y| puts x } +# ->(x, y) { puts x } +# +# # good +# {}.each { | x, y | puts x } +# ->( x, y ) { puts x } +# +# source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#27 +class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#32 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#65 + def check_after_closing_pipe(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#125 + def check_arg(arg); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#103 + def check_closing_pipe_space(arguments, closing_pipe); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#121 + def check_each_arg(args); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#56 + def check_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#150 + def check_no_space(space_begin_pos, space_end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#73 + def check_no_space_style_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#92 + def check_opening_pipe_space(arguments, opening_pipe); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#136 + def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#85 + def check_space_style_inside_pipes(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#113 + def last_end_pos_inside_pipes(arguments, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#44 + def pipes(arguments); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#48 + def pipes?(arguments); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_block_parameters.rb#52 + def style_parameter_name; end +end + +# Checks that the equals signs in parameter default assignments +# have or don't have surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space +# # bad +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# # good +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# @example EnforcedStyle: space (default) +# # bad +# def some_method(arg1=:default, arg2=nil, arg3=[]) +# # do something... +# end +# +# # good +# def some_method(arg1 = :default, arg2 = nil, arg3 = []) +# # do something... +# end +# +# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#30 +class RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#38 + def on_optarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#67 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#46 + def check_optarg(arg, equals, value); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#58 + def incorrect_style_detected(arg, value); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#83 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#79 + def no_surrounding_space?(arg, equals); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#75 + def space_on_both_sides?(arg, equals); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb#36 +RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe(nil), String) + +# Checks the spacing around the keywords. +# +# @example +# +# # bad +# something 'test'do|x| +# end +# +# while(something) +# end +# +# something = 123if test +# +# return(foo + bar) +# +# # good +# something 'test' do |x| +# end +# +# while (something) +# end +# +# something = 123 if test +# +# return (foo + bar) +# +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#32 +class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#46 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#50 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#54 + def on_break(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#58 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#62 + def on_case_match(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#162 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#66 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#70 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#74 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#78 + def on_if_guard(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#82 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#86 + def on_kwbegin(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#91 + def on_match_pattern(node); end + + # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#98 + def on_match_pattern_p(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#102 + def on_next(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#106 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#110 + def on_postexe(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#114 + def on_preexe(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#118 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#122 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#126 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#130 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#134 + def on_super(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#142 + def on_unless_guard(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#146 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#150 + def on_when(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#154 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#158 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#138 + def on_zsuper(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#241 + def accept_left_parenthesis?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#245 + def accept_left_square_bracket?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#249 + def accept_namespace_operator?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#234 + def accepted_opening_delimiter?(range, char); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#168 + def check(node, locations, begin_keyword = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#183 + def check_begin(node, range, begin_keyword); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#189 + def check_end(node, range, begin_keyword); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#202 + def check_keyword(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#198 + def do?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#257 + def namespace_operator?(range, pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#261 + def preceded_by_operator?(node, _range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#253 + def safe_navigation_call?(range, pos); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#223 + def space_after_missing?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#216 + def space_before_missing?(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#41 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_PAREN = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#42 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_LEFT_SQUARE_BRACKET = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#43 +RuboCop::Cop::Layout::SpaceAroundKeyword::ACCEPT_NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#38 +RuboCop::Cop::Layout::SpaceAroundKeyword::DO = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#36 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_AFTER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#35 +RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#40 +RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#44 +RuboCop::Cop::Layout::SpaceAroundKeyword::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#39 +RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) + +# Checks method call operators to not have spaces around them. +# +# @example +# # bad +# foo. bar +# foo .bar +# foo . bar +# foo. bar .buzz +# foo +# . bar +# . buzz +# foo&. bar +# foo &.bar +# foo &. bar +# foo &. bar&. buzz +# RuboCop:: Cop +# RuboCop:: Cop:: Base +# :: RuboCop::Cop +# +# # good +# foo.bar +# foo.bar.buzz +# foo +# .bar +# .buzz +# foo&.bar +# foo&.bar&.buzz +# RuboCop::Cop +# RuboCop::Cop::Base +# ::RuboCop::Cop +# +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 +class RuboCop::Cop::Layout::SpaceAroundMethodCallOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#53 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#51 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#45 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#87 + def check_space(begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#67 + def check_space_after_dot(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#81 + def check_space_after_double_colon(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#61 + def check_space_before_dot(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#43 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#41 +RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Checks that operators have space around them, except for ** which +# should or shouldn't have surrounding space depending on configuration. +# It allows vertical alignment consisting of one or more whitespace +# around operators. +# +# This cop has `AllowForAlignment` option. When `true`, allows most +# uses of extra spacing if the intent is to align with an operator on +# the previous or next line, not counting empty lines or comment lines. +# +# @example +# # bad +# total = 3*4 +# "apple"+"juice" +# my_number = 38/4 +# +# # good +# total = 3 * 4 +# "apple" + "juice" +# my_number = 38 / 4 +# @example AllowForAlignment: false +# # bad +# { +# 1 => 2, +# 11 => 3 +# } +# @example AllowForAlignment: true (default) +# # good +# { +# 1 => 2, +# 11 => 3 +# } +# @example EnforcedStyleForExponentOperator: no_space (default) +# # bad +# a ** b +# +# # good +# a**b +# @example EnforcedStyleForExponentOperator: space +# # bad +# a**b +# +# # good +# a ** b +# @example EnforcedStyleForRationalLiterals: no_space (default) +# # bad +# 1 / 48r +# +# # good +# 1/48r +# @example EnforcedStyleForRationalLiterals: space +# # bad +# 1/48r +# +# # good +# 1 / 48r +# +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67 +class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RationalLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#163 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#171 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#115 + def on_assignment(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#132 + def on_binary(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#165 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#124 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#168 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#167 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#164 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#166 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#154 + def on_match_alt(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#158 + def on_match_as(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#148 + def on_match_pattern(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#172 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#162 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#170 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#105 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#140 + def on_setter_method(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#266 + def align_hash_cop_config; end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#205 + def autocorrect(corrector, range, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#186 + def check_operator(type, operator, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#219 + def enclose_operator_with_space(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#246 + def excess_leading_space?(type, operator, with_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#261 + def excess_trailing_space?(right_operand, with_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#287 + def force_equal_sign_alignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#270 + def hash_table_style?; end + + # @yield [msg] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#200 + def offense(type, operator, with_space, right_operand); end + + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#232 + def offense_message(type, operator, with_space, right_operand); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#182 + def operator_with_regular_syntax?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#176 + def regular_operator?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#291 + def should_not_have_surrounding_space?(operator, right_operand); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277 + def space_around_exponent_operator?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281 + def space_around_slash_operator?(right_operand); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74 +RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73 +RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that block braces have or don't have a space before the opening +# brace depending on configuration. +# +# @example EnforcedStyle: no_space +# # bad +# foo.map { |a| +# a.bar.to_s +# } +# +# # good +# foo.map{ |a| +# a.bar.to_s +# } +# @example EnforcedStyle: space (default) +# # bad +# foo.map{ |a| +# a.bar.to_s +# } +# +# # good +# foo.map { |a| +# a.bar.to_s +# } +# @example EnforcedStyleForEmptyBraces: no_space +# # bad +# 7.times {} +# +# # good +# 7.times{} +# @example EnforcedStyleForEmptyBraces: space (default) +# # bad +# 7.times{} +# +# # good +# 7.times {} +# +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#44 +class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#56 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#80 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#79 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#134 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#154 + def block_delimiters_style; end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#84 + def check_empty(left_brace, space_plus_brace, used_style); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#110 + def check_non_empty(left_brace, space_plus_brace, used_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#150 + def conflict_with_block_delimiters?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#158 + def empty_braces?(loc); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#102 + def handle_different_styles_for_empty_braces(used_style); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#125 + def space_detected(left_brace, space_plus_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#118 + def space_missing(left_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#141 + def style_for_empty_braces; end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#52 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#50 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::DETECTED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#49 +RuboCop::Cop::Layout::SpaceBeforeBlockBraces::MISSING_MSG = T.let(T.unsafe(nil), String) + +# Checks for space between the name of a receiver and a left +# brackets. +# +# @example +# +# # bad +# collection [index_or_key] +# +# # good +# collection[index_or_key] +# +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#17 +class RuboCop::Cop::Layout::SpaceBeforeBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#24 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#21 +RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#22 +RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for comma (`,`) preceded by space. +# +# @example +# # bad +# [1 , 2 , 3] +# a(1 , 2) +# each { |a , b| } +# +# # good +# [1, 2, 3] +# a(1, 2) +# each { |a, b| } +# +# source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#19 +class RuboCop::Cop::Layout::SpaceBeforeComma < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_comma.rb#23 + def kind(token); end +end + +# Checks for missing space between a token and a comment on the +# same line. +# +# @example +# # bad +# 1 + 1# this operation does ... +# +# # good +# 1 + 1 # this operation does ... +# +# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#15 +class RuboCop::Cop::Layout::SpaceBeforeComment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#20 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_comment.rb#18 +RuboCop::Cop::Layout::SpaceBeforeComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that exactly one space is used between a method name and the +# first argument for method calls without parentheses. +# +# Alternatively, extra spaces can be added to align the argument with +# something on a preceding or following line, if the AllowForAlignment +# config parameter is true. +# +# @example +# # bad +# something x +# something y, z +# something'hello' +# +# # good +# something x +# something y, z +# something 'hello' +# +# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#24 +class RuboCop::Cop::Layout::SpaceBeforeFirstArg < ::RuboCop::Cop::Base + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#55 + def expect_params_after_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#64 + def no_space_between_method_name_and_first_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#51 + def regular_method_call_with_arguments?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#29 +RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) + +# Checks for semicolon (`;`) preceded by space. +# +# @example +# # bad +# x = 1 ; y = 2 +# +# # good +# x = 1; y = 2 +# +# source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#14 +class RuboCop::Cop::Layout::SpaceBeforeSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SpaceBeforePunctuation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_before_semicolon.rb#18 + def kind(token); end +end + +# Checks for spaces between `->` and opening parameter +# parenthesis (`(`) in lambda literals. +# +# @example EnforcedStyle: require_no_space (default) +# # bad +# a = -> (x, y) { x + y } +# +# # good +# a = ->(x, y) { x + y } +# @example EnforcedStyle: require_space +# # bad +# a = ->(x, y) { x + y } +# +# # good +# a = -> (x, y) { x + y } +# +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#22 +class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#30 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#50 + def arrow_lambda_with_args?(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#72 + def lambda_arguments(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#65 + def range_of_offense(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#58 + def space_after_arrow(lambda_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#54 + def space_after_arrow?(lambda_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#28 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_NO_SPACE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_in_lambda_literal.rb#27 +RuboCop::Cop::Layout::SpaceInLambdaLiteral::MSG_REQUIRE_SPACE = T.let(T.unsafe(nil), String) + +# Checks that brackets used for array literals have or don't have +# surrounding space depending on configuration. +# +# Array pattern matching is handled in the same way. +# +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # array brackets, with the exception that successive left +# # or right brackets are collapsed together in nested arrays. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ] ] +# array = [ +# [ a ], +# [ b, c ] +# ] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# array = [[ a ], +# [ b, c ]] +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that array literals have +# # no surrounding space. +# +# # bad +# array = [ a, b, c, d ] +# array = [ a, [ b, c ]] +# +# # good +# array = [a, b, c, d] +# array = [a, [b, c]] +# @example EnforcedStyle: space +# # The `space` style enforces that array literals have +# # surrounding space. +# +# # bad +# array = [a, b, c, d] +# array = [ a, [ b, c ]] +# +# # good +# array = [ a, b, c, d ] +# array = [ a, [ b, c ] ] +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets do not contain spaces. +# +# # bad +# foo = [ ] +# bar = [ ] +# +# # good +# foo = [] +# bar = [] +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty array brackets contain exactly one space. +# +# # bad +# foo = [] +# bar = [ ] +# +# # good +# foo = [ ] +# bar = [ ] +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#78 +class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#86 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#102 + def on_array_pattern(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#124 + def array_brackets(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#110 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#232 + def compact(corrector, bracket, side); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#218 + def compact_corrections(corrector, node, left, right); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#210 + def compact_offense(node, token, side: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#172 + def compact_offenses(node, left, right, start_ok, end_ok); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#133 + def empty_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#141 + def end_has_own_line?(token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#106 + def find_node_with_brackets(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#148 + def index_for(node, token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#156 + def issue_offenses(node, left, right, start_ok, end_ok); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#152 + def line_and_column_for(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#193 + def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#204 + def next_to_bracket?(token, side: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#168 + def next_to_comment?(node, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#137 + def next_to_newline?(node, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#185 + def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#84 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb#83 +RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside array percent literals +# (i.e. %i/%w). +# +# Note that blank percent literals (e.g. `%i( )`) are checked by +# `Layout/SpaceInsidePercentLiteralDelimiters`. +# +# @example +# +# # bad +# %w(foo bar baz) +# # good +# %i(foo bar baz) +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#18 +class RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#26 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#30 + def on_percent_literal(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#40 + def each_unnecessary_space_match(node, &blk); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#23 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_array_percent_literal.rb#24 +RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral::MULTIPLE_SPACES_BETWEEN_ITEMS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks that block braces have or don't have surrounding space inside +# them on configuration. For blocks taking parameters, it checks that the +# left brace has or doesn't have trailing space depending on +# configuration. +# +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that block braces don't +# # have surrounding space. +# +# # bad +# some_array.each { puts e } +# +# # good +# some_array.each {puts e} +# @example EnforcedStyle: space (default) +# # The `space` style enforces that block braces have +# # surrounding space. +# +# # bad +# some_array.each {puts e} +# +# # good +# some_array.each { puts e } +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # block braces don't have a space in between when empty. +# +# # bad +# some_array.each { } +# some_array.each { } +# some_array.each { } +# +# # good +# some_array.each {} +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # block braces have at least a space in between when empty. +# +# # bad +# some_array.each {} +# +# # good +# some_array.each { } +# some_array.each { } +# some_array.each { } +# @example SpaceBeforeBlockParameters: false +# # The SpaceBeforeBlockParameters style set to `false` enforces that +# # there is no space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each { |n| n * 2 } +# +# # good +# [1, 2, 3].each {|n| n * 2 } +# @example SpaceBeforeBlockParameters: true (default) +# # The SpaceBeforeBlockParameters style set to `true` enforces that +# # there is a space between `{` and `|`. Overrides `EnforcedStyle` +# # if there is a conflict. +# +# # bad +# [1, 2, 3].each {|n| n * 2 } +# +# # good +# [1, 2, 3].each { |n| n * 2 } +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#79 +class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#89 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#106 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#105 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#127 + def adjacent_braces(left_brace, right_brace); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#166 + def aligned_braces?(inner, right_brace, column); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#135 + def braces_with_contents_inside(node, inner); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#110 + def check_inside(node, left_brace, right_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#142 + def check_left_brace(inner, left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#150 + def check_right_brace(node, inner, left_brace, right_brace, single_line); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#170 + def inner_last_space_count(inner); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#162 + def multiline_block?(left_brace, right_brace); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#227 + def no_space(begin_pos, end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#174 + def no_space_inside_left_brace(left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#243 + def offense(begin_pos, end_pos, msg, style_param = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#206 + def pipe?(args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#235 + def space(begin_pos, end_pos, msg); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#191 + def space_inside_left_brace(left_brace, args_delimiter); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#210 + def space_inside_right_brace(inner, right_brace, column); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#258 + def style_for_empty_braces; end + + class << self + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#85 + def autocorrect_incompatible_with; end + end +end + +# Checks that braces used for hash literals have or don't have +# surrounding space depending on configuration. +# +# Hash pattern matching is handled in the same way. +# +# @example EnforcedStyle: compact +# # The `compact` style normally requires a space inside +# # hash braces, with the exception that successive left +# # braces or right braces are collapsed together in nested hashes. +# +# # bad +# h = { a: { b: 2 } } +# foo = { { a: 1 } => { b: { c: 2 } } } +# +# # good +# h = { a: { b: 2 }} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# @example EnforcedStyle: no_space +# # The `no_space` style enforces that hash literals have +# # no surrounding space. +# +# # bad +# h = { a: 1, b: 2 } +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# # good +# h = {a: 1, b: 2} +# foo = {{a: 1} => {b: {c: 2}}} +# @example EnforcedStyle: space (default) +# # The `space` style enforces that hash literals have +# # surrounding space. +# +# # bad +# h = {a: 1, b: 2} +# foo = {{ a: 1 } => { b: { c: 2 }}} +# +# # good +# h = { a: 1, b: 2 } +# foo = { { a: 1 } => { b: { c: 2 } } } +# @example EnforcedStyleForEmptyBraces: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces do not contain spaces. +# +# # bad +# foo = { } +# bar = { } +# baz = { +# } +# +# # good +# foo = {} +# bar = {} +# baz = {} +# @example EnforcedStyleForEmptyBraces: space +# # The `space` EnforcedStyleForEmptyBraces style enforces that +# # empty hash braces contain space. +# +# # bad +# foo = {} +# +# # good +# foo = { } +# foo = { } +# foo = { +# } +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#76 +class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#84 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#92 + def on_hash_pattern(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#144 + def ambiguous_or_unexpected_style_detected(style, is_match); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#136 + def autocorrect(corrector, range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#96 + def check(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#191 + def check_whitespace_only_hash(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#209 + def enforce_no_space_style_for_empty_braces?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#111 + def expect_space?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#124 + def incorrect_style_detected(token1, token2, expect_space, is_empty_braces); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#157 + def message(brace, is_empty_braces, expect_space); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#152 + def offense?(token1, expect_space); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#203 + def range_inside_hash(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#183 + def range_of_space_to_the_left(range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#175 + def range_of_space_to_the_right(range); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#167 + def space_range(token_range); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb#82 +RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside ordinary round parentheses. +# +# @example EnforcedStyle: compact +# # The `compact` style enforces that parentheses have a space at the +# # beginning with the exception that successive parentheses are allowed. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# g( f( x ) ) +# g( f( x( 3 ) ), 5 ) +# g( ( ( 3 + 5 ) * f) ** x, 5 ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# g( f( x )) +# g( f( x( 3 )), 5 ) +# g((( 3 + 5 ) * f ) ** x, 5 ) +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that parentheses do not have spaces. +# +# # bad +# f( 3) +# g = (a + 3 ) +# f( ) +# +# # good +# f(3) +# g = (a + 3) +# f() +# @example EnforcedStyle: space +# # The `space` style enforces that parentheses have a space at the +# # beginning and end. +# # Note: Empty parentheses should not have spaces. +# +# # bad +# f(3) +# g = (a + 3) +# y( ) +# +# # good +# f( 3 ) +# g = ( a + 3 ) +# y() +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#57 +class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#66 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#161 + def can_be_ignored?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#99 + def correct_extraneous_space(tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#115 + def correct_extraneous_space_between_consecutive_parens(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#124 + def correct_extraneous_space_in_empty_parens(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#135 + def correct_missing_space(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#153 + def left_parens?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#149 + def parens?(token1, token2); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#88 + def process_with_compact_style(tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#81 + def process_with_space_style(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#157 + def right_parens?(token1, token2); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#63 +RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_parens.rb#64 +RuboCop::Cop::Layout::SpaceInsideParens::MSG_SPACE = T.let(T.unsafe(nil), String) + +# Checks for unnecessary additional spaces inside the delimiters of +# %i/%w/%x literals. +# +# @example +# +# # bad +# %i( foo bar baz ) +# +# # good +# %i(foo bar baz) +# +# # bad +# %w( foo bar baz ) +# +# # good +# %w(foo bar baz) +# +# # bad +# %x( ls -l ) +# +# # good +# %x(ls -l) +# +# # bad +# %w( ) +# %w( +# ) +# +# # good +# %w() +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#36 +class RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#45 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#53 + def on_percent_literal(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#49 + def on_xstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#60 + def add_offenses_for_blank_spaces(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#69 + def add_offenses_for_unnecessary_spaces(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#85 + def body_range(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#79 + def regex_matches(node, &blk); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#42 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::BEGIN_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#43 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::END_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb#41 +RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters::MSG = T.let(T.unsafe(nil), String) + +# Checks for spaces inside range literals. +# +# @example +# # bad +# 1 .. 3 +# +# # good +# 1..3 +# +# # bad +# 'a' .. 'z' +# +# # good +# 'a'..'z' +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#20 +class RuboCop::Cop::Layout::SpaceInsideRangeLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#29 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#25 + def on_irange(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#35 + def check(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_range_literal.rb#23 +RuboCop::Cop::Layout::SpaceInsideRangeLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks that reference brackets have or don't have +# surrounding space depending on configuration. +# +# @example EnforcedStyle: no_space (default) +# # The `no_space` style enforces that reference brackets have +# # no surrounding space. +# +# # bad +# hash[ :key ] +# array[ index ] +# +# # good +# hash[:key] +# array[index] +# @example EnforcedStyle: space +# # The `space` style enforces that reference brackets have +# # surrounding space. +# +# # bad +# hash[:key] +# array[index] +# +# # good +# hash[ :key ] +# array[ index ] +# @example EnforcedStyleForEmptyBrackets: no_space (default) +# # The `no_space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets do not contain spaces. +# +# # bad +# foo[ ] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[] +# @example EnforcedStyleForEmptyBrackets: space +# # The `space` EnforcedStyleForEmptyBrackets style enforces that +# # empty reference brackets contain exactly one space. +# +# # bad +# foo[] +# foo[ ] +# foo[ +# ] +# +# # good +# foo[ ] +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#60 +class RuboCop::Cop::Layout::SpaceInsideReferenceBrackets < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#70 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#92 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#121 + def closing_bracket(tokens, opening_bracket); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#137 + def empty_config; end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#110 + def left_ref_bracket(node, tokens); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#132 + def previous_token(current_token); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#104 + def reference_brackets(node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#66 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#65 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/layout/space_inside_reference_brackets.rb#68 +RuboCop::Cop::Layout::SpaceInsideReferenceBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for whitespace within string interpolations. +# +# @example EnforcedStyle: no_space (default) +# # bad +# var = "This is the #{ space } example" +# +# # good +# var = "This is the #{no_space} example" +# @example EnforcedStyle: space +# # bad +# var = "This is the #{no_space} example" +# +# # good +# var = "This is the #{ space } example" +# +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#21 +class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 + def on_interpolation(begin_node); end + + private + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#45 + def autocorrect(corrector, begin_node); end + + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#55 + def delimiters(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#27 +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Looks for trailing blank lines and a final newline in the +# source code. +# +# @example EnforcedStyle: final_blank_line +# # `final_blank_line` looks for one blank line followed by a new line +# # at the end of files. +# +# # bad +# class Foo; end +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# +# # EOF +# @example EnforcedStyle: final_newline (default) +# # `final_newline` looks for one newline at the end of files. +# +# # bad +# class Foo; end +# +# # EOF +# +# # bad +# class Foo; end # EOF +# +# # good +# class Foo; end +# # EOF +# +# source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#40 +class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#45 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 + def ends_in_end?(processed_source); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 + def message(wanted_blank_lines, blank_lines); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 + def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end +end + +# Looks for trailing whitespace in the source code. +# +# @example +# # The line in this example contains spaces after the 0. +# # bad +# x = 0 +# +# # The line in this example ends directly after the 0. +# # good +# x = 0 +# @example AllowInHeredoc: false (default) +# # The line in this example contains spaces after the 0. +# # bad +# code = <<~RUBY +# x = 0 +# RUBY +# +# # ok +# code = <<~RUBY +# x = 0 #{} +# RUBY +# +# # good +# trailing_whitespace = ' ' +# code = <<~RUBY +# x = 0#{trailing_whitespace} +# RUBY +# @example AllowInHeredoc: true +# # The line in this example contains spaces after the 0. +# # good +# code = <<~RUBY +# x = 0 +# RUBY +# +# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#42 +class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#57 + def on_heredoc(_node); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#49 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#112 + def extract_heredocs(ast); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#103 + def find_heredoc(line_number); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#108 + def heredocs; end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#125 + def offense_range(lineno, line); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#61 + def process_line(line, lineno); end + + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#75 + def process_line_in_heredoc(corrector, range, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#99 + def skip_heredoc?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#95 + def static?(heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#86 + def whitespace_is_indentation?(range, level); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#90 + def whitespace_only?(range); end +end + +# source://rubocop//lib/rubocop/cop/layout/trailing_whitespace.rb#47 +RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#5 +module RuboCop::Cop::Legacy; end + +# Legacy support for Corrector#corrections +# See https://docs.rubocop.org/rubocop/v1_upgrade_notes.html +# +# source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#8 +class RuboCop::Cop::Legacy::CorrectionsProxy + # @return [CorrectionsProxy] a new instance of CorrectionsProxy + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#9 + def initialize(corrector); end + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#13 + def <<(callable); end + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#21 + def concat(corrections); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#17 + def empty?; end + + protected + + # Returns the value of attribute corrector. + # + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#31 + def corrector; end + + private + + # source://rubocop//lib/rubocop/cop/legacy/corrections_proxy.rb#35 + def suppress_clobbering; end +end + +# This class handles autocorrection for code that needs to be moved +# to new lines. +# +# source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#7 +class RuboCop::Cop::LineBreakCorrector + extend ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::TrailingBody + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#27 + def break_line_before(range:, node:, corrector:, configured_width:, indent_steps: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#15 + def correct_trailing_body(configured_width:, corrector:, node:, processed_source:); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#35 + def move_comment(eol_comment:, node:, corrector:); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#13 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#45 + def remove_semicolon(node, corrector); end + + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#51 + def semicolon(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 + def trailing_class_definition?(token, body); end + end +end + +# Help methods for determining if a line is too long. +# +# source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#6 +module RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::Alignment + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#24 + def allow_cop_directives?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#47 + def allow_qualified_name?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#11 + def allow_rbs_inline_annotation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#43 + def allow_uri?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 + def allowed_position?(line, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#34 + def directive_on_source_line?(line_index); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#104 + def extend_end_position(line, end_position); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#59 + def find_excessive_range(line, type); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#91 + def indentation_difference(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#55 + def line_length(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#146 + def line_length_without_directive(line); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#83 + def match_qualified_names(string); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#75 + def match_uris(string); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#135 + def qualified_name_regexp; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#15 + def rbs_inline_annotation_on_source_line?(line_index); end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#120 + def tab_indentation_width; end + + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#125 + def uri_regexp; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#139 + def valid_uri?(uri_ish_string); end +end + +# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#5 +module RuboCop::Cop::Lint; end + +# Checks for mistyped shorthand assignments. +# +# @example +# # bad +# x =- y +# x =+ y +# x =* y +# x =! y +# +# # good +# x -= y # or x = -y +# x += y # or x = +y +# x *= y # or x = *y +# x != y # or x = !y +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#21 +class RuboCop::Cop::Lint::AmbiguousAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#30 + def on_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#40 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#40 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#40 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#40 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#40 + def on_lvasgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#44 + def rhs(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#28 +RuboCop::Cop::Lint::AmbiguousAssignment::MISTAKES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#24 +RuboCop::Cop::Lint::AmbiguousAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_assignment.rb#26 +RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous block association with method +# when param passed without parentheses. +# +# This cop can customize allowed methods with `AllowedMethods`. +# By default, there are no methods to allowed. +# +# @example +# +# # bad +# some_method a { |val| puts val } +# +# # good +# # With parentheses, there's no ambiguity. +# some_method(a { |val| puts val }) +# # or (different meaning) +# some_method(a) { |val| puts val } +# +# # good +# # Operator methods require no disambiguation +# foo == bar { |b| b.baz } +# +# # good +# # Lambda arguments require no disambiguation +# foo = ->(bar) { bar.baz } +# @example AllowedMethods: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# @example AllowedMethods: [change] +# +# # good +# expect { do_something }.to change { object.attribute } +# @example AllowedPatterns: ['change'] +# +# # good +# expect { do_something }.to change { object.attribute } +# expect { do_something }.to not_change { object.attribute } +# @example AllowedPatterns: [] (default) +# +# # bad +# expect { do_something }.to change { object.attribute } +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 +class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#75 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83 + def allowed_method_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79 + def ambiguous_block_association?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89 + def message(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95 + def wrap_in_parentheses(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 +RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous operators in the first argument of a +# method invocation without parentheses. +# +# @example +# +# # bad +# +# # The `*` is interpreted as a splat operator but it could possibly be +# # a `*` method invocation (i.e. `do_something.*(some_array)`). +# do_something *some_array +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(*some_array) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21 +class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62 + def find_offense_node_by(diagnostic); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80 + def message(diagnostic); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90 + def offense_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86 + def offense_position?(node, diagnostic); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99 + def unary_operator?(node, diagnostic); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24 +RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34 +RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) + +# Looks for expressions containing multiple binary operators +# where precedence is ambiguous due to lack of parentheses. For example, +# in `1 + 2 * 3`, the multiplication will happen before the addition, but +# lexically it appears that the addition will happen first. +# +# The cop does not consider unary operators (ie. `!a` or `-b`) or comparison +# operators (ie. `a =~ b`) because those are not ambiguous. +# +# NOTE: Ranges are handled by `Lint/AmbiguousRange`. +# +# @example +# # bad +# a + b * c +# a || b && c +# a ** b + c +# +# # good (different precedence) +# a + (b * c) +# a || (b && c) +# (a ** b) + c +# +# # good (same precedence) +# a + b + c +# a * b / c % d +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#30 +class RuboCop::Cop::Lint::AmbiguousOperatorPrecedence < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#54 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#65 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#105 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#89 + def greater_precedence?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#85 + def operator?(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#97 + def operator_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#79 + def precedence(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#45 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::MSG = T.let(T.unsafe(nil), String) + +# See https://ruby-doc.org/core-3.0.2/doc/syntax/precedence_rdoc.html +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#34 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::PRECEDENCE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator_precedence.rb#44 +RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for ambiguous ranges. +# +# Ranges have quite low precedence, which leads to unexpected behavior when +# using a range with other operators. This cop avoids that by making ranges +# explicit by requiring parenthesis around complex range boundaries (anything +# that is not a literal: numerics, strings, symbols, etc.). +# +# This cop can be configured with `RequireParenthesesForMethodChains` in order to +# specify whether method chains (including `self.foo`) should be wrapped in parens +# by this cop. +# +# NOTE: Regardless of this configuration, if a method receiver is a basic literal +# value, it will be wrapped in order to prevent the ambiguity of `1..2.to_a`. +# +# @example +# # bad +# x || 1..2 +# x - 1..2 +# (x || 1..2) +# x || 1..y || 2 +# 1..2.to_a +# +# # good, unambiguous +# 1..2 +# 'a'..'z' +# :bar..:baz +# MyClass::MIN..MyClass::MAX +# @min..@max +# a..b +# -a..b +# +# # good, ambiguity removed +# x || (1..2) +# (x - 1)..2 +# (x || 1)..2 +# (x || 1)..(y || 2) +# (1..2).to_a +# @example RequireParenthesesForMethodChains: false (default) +# # good +# a.foo..b.bar +# (a.foo)..(b.bar) +# @example RequireParenthesesForMethodChains: true +# # bad +# a.foo..b.bar +# +# # good +# (a.foo)..(b.bar) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#62 +class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RationalLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#77 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#68 + def on_irange(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#87 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#95 + def acceptable_call?(node); end + + # @yield [range.begin] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#81 + def each_boundary(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#107 + def require_parentheses_for_method_chain?; end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#66 +RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) + +# Checks for ambiguous regexp literals in the first argument of +# a method invocation without parentheses. +# +# @example +# +# # bad +# +# # This is interpreted as a method invocation with a regexp literal, +# # but it could possibly be `/` method invocations. +# # (i.e. `do_something./(pattern)./(i)`) +# do_something /pattern/i +# +# # good +# +# # With parentheses, there's no ambiguity. +# do_something(/pattern/i) +# +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22 +class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54 + def find_offense_node(node, regexp_receiver); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47 + def find_offense_node_by(diagnostic); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65 + def first_argument_is_regexp?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69 + def method_chain_to_regexp_receiver?(node, regexp_receiver); end +end + +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 +RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks for an array literal interpolated inside a regexp. +# +# When interpolating an array literal, it is converted to a string. This means +# that when inside a regexp, it acts as a character class but with additional +# quotes, spaces and commas that are likely not intended. For example, +# `/#{%w[a b c]}/` parses as `/["a", "b", "c"]/` (or `/["a, bc]/` without +# repeated characters). +# +# The cop can autocorrect to a character class (if all items in the array are a +# single character) or alternation (if the array contains longer items). +# +# NOTE: This only considers interpolated arrays that contain only strings, symbols, +# integers, and floats. Any other type is not easily convertible to a character class +# or regexp alternation. +# +# @example +# # bad +# /#{%w[a b c]}/ +# +# # good +# /[abc]/ +# +# # bad +# /#{%w[foo bar baz]}/ +# +# # good +# /(?:foo|bar|baz)/ +# +# # bad - construct a regexp rather than interpolate an array of identifiers +# /#{[foo, bar]}/ +# +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#41 +class RuboCop::Cop::Lint::ArrayLiteralInRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#53 + def on_interpolation(begin_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#106 + def alternation_for(values); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#67 + def array_of_literal_values?(node); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#92 + def array_values(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#98 + def character_class?(values); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#102 + def character_class_for(values); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#110 + def escape_values(values); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#71 + def register_array_of_literal_values(begin_node, node); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#87 + def register_array_of_nonliteral_values(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#45 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#49 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_ALTERNATION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#48 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#50 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_UNKNOWN = T.let(T.unsafe(nil), String) + +# Checks for assignments in the conditions of +# if/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example +# # bad +# if some_var = value +# do_something +# end +# +# # good +# if some_var == value +# do_something +# end +# @example AllowSafeAssignment: false +# # bad +# if (some_var = value) +# do_something +# end +# @example AllowSafeAssignment: true (default) +# # good +# if (some_var = value) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#41 +class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#68 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#67 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#80 + def allowed_construct?(asgn_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#84 + def conditional_assignment?(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#72 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#88 + def skip_children?(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#94 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#53 +RuboCop::Cop::Lint::AssignmentInCondition::ASGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#50 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITHOUT_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#46 +RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T.let(T.unsafe(nil), String) + +# `BigDecimal.new()` is deprecated since BigDecimal 1.3.3. +# This cop identifies places where `BigDecimal.new()` +# can be replaced by `BigDecimal()`. +# +# @example +# # bad +# BigDecimal.new(123.456, 3) +# +# # good +# BigDecimal(123.456, 3) +# +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#17 +class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#24 + def big_decimal_new(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 +RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#21 +RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where binary operator has identical operands. +# +# It covers comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; +# bitwise operators: `|`, `^`, `&`; +# boolean operators: `&&`, `||` +# and "spaceship" operator - ``<=>``. +# +# Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. +# Although these can be rewritten in a different way, it should not be necessary to +# do so. Operations such as `-` or `/` where the result will always be the same +# (`x - x` will always be 0; `x / x` will always be 1) are offenses, but these +# are covered by `Lint/NumericOperationWithConstantResult` instead. +# +# @example +# # bad +# x.top >= x.top +# +# if a.x != 0 && a.x != 0 +# do_something +# end +# +# def child? +# left_child || left_child +# end +# +# # good +# x + x +# 1 << 1 +# +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#46 +class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#57 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#62 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#50 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#47 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb#48 +RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `:true` and `:false` symbols. +# In most cases it would be a typo. +# +# @example +# +# # bad +# :true +# +# # good +# true +# +# # bad +# :false +# +# # good +# false +# +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27 +class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33 + def boolean_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30 +RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) + +# Checks for circular argument references in optional keyword +# arguments and optional ordinal arguments. +# +# NOTE: This syntax was made invalid on Ruby 2.7 - Ruby 3.3 but is allowed +# again since Ruby 3.4. +# +# @example +# +# # bad +# def bake(pie: pie) +# pie.heat_up +# end +# +# # good +# def bake(pie:) +# pie.refrigerate +# end +# +# # good +# def bake(pie: self.pie) +# pie.feed_to(user) +# end +# +# # bad +# def cook(dry_ingredients = dry_ingredients) +# dry_ingredients.reduce(&:+) +# end +# +# # good +# def cook(dry_ingredients = self.dry_ingredients) +# dry_ingredients.combine +# end +# +# # bad +# def foo(pie = pie = pie) +# pie.heat_up +# end +# +# # good +# def foo(pie) +# pie.heat_up +# end +# +# # bad +# def foo(pie = cake = pie) +# [pie, cake].each(&:heat_up) +# end +# +# # good +# def foo(cake = pie) +# [pie, cake].each(&:heat_up) +# end +# +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#58 +class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#67 + def on_optarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#84 + def check_assignment_chain(arg_name, node); end + + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#73 + def check_for_circular_argument_references(arg_name, arg_value); end +end + +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#61 +RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) + +# Do not define constants within a block, since the block's scope does not +# isolate or namespace the constant in any way. +# +# If you are trying to define that constant once, define it outside of +# the block instead, or use a variable or method if defining the constant +# in the outer scope would be problematic. +# +# For meta-programming, use `const_set`. +# +# @example +# # bad +# task :lint do +# FILES_TO_LINT = Dir['lib/*.rb'] +# end +# +# # bad +# describe 'making a request' do +# class TestRequest; end +# end +# +# # bad +# module M +# extend ActiveSupport::Concern +# included do +# LIST = [] +# end +# end +# +# # good +# task :lint do +# files_to_lint = Dir['lib/*.rb'] +# end +# +# # good +# describe 'making a request' do +# let(:test_request) { Class.new } +# # see also `stub_const` for RSpec +# end +# +# # good +# module M +# extend ActiveSupport::Concern +# included do +# const_set(:LIST, []) +# end +# end +# @example AllowedMethods: ['enums'] (default) +# # good +# +# # `enums` for Typed Enums via `T::Enum` in Sorbet. +# # https://sorbet.org/docs/tenum +# class TestEnum < T::Enum +# enums do +# Foo = new("foo") +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#64 +class RuboCop::Cop::Lint::ConstantDefinitionInBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#70 + def constant_assigned_in_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#75 + def module_defined_in_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#79 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#85 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#90 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#94 + def method_name(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#67 +RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for overwriting an exception with an exception result by use ``rescue =>``. +# +# You intended to write as `rescue StandardError`. +# However, you have written `rescue => StandardError`. +# In that case, the result of `rescue` will overwrite `StandardError`. +# +# @example +# +# # bad +# begin +# something +# rescue => StandardError +# end +# +# # good +# begin +# something +# rescue StandardError +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#26 +class RuboCop::Cop::Lint::ConstantOverwrittenInRescue < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#41 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#33 + def overwritten_constant(param0 = T.unsafe(nil)); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#37 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb#30 +RuboCop::Cop::Lint::ConstantOverwrittenInRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for constant reassignments. +# +# Emulates Ruby's runtime warning "already initialized constant X" +# when a constant is reassigned in the same file and namespace using the +# `NAME = value` syntax. +# +# The cop cannot catch all offenses, like, for example, when a constant +# is reassigned in another file, or when using metaprogramming (`Module#const_set`). +# +# The cop only takes into account constants assigned in a "simple" way: directly +# inside class/module definition, or within another constant. Other type of assignments +# (e.g., inside a conditional) are disregarded. +# +# The cop also tracks constant removal using `Module#remove_const` with symbol +# or string argument. +# +# @example +# # bad +# X = :foo +# X = :bar +# +# # bad +# class A +# X = :foo +# X = :bar +# end +# +# # bad +# module A +# X = :foo +# X = :bar +# end +# +# # good - keep only one assignment +# X = :bar +# +# class A +# X = :bar +# end +# +# module A +# X = :bar +# end +# +# # good - use OR assignment +# X = :foo +# X ||= :bar +# +# # good - use conditional assignment +# X = :foo +# X = :bar unless defined?(X) +# +# # good - remove the assigned constant first +# class A +# X = :foo +# remove_const :X +# X = :bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#65 +class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#76 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#84 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#71 + def remove_constant(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#135 + def ancestor_namespaces(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#142 + def constant_names; end + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#131 + def constant_namespaces(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#98 + def fixed_constant_path?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#111 + def freeze_method?(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#115 + def fully_qualified_constant_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#127 + def fully_qualified_name_for(namespaces, constant); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#102 + def simple_assignment?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#66 +RuboCop::Cop::Lint::ConstantReassignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#68 +RuboCop::Cop::Lint::ConstantReassignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that certain constants are fully qualified. +# +# This is not enabled by default because it would mark a lot of offenses +# unnecessarily. +# +# Generally, gems should fully qualify all constants to avoid conflicts with +# the code that uses the gem. Enable this cop without using `Only`/`Ignore` +# +# Large projects will over time end up with one or two constant names that +# are problematic because of a conflict with a library or just internally +# using the same name a namespace and a class. To avoid too many unnecessary +# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]` +# +# NOTE: `Style/RedundantConstantBase` cop is disabled if this cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# this cop which is disabled by default. +# +# @example +# # By default checks every constant +# +# # bad +# User +# +# # bad +# User::Login +# +# # good +# ::User +# +# # good +# ::User::Login +# @example Ignore: ['Login'] +# # Restrict this cop not being concerned about certain constants +# +# # bad +# User +# +# # good +# ::User::Login +# +# # good +# Login +# @example Only: ['Login'] +# # Restrict this cop to only being concerned about certain constants +# +# # bad +# Login +# +# # good +# ::Login +# +# # good +# User::Login +# +# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#62 +class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#70 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#66 + def unqualified_const?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#83 + def allowed_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#78 + def const_name?(name); end + + # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#87 + def ignored_names; end +end + +# source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#63 +RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) + +# are strictly formatted. +# +# A comment can be added to the directive by prefixing it with `--`. +# +# @example +# # bad +# # rubocop:disable Layout/LineLength Style/Encoding +# +# # good +# # rubocop:disable Layout/LineLength, Style/Encoding +# +# # bad +# # rubocop:disable +# +# # good +# # rubocop:disable all +# +# # bad +# # rubocop:disable Layout/LineLength # rubocop:disable Style/Encoding +# +# # good +# # rubocop:disable Layout/LineLength +# # rubocop:disable Style/Encoding +# +# # bad +# # rubocop:wrongmode Layout/LineLength +# +# # good +# # rubocop:disable Layout/LineLength +# +# # bad +# # rubocop:disable Layout/LineLength comment +# +# # good +# # rubocop:disable Layout/LineLength -- comment +# +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#45 +class RuboCop::Cop::Lint::CopDirectiveSyntax < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#54 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#68 + def offense_message(directive_comment); end +end + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#46 +RuboCop::Cop::Lint::CopDirectiveSyntax::COMMON_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#49 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#51 +RuboCop::Cop::Lint::CopDirectiveSyntax::MALFORMED_COP_NAMES_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#50 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_COP_NAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#48 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# Checks unexpected overrides of the `Data` built-in methods +# via `Data.define`. +# +# @example +# # bad +# Bad = Data.define(:members, :clone, :to_s) +# b = Bad.new(members: [], clone: true, to_s: 'bad') +# b.members #=> [] (overriding `Data#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.to_s #=> "bad" (overriding `Data#to_s`) +# +# # good +# Good = Data.define(:id, :name) +# g = Good.new(id: 1, name: "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# +# source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#23 +class RuboCop::Cop::Lint::DataDefineOverride < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#41 + def data_define(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#46 + def on_send(node); end +end + +# This is based on `Data.define.instance_methods.sort` in Ruby 4.0.0. +# +# source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#28 +RuboCop::Cop::Lint::DataDefineOverride::DATA_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#38 +RuboCop::Cop::Lint::DataDefineOverride::MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#24 +RuboCop::Cop::Lint::DataDefineOverride::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/data_define_override.rb#25 +RuboCop::Cop::Lint::DataDefineOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for debug calls (such as `debugger` or `binding.pry`) that should +# not be kept for production code. +# +# The cop can be configured using `DebuggerMethods`. By default, a number of gems +# debug entrypoints are configured (`Kernel`, `Byebug`, `Capybara`, `debug.rb`, +# `Pry`, `Rails`, `RubyJard`, and `WebConsole`). Additional methods can be added. +# +# Specific default groups can be disabled if necessary: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# WebConsole: ~ +# ---- +# +# You can also add your own methods by adding a new category: +# +# [source,yaml] +# ---- +# Lint/Debugger: +# DebuggerMethods: +# MyDebugger: +# MyDebugger.debug_this +# ---- +# +# Some gems also ship files that will start a debugging session when required, +# for example `require 'debug/start'` from `ruby/debug`. These requires can +# be configured through `DebuggerRequires`. It has the same structure as +# `DebuggerMethods`, which you can read about above. +# +# @example +# +# # bad (ok during development) +# +# # using pry +# def some_method +# binding.pry +# do_something +# end +# +# # bad (ok during development) +# +# # using byebug +# def some_method +# byebug +# do_something +# end +# +# # good +# +# def some_method +# do_something +# end +# @example DebuggerMethods: [my_debugger] +# +# # bad (ok during development) +# +# def some_method +# my_debugger +# end +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) +# +# require 'my_debugger/start' +# +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74 +class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#136 + def assumed_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#115 + def assumed_usage_context?(node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#125 + def chained_method_name(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104 + def debugger_method?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 + def debugger_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108 + def debugger_require?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97 + def debugger_requires; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76 +RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75 +RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the deprecated class method usages. +# +# @example +# +# # bad +# File.exists?(some_path) +# Dir.exists?(some_path) +# iterator? +# attr :name, true +# attr :name, false +# ENV.freeze # Calling `Env.freeze` raises `TypeError` since Ruby 2.7. +# ENV.clone +# ENV.dup # Calling `Env.dup` raises `TypeError` since Ruby 3.1. +# Socket.gethostbyname(host) +# Socket.gethostbyaddr(host) +# +# # good +# File.exist?(some_path) +# Dir.exist?(some_path) +# block_given? +# attr_accessor :name +# attr_reader :name +# ENV # `ENV.freeze` cannot prohibit changes to environment variables. +# ENV.to_h +# ENV.to_h # `ENV.dup` cannot dup `ENV`, use `ENV.to_h` to get a copy of `ENV` as a hash. +# Addrinfo.getaddrinfo(nodename, service) +# Addrinfo.tcp(host, port).getnameinfo +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#33 +class RuboCop::Cop::Lint::DeprecatedClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#53 + def deprecated_class_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#63 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#112 + def dir_env_file_const?(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#83 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#93 + def preferred_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#108 + def socket_const?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#50 +RuboCop::Cop::Lint::DeprecatedClassMethods::DIR_ENV_FILE_CONSTANTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#36 +RuboCop::Cop::Lint::DeprecatedClassMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#41 +RuboCop::Cop::Lint::DeprecatedClassMethods::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_class_methods.rb#37 +RuboCop::Cop::Lint::DeprecatedClassMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for deprecated constants. +# +# It has `DeprecatedConstants` config. If there is an alternative method, you can set +# alternative value as `Alternative`. And you can set the deprecated version as +# `DeprecatedVersion`. These options can be omitted if they are not needed. +# +# DeprecatedConstants: +# 'DEPRECATED_CONSTANT': +# Alternative: 'alternative_value' +# DeprecatedVersion: 'deprecated_version' +# +# By default, `NIL`, `TRUE`, `FALSE`, `Net::HTTPServerException, `Random::DEFAULT`, +# `Struct::Group`, and `Struct::Passwd` are configured. +# +# @example +# +# # bad +# NIL +# TRUE +# FALSE +# Net::HTTPServerException +# Random::DEFAULT # Return value of Ruby 2 is `Random` instance, Ruby 3.0 is `Random` class. +# Struct::Group +# Struct::Passwd +# +# # good +# nil +# true +# false +# Net::HTTPClientException +# Random.new # `::DEFAULT` has been deprecated in Ruby 3, `.new` is compatible with Ruby 2. +# Etc::Group +# Etc::Passwd +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#40 +class RuboCop::Cop::Lint::DeprecatedConstants < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#46 + def on_const(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#66 + def constant_name(node, nested_constant_name); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#82 + def deprecated_constants; end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#72 + def message(good, bad, deprecated_version); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#44 +RuboCop::Cop::Lint::DeprecatedConstants::DO_NOT_USE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_constants.rb#43 +RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), String) + +# Algorithmic constants for `OpenSSL::Cipher` and `OpenSSL::Digest` +# deprecated since OpenSSL version 2.2.0. Prefer passing a string +# instead. +# +# @example +# +# # bad +# OpenSSL::Cipher::AES.new(128, :GCM) +# +# # good +# OpenSSL::Cipher.new('aes-128-gcm') +# +# # bad +# OpenSSL::Digest::SHA256.new +# +# # good +# OpenSSL::Digest.new('SHA256') +# +# # bad +# OpenSSL::Digest::SHA256.digest('foo') +# +# # good +# OpenSSL::Digest.digest('SHA256', 'foo') +# +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30 +class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 + def algorithm_const(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#50 + def digest_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#54 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#101 + def algorithm_name(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#66 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#133 + def build_cipher_arguments(node, algorithm_name, no_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#93 + def correction_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#78 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#97 + def openssl_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#119 + def replacement_args(node); end + + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#111 + def sanitize_arguments(arguments); end +end + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#37 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36 +RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks constructors for disjunctive assignments (`||=`) that should +# be plain assignments. +# +# So far, this cop is only concerned with disjunctive assignment of +# instance variables. +# +# In ruby, an instance variable is nil until a value is assigned, so the +# disjunction is unnecessary. A plain assignment has the same effect. +# +# @example +# # bad +# def initialize +# @x ||= 1 +# end +# +# # good +# def initialize +# @x = 1 +# end +# +# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#48 +class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#53 + def on_def(node); end + + private + + # @param node [DefNode] a constructor definition + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#60 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#66 + def check_body(body); end + + # @param lines [Array] the logical lines of the constructor + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#78 + def check_body_lines(lines); end + + # Add an offense if the LHS of the given disjunctive assignment is + # an instance variable. + # + # For now, we only care about assignments to instance variables. + # + # @param node [Node] a disjunctive assignment + # + # source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#99 + def check_disjunctive_assignment(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb#51 +RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated bodies +# within `if/unless`, `case-when`, `case-in` and `rescue` constructs. +# +# With `IgnoreLiteralBranches: true`, branches are not registered +# as offenses if they return a basic literal value (string, symbol, +# integer, float, rational, complex, `true`, `false`, or `nil`), or +# return an array, hash, regexp or range that only contains one of +# the above basic literal values. +# +# With `IgnoreConstantBranches: true`, branches are not registered +# as offenses if they return a constant value. +# +# With `IgnoreDuplicateElseBranch: true`, in conditionals with multiple branches, +# duplicate 'else' branches are not registered as offenses. +# +# @example +# # bad +# if foo +# do_foo +# do_something_else +# elsif bar +# do_foo +# do_something_else +# end +# +# # good +# if foo || bar +# do_foo +# do_something_else +# end +# +# # bad +# case x +# when foo +# do_foo +# when bar +# do_foo +# else +# do_something_else +# end +# +# # good +# case x +# when foo, bar +# do_foo +# else +# do_something_else +# end +# +# # bad +# begin +# do_something +# rescue FooError +# handle_error +# rescue BarError +# handle_error +# end +# +# # good +# begin +# do_something +# rescue FooError, BarError +# handle_error +# end +# @example IgnoreConstantBranches: true +# # good +# case size +# when "small" then SMALL_SIZE +# when "medium" then MEDIUM_SIZE +# when "large" then LARGE_SIZE +# else MEDIUM_SIZE +# end +# @example IgnoreDuplicateElseBranch: true +# # good +# if foo +# do_foo +# elsif bar +# do_bar +# else +# do_foo +# end +# @example IgnoreLiteralBranches: true +# # good +# case size +# when "small" then 100 +# when "medium" then 250 +# when "large" then 1000 +# else 250 +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#99 +class RuboCop::Cop::Lint::DuplicateBranch < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#102 + def on_branching_statement(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#110 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#111 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#114 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#112 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#136 + def branches(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#140 + def consider_branch?(branches, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#174 + def const_branch?(branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#178 + def duplicate_else_branch?(branches, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#155 + def ignore_constant_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#159 + def ignore_duplicate_else_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#151 + def ignore_literal_branches?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#163 + def literal_branch?(branch); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#122 + def offense_range(duplicate_branch); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_branch.rb#100 +RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions +# used in case 'when' expressions. +# +# @example +# +# # bad +# case x +# when 'first' +# do_something +# when 'first' +# do_something_else +# end +# +# # good +# case x +# when 'first' +# do_something +# when 'second' +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26 +class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29 + def on_case(case_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27 +RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated conditions used in if 'elsif'. +# +# @example +# # bad +# if x == 1 +# do_something +# elsif x == 1 +# do_something_else +# end +# +# # good +# if x == 1 +# do_something +# elsif x == 2 +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#23 +class RuboCop::Cop::Lint::DuplicateElsifCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#26 + def on_if(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_elsif_condition.rb#24 +RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated keys in hash literals. +# This cop considers both primitive types and constants for the hash keys. +# +# This cop mirrors a warning in Ruby 2.2. +# +# @example +# +# # bad +# hash = { food: 'apple', food: 'orange' } +# +# # good +# hash = { food: 'apple', other_food: 'orange' } +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18 +class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Duplication + + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23 + def on_hash(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 +RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated magic comments. +# +# @example +# +# # bad +# +# # encoding: ascii +# # encoding: ascii +# +# # good +# +# # encoding: ascii +# +# # bad +# +# # frozen_string_literal: true +# # frozen_string_literal: true +# +# # good +# +# # frozen_string_literal: true +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#28 +class RuboCop::Cop::Lint::DuplicateMagicComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#35 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#51 + def magic_comment_lines; end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#65 + def register_offense(range); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#33 +RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) + +# Checks that there are no repeated patterns used in `in` keywords. +# +# @example +# +# # bad +# case x +# in 'first' +# do_something +# in 'first' +# do_something_else +# end +# +# # good +# case x +# in 'first' +# do_something +# in 'second' +# do_something_else +# end +# +# # bad - repeated alternate patterns with the same conditions don't depend on the order +# case x +# in 0 | 1 +# first_method +# in 1 | 0 +# second_method +# end +# +# # good +# case x +# in 0 | 1 +# first_method +# in 2 | 3 +# second_method +# end +# +# # bad - repeated hash patterns with the same conditions don't depend on the order +# case x +# in foo: a, bar: b +# first_method +# in bar: b, foo: a +# second_method +# end +# +# # good +# case x +# in foo: a, bar: b +# first_method +# in bar: b, baz: c +# second_method +# end +# +# # bad - repeated array patterns with elements in the same order +# case x +# in [foo, bar] +# first_method +# in [foo, bar] +# second_method +# end +# +# # good +# case x +# in [foo, bar] +# first_method +# in [bar, foo] +# second_method +# end +# +# # bad - repeated the same patterns and guard conditions +# case x +# in foo if bar +# first_method +# in foo if bar +# second_method +# end +# +# # good +# case x +# in foo if bar +# first_method +# in foo if baz +# second_method +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#90 +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#97 + def on_case_match(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#108 + def pattern_identity(pattern); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#93 +RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicated instance (or singleton) method +# definitions. +# +# NOTE: Aliasing a method to itself is allowed, as it indicates that +# the developer intends to suppress Ruby's method redefinition warnings. +# See https://bugs.ruby-lang.org/issues/13574. +# +# @example +# +# # bad +# def foo +# 1 +# end +# +# def foo +# 2 +# end +# +# # bad +# def foo +# 1 +# end +# +# alias foo bar +# +# # good +# def foo +# 1 +# end +# +# def bar +# 2 +# end +# +# # good +# def foo +# 1 +# end +# +# alias bar foo +# +# # good +# alias foo foo +# def foo +# 1 +# end +# +# # good +# alias_method :foo, :foo +# def foo +# 1 +# end +# +# # bad +# class MyClass +# extend Forwardable +# +# # or with: `def_instance_delegator`, `def_delegators`, `def_instance_delegators` +# def_delegator :delegation_target, :delegated_method_name +# +# def delegated_method_name +# end +# end +# +# # good +# class MyClass +# extend Forwardable +# +# def_delegator :delegation_target, :delegated_method_name +# +# def non_duplicated_delegated_method_name +# end +# end +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# def foo +# 1 +# end +# +# delegate :foo, to: :bar +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# def foo +# 1 +# end +# +# delegate :foo, to: :bar +# +# # good +# def foo +# 1 +# end +# +# delegate :baz, to: :bar +# +# # good - delegate with splat arguments is ignored +# def foo +# 1 +# end +# +# delegate :foo, **options +# +# # good - delegate inside a condition is ignored +# def foo +# 1 +# end +# +# if cond +# delegate :foo, to: :bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#121 +class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base + # @return [DuplicateMethods] a new instance of DuplicateMethods + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#127 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#167 + def alias_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#172 + def delegate_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#180 + def delegator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#190 + def delegators?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#153 + def method_alias?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#157 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#133 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#141 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#200 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#198 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#227 + def check_const_receiver(node, name, const_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#234 + def check_self_receiver(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260 + def delegate_prefix(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#348 + def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#276 + def found_instance_method(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#299 + def found_method(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#289 + def found_sclass_method(node, name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#272 + def hash_value(node, key); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#241 + def inside_condition?(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#326 + def location(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#358 + def lookup_constant(node, const_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#245 + def message_for_dup(node, method_name, key); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#318 + def method_key(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#334 + def on_attr(node, attr_name, args); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 + def on_delegate(node, method_names); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#376 + def qualified_name(enclosing, namespace, mod_name); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#390 + def source_location(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#122 +RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#123 +RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for duplicate elements in `Regexp` character classes. +# +# @example +# +# # bad +# r = /[xyx]/ +# +# # bad +# r = /[0-9x0-9]/ +# +# # good +# r = /[xy]/ +# +# # good +# r = /[0-9x]/ +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#21 +class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#35 + def each_repeated_character_class_element_loc(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#52 + def group_expressions(node, expressions); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#73 + def interpolation_locs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#60 + def skip_expression?(expr); end + + # Since we blank interpolations with a space for every char of the interpolation, we would + # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes + # that are within an interpolation. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#67 + def within_interpolation?(node, child); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#25 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) + +# Checks for duplicate ``require``s and ``require_relative``s. +# +# @example +# # bad +# require 'foo' +# require 'bar' +# require 'foo' +# +# # good +# require 'foo' +# require 'bar' +# +# # good +# require 'foo' +# require_relative 'foo' +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#26 +class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#39 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#45 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#35 + def require_call?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#30 +RuboCop::Cop::Lint::DuplicateRequire::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#31 +RuboCop::Cop::Lint::DuplicateRequire::REQUIRE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_require.rb#32 +RuboCop::Cop::Lint::DuplicateRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks that there are no repeated exceptions +# used in 'rescue' expressions. +# +# @example +# # bad +# begin +# something +# rescue FirstException +# handle_exception +# rescue FirstException +# handle_other_exception +# end +# +# # good +# begin +# something +# rescue FirstException +# handle_exception +# rescue SecondException +# handle_other_exception +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#28 +class RuboCop::Cop::Lint::DuplicateRescueException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + + # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#33 + def on_rescue(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 +RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks for duplicate literal, constant, or variable elements in `Set` and `SortedSet`. +# +# @example +# +# # bad +# Set[:foo, :bar, :foo] +# +# # good +# Set[:foo, :bar] +# +# # bad +# Set.new([:foo, :bar, :foo]) +# +# # good +# Set.new([:foo, :bar]) +# +# # bad +# [:foo, :bar, :foo].to_set +# +# # good +# [:foo, :bar].to_set +# +# # bad +# SortedSet[:foo, :bar, :foo] +# +# # good +# SortedSet[:foo, :bar] +# +# # bad +# SortedSet.new([:foo, :bar, :foo]) +# +# # good +# SortedSet.new([:foo, :bar]) +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#39 +class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#71 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#54 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#46 + def set_init_elements(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#75 + def register_offense(current_element, prev_element, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#42 +RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#43 +RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if each_with_object is called with an immutable +# argument. Since the argument is the object that the given block shall +# make calls on to build something based on the enumerable that +# each_with_object iterates over, an immutable argument makes no sense. +# It's definitely a bug. +# +# @example +# +# # bad +# sum = numbers.each_with_object(0) { |e, a| a += e } +# +# # good +# num = 0 +# sum = numbers.each_with_object(num) { |e, a| a += e } +# +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20 +class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 + def each_with_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#36 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21 +RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22 +RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for odd `else` block layout - like +# having an expression on the same line as the `else` keyword, +# which is usually a mistake. +# +# Its autocorrection tweaks layout to keep the syntax. So, this autocorrection +# is compatible correction for bad case syntax, but if your code makes a mistake +# with `elsif` and `else`, you will have to correct it manually. +# +# @example +# +# # bad +# +# if something +# # ... +# else do_this +# do_that +# end +# +# # good +# +# # This code is compatible with the bad case. It will be autocorrected like this. +# if something +# # ... +# else +# do_this +# do_that +# end +# +# # This code is incompatible with the bad case. +# # If `do_this` is a condition, `elsif` should be used instead of `else`. +# if something +# # ... +# elsif do_this +# do_that +# end +# +# # bad +# +# # For single-line conditionals using `then` the layout is disallowed +# # when the `else` body is multiline because it is treated as a lint offense. +# if something then on_the_same_line_as_then +# else first_line +# second_line +# end +# +# # good +# +# # For single-line conditional using `then` the layout is allowed +# # when `else` body is a single-line because it is treated as intentional. +# +# if something then on_the_same_line_as_then +# else single_line +# end +# +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59 +class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#66 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#98 + def autocorrect(corrector, node, first_else); end + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#78 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#88 + def check_else(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#64 +RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) + +# Checks for blocks without a body. +# Such empty blocks are typically an oversight or we should provide a comment +# to clarify what we're aiming for. +# +# Empty lambdas and procs are ignored by default. +# +# NOTE: For backwards compatibility, the configuration that allows/disallows +# empty lambdas and procs is called `AllowEmptyLambdas`, even though it also +# applies to procs. +# +# @example +# # bad +# items.each { |item| } +# +# # good +# items.each { |item| puts item } +# @example AllowComments: false +# # bad +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# @example AllowComments: true (default) +# # good +# items.each do |item| +# # TODO: implement later (inner comment) +# end +# +# items.each { |item| } # TODO: implement later (inline comment) +# @example AllowEmptyLambdas: false +# # bad +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# @example AllowEmptyLambdas: true (default) +# # good +# allow(subject).to receive(:callable).and_return(-> {}) +# +# placeholder = lambda do +# end +# (callable || placeholder).call +# +# proc { } +# +# Proc.new { } +# +# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#63 +class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#66 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#76 + def allow_comment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#83 + def allow_empty_lambdas?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_block.rb#87 + def comment_disables_cop?(comment); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_block.rb#64 +RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for classes and metaclasses without a body. +# Such empty classes and metaclasses are typically an oversight or we should provide a comment +# to be clearer what we're aiming for. +# +# @example +# # bad +# class Foo +# end +# +# class Bar +# class << self +# end +# end +# +# class << obj +# end +# +# # good +# class Foo +# def do_something +# # ... code +# end +# end +# +# class Bar +# class << self +# attr_reader :bar +# end +# end +# +# class << obj +# attr_reader :bar +# end +# @example AllowComments: false (default) +# # bad +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# @example AllowComments: true +# # good +# class Foo +# # TODO: implement later +# end +# +# class Bar +# class << self +# # TODO: implement later +# end +# end +# +# class << obj +# # TODO: implement later +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#72 +class RuboCop::Cop::Lint::EmptyClass < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#76 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#81 + def on_sclass(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_class.rb#87 + def body_or_allowed_comment_lines?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#73 +RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/empty_class.rb#74 +RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `if`, `elsif` and `unless` branches without a body. +# +# NOTE: empty `else` branches are handled by `Style/EmptyElse`. +# +# @example +# # bad +# if condition +# end +# +# # bad +# unless condition +# end +# +# # bad +# if condition +# do_something +# elsif other_condition +# end +# +# # good +# if condition +# do_something +# end +# +# # good +# unless condition +# do_something +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# nil +# end +# +# # good +# if condition +# do_something +# elsif other_condition +# do_something_else +# end +# @example AllowComments: false +# # bad +# if condition +# do_something +# elsif other_condition +# # noop +# end +# @example AllowComments: true (default) +# # good +# if condition +# do_something +# elsif other_condition +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#65 +class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 + def branch_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#94 + def can_simplify_conditional?(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#133 + def deletion_range(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#121 + def else_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#113 + def empty_if_branch?(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#108 + def flip_orphaned_else(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#86 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#98 + def remove_empty_branch(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#69 +RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty `ensure` blocks. +# +# @example +# +# # bad +# def some_method +# do_something +# ensure +# end +# +# # bad +# begin +# do_something +# ensure +# end +# +# # good +# def some_method +# do_something +# ensure +# do_something_else +# end +# +# # good +# begin +# do_something +# ensure +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35 +class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40 + def on_ensure(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38 +RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of empty expressions. +# +# @example +# +# # bad +# +# foo = () +# if () +# bar +# end +# +# # good +# +# foo = (some_expression) +# if (some_expression) +# bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#23 +class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 + def on_begin(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#34 + def empty_expression?(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#24 +RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) + +# Enforces that Ruby source files are not empty. +# +# @example +# # bad +# # Empty file +# +# # good +# # File containing non commented source lines +# @example AllowComments: false +# # bad +# # File consisting only of comments +# @example AllowComments: true (default) +# # good +# # File consisting only of comments +# +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#23 +class RuboCop::Cop::Lint::EmptyFile < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#26 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#40 + def contains_only_comments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#36 + def empty_file?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_file.rb#32 + def offending?; end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_file.rb#24 +RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `in` pattern branches without a body. +# +# @example +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# end +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# nil +# end +# @example AllowComments: false +# +# # bad +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# @example AllowComments: true (default) +# +# # good +# case condition +# in [a] +# do_something +# in [a, b] +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#45 +class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#53 + def on_case_match(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_in_pattern.rb#49 +RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty interpolation. +# +# @example +# +# # bad +# "result is #{}" +# +# # good +# "result is #{some_result}" +# +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15 +class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21 + def on_interpolation(begin_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#33 + def in_percent_literal_array?(begin_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 +RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of `when` branches without a body. +# +# @example +# +# # bad +# case foo +# when bar +# do_something +# when baz +# end +# +# # good +# case condition +# when foo +# do_something +# when bar +# nil +# end +# @example AllowComments: false +# +# # bad +# case condition +# when foo +# do_something +# when bar +# # do nothing +# end +# @example AllowComments: true (default) +# +# # good +# case condition +# when foo +# do_something +# when bar +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 +class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + + # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 + def on_case(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48 +RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) + +# Checks for `return` from an `ensure` block. +# `return` from an ensure block is a dangerous code smell as it +# will take precedence over any exception being raised, +# and the exception will be silently thrown away as if it were rescued. +# +# If you want to rescue some (or all) exceptions, best to do it explicitly +# +# @example +# +# # bad +# def foo +# do_something +# ensure +# cleanup +# return self +# end +# +# # good +# def foo +# do_something +# self +# ensure +# cleanup +# end +# +# # good +# def foo +# begin +# do_something +# rescue SomeException +# # Let's ignore this exception +# end +# self +# ensure +# cleanup +# end +# +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 +class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#45 + def on_ensure(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#43 +RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warnings in Ruby 2.6. +# +# [source,console] +# ---- +# $ cat example.rb +# ERB.new('hi', nil, '-', '@output_buffer') +# $ ruby -rerb example.rb +# example.rb:1: warning: Passing safe_level with the 2nd argument of ERB.new is +# deprecated. Do not use it, and specify other arguments as keyword arguments. +# example.rb:1: warning: Passing trim_mode with the 3rd argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, trim_mode:...) instead. +# example.rb:1: warning: Passing eoutvar with the 4th argument of ERB.new is +# deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead. +# ---- +# +# Now non-keyword arguments other than first one are softly deprecated +# and will be removed when Ruby 2.5 becomes EOL. +# `ERB.new` with non-keyword arguments is deprecated since ERB 2.2.0. +# Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`. +# This cop identifies places where `ERB.new(str, trim_mode, eoutvar)` can +# be replaced by `ERB.new(str, :trim_mode: trim_mode, eoutvar: eoutvar)`. +# +# @example +# # Target codes supports Ruby 2.6 and higher only +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# +# # Target codes supports Ruby 2.5 and lower only +# # good +# ERB.new(str, nil, '-', '@output_buffer') +# +# # Target codes supports Ruby 2.6, 2.5 and lower +# # bad +# ERB.new(str, nil, '-', '@output_buffer') +# +# # good +# # Ruby standard library style +# # https://github.com/ruby/ruby/commit/3406c5d +# if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+ +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# # good +# # Use `RUBY_VERSION` style +# if RUBY_VERSION >= '2.6' +# ERB.new(str, trim_mode: '-', eoutvar: '@output_buffer') +# else +# ERB.new(str, nil, '-', '@output_buffer') +# end +# +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#61 +class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81 + def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#86 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#115 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#130 + def build_kwargs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#126 + def correct_arguments?(arguments); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#104 + def message(positional_argument_index, arg_value); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#147 + def override_by_legacy_args(kwargs, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#74 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#71 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#78 +RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of flip-flop operator +# based on the Ruby Style Guide. +# +# Here is the history of flip-flops in Ruby. +# flip-flop operator is deprecated in Ruby 2.6.0 and +# the deprecation has been reverted by Ruby 2.7.0 and +# backported to Ruby 2.6. +# See: https://bugs.ruby-lang.org/issues/5400 +# +# @example +# # bad +# (1..20).each do |x| +# puts x if (x == 5) .. (x == 10) +# end +# +# # good +# (1..20).each do |x| +# puts x if (x >= 5) && (x <= 10) +# end +# +# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#25 +class RuboCop::Cop::Lint::FlipFlop < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#32 + def on_eflipflop(node); end + + # source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#28 + def on_iflipflop(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/flip_flop.rb#26 +RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of precise comparison of floating point numbers. +# +# Floating point values are inherently inaccurate, and comparing them for exact equality +# is almost never the desired semantics. Comparison via the `==/!=` operators checks +# floating-point value representation to be exactly the same, which is very unlikely +# if you perform any arithmetic operations involving precision loss. +# +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # bad +# case value +# when 1.0 +# foo +# when 2.0 +# bar +# end +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# # good - comparing against zero +# x == 0.0 +# x != 0.0 +# +# # good +# (x - 0.1).abs < Float::EPSILON +# +# # good +# tolerance = 0.0001 +# (x - 0.1).abs < tolerance +# +# # good - comparing against nil +# Float(x, exception: false) == nil +# +# # good - using epsilon comparison in case expression +# case +# when (value - 1.0).abs < Float::EPSILON +# foo +# when (value - 2.0).abs < Float::EPSILON +# bar +# end +# +# # Or some other epsilon based type of comparison: +# # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ +# +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#54 +class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#78 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#76 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#65 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#90 + def float?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#111 + def float_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#105 + def literal_safe?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#122 + def numeric_returning_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#59 +RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#61 +RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#60 +RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#57 +RuboCop::Cop::Lint::FloatComparison::MSG_CASE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#55 +RuboCop::Cop::Lint::FloatComparison::MSG_EQUALITY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#56 +RuboCop::Cop::Lint::FloatComparison::MSG_INEQUALITY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63 +RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies `Float` literals which are, like, really really really +# really really really really really big. Too big. No-one needs Floats +# that big. If you need a float that big, something is wrong with you. +# +# @example +# +# # bad +# float = 3.0e400 +# +# # good +# float = 42.9 +# +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17 +class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20 + def on_float(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18 +RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) + +# This lint sees if there is a mismatch between the number of +# expected fields for format/sprintf/#% and what is actually +# passed as arguments. +# +# In addition, it checks whether different formats are used in the same +# format string. Do not mix numbered, unnumbered, and named formats in +# the same format string. +# +# @example +# +# # bad +# format('A value: %s and another: %i', a_value) +# +# # good +# format('A value: %s and another: %i', a_value, another) +# +# # bad +# format('Unnumbered format: %s and numbered: %2$s', a_value, another) +# +# # good +# format('Numbered format: %1$s and numbered %2$s', a_value, another) +# +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27 +class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90 + def called_on_string?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127 + def count_format_matches(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 + def count_matches(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131 + def count_percent_matches(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 + def countable_format?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123 + def countable_percent?(node); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143 + def expected_fields_count(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158 + def format?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136 + def format_method?(name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54 + def format_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58 + def invalid_format_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81 + def matched_arguments_count?(expected, passed); end + + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95 + def method_with_format_args?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67 + def offending_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166 + def percent?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99 + def splat_args?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162 + def sprintf?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185 + def string_type?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34 +RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) + +# http://rubular.com/r/CvpbxkcTzy +# +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31 +RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 +RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35 +RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36 +RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) + +# Prefer using `Hash#compare_by_identity` rather than using `object_id` +# for hash keys. +# +# This cop looks for hashes being keyed by objects' `object_id`, using +# one of these methods: `key?`, `has_key?`, `fetch`, `[]` and `[]=`. +# +# @example +# # bad +# hash = {} +# hash[foo.object_id] = :bar +# hash.key?(baz.object_id) +# +# # good +# hash = {}.compare_by_identity +# hash[foo] = :bar +# hash.key?(baz) +# +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#31 +class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#37 + def id_as_hash_key?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#44 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#34 +RuboCop::Cop::Lint::HashCompareByIdentity::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#32 +RuboCop::Cop::Lint::HashCompareByIdentity::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the deprecated use of keyword arguments as a default in `Hash.new`. +# +# This usage raises a warning in Ruby 3.3 and results in an error in Ruby 3.4. +# In Ruby 3.4, keyword arguments will instead be used to change the behavior of a hash. +# For example, the capacity option can be passed to create a hash with a certain size +# if you know it in advance, for better performance. +# +# NOTE: The following corner case may result in a false negative when upgrading from Ruby 3.3 +# or earlier, but it is intentionally not detected to respect the expected usage in Ruby 3.4. +# +# [source,ruby] +# ---- +# Hash.new(capacity: 42) +# ---- +# +# @example +# +# # bad +# Hash.new(key: :value) +# +# # good +# Hash.new({key: :value}) +# +# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#29 +class RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#36 + def hash_new(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#40 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#32 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb#33 +RuboCop::Cop::Lint::HashNewWithKeywordArgumentsAsDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the ordering of a method call where +# the receiver of the call is a HEREDOC. +# +# @example +# # bad +# <<-SQL +# bar +# SQL +# .strip_indent +# +# <<-SQL +# bar +# SQL +# .strip_indent +# .trim +# +# # good +# <<~SQL +# bar +# SQL +# +# <<~SQL.trim +# bar +# SQL +# +# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#31 +class RuboCop::Cop::Lint::HeredocMethodCallPosition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#46 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#97 + def all_on_same_line?(nodes); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#50 + def autocorrect(corrector, node, heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#77 + def call_after_heredoc_range(heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#107 + def call_end_pos(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#116 + def call_line_range(node); end + + # Returns nil if no range can be safely repositioned. + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#122 + def call_range_to_safely_reposition(node, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#86 + def calls_on_multiple_lines?(node, _heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#82 + def correctly_positioned?(node, heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#111 + def heredoc_begin_line_range(heredoc); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#103 + def heredoc_end_pos(heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#73 + def heredoc_node?(node); end + + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#59 + def heredoc_node_descendent_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#67 + def send_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#146 + def trailing_comma?(call_source, call_line_source); end +end + +# source://rubocop//lib/rubocop/cop/lint/heredoc_method_call_position.rb#35 +RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String) + +# Prefer `equal?` over `==` when comparing `object_id`. +# +# `Object#equal?` is provided to compare objects for identity, and in contrast +# `Object#==` is provided for the purpose of doing value comparison. +# +# @example +# # bad +# foo.object_id == bar.object_id +# foo.object_id != baz.object_id +# +# # good +# foo.equal?(bar) +# !foo.equal?(baz) +# +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#20 +class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#27 + def object_id_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#35 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#23 +RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24 +RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for implicit string concatenation of string literals +# which are on the same line. +# +# @example +# +# # bad +# array = ['Item 1' 'Item 2'] +# +# # good +# array = ['Item 1Item 2'] +# array = ['Item 1' + 'Item 2'] +# array = [ +# 'Item 1' \ +# 'Item 2' +# ] +# +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21 +class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#92 + def display_str(node); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#59 + def each_bad_cons(node); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#74 + def ending_delimiter(str); end + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#100 + def str_content(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#84 + def string_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#88 + def string_literals?(node1, node2); end +end + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24 +RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. +# +# When an array of IO objects waiting for an exception (the third argument of `IO.select`) +# is used as an argument, there is no alternative API, so offenses are not registered. +# +# NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`, +# and the return value of `io.wait_readable` and `io.wait_writable` are `self`. +# They are not autocorrected when assigning a return value because these types are different. +# It's up to user how to handle the return value. +# +# @example +# +# # bad +# IO.select([io], [], [], timeout) +# +# # good +# io.wait_readable(timeout) +# +# # bad +# IO.select([], [io], [], timeout) +# +# # good +# io.wait_writable(timeout) +# +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#34 +class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#41 + def io_select(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#46 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#69 + def preferred_method(read, write, timeout); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#63 + def scheduler_compatible?(io1, io2); end +end + +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#37 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38 +RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `private` or `protected` access modifiers which are +# applied to a singleton method. These access modifiers do not make +# singleton methods private/protected. `private_class_method` can be +# used for that. +# +# @example +# +# # bad +# class C +# private +# +# def self.method +# puts 'hi' +# end +# end +# +# # good +# class C +# def self.method +# puts 'hi' +# end +# +# private_class_method :method +# end +# +# # good +# class C +# class << self +# private +# +# def method +# puts 'hi' +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41 +class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 + def private_class_methods(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102 + def access_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + def check_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106 + def correct_visibility?(node, modifier, ignored_methods); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71 + def format_message(modifier); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84 + def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67 + def private_class_method_names(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45 +RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42 +RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Looks for error classes inheriting from `Exception`. +# It is configurable to suggest using either `StandardError` (default) or +# `RuntimeError` instead. +# +# @example EnforcedStyle: runtime_error +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < RuntimeError; end +# +# C = Class.new(RuntimeError) +# @example EnforcedStyle: standard_error (default) +# # bad +# +# class C < Exception; end +# +# C = Class.new(Exception) +# +# # good +# +# class C < StandardError; end +# +# C = Class.new(StandardError) +# +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#40 +class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#53 + def class_new_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87 + def exception_class?(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91 + def inherit_exception_class_with_omitted_namespace?(class_node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99 + def preferred_base_class; end +end + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#44 +RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#45 +RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#50 +RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for interpolation in a single quoted string. +# +# @example +# +# # bad +# foo = 'something with #{interpolation} inside' +# +# # good +# foo = "something with #{interpolation} inside" +# +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21 +class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 + def on_str(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#41 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#52 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#56 + def valid_syntax?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 +RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) + +# Emulates the following Ruby warning in Ruby 3.3. +# +# [source,ruby] +# ---- +# $ ruby -e '0.times { it }' +# -e:1: warning: `it` calls without arguments will refer to the first block param in Ruby 3.4; +# use it() or self.it +# ---- +# +# `it` calls without arguments will refer to the first block param in Ruby 3.4. +# So use `it()` or `self.it` to ensure compatibility. +# +# @example +# +# # bad +# do_something { it } +# +# # good +# do_something { it() } +# do_something { self.it } +# +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#27 +class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base + include ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::Cop::TargetRubyVersion + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#44 + def deprecated_it_method?(node); end + + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#37 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#35 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks uses of lambda without a literal block. +# It emulates the following warning in Ruby 3.0: +# +# $ ruby -vwe 'lambda(&proc {})' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: warning: lambda without a literal block is deprecated; use the proc without +# lambda instead +# +# This way, proc object is never converted to lambda. +# Autocorrection replaces with compatible proc argument. +# +# @example +# +# # bad +# lambda(&proc { do_something }) +# lambda(&Proc.new { do_something }) +# +# # good +# proc { do_something } +# Proc.new { do_something } +# lambda { do_something } # If you use lambda. +# +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#28 +class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#35 + def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#39 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#31 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/lambda_without_literal_block.rb#32 +RuboCop::Cop::Lint::LambdaWithoutLiteralBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literals used as the conditions or as +# operands in and/or expressions serving as the conditions of +# if/while/until/case-when/case-in. +# +# NOTE: Literals in `case-in` condition where the match variable is used in +# `in` are accepted as a pattern matching. +# +# @example +# +# # bad +# if 20 +# do_something +# end +# +# # bad +# # We're only interested in the left hand side being a truthy literal, +# # because it affects the evaluation of the &&, whereas the right hand +# # side will be conditionally executed/called and can be a literal. +# if true && some_var +# do_something +# end +# +# # good +# if some_var +# do_something +# end +# +# # good +# # When using a boolean value for an infinite loop. +# while true +# break if condition +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 +class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#174 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#45 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#137 + def on_case(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#154 + def on_case_match(case_match_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#69 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#57 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#168 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#107 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#122 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#77 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#92 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#189 + def basic_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#221 + def check_case(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#180 + def check_for_literal(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#201 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#230 + def condition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#245 + def condition_evaluation?(node, cond); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#254 + def correct_if_node(node, cond); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#211 + def handle_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#197 + def primitive_array?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#238 + def when_conditions_range(when_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#42 +RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#43 +RuboCop::Cop::Lint::LiteralAsCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for literal assignments in the conditions of `if`, `while`, and `until`. +# It emulates the following Ruby warning: +# +# [source,console] +# ---- +# $ ruby -we 'if x = true; end' +# -e:1: warning: found `= literal' in conditional, should be == +# ---- +# +# As a lint cop, it cannot be determined if `==` is appropriate as intended, +# therefore this cop does not provide autocorrection. +# +# @example +# +# # bad +# if x = 42 +# do_something +# end +# +# # good +# if x == 42 +# do_something +# end +# +# # good +# if x = y +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#35 +class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#52 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#51 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#62 + def all_literals?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#79 + def offense_range(asgn_node, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#75 + def parallel_assignment_with_splat_operator?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#56 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#36 +RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for interpolated literals. +# +# NOTE: Array literals interpolated in regexps are not handled by this cop, but +# by `Lint/ArrayLiteralInRegexp` instead. +# +# @example +# +# # bad +# "result is #{10}" +# +# # good +# "result is 10" +# +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#18 +class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28 + def on_interpolation(begin_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#72 + def array_in_regexp?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#78 + def autocorrected_value(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#145 + def autocorrected_value_for_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + def autocorrected_value_for_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 + def autocorrected_value_for_string(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#129 + def autocorrected_value_for_symbol(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#162 + def autocorrected_value_in_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#136 + def autocorrected_value_in_hash_for_symbol(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#192 + def ends_heredoc_line?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#100 + def handle_special_regexp_chars(begin_node, value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#200 + def in_array_percent_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#57 + def offending?(node); end + + # Does node print its own source when converted to a string? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#183 + def prints_as_self?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#188 + def space_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#67 + def special_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 +RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 +RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `begin...end while/until something`. +# +# @example +# +# # bad +# +# # using while +# begin +# do_something +# end while some_condition +# +# # good +# +# # while replacement +# loop do +# do_something +# break unless some_condition +# end +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition +# +# # good +# +# # until replacement +# loop do +# do_something +# break if some_condition +# end +# +# source://rubocop//lib/rubocop/cop/lint/loop.rb#44 +class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#53 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#49 + def on_while_post(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#73 + def build_break_line(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#69 + def keyword_and_condition_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 + def register_offense(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/loop.rb#47 +RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) + +# cop disables on wide ranges of code, that latter contributors to +# a file wouldn't be aware of. +# +# You can set `MaximumRangeSize` to define the maximum number of +# consecutive lines a cop can be disabled for. +# +# - `.inf` any size (default) +# - `0` allows only single-line disables +# - `1` means the maximum allowed is as follows: +# +# [source,ruby] +# ---- +# a = 1 +# ---- +# +# @example MaximumRangeSize: .inf (default) +# +# # good +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # rubocop:enable Layout/SpaceAroundOperators +# # y = 1 +# # EOF +# +# # bad +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # EOF +# @example MaximumRangeSize: 2 +# +# # good +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# # With the previous, there are 2 lines on which cop is disabled. +# # rubocop:enable Layout/SpaceAroundOperators +# +# # bad +# # rubocop:disable Layout/SpaceAroundOperators +# x= 0 +# x += 1 +# # Including this, that's 3 lines on which the cop is disabled. +# # rubocop:enable Layout/SpaceAroundOperators +# +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#55 +class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#61 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#79 + def acceptable_range?(cop, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#113 + def department_enabled?(cop, comment); end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#73 + def each_missing_enable; end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#96 + def max_range; end + + # source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#100 + def message(cop, comment, type = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#58 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_cop_enable_directive.rb#59 +RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), String) + +# Checks for the presence of constructors and lifecycle callbacks +# without calls to `super`. +# +# This cop does not consider `method_missing` (and `respond_to_missing?`) +# because in some cases it makes sense to overtake what is considered a +# missing method. In other cases, the theoretical ideal handling could be +# challenging or verbose for no actual gain. +# +# Autocorrection is not supported because the position of `super` cannot be +# determined automatically. +# +# `Object` and `BasicObject` are allowed by this cop because of their +# stateless nature. However, sometimes you might want to allow other parent +# classes from this cop, for example in the case of an abstract class that is +# not meant to be called with `super`. In those cases, you can use the +# `AllowedParentClasses` option to specify which classes should be allowed +# *in addition to* `Object` and `BasicObject`. +# +# @example +# # bad +# class Employee < Person +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# class Employee < Person +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# Employee = Class.new(Person) do +# def initialize(name, salary) +# @salary = salary +# end +# end +# +# # good +# Employee = Class.new(Person) do +# def initialize(name, salary) +# super(name) +# @salary = salary +# end +# end +# +# # bad +# class Parent +# def self.inherited(base) +# do_something +# end +# end +# +# # good +# class Parent +# def self.inherited(base) +# super +# do_something +# end +# end +# +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#85 +class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#99 + def class_new_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#149 + def allowed_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#153 + def allowed_classes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 + def callback_method_def?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#133 + def contains_super?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#137 + def inside_class_with_stateful_parent?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#123 + def offender?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#96 +RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#87 +RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#91 +RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#86 +RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#92 +RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#89 +RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) + +# Checks for mixed-case character ranges since they include likely unintended characters. +# +# Offenses are registered for regexp character classes like `/[A-z]/` +# as well as range objects like `('A'..'z')`. +# +# NOTE: `Range` objects cannot be autocorrected. +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#28 +class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#55 + def each_unsafe_regexp_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#43 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#45 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#71 + def build_source_range(range_start, range_end); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#75 + def range_for(char); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#81 + def range_pairs(expr); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#101 + def regexp_range(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#91 + def skip_expression?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#95 + def skip_range?(range_start, range_end); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#85 + def unsafe_range?(range_start, range_end); end +end + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#32 +RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#35 +RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) + +# Do not mix named captures and numbered captures in a `Regexp` literal +# because numbered capture is ignored if they're mixed. +# Replace numbered captures with non-capturing groupings or +# named captures. +# +# @example +# # bad +# /(?FOO)(BAR)/ +# +# # good +# /(?FOO)(?BAR)/ +# +# # good +# /(?FOO)(?:BAR)/ +# +# # good +# /(FOO)(BAR)/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#24 +class RuboCop::Cop::Lint::MixedRegexpCaptureTypes < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#27 + def on_regexp(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/mixed_regexp_capture_types.rb#25 +RuboCop::Cop::Lint::MixedRegexpCaptureTypes::MSG = T.let(T.unsafe(nil), String) + +# In math and Python, we can use `x < y < z` style comparison to compare +# multiple value. However, we can't use the comparison in Ruby. However, +# the comparison is not syntax error. This cop checks the bad usage of +# comparison operators. +# +# @example +# +# # bad +# x < y < z +# 10 <= x <= 20 +# +# # good +# x < y && y < z +# 10 <= x && x <= 20 +# +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#20 +class RuboCop::Cop::Lint::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#29 + def multiple_compare?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#33 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#24 +RuboCop::Cop::Lint::MultipleComparison::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#23 +RuboCop::Cop::Lint::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#26 +RuboCop::Cop::Lint::MultipleComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/multiple_comparison.rb#25 +RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks for nested method definitions. +# +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo +# def bar +# end +# end +# +# # good +# +# def foo +# bar = -> { puts 'hello' } +# bar.call +# end +# +# # good +# +# # `class_eval`, `instance_eval`, `module_eval`, `class_exec`, `instance_exec`, and +# # `module_exec` blocks are allowed by default. +# +# def foo +# self.class.class_eval do +# def bar +# end +# end +# end +# +# def foo +# self.class.module_exec do +# def bar +# end +# end +# end +# +# # good +# +# def foo +# class << self +# def bar +# end +# end +# end +# @example AllowedMethods: ['has_many'] +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# @example AllowedMethods: [] (default) +# # bad +# def do_something +# has_many :articles do +# def find_or_create_by_name(name) +# end +# end +# end +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# @example AllowedPatterns: [] (default) +# # bad +# def foo(obj) +# obj.do_baz do +# def bar +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91 +class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#131 + def eval_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#136 + def exec_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#111 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#124 + def allowed_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120 + def allowed_subject_type?(subject); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115 + def scoping_method_call?(child); end +end + +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95 +RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested percent literals. +# +# @example +# +# # bad +# +# # The percent literal for nested_attributes is parsed as four tokens, +# # yielding the array [:name, :content, :"%i[incorrectly", :"nested]"]. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: %i[name content %i[incorrectly nested]] +# } +# +# # good +# +# # Neither is incompatible with the bad case, but probably the intended code. +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, %i[incorrectly nested]] +# } +# +# attributes = { +# valid_attributes: %i[name content], +# nested_attributes: [:name, :content, [:incorrectly, :nested]] +# } +# +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#32 +class RuboCop::Cop::Lint::NestedPercentLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + + # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#44 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#48 + def on_percent_literal(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#54 + def contains_percent_literals?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#35 +RuboCop::Cop::Lint::NestedPercentLiteral::MSG = T.let(T.unsafe(nil), String) + +# The array of regular expressions representing percent literals that, +# if found within a percent literal expression, will cause a +# NestedPercentLiteral violation to be emitted. +# +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#41 +RuboCop::Cop::Lint::NestedPercentLiteral::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/nested_percent_literal.rb#42 +RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) + +# Don't omit the accumulator when calling `next` in a `reduce` block. +# +# @example +# +# # bad +# result = (1..4).reduce(0) do |acc, i| +# next if i.odd? +# acc + i +# end +# +# # good +# result = (1..4).reduce(0) do |acc, i| +# next acc if i.odd? +# acc + i +# end +# +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21 +class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#39 + def on_block_body_of_reduce(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#34 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#33 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#47 + def parent_block_node(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22 +RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of a `return` inside a `begin..end` block +# in assignment contexts. +# In this situation, the `return` will result in an exit from the current +# method, possibly leading to unexpected behavior. +# +# @example +# +# # bad +# @some_variable ||= begin +# return some_value if some_condition_is_met +# +# do_something +# end +# +# # good +# @some_variable ||= begin +# if some_condition_is_met +# some_value +# else +# do_something +# end +# end +# +# # good +# some_variable = if some_condition_is_met +# return if another_condition_is_met +# +# some_value +# else +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38 +class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#51 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#49 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#50 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#48 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#53 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#52 + def on_or_asgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39 +RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-atomic file operation. +# And then replace it with a nearly equivalent and atomic method. +# +# These can cause problems that are difficult to reproduce, +# especially in cases of frequent file operations in parallel, +# such as test runs with parallel_rspec. +# +# For examples: creating a directory if there is none, has the following problems +# +# An exception occurs when the directory didn't exist at the time of `exist?`, +# but someone else created it before `mkdir` was executed. +# +# Subsequent processes are executed without the directory that should be there +# when the directory existed at the time of `exist?`, +# but someone else deleted it shortly afterwards. +# +# @example +# # bad - race condition with another process may result in an error in `mkdir` +# unless Dir.exist?(path) +# FileUtils.mkdir(path) +# end +# +# # good - atomic and idempotent creation +# FileUtils.mkdir_p(path) +# +# # bad - race condition with another process may result in an error in `remove` +# if File.exist?(path) +# FileUtils.remove(path) +# end +# +# # good - atomic and idempotent removal +# FileUtils.rm_f(path) +# +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44 +class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76 + def explicit_not_force?(param0); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71 + def force?(param0); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66 + def receiver_and_method_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61 + def send_exist_node(param0); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#98 + def allowable_use_with_if?(if_node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#123 + def autocorrect(corrector, node, range); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#134 + def autocorrect_replace_method(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#154 + def force_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#168 + def force_method_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#164 + def force_option?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#92 + def if_node_child?(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#113 + def message_change_force_method(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#117 + def message_remove_file_exist_check(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#102 + def register_offense(node, exist_node); end + + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#142 + def replacement_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#158 + def require_mode_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 +RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47 +RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 +RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55 +RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# `Dir[...]` and `Dir.glob(...)` do not make any guarantees about +# the order in which files are returned. The final order is +# determined by the operating system and file system. +# This means that using them in cases where the order matters, +# such as requiring files, can lead to intermittent failures +# that are hard to debug. To ensure this doesn't happen, +# always sort the list. +# +# `Dir.glob` and `Dir[]` sort globbed results by default in Ruby 3.0. +# So all bad cases are acceptable when Ruby 3.0 or higher are used. +# +# NOTE: This cop will be deprecated and removed when supporting only Ruby 3.0 and higher. +# +# @example +# +# # bad +# Dir["./lib/**/*.rb"].each do |file| +# require file +# end +# +# # good +# Dir["./lib/**/*.rb"].sort.each do |file| +# require file +# end +# +# # bad +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')) do |file| +# require file +# end +# +# # good +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb')).sort.each do |file| +# require file +# end +# +# # bad +# Dir['./lib/**/*.rb'].each(&method(:require)) +# +# # good +# Dir['./lib/**/*.rb'].sort.each(&method(:require)) +# +# # bad +# Dir.glob(Rails.root.join('test', '*.rb'), &method(:require)) +# +# # good +# Dir.glob(Rails.root.join('test', '*.rb')).sort.each(&method(:require)) +# +# # good - Respect intent if `sort` keyword option is specified in Ruby 3.0 or higher. +# Dir.glob(Rails.root.join(__dir__, 'test', '*.rb'), sort: false).each(&method(:require)) +# +# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#60 +class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#174 + def loop_variable(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#157 + def method_require?(param0 = T.unsafe(nil)); end + + # NOTE: itblock is not handled because this cop is limited to Ruby <= 2.7 + # via `maximum_target_ruby_version`, so itblock nodes (Ruby 3.4+) are never encountered. + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#70 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#92 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#81 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#147 + def unsorted_dir_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#152 + def unsorted_dir_each?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#168 + def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#162 + def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#179 + def var_is_required?(param0, param1); end + + private + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#109 + def correct_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#119 + def correct_block_pass(corrector, node); end + + # Returns range of last argument including comma and whitespace. + # + # @return [Parser::Source::Range] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#134 + def last_arg_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#138 + def unsorted_dir_loop?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#142 + def unsorted_dir_pass?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#64 +RuboCop::Cop::Lint::NonDeterministicRequireOrder::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-local exits from iterators without a return +# value. It registers an offense under these conditions: +# +# * No value is returned, +# * the block is preceded by a method chain, +# * the block has arguments, +# * the method which receives the block is not `define_method` +# or `define_singleton_method`, +# * the return is not contained in an inner scope, e.g. a lambda or a +# method definition. +# +# @example +# +# class ItemApi +# rescue_from ValidationError do |e| # non-iteration block with arg +# return { message: 'validation error' } unless e.errors # allowed +# error_array = e.errors.map do |error| # block with method chain +# return if error.suppress? # warned +# return "#{error.param}: invalid" unless error.message # allowed +# "#{error.param}: #{error.message}" +# end +# { message: 'validation error', errors: error_array } +# end +# +# def update_items +# transaction do # block without arguments +# return unless update_necessary? # allowed +# find_each do |item| # block without method chain +# return if item.stock == 0 # false-negative... +# item.update!(foobar: true) +# end +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#41 +class RuboCop::Cop::Lint::NonLocalExitFromIterator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#77 + def chained_send?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#80 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#46 + def on_return(return_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#72 + def return_value?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#68 + def scoped_node?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/non_local_exit_from_iterator.rb#42 +RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) + +# Warns the usage of unsafe number conversions. Unsafe +# number conversion can cause unexpected error if auto type conversion +# fails. Cop prefer parsing with number class instead. +# +# Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` +# if given input that is not numeric (eg. an empty string), whereas +# `to_i`, etc. will try to convert regardless of input (``''.to_i => 0``). +# As such, this cop is disabled by default because it's not necessarily +# always correct to raise if a value is not numeric. +# +# NOTE: Some values cannot be converted properly using one of the `Kernel` +# method (for instance, `Time` and `DateTime` values are allowed by this +# cop by default). Similarly, Rails' duration methods do not work well +# with `Integer()` and can be allowed with `AllowedMethods`. By default, +# there are no methods to allowed. +# +# @example +# +# # bad +# +# '10'.to_i +# '10.2'.to_f +# '10'.to_c +# '1/3'.to_r +# ['1', '2', '3'].map(&:to_i) +# foo.try(:to_f) +# bar.send(:to_c) +# +# # good +# +# Integer('10', 10) +# Float('10.2') +# Complex('10') +# Rational('1/3') +# ['1', '2', '3'].map { |i| Integer(i, 10) } +# foo.try { |i| Float(i) } +# bar.send { |i| Complex(i) } +# @example AllowedMethods: [] (default) +# +# # bad +# 10.minutes.to_i +# @example AllowedMethods: [minutes] +# +# # good +# 10.minutes.to_i +# @example AllowedPatterns: ['min*'] +# +# # good +# 10.minutes.to_i +# @example AllowedPatterns: [] (default) +# +# # bad +# 10.minutes.to_i +# @example IgnoredClasses: [Time, DateTime] (default) +# +# # good +# Time.now.to_datetime.to_i +# +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#73 +class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#110 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#106 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#92 + def to_method(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#97 + def to_method_symbol(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#164 + def allow_receiver?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#176 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#186 + def conversion_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 + def correct_method(node, receiver); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#154 + def correct_sym_method(to_method); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#133 + def handle_as_symbol(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#114 + def handle_conversion_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#194 + def ignored_class?(name); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#190 + def ignored_classes; end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#159 + def remove_parentheses(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#180 + def top_receiver(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#88 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#78 +RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 +RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#84 +RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of numbered parameter assignment. +# It emulates the following warning in Ruby 2.7: +# +# $ ruby -ve '_1 = :value' +# ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19] +# -e:1: warning: `_1' is reserved for numbered parameter; consider another name +# +# Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0. +# +# $ ruby -ve '_1 = :value' +# ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] +# -e:1: _1 is reserved for numbered parameter +# +# NOTE: The parametered parameters are from `_1` to `_9`. This cop checks `_0`, and over `_10` +# as well to prevent confusion. +# +# @example +# +# # bad +# _1 = :value +# +# # good +# non_numbered_parameter_name = :value +# +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#30 +class RuboCop::Cop::Lint::NumberedParameterAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#35 + def on_lvasgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#32 +RuboCop::Cop::Lint::NumberedParameterAssignment::LVAR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#33 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUMBERED_PARAMETER_RANGE = T.let(T.unsafe(nil), Range) + +# source://rubocop//lib/rubocop/cop/lint/numbered_parameter_assignment.rb#31 +RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have a constant result, usually 0 or 1. +# Multiplying a number by 0 will always return 0. +# Dividing a number by itself or raising it to the power of 0 will always return 1. +# As such, they can be replaced with that result. +# These are probably leftover from debugging, or are mistakes. +# Other numeric operations that are similarly leftover from debugging or mistakes +# are handled by `Lint/UselessNumericOperation`. +# +# NOTE: This cop doesn't detect offenses for the `-` and `%` operator because it +# can't determine the type of `x`. If `x` is an `Array` or `String`, it doesn't perform +# a numeric operation. +# +# @example +# +# # bad +# x * 0 +# +# # good +# 0 +# +# # bad +# x *= 0 +# +# # good +# x = 0 +# +# # bad +# x / x +# x ** 0 +# +# # good +# 1 +# +# # bad +# x /= x +# x **= 0 +# +# # good +# x = 1 +# +# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#46 +class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#57 + def abbreviated_assignment_with_constant_result?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#68 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#70 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#60 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#53 + def operation_with_constant_result?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#81 + def constant_result?(lhs, operation, rhs); end +end + +# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#49 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#50 +RuboCop::Cop::Lint::NumericOperationWithConstantResult::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for unintended or-assignment to a constant. +# +# Constants should always be assigned in the same location. And its value +# should always be the same. If constants are assigned in multiple +# locations, the result may vary depending on the order of `require`. +# +# @example +# +# # bad +# CONST ||= 1 +# +# # good +# CONST = 1 +# +# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#24 +class RuboCop::Cop::Lint::OrAssignmentToConstant < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#29 + def on_or_asgn(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/or_assignment_to_constant.rb#27 +RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) + +# Checks the proper ordering of magic comments and whether +# a magic comment is not placed before a shebang. +# +# @example +# # bad +# +# # frozen_string_literal: true +# # encoding: ascii +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# # encoding: ascii +# # frozen_string_literal: true +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# # good +# +# #!/usr/bin/env ruby +# # encoding: ascii +# # frozen_string_literal: true +# p [''.frozen?, ''.encoding] #=> [true, #] +# +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32 +class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55 + def autocorrect(corrector, encoding_line, frozen_string_literal_line); end + + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63 + def magic_comment_lines; end +end + +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36 +RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) + +# Looks for references of `Regexp` captures that are out of range +# and thus always returns nil. +# +# @example +# +# /(foo)bar/ =~ 'foobar' +# +# # bad - always returns nil +# +# puts $2 # => nil +# +# # good +# +# puts $1 # => foo +# +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#38 +class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#64 + def after_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 + def after_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#72 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#51 + def on_match_with_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#78 + def on_nth_ref(node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#66 + def on_when(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#103 + def check_regexp(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#123 + def nth_ref_receiver?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#114 + def regexp_first_argument?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#94 + def regexp_patterns(in_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#119 + def regexp_receiver?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#39 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#42 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_ARGUMENT_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#44 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_CAPTURE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#41 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::REGEXP_RECEIVER_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#45 +RuboCop::Cop::Lint::OutOfRangeRegexpRef::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks for space between the name of a called method and a left +# parenthesis. +# +# @example +# +# # bad +# do_something (foo) +# +# # good +# do_something(foo) +# do_something (2 + 3) * 4 +# do_something (foo * bar).baz +# +# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#18 +class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#35 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#24 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 + def chained_calls?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#52 + def compound_range?(first_arg); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#81 + def space_range(expr, space_length); end + + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 + def spaces_before_left_parenthesis(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 + def ternary_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#39 + def valid_context?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 + def valid_first_argument?(first_arg); end +end + +# source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#22 +RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), String) + +# Checks for quotes and commas in %w, e.g. `%w('foo', "bar")` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting strings. +# +# @example +# +# # bad +# %w('foo', "bar") +# +# # good +# %w(foo bar) +# +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29 +class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 + def on_percent_literal(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61 + def contains_quotes_or_commas?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34 +RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 +RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 +RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35 +RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) + +# Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` +# +# It is more likely that the additional characters are unintended (for +# example, mistranslating an array of literals to percent string notation) +# rather than meant to be part of the resulting symbols. +# +# @example +# +# # bad +# %i(:foo, :bar) +# +# # good +# %i(foo bar) +# +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19 +class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 + def on_percent_literal(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48 + def contains_colons_or_commas?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58 + def non_alphanumeric_literal?(literal); end +end + +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 +RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which raise `Exception` or +# `Exception.new`. Use `StandardError` or a specific exception class instead. +# +# If you have defined your own namespaced `Exception` class, it is possible +# to configure the cop to allow it by setting `AllowedImplicitNamespaces` to +# an array with the names of the namespaces to allow. By default, this is set to +# `['Gem']`, which allows `Gem::Exception` to be raised without an explicit namespace. +# If not allowed, a false positive may be registered if `raise Exception` is called +# within the namespace. +# +# Alternatively, use a fully qualified name with `raise`/`fail` +# (eg. `raise Namespace::Exception`). +# +# @example +# # bad +# raise Exception, 'Error message here' +# raise Exception.new('Error message here') +# +# # good +# raise StandardError, 'Error message here' +# raise MyError.new, 'Error message here' +# @example AllowedImplicitNamespaces: ['Gem'] (default) +# # bad - `Foo` is not an allowed implicit namespace +# module Foo +# def self.foo +# raise Exception # This is qualified to `Foo::Exception`. +# end +# end +# +# # good +# module Gem +# def self.foo +# raise Exception # This is qualified to `Gem::Exception`. +# end +# end +# +# # good +# module Foo +# def self.foo +# raise Foo::Exception +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#53 +class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#60 + def exception?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#65 + def exception_new_with_message?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#70 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#104 + def allow_implicit_namespaces; end + + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#76 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#92 + def implicit_namespace?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#56 +RuboCop::Cop::Lint::RaiseException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/raise_exception.rb#57 +RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rand(1)` calls. +# Such calls always return `0`. +# +# @example +# +# # bad +# rand 1 +# Kernel.rand(-1) +# rand 1.0 +# rand(-1.0) +# +# # good +# 0 # just use 0 instead +# +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19 +class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 + def rand_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20 +RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21 +RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# removed without causing any offenses to be reported. It's implemented +# as a cop in that it inherits from the Cop base class and calls +# add_offense. The unusual part of its implementation is that it doesn't +# have any on_* methods or an investigate method. This means that it +# doesn't take part in the investigation phase when the other cops do +# their work. Instead, it waits until it's called in a later stage of the +# execution. The reason it can't be implemented as a normal cop is that +# it depends on the results of all other cops to do its work. +# +# @example +# # bad +# # rubocop:disable Layout/LineLength +# x += 1 +# # rubocop:enable Layout/LineLength +# +# # good +# x += 1 +# +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#28 +class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [RedundantCopDisableDirective] a new instance of RedundantCopDisableDirective + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#37 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end + + # Returns the value of attribute offenses_to_check. + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 + def offenses_to_check; end + + # Sets the attribute offenses_to_check + # + # @param value the value to set the attribute offenses_to_check to. + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#35 + def offenses_to_check=(_arg0); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#337 + def add_department_marker(department); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#243 + def add_offense_for_entire_comment(comment, cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#258 + def add_offense_for_some_cops(comment, cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#233 + def add_offenses(redundant_cops); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#320 + def all_cop_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#204 + def all_disabled?(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#69 + def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#57 + def cop_disabled_line_ranges; end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#278 + def cop_range(comment, cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#224 + def department_disabled?(cop, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#329 + def department_marker?(department); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#307 + def describe(cop); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#229 + def directive_count(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#92 + def directive_range_in_list(range, ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#61 + def disabled_ranges; end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#146 + def each_already_disabled(cop, line_ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#113 + def each_line_range(cop, line_ranges); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#106 + def each_redundant_disable(&block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#324 + def ends_its_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#216 + def expected_final_disable?(cop, line_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#180 + def find_redundant_all(range, next_range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#175 + def find_redundant_cop(cop, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#190 + def find_redundant_department(cop, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#135 + def find_redundant_directive(cop, comment, line_range, next_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#196 + def followed_ranges?(range, next_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#208 + def ignore_offense?(line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#272 + def leave_free_comment?(comment, range); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#285 + def matching_range(haystack, needle); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#316 + def message(cop_names); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#65 + def previous_line_blank?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#200 + def range_with_offense?(range, offenses = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#333 + def remove_department_marker(department); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#126 + def should_skip_line_range?(cop, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#130 + def skip_directive?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#293 + def trailing_range?(ranges, range); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#32 +RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#33 +RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_disable_directive.rb#301 +RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.let(T.unsafe(nil), Hash) + +# removed. +# +# that cop checks whether any cop was actually enabled. +# +# @example +# +# # bad +# foo = 1 +# # rubocop:enable Layout/LineLength +# +# # good +# foo = 1 +# +# # bad +# # rubocop:disable Style/StringLiterals +# foo = "1" +# # rubocop:enable Style/StringLiterals +# baz +# # rubocop:enable all +# +# # good +# # rubocop:disable Style/StringLiterals +# foo = "1" +# # rubocop:enable all +# baz +# +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#33 +class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#40 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 + def all_or_name(name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#72 + def comment_start(comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76 + def cop_name_indention(comment, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120 + def department?(directive, name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#67 + def range_of_offense(comment, name); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#91 + def range_to_remove(begin_pos, end_pos, comment); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80 + def range_with_comma(comment, name); end + + # If the list of cops is comma-separated, but without an empty space after the comma, + # we should **not** remove the prepending empty space, thus begin_pos += 1 + # + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110 + def range_with_comma_after(comment, start, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#104 + def range_with_comma_before(start, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#49 + def register_offense(comment, cop_names); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#38 +RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) + +# Sort globbed results by default in Ruby 3.0. +# This cop checks for redundant `sort` method to `Dir.glob` and `Dir[]`. +# +# @example +# +# # bad +# Dir.glob('./lib/**/*.rb').sort.each do |file| +# end +# +# Dir['./lib/**/*.rb'].sort.each do |file| +# end +# +# # good +# Dir.glob('./lib/**/*.rb').each do |file| +# end +# +# Dir['./lib/**/*.rb'].each do |file| +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#30 +class RuboCop::Cop::Lint::RedundantDirGlobSort < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#56 + def multiple_argument?(glob_method); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#38 +RuboCop::Cop::Lint::RedundantDirGlobSort::GLOB_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#36 +RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 +RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant quantifiers inside `Regexp` literals. +# +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# +# @example +# # bad +# /(?:x+)+/ +# +# # good +# /(?:x)+/ +# +# # good +# /(?:x+)/ +# +# # bad +# /(?:x+)?/ +# +# # good +# /(?:x)*/ +# +# # good +# /(?:x*)/ +# +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 +class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 + def character_set?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 + def each_redundantly_quantified_pair(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 + def mergeable_quantifier(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 + def merged_quantifier(exp1, exp2); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 + def message(group, child, replacement); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 + def quantifier_range(group, child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 + def redundant_group?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 + def redundantly_quantifiable?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 +RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) + +# Checks for unnecessary `require` statement. +# +# The following features are unnecessary `require` statement because +# they are already loaded. e.g. Ruby 2.2: +# +# ruby -ve 'p $LOADED_FEATURES.reject { |feature| %r|/| =~ feature }' +# ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-darwin13] +# ["enumerator.so", "rational.so", "complex.so", "thread.rb"] +# +# Below are the features that each `TargetRubyVersion` targets. +# +# * 2.0+ ... `enumerator` +# * 2.1+ ... `thread` +# * 2.2+ ... Add `rational` and `complex` above +# * 2.7+ ... Add `ruby2_keywords` above +# * 3.1+ ... Add `fiber` above +# * 3.2+ ... Add `set` above +# * 4.0+ ... Add `pathname` above +# +# This cop target those features. +# +# @example +# # bad +# require 'unloaded_feature' +# require 'thread' +# +# # good +# require 'unloaded_feature' +# +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#34 +class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#48 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43 + def redundant_require_statement?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#67 + def redundant_feature?(feature_name); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 +RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#39 +RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#40 +RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) + +# Checks for redundant safe navigation calls. +# Use cases where a constant, named in camel case for classes and modules is `nil` are rare, +# and an offense is not detected when the receiver is a constant. The detection also applies +# to `self`, and to literal receivers, except for `nil`. +# +# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, +# and `equal?` methods are checked by default. +# These are customizable with `AllowedMethods` option. +# +# The `AllowedMethods` option specifies nil-safe methods, +# in other words, it is a method that is allowed to skip safe navigation. +# Note that the `AllowedMethod` option is not an option that specifies methods +# for which to suppress (allow) this cop's check. +# +# In the example below, the safe navigation operator (`&.`) is unnecessary +# because `NilClass` has methods like `respond_to?` and `is_a?`. +# +# The `InferNonNilReceiver` option specifies whether to look into previous code +# paths to infer if the receiver can't be nil. This check is unsafe because the receiver +# can be redefined between the safe navigation call and previous regular method call. +# It does the inference only in the current scope, e.g. within the same method definition etc. +# +# The `AdditionalNilMethods` option specifies additional custom methods which are +# defined on `NilClass`. When `InferNonNilReceiver` is set, they are used to determine +# whether the receiver can be nil. +# +# @example +# # bad +# CamelCaseConst&.do_something +# +# # good +# CamelCaseConst.do_something +# +# # bad +# foo.to_s&.strip +# foo.to_i&.zero? +# foo.to_f&.zero? +# foo.to_a&.size +# foo.to_h&.size +# +# # good +# foo.to_s.strip +# foo.to_i.zero? +# foo.to_f.zero? +# foo.to_a.size +# foo.to_h.size +# +# # bad +# do_something if attrs&.respond_to?(:[]) +# +# # good +# do_something if attrs.respond_to?(:[]) +# +# # bad +# while node&.is_a?(BeginNode) +# node = node.parent +# end +# +# # good +# while node.is_a?(BeginNode) +# node = node.parent +# end +# +# # good - without `&.` this changes the return value for `nil` +# foo&.respond_to?(:to_a) +# foo&.respond_to?(:class) +# +# # bad - for `nil`s conversion methods return default values for the type +# foo&.to_h || {} +# foo&.to_h { |k, v| [k, v] } || {} +# foo&.to_a || [] +# foo&.to_i || 0 +# foo&.to_f || 0.0 +# foo&.to_s || '' +# +# # good +# foo.to_h +# foo.to_h { |k, v| [k, v] } +# foo.to_a +# foo.to_i +# foo.to_f +# foo.to_s +# +# # bad +# self&.foo +# +# # good +# self.foo +# @example AdditionalNilMethods: [present?] +# # good +# foo.present? +# foo&.bar +# @example AllowedMethods: [nil_safe_method] +# # bad +# do_something if attrs&.nil_safe_method(:[]) +# +# # good +# do_something if attrs.nil_safe_method(:[]) +# do_something if attrs&.not_nil_safe_method(:[]) +# @example InferNonNilReceiver: false (default) +# # good +# foo.bar +# foo&.baz +# @example InferNonNilReceiver: true +# # bad +# foo.bar +# foo&.baz # would raise on previous line if `foo` is nil +# +# # good +# foo.bar +# foo.baz +# +# # bad +# if foo.condition? +# foo&.bar +# end +# +# # good +# if foo.condition? +# foo.bar +# end +# +# # good (different scopes) +# def method1 +# foo.bar +# end +# +# def method2 +# foo&.bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#146 +class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#167 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#179 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#201 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#162 + def respond_to_nil_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#253 + def additional_nil_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#217 + def assume_receiver_instance_exists?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#234 + def check?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#245 + def condition?(parent, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#223 + def guaranteed_instance?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#249 + def infer_non_nil_receiver?; end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#159 +RuboCop::Cop::Lint::RedundantSafeNavigation::GUARANTEED_INSTANCE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#150 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#151 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#152 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_NON_NIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#155 +RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#157 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks for unneeded usages of splat expansion. +# +# @example +# +# # bad +# a = *[1, 2, 3] +# a = *'a' +# a = *1 +# ['a', 'b', *%w(c d e), 'f', 'g'] +# +# # good +# c = [1, 2, 3] +# a = *c +# a, b = *c +# a, *b = *c +# a = *1..10 +# a = ['a'] +# ['a', 'b', 'c', 'd', 'e', 'f', 'g'] +# +# # bad +# do_something(*['foo', 'bar', 'baz']) +# +# # good +# do_something('foo', 'bar', 'baz') +# +# # bad +# begin +# foo +# rescue *[StandardError, ApplicationError] +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, ApplicationError +# bar +# end +# +# # bad +# case foo +# when *[1, 2, 3] +# bar +# else +# baz +# end +# +# # good +# case foo +# when 1, 2, 3 +# bar +# else +# baz +# end +# @example AllowPercentLiteralArrayArgument: false +# +# # bad +# do_something(*%w[foo bar baz]) +# @example AllowPercentLiteralArrayArgument: true (default) +# +# # good +# do_something(*%w[foo bar baz]) +# +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#71 +class RuboCop::Cop::Lint::RedundantSplatExpansion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#83 + def array_new?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#91 + def literal_expansion(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#95 + def on_splat(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#210 + def allow_percent_literal_array_argument?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#131 + def array_new_inside_array_literal?(array_new_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#158 + def array_splat?(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#112 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#162 + def method_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#166 + def part_of_an_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#173 + def redundant_brackets?(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#118 + def redundant_splat_expansion(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#185 + def remove_brackets(array); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#139 + def replacement_range_and_content(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#203 + def use_percent_literal_array_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#181 + def wrap_in_brackets?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#75 +RuboCop::Cop::Lint::RedundantSplatExpansion::ARRAY_PARAM_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#80 +RuboCop::Cop::Lint::RedundantSplatExpansion::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#74 +RuboCop::Cop::Lint::RedundantSplatExpansion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#79 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_I = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#77 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_CAPITAL_W = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#78 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#76 +RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) + +# Checks for string conversion in string interpolation, `print`, `puts`, and `warn` arguments, +# which is redundant. +# +# @example +# +# # bad +# "result is #{something.to_s}" +# print something.to_s +# puts something.to_s +# warn something.to_s +# +# # good +# "result is #{something}" +# print something +# puts something +# warn something +# +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23 +class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#34 + def on_interpolation(begin_node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 + def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54 + def register_offense(node, context); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 +RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29 +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of `to_s`, `to_sym`, `to_i`, `to_f`, `to_d`, `to_r`, `to_c`, +# `to_a`, `to_h`, and `to_set`. +# +# When one of these methods is called on an object of the same type, that object +# is returned, making the call unnecessary. The cop detects conversion methods called +# on object literals, class constructors, class `[]` methods, and the `Kernel` methods +# `String()`, `Integer()`, `Float()`, BigDecimal(), `Rational()`, `Complex()`, and `Array()`. +# +# Specifically, these cases are detected for each conversion method: +# +# * `to_s` when called on a string literal, interpolated string, heredoc, +# or with `String.new` or `String()`. +# * `to_sym` when called on a symbol literal or interpolated symbol. +# * `to_i` when called on an integer literal or with `Integer()`. +# * `to_f` when called on a float literal of with `Float()`. +# * `to_r` when called on a rational literal or with `Rational()`. +# * `to_c` when called on a complex literal of with `Complex()`. +# * `to_a` when called on an array literal, or with `Array.new`, `Array()` or `Array[]`. +# * `to_h` when called on a hash literal, or with `Hash.new`, `Hash()` or `Hash[]`. +# * `to_set` when called on `Set.new` or `Set[]`. +# +# In all cases, chaining one same `to_*` conversion methods listed above is redundant. +# +# The cop can also register an offense for chaining conversion methods on methods that are +# expected to return a specific type regardless of receiver (eg. `foo.inspect.to_s` and +# `foo.to_json.to_s`). +# +# @example +# # bad +# "text".to_s +# :sym.to_sym +# 42.to_i +# 8.5.to_f +# 12r.to_r +# 1i.to_c +# [].to_a +# {}.to_h +# Set.new.to_set +# +# # good +# "text" +# :sym +# 42 +# 8.5 +# 12r +# 1i +# [] +# {} +# Set.new +# +# # bad +# Integer(var).to_i +# +# # good +# Integer(var) +# +# # good - chaining to a type constructor with exceptions suppressed +# # in this case, `Integer()` could return `nil` +# Integer(var, exception: false).to_i +# +# # bad - chaining the same conversion +# foo.to_s.to_s +# +# # good +# foo.to_s +# +# # bad - chaining a conversion to a method that is expected to return the same type +# foo.inspect.to_s +# foo.to_json.to_s +# +# # good +# foo.inspect +# foo.to_json +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#80 +class RuboCop::Cop::Lint::RedundantTypeConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#160 + def array_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#145 + def bigdecimal_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#155 + def complex_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#184 + def exception_false_keyword_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#140 + def float_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#168 + def hash_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#135 + def integer_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#205 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#189 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#150 + def rational_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#177 + def set_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#127 + def string_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#122 + def type_constructor?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#247 + def chained_conversion?(node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#253 + def chained_to_typed_method?(node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#234 + def constructor?(node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#241 + def constructor_suppresses_exceptions?(receiver); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#215 + def find_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#209 + def hash_or_set_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#228 + def literal_receiver?(node, receiver); end +end + +# Maps each conversion method to the pattern matcher for that type's constructors +# Not every type has a constructor, for instance Symbol. +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#100 +RuboCop::Cop::Lint::RedundantTypeConversion::CONSTRUCTOR_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#116 +RuboCop::Cop::Lint::RedundantTypeConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Set) + +# Maps conversion methods to the node types for the literals of that type +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#86 +RuboCop::Cop::Lint::RedundantTypeConversion::LITERAL_NODE_TYPES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#83 +RuboCop::Cop::Lint::RedundantTypeConversion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#117 +RuboCop::Cop::Lint::RedundantTypeConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Methods that already are expected to return a given type, which makes a further +# conversion redundant. +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#114 +RuboCop::Cop::Lint::RedundantTypeConversion::TYPED_METHODS = T.let(T.unsafe(nil), Hash) + +# Checks for redundant `with_index`. +# +# @example +# # bad +# ary.each_with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_index do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#29 +class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#56 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#55 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#61 + def redundant_with_index?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#73 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#81 + def with_index_range(send); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#33 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_EACH_WITH_INDEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#34 +RuboCop::Cop::Lint::RedundantWithIndex::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# Checks for redundant `with_object`. +# +# @example +# # bad +# ary.each_with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# # bad +# ary.each.with_object([]) do |v| +# v +# end +# +# # good +# ary.each do |v| +# v +# end +# +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#29 +class RuboCop::Cop::Lint::RedundantWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#36 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#52 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#51 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#57 + def redundant_with_object?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#68 + def message(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#76 + def with_object_range(send); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#33 +RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_with_object.rb#34 +RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# Checks if `include` or `prepend` is called in `refine` block. +# These methods are deprecated and should be replaced with `Refinement#import_methods`. +# +# It emulates deprecation warnings in Ruby 3.1. Functionality has been removed in Ruby 3.2. +# +# @example +# +# # bad +# refine Foo do +# include Bar +# end +# +# # bad +# refine Foo do +# prepend Bar +# end +# +# # good +# refine Foo do +# import_methods Bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#34 +class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#42 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#37 +RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/refinement_import_methods.rb#38 +RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for regexp literals used as `match-current-line`. +# If a regexp literal is in condition, the regexp matches `$_` implicitly. +# +# @example +# # bad +# if /foo/ +# do_something +# end +# +# # good +# if /foo/ =~ $_ +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#19 +class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#25 + def on_match_current_line(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/regexp_as_condition.rb#22 +RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for expressions where there is a call to a predicate +# method with at least one argument, where no parentheses are used around +# the parameter list, and a boolean operator, && or ||, is used in the +# last argument. +# +# The idea behind warning for these constructs is that the user might +# be under the impression that the return value from the method call is +# an operand of &&/||. +# +# @example +# +# # bad +# if day.is? :tuesday && month == :jan +# # ... +# end +# +# # good +# if day.is?(:tuesday) && month == :jan +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26 +class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#40 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54 + def check_predicate(predicate, node); end + + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44 + def check_ternary(ternary, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29 +RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks that a range literal is enclosed in parentheses when the end of the range is +# at a line break. +# +# NOTE: The following is maybe intended for `(42..)`. But, compatible is `42..do_something`. +# So, this cop does not provide autocorrection because it is left to user. +# +# [source,ruby] +# ---- +# case condition +# when 42.. +# do_something +# end +# ---- +# +# @example +# +# # bad - Represents `(1..42)`, not endless range. +# 1.. +# 42 +# +# # good - It's incompatible, but your intentions when using endless range may be: +# (1..) +# 42 +# +# # good +# 1..42 +# +# # good +# (1..42) +# +# # good +# (1.. +# 42) +# +# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#40 +class RuboCop::Cop::Lint::RequireRangeParentheses < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#53 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#43 + def on_irange(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_range_parentheses.rb#41 +RuboCop::Cop::Lint::RequireRangeParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses a file requiring itself with `require_relative`. +# +# @example +# +# # bad +# +# # foo.rb +# require_relative 'foo' +# require_relative 'bar' +# +# # good +# +# # foo.rb +# require_relative 'bar' +# +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#21 +class RuboCop::Cop::Lint::RequireRelativeSelfPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#28 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#44 + def remove_ext(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#40 + def same_file?(file_path, required_feature); end +end + +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#25 +RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#26 +RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks targeting the `Exception` class. +# +# @example +# +# # bad +# begin +# do_something +# rescue Exception +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue ArgumentError +# handle_exception +# end +# +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23 +class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26 + def on_resbody(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#32 + def targets_exception?(rescue_arg_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24 +RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) + +# Checks for arguments to `rescue` that will result in a `TypeError` +# if an exception is raised. +# +# @example +# # bad +# begin +# bar +# rescue nil +# baz +# end +# +# # bad +# def foo +# bar +# rescue 1, 'a', "#{b}", 0.0, [], {} +# baz +# end +# +# # good +# begin +# bar +# rescue +# baz +# end +# +# # good +# def foo +# bar +# rescue NameError +# baz +# end +# +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#37 +class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#56 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#44 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#65 + def correction(*exceptions); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 + def invalid_exceptions(exceptions); end + + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#72 + def valid_exceptions(exceptions); end +end + +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#42 +RuboCop::Cop::Lint::RescueType::INVALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#40 +RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a return with a value in a context +# where the value will be ignored. (initialize and setter methods) +# +# @example +# +# # bad +# def initialize +# foo +# return :qux if bar? +# baz +# end +# +# def foo=(bar) +# return 42 +# end +# +# # good +# def initialize +# foo +# return if bar? +# baz +# end +# +# def foo=(bar) +# return +# end +# +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32 +class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#38 + def on_return(return_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33 +RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) + +# Returning out of these methods only exits the block itself. +# +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#36 +RuboCop::Cop::Lint::ReturnInVoidContext::SCOPE_CHANGING_METHODS = T.let(T.unsafe(nil), Array) + +# The safe navigation operator returns nil if the receiver is +# nil. If you chain an ordinary method call after a safe +# navigation operator, it raises NoMethodError. We should use a +# safe navigation operator after a safe navigation operator. +# This cop checks for the problem outlined above. +# +# @example +# +# # bad +# x&.foo.bar +# x&.foo + bar +# x&.foo[bar] +# +# # good +# x&.foo&.bar +# x&.foo || bar +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22 +class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40 + def on_send(node); end + + private + + # @param offense_range [Parser::Source::Range] + # @param send_node [RuboCop::AST::SendNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#67 + def add_safe_navigation_operator(offense_range:, send_node:); end + + # @param corrector [RuboCop::Cop::Corrector] + # @param offense_range [Parser::Source::Range] + # @param send_node [RuboCop::AST::SendNode] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#86 + def autocorrect(corrector, offense_range:, send_node:); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#95 + def brackets?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#108 + def operator_inside_collection_literal?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#99 + def require_parentheses?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#57 + def require_safe_navigation?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29 +RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 +RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) + +# Checks that if safe navigation is used in an `&&` or `||` condition, +# consistent and appropriate safe navigation, without excess or deficiency, +# is used for all method calls on the same object. +# +# @example +# # bad +# foo&.bar && foo&.baz +# +# # good +# foo&.bar && foo.baz +# +# # bad +# foo.bar && foo&.baz +# +# # good +# foo.bar && foo.baz +# +# # bad +# foo&.bar || foo.baz +# +# # good +# foo&.bar || foo&.baz +# +# # bad +# foo.bar || foo&.baz +# +# # good +# foo.bar || foo.baz +# +# # bad +# foo&.bar && (foobar.baz || foo&.baz) +# +# # good +# foo&.bar && (foobar.baz || foo.baz) +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#47 +class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#54 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#69 + def on_or(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#104 + def already_appropriate_call?(operand, dot_op); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#73 + def collect_operands(node, operand_nodes); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#89 + def find_consistent_parts(grouped_operands); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#130 + def most_left_indices(grouped_operands); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#160 + def nilable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#144 + def operand_in_and?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#152 + def operand_in_or?(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#121 + def operand_nodes(operand, operand_nodes); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#80 + def receiver_name_as_key(method, fully_receivers); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#110 + def register_offense(operand, dot_operator); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#51 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#52 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) + +# Checks to make sure safe navigation isn't used with `empty?` in +# a conditional. +# +# While the safe navigation operator is generally a good idea, when +# checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# do the opposite of what the author intends. +# +# @example +# # bad +# return if foo&.empty? +# return unless foo&.empty? +# +# # good +# return if foo && foo.empty? +# return unless foo && foo.empty? +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#22 +class RuboCop::Cop::Lint::SafeNavigationWithEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#32 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#28 + def safe_navigation_empty_in_conditional?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_with_empty.rb#25 +RuboCop::Cop::Lint::SafeNavigationWithEmpty::MSG = T.let(T.unsafe(nil), String) + +# Checks if a file which has a shebang line as +# its first line is granted execute permission. +# +# @example +# # bad +# +# # A file which has a shebang line as its first line is not +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has a shebang line as its first line is +# # granted execute permission. +# +# #!/usr/bin/env ruby +# puts 'hello, world' +# +# # good +# +# # A file which has not a shebang line as its first line is not +# # granted execute permission. +# +# puts 'hello, world' +# +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#33 +class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#39 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 + def autocorrect; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#59 + def executable?(processed_source); end + + # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#66 + def format_message_from(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#36 +RuboCop::Cop::Lint::ScriptPermission::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/script_permission.rb#37 +RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for self-assignments. +# +# @example +# # bad +# foo = foo +# foo, bar = foo, bar +# Foo = Foo +# hash['foo'] = hash['foo'] +# obj.attr = obj.attr +# +# # good +# foo = bar +# foo, bar = bar, foo +# Foo = Bar +# hash['foo'] = hash['bar'] +# obj.attr = obj.attr2 +# +# # good (method calls possibly can return different results) +# hash[foo] = hash[foo] +# @example AllowRBSInlineAnnotation: false (default) +# # bad +# foo = foo #: Integer +# foo, bar = foo, bar #: Integer +# Foo = Foo #: Integer +# hash['foo'] = hash['foo'] #: Integer +# obj.attr = obj.attr #: Integer +# @example AllowRBSInlineAnnotation: true +# # good +# foo = foo #: Integer +# foo, bar = foo, bar #: Integer +# Foo = Foo #: Integer +# hash['foo'] = hash['foo'] #: Integer +# obj.attr = obj.attr #: Integer +# +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#42 +class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#95 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#75 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#61 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#72 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#73 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#71 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#63 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#83 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#90 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#52 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#142 + def allow_rbs_inline_annotation?; end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#127 + def handle_attribute_assignment(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#115 + def handle_key_assignment(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#99 + def multiple_self_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#138 + def rbs_inline_annotation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#110 + def rhs_matches_lhs?(rhs, lhs); end +end + +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 +RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#43 +RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for `send`, `public_send`, and `__send__` methods +# when using mix-in. +# +# `include` and `prepend` methods were private methods until Ruby 2.0, +# they were mixed-in via `send` method. This cop uses Ruby 2.1 or +# higher style that can be called by public methods. +# And `extend` method that was originally a public method is also targeted +# for style unification. +# +# @example +# # bad +# Foo.send(:include, Bar) +# Foo.send(:prepend, Bar) +# Foo.send(:extend, Bar) +# +# # bad +# Foo.public_send(:include, Bar) +# Foo.public_send(:prepend, Bar) +# Foo.public_send(:extend, Bar) +# +# # bad +# Foo.__send__(:include, Bar) +# Foo.__send__(:prepend, Bar) +# Foo.__send__(:extend, Bar) +# +# # good +# Foo.include Bar +# Foo.prepend Bar +# Foo.extend Bar +# +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#36 +class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#53 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#46 + def send_with_mixin_argument?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#67 + def bad_location(node); end + + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#73 + def message(method, module_name, bad_method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#77 + def mixin_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41 +RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#40 +RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43 +RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42 +RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for shadowed arguments. +# +# This cop has `IgnoreImplicitReferences` configuration option. +# It means argument shadowing is used in order to pass parameters +# to zero arity `super` when `IgnoreImplicitReferences` is `true`. +# +# @example +# +# # bad +# do_something do |foo| +# foo = 42 +# puts foo +# end +# +# def do_something(foo) +# foo = 42 +# puts foo +# end +# +# # good +# do_something do |foo| +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# foo = foo + 42 +# puts foo +# end +# +# def do_something(foo) +# puts foo +# end +# @example IgnoreImplicitReferences: false (default) +# +# # bad +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# @example IgnoreImplicitReferences: true +# +# # good +# def do_something(foo) +# foo = 42 +# super +# end +# +# def do_something(foo) +# foo = super +# bar +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#66 +class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#76 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#70 + def uses_var?(param0, param1); end + + private + + # Get argument references without assignments' references + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#161 + def argument_references(argument); end + + # Find the first argument assignment, which doesn't reference the + # argument at the rhs. If the assignment occurs inside a branch or + # block, it is impossible to tell whether it's executed, so precise + # shadowing location is not known. + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#120 + def assignment_without_argument_usage(argument); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#82 + def check_argument(argument); end + + # Check whether the given node is always executed or not + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#152 + def conditional_assignment?(node, stop_search_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#171 + def ignore_implicit_references?; end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#144 + def reference_pos(node); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#95 + def shadowing_assignment(argument); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#72 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#67 +RuboCop::Cop::Lint::ShadowedArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for a rescued exception that get shadowed by a +# less specific exception being rescued before a more specific +# exception is rescued. +# +# An exception is considered shadowed if it is rescued after its +# ancestor is, or if it and its ancestor are both rescued in the +# same `rescue` statement. In both cases, the more specific rescue is +# unnecessary because it is covered by rescuing the less specific +# exception. (ie. `rescue Exception, StandardError` has the same behavior +# whether `StandardError` is included or not, because all ``StandardError``s +# are rescued by `rescue Exception`). +# +# @example +# +# # bad +# +# begin +# something +# rescue Exception +# handle_exception +# rescue StandardError +# handle_standard_error +# end +# +# # bad +# begin +# something +# rescue Exception, StandardError +# handle_error +# end +# +# # good +# +# begin +# something +# rescue StandardError +# handle_standard_error +# rescue Exception +# handle_exception +# end +# +# # good, however depending on runtime environment. +# # +# # This is a special case for system call errors. +# # System dependent error code depends on runtime environment. +# # For example, whether `Errno::EAGAIN` and `Errno::EWOULDBLOCK` are +# # the same error code or different error code depends on environment. +# # This good case is for `Errno::EAGAIN` and `Errno::EWOULDBLOCK` with +# # the same error code. +# begin +# something +# rescue Errno::EAGAIN, Errno::EWOULDBLOCK +# handle_standard_error +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#61 +class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#67 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#101 + def compare_exceptions(exception, other_exception); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#94 + def contains_multiple_levels_of_exceptions?(group); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119 + def evaluate_exceptions(group); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152 + def find_shadowing_rescue(rescues); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84 + def offense_range(rescues); end + + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#90 + def rescued_groups_for(rescues); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137 + def sorted?(rescued_groups); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#115 + def system_call_err?(error); end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#65 +RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of local variable names from an outer scope +# in block arguments or block-local variables. This mirrors the warning +# given by `ruby -cw` prior to Ruby 2.6: +# "shadowing outer local variable - foo". +# +# The cop is now disabled by default to match the upstream Ruby behavior. +# It's useful, however, if you'd like to avoid shadowing variables from outer +# scopes, which some people consider an anti-pattern that makes it harder +# to keep track of what's going on in a program. +# +# NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed +# because `Ractor` should not access outer variables. +# eg. following style is encouraged: +# +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- +# +# @example +# +# # bad +# def some_method +# foo = 1 +# +# 2.times do |foo| # shadowing outer `foo` +# do_something(foo) +# end +# end +# +# # good +# def some_method +# foo = 1 +# +# 2.times do |bar| +# do_something(bar) +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46 +class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#58 + def before_declaring_variable(variable, variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#50 + def ractor_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#101 + def find_conditional_node_from_ascendant(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#108 + def node_or_its_ascendant_conditional?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#77 + def same_conditions_node_different_branch?(variable, outer_local_variable); end + + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#91 + def variable_node(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#73 + def variable_used_in_declaration_of_outer?(variable, outer_local_variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#54 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#47 +RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) + +# Checks for `Hash` creation with a mutable default value. +# Creating a `Hash` in such a way will share the default value +# across all keys, causing unexpected behavior when modifying it. +# +# For example, when the `Hash` was created with an `Array` as the argument, +# calling `hash[:foo] << 'bar'` will also change the value of all +# other keys that have not been explicitly assigned to. +# +# @example +# # bad +# Hash.new([]) +# Hash.new({}) +# Hash.new(Array.new) +# Hash.new(Hash.new) +# +# # okay -- In rare cases that intentionally have this behavior, +# # without disabling the cop, you can set the default explicitly. +# h = Hash.new +# h.default = [] +# h[:a] << 1 +# h[:b] << 2 +# h # => {:a => [1, 2], :b => [1, 2]} +# +# # okay -- beware this will discard mutations and only remember assignments +# Hash.new { Array.new } +# Hash.new { Hash.new } +# Hash.new { {} } +# Hash.new { [] } +# +# # good - frozen solution will raise an error when mutation attempted +# Hash.new([].freeze) +# Hash.new({}.freeze) +# +# # good - using a proc will create a new object for each key +# h = Hash.new +# h.default_proc = ->(h, k) { [] } +# h.default_proc = ->(h, k) { {} } +# +# # good - using a block will create a new object for each key +# Hash.new { |h, k| h[k] = [] } +# Hash.new { |h, k| h[k] = {} } +# +# source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#47 +class RuboCop::Cop::Lint::SharedMutableDefault < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#64 + def capacity_keyword_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#53 + def hash_initialized_with_mutable_shared_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#68 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#48 +RuboCop::Cop::Lint::SharedMutableDefault::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/shared_mutable_default.rb#50 +RuboCop::Cop::Lint::SharedMutableDefault::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks unexpected overrides of the `Struct` built-in methods +# via `Struct.new`. +# +# @example +# # bad +# Bad = Struct.new(:members, :clone, :count) +# b = Bad.new([], true, 1) +# b.members #=> [] (overriding `Struct#members`) +# b.clone #=> true (overriding `Object#clone`) +# b.count #=> 1 (overriding `Enumerable#count`) +# +# # good +# Good = Struct.new(:id, :name) +# g = Good.new(1, "foo") +# g.members #=> [:id, :name] +# g.clone #=> # +# g.count #=> 2 +# +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#24 +class RuboCop::Cop::Lint::StructNewOverride < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#54 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#49 + def struct_new(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#25 +RuboCop::Cop::Lint::StructNewOverride::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#27 +RuboCop::Cop::Lint::StructNewOverride::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#46 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_MEMBER_NAME_TYPES = T.let(T.unsafe(nil), Array) + +# This is based on `Struct.instance_methods.sort` in Ruby 4.0.0. +# +# source://rubocop//lib/rubocop/cop/lint/struct_new_override.rb#30 +RuboCop::Cop::Lint::StructNewOverride::STRUCT_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# Checks for `rescue` blocks with no body. +# +# @example +# +# # bad +# def some_method +# do_something +# rescue +# end +# +# # bad +# begin +# do_something +# rescue +# end +# +# # good +# def some_method +# do_something +# rescue +# handle_exception +# end +# +# # good +# begin +# do_something +# rescue +# handle_exception +# end +# @example AllowComments: false +# +# # bad +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # bad +# begin +# do_something +# rescue +# # do nothing +# end +# @example AllowComments: true (default) +# +# # good +# def some_method +# do_something +# rescue +# # do nothing +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# @example AllowNil: false +# +# # bad +# def some_method +# do_something +# rescue +# nil +# end +# +# # bad +# begin +# do_something +# rescue +# nil +# end +# +# # bad +# do_something rescue nil +# @example AllowNil: true (default) +# +# # good +# def some_method +# do_something +# rescue +# nil +# end +# +# # good +# begin +# do_something +# rescue +# # do nothing +# end +# +# # good +# do_something rescue nil +# +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#105 +class RuboCop::Cop::Lint::SuppressedException < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#108 + def on_resbody(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#118 + def comment_between_rescue_and_end?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#126 + def nil_body?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#106 +RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) + +# Checks for cases where exceptions unrelated to the numeric constructors `Integer()`, +# `Float()`, `BigDecimal()`, `Complex()`, and `Rational()` may be unintentionally swallowed. +# +# @example +# +# # bad +# Integer(arg) rescue nil +# +# # bad +# begin +# Integer(arg) +# rescue +# nil +# end +# +# # bad +# begin +# Integer(arg) +# rescue +# end +# +# # good +# Integer(arg, exception: false) +# +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#41 +class RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#56 + def begin_numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#75 + def constructor_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#49 + def numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#65 + def numeric_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#82 + def on_rescue(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#103 + def expected_exception_classes_only?(exception_classes); end +end + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#46 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::EXPECTED_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#45 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of literal strings converted to +# a symbol where a literal symbol could be used instead. +# +# There are two possible styles for this cop. +# `strict` (default) will register an offense for any incorrect usage. +# `consistent` additionally requires hashes to use the same style for +# every symbol key (ie. if any symbol key needs to be quoted it requires +# all keys to be quoted). +# +# @example +# # bad +# 'string'.to_sym +# :symbol.to_sym +# 'underscored_string'.to_sym +# :'underscored_symbol' +# 'hyphenated-string'.to_sym +# "string_#{interpolation}".to_sym +# +# # good +# :string +# :symbol +# :underscored_string +# :underscored_symbol +# :'hyphenated-string' +# :"string_#{interpolation}" +# @example EnforcedStyle: consistent +# +# # bad +# { +# a: 1, +# 'b-c': 2 +# } +# +# # good (quote all keys if any need quoting) +# { +# 'a': 1, +# 'b-c': 2 +# } +# +# # good (no quoting required) +# { +# a: 1, +# b: 2 +# } +# @example EnforcedStyle: strict (default) +# +# # bad +# { +# 'a': 1, +# "b": 2, +# 'c-d': 3 +# } +# +# # good (don't quote keys that don't require quoting) +# { +# a: 1, +# b: 2, +# 'c-d': 3 +# } +# +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68 +class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::SymbolHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#105 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#88 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#147 + def correct_hash_key(node); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#166 + def correct_inconsistent_hash_keys(keys); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#139 + def in_alias?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#143 + def in_percent_literal_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#126 + def properly_quoted?(source, value); end + + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#122 + def register_offense(node, correction:, message: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#135 + def requires_quotes?(sym_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#73 +RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 +RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 +RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Repacks Parser's diagnostics/errors +# into RuboCop's offenses. +# +# source://rubocop//lib/rubocop/cop/lint/syntax.rb#8 +class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#11 + def on_other_file; end + + private + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#22 + def add_offense_from_diagnostic(diagnostic, ruby_version); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#32 + def add_offense_from_error(error); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#37 + def beautify_message(message); end + + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#43 + def find_severity(_range, _severity); end +end + +# source://rubocop//lib/rubocop/cop/lint/syntax.rb#9 +RuboCop::Cop::Lint::Syntax::LEVELS = T.let(T.unsafe(nil), Array) + +# Ensures that `to_enum`/`enum_for`, called for the current method, +# has correct arguments. +# +# @example +# # bad +# def foo(x, y = 1) +# return to_enum(__callee__, x) # `y` is missing +# end +# +# # good +# def foo(x, y = 1) +# # Alternatives to `__callee__` are `__method__` and `:foo`. +# return to_enum(__callee__, x, y) +# end +# +# # good +# def foo(x, y = 1) +# # It is also allowed if it is wrapped in some method like Sorbet. +# return to_enum(T.must(__callee__), x, y) +# end +# +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#27 +class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#33 + def enum_conversion_call?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#38 + def method_name?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#43 + def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#76 + def argument_match?(send_arg, def_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61 + def arguments_match?(arguments, def_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#28 +RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#30 +RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks to make sure `#to_json` includes an optional argument. +# When overriding `#to_json`, callers may invoke JSON +# generation via `JSON.generate(your_obj)`. Since `JSON#generate` allows +# for an optional argument, your method should too. +# +# @example +# # bad - incorrect arity +# def to_json +# JSON.generate([x, y]) +# end +# +# # good - preserving args +# def to_json(*args) +# JSON.generate([x, y], *args) +# end +# +# # good - discarding args +# def to_json(*_args) +# JSON.generate([x, y]) +# end +# +# source://rubocop//lib/rubocop/cop/lint/to_json.rb#27 +class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/to_json.rb#32 + def on_def(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/to_json.rb#30 +RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) + +# Checks for top level return with arguments. If there is a +# top-level return statement with an argument, then the argument is +# always ignored. This is detected automatically since Ruby 2.7. +# +# @example +# # bad +# return 1 +# +# # good +# return +# +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#16 +class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#21 + def on_return(return_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#35 + def remove_arguments(corrector, return_node); end + + # This cop works by validating the ancestors of the return node. A + # top-level return node's ancestors should not be of block, def, or + # defs type. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#42 + def top_level_return?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#31 + def top_level_return_with_any_argument?(return_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19 +RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing commas in attribute declarations, such as +# `#attr_reader`. Leaving a trailing comma will nullify the next method +# definition by overriding it with a getter method. +# +# @example +# +# # bad +# class Foo +# attr_reader :foo, +# +# def bar +# puts "Unreachable." +# end +# end +# +# # good +# class Foo +# attr_reader :foo +# +# def bar +# puts "No problem!" +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#30 +class RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#36 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#46 + def trailing_comma_range(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb#34 +RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration::MSG = T.let(T.unsafe(nil), String) + +# Checks for "triple quotes" (strings delimited by any odd number +# of quotes greater than 1). +# +# Ruby allows multiple strings to be implicitly concatenated by just +# being adjacent in a statement (ie. `"foo""bar" == "foobar"`). This sometimes +# gives the impression that there is something special about triple quotes, but +# in fact it is just extra unnecessary quotes and produces the same string. Each +# pair of quotes produces an additional concatenated empty string, so the result +# is still only the "actual" string within the delimiters. +# +# NOTE: Although this cop is called triple quotes, the same behavior is present +# for strings delimited by 5, 7, etc. quotation marks. +# +# @example +# # bad +# """ +# A string +# """ +# +# # bad +# ''' +# A string +# ''' +# +# # good +# " +# A string +# " +# +# # good +# < b } +# values.sort { |*x| x[0] <=> x[1] } +# +# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#41 +class RuboCop::Cop::Lint::UnexpectedBlockArity < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#44 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#56 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#55 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#64 + def acceptable?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#76 + def arg_count(node); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#72 + def expected_arity(method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#68 + def included_method?(name); end + + # source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#60 + def methods; end +end + +# source://rubocop//lib/rubocop/cop/lint/unexpected_block_arity.rb#42 +RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) + +# Checks for using Fixnum or Bignum constant. +# +# @example +# +# # bad +# 1.is_a?(Fixnum) +# 1.is_a?(Bignum) +# +# # good +# 1.is_a?(Integer) +# +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16 +class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22 + def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 + def on_const(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19 +RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) + +# Looks for `reduce` or `inject` blocks where the value returned (implicitly or +# explicitly) does not include the accumulator. A block is considered valid as +# long as at least one return value includes the accumulator. +# +# If the accumulator is not included in the return value, then the entire +# block will just return a transformation of the last element value, and +# could be rewritten as such without a loop. +# +# Also catches instances where an index of the accumulator is returned, as +# this may change the type of object being retained. +# +# NOTE: For the purpose of reducing false positives, this cop only flags +# returns in `reduce` blocks where the element is the only variable in +# the expression (since we will not be able to tell what other variables +# relate to via static analysis). +# +# @example +# +# # bad +# (1..4).reduce(0) do |acc, el| +# el * 2 +# end +# +# # bad, may raise a NoMethodError after the first iteration +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# end +# +# # good +# (1..4).reduce(0) do |acc, el| +# acc + el * 2 +# end +# +# # good, element is returned but modified using the accumulator +# values.reduce do |acc, el| +# el << acc +# el +# end +# +# # good, returns the accumulator instead of the index +# %w(a b c).reduce({}) do |acc, letter| +# acc[letter] = true +# acc +# end +# +# # good, at least one branch returns the accumulator +# values.reduce(nil) do |result, value| +# break result if something? +# value +# end +# +# # good, recursive +# keys.reduce(self) { |result, key| result[key] } +# +# # ignored as the return value cannot be determined +# enum.reduce do |acc, el| +# x = foo(acc, el) +# bar(x) +# end +# +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#65 +class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#78 + def accumulator_index?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#83 + def element_modified?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#104 + def expression_values(param0); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#93 + def lvar_used?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#115 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#123 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#122 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#70 + def reduce_with_block?(param0 = T.unsafe(nil)); end + + private + + # Determine if a return value is acceptable for the purposes of this cop + # If it is an expression containing the accumulator, it is acceptable + # Otherwise, it is only unacceptable if it contains the iterated element, since we + # otherwise do not have enough information to prevent false positives. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#192 + def acceptable_return?(return_val, element_name); end + + # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#200 + def allowed_type?(parent_node); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#160 + def block_arg_name(node, index); end + + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#143 + def check_return_values(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#177 + def potential_offense?(return_values, block_body, element_name, accumulator_name); end + + # Return values in a block are either the value given to next, + # the last line of a multiline block, or the only line of the block + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#129 + def return_values(block_body_node); end + + # Look for an index of the accumulator being returned, except where the index + # is the element. + # This is always an offense, in order to try to catch potential exceptions + # due to type mismatches + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#168 + def returned_accumulator_index(return_values, accumulator_name, element_name); end + + # If the accumulator is used in any return value, the node is acceptable since + # the accumulator has a chance to change each iteration + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#184 + def returns_accumulator_anywhere?(return_values, accumulator_name); end +end + +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#66 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#67 +RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String) + +# Checks for unreachable code. +# The check are based on the presence of flow of control +# statement in non-final position in `begin` (implicit) blocks. +# +# @example +# +# # bad +# def some_method +# return +# do_something +# end +# +# # bad +# def some_method +# if cond +# return +# else +# return +# end +# do_something +# end +# +# # good +# def some_method +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32 +class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base + # @return [UnreachableCode] a new instance of UnreachableCode + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#48 + def after_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#71 + def flow_command?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#52 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#41 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#46 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#62 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#45 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#108 + def check_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#102 + def check_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#82 + def flow_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#122 + def instance_eval_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#66 + def redefinable_flow_method?(method); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#118 + def register_redefinition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#126 + def report_on_flow_command?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33 +RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) + +# Checks for loops that will have at most one iteration. +# +# A loop that can never reach the second iteration is a possible error in the code. +# In rare cases where only one iteration (or at most one iteration) is intended behavior, +# the code should be refactored to use `if` conditionals. +# +# NOTE: Block methods that are used with ``Enumerable``s are considered to be loops. +# +# `AllowedPatterns` can be used to match against the block receiver in order to allow +# code that would otherwise be registered as an offense (eg. `times` used not in an +# `Enumerable` context). +# +# @example +# # bad +# while node +# do_something(node) +# node = node.parent +# break +# end +# +# # good +# while node +# do_something(node) +# node = node.parent +# end +# +# # bad +# def verify_list(head) +# item = head +# begin +# if verify(item) +# return true +# else +# return false +# end +# end while(item) +# end +# +# # good +# def verify_list(head) +# item = head +# begin +# if verify(item) +# item = item.next +# else +# return false +# end +# end while(item) +# +# true +# end +# +# # bad +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# else +# raise NotFoundError +# end +# end +# end +# +# # good +# def find_something(items) +# items.each do |item| +# if something?(item) +# return item +# end +# end +# raise NotFoundError +# end +# +# # bad +# 2.times { raise ArgumentError } +# @example AllowedPatterns: ['(exactly|at_least|at_most)\(\d+\)\.times'] (default) +# +# # good +# exactly(2).times { raise StandardError } +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#86 +class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#142 + def break_command?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#100 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#98 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#105 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#104 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#95 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#97 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#92 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#96 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#152 + def break_statement?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#118 + def check(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#175 + def check_case(node); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#169 + def check_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 + def conditional_continue_keyword?(break_statement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#109 + def loop_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#189 + def preceded_by_continue_statement?(break_statement); end + + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#129 + def statements(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#90 +RuboCop::Cop::Lint::UnreachableLoop::CONTINUE_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#89 +RuboCop::Cop::Lint::UnreachableLoop::MSG = T.let(T.unsafe(nil), String) + +# Checks for unreachable `in` pattern branches in `case...in` statements. +# +# An `in` branch is unreachable when a previous branch uses an unguarded +# catch-all pattern that matches any value unconditionally. Any `in` branches +# (and `else`) that follow such a catch-all are dead code. +# +# A catch-all pattern is one of: +# +# * A bare variable capture (`in x`) +# * An underscore (`in _`) +# * A pattern alias where the left side is a catch-all (`in _ => y`) +# * An alternation pattern where at least one alternative is a catch-all +# (`in _ | Integer`) +# +# NOTE: A catch-all pattern with a guard clause (e.g., `in _ if condition`) +# does NOT make subsequent branches unreachable because the guard might +# not be satisfied. +# +# @example +# +# # bad +# case value +# in Integer +# handle_integer +# in x +# handle_other +# in String +# handle_string +# else +# handle_else +# end +# +# # good +# case value +# in Integer +# handle_integer +# in String +# handle_string +# in x +# handle_other +# end +# +# # bad - else is unreachable after catch-all +# case value +# in Integer +# handle_integer +# in _ +# handle_other +# else +# handle_else +# end +# +# # good - guard clause means catch-all might not match +# case value +# in x if x.positive? +# handle_positive +# in Integer +# handle_integer +# else +# handle_other +# end +# +# source://rubocop//lib/rubocop/cop/lint/unreachable_pattern_branch.rb#68 +class RuboCop::Cop::Lint::UnreachablePatternBranch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/unreachable_pattern_branch.rb#76 + def on_case_match(case_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unreachable_pattern_branch.rb#98 + def catch_all_pattern?(pattern); end +end + +# source://rubocop//lib/rubocop/cop/lint/unreachable_pattern_branch.rb#71 +RuboCop::Cop::Lint::UnreachablePatternBranch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/unreachable_pattern_branch.rb#72 +RuboCop::Cop::Lint::UnreachablePatternBranch::MSG_ELSE = T.let(T.unsafe(nil), String) + +# Common functionality for cops handling unused arguments. +# +# source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#7 +module RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#10 + def after_leaving_scope(scope, _variable_table); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/unused_argument.rb#16 + def check_argument(variable); end +end + +# Checks for unused block arguments. +# +# @example +# # bad +# do_something do |used, unused| +# puts used +# end +# +# do_something do |bar| +# puts :foo +# end +# +# define_method(:foo) do |bar| +# puts :baz +# end +# +# # good +# do_something do |used, _unused| +# puts used +# end +# +# do_something do +# puts :foo +# end +# +# define_method(:foo) do |_bar| +# puts :baz +# end +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# do_something do |unused: 42| +# foo +# end +# @example AllowUnusedKeywordArguments: true +# # good +# do_something do |unused: 42| +# foo +# end +# @example IgnoreEmptyBlocks: false +# # bad +# do_something { |unused| } +# @example IgnoreEmptyBlocks: true (default) +# # good +# do_something { |unused| } +# +# source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#55 +class RuboCop::Cop::Lint::UnusedBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#162 + def allow_unused_keyword_arguments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#81 + def allowed_block?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#85 + def allowed_keyword_argument?(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#99 + def augment_message(message, variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#65 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#69 + def check_argument(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#149 + def define_method_call?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#156 + def empty_block?(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#166 + def ignore_empty_blocks?; end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#89 + def message(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#132 + def message_for_lambda(variable, all_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#120 + def message_for_normal_block(variable, all_arguments); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#144 + def message_for_underscore_prefix(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#77 + def used_block_local?(variable); end + + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#112 + def variable_type(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/unused_block_argument.rb#59 + def joining_forces; end + end +end + +# Checks for unused method arguments. +# +# @example +# # bad +# def some_method(used, unused, _unused_but_allowed) +# puts used +# end +# +# # good +# def some_method(used, _unused, _unused_but_allowed) +# puts used +# end +# @example AllowUnusedKeywordArguments: false (default) +# # bad +# def do_something(used, unused: 42) +# used +# end +# @example AllowUnusedKeywordArguments: true +# # good +# def do_something(used, unused: 42) +# used +# end +# @example IgnoreEmptyMethods: false +# # bad +# def do_something(unused) +# end +# @example IgnoreEmptyMethods: true (default) +# # good +# def do_something(unused) +# end +# @example IgnoreNotImplementedMethods: false +# # bad +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# @example IgnoreNotImplementedMethods: true +# # with `NotImplementedExceptions: ['AbstractMethodError']` +# +# # good +# def do_something(unused) +# raise AbstractMethodError +# end +# @example IgnoreNotImplementedMethods: true (default) +# # with default value of `NotImplementedExceptions: ['NotImplementedError']` +# +# # good +# def do_something(unused) +# raise NotImplementedError +# end +# +# def do_something_else(unused) +# fail "TODO" +# end +# +# source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#70 +class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 + def not_implemented?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#128 + def allowed_exception_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#90 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#94 + def check_argument(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#102 + def ignored_method?(body); end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#107 + def message(variable); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#80 + def autocorrect_incompatible_with; end + + # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#84 + def joining_forces; end + end +end + +# Identifies places where `URI.escape` can be replaced by +# `CGI.escape`, `URI.encode_www_form`, or `URI.encode_www_form_component` +# depending on your specific use case. +# Also this cop identifies places where `URI.unescape` can be replaced by +# `CGI.unescape`, `URI.decode_www_form`, +# or `URI.decode_www_form_component` depending on your specific use case. +# +# @example +# # bad +# URI.escape('http://example.com') +# URI.encode('http://example.com') +# +# # good +# CGI.escape('http://example.com') +# URI.encode_uri_component(uri) # Since Ruby 3.1 +# URI.encode_www_form([['example', 'param'], ['lang', 'en']]) +# URI.encode_www_form(page: 10, locale: 'en') +# URI.encode_www_form_component('http://example.com') +# +# # bad +# URI.unescape(enc_uri) +# URI.decode(enc_uri) +# +# # good +# CGI.unescape(enc_uri) +# URI.decode_uri_component(uri) # Since Ruby 3.1 +# URI.decode_www_form(enc_uri) +# URI.decode_www_form_component(enc_uri) +# +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#34 +class RuboCop::Cop::Lint::UriEscapeUnescape < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#59 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#53 + def uri_escape_unescape?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#35 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_ESCAPE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#40 +RuboCop::Cop::Lint::UriEscapeUnescape::ALTERNATE_METHODS_OF_URI_UNESCAPE = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#49 +RuboCop::Cop::Lint::UriEscapeUnescape::METHOD_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#46 +RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#50 +RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `URI.regexp` is obsolete and should not be used. +# +# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. +# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. +# +# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, +# consider manually changing the code as follows: +# +# [source,ruby] +# ---- +# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER +# ---- +# +# @example +# # bad +# URI.regexp('http://example.com') +# +# # good - Ruby 3.3 or lower +# URI::DEFAULT_PARSER.make_regexp('http://example.com') +# +# # good - Ruby 3.4 or higher +# URI::RFC2396_PARSER.make_regexp('http://example.com') +# +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#29 +class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#40 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#36 + def uri_constant?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#32 +RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#33 +RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant access modifiers, including those with no +# code, those which are repeated, those which are on top-level, and +# leading `public` modifiers in a class or module body. +# Conditionally-defined methods are considered as always being defined, +# and thus access modifiers guarding such methods are not redundant. +# +# This cop has `ContextCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create its own context in the module's current access context. +# +# It also has `MethodCreatingMethods` option. The default setting value +# is an empty array that means no method is specified. +# This setting is an array of methods which, when called, are known to +# create other methods in the module's current access context. +# +# @example +# # bad +# class Foo +# public # this is redundant (default access is public) +# +# def method +# end +# end +# +# # bad +# class Foo +# # The following is redundant (methods defined on the class' +# # singleton class are not affected by the private modifier) +# private +# +# def self.method3 +# end +# end +# +# # bad +# class Foo +# protected +# +# define_method(:method2) do +# end +# +# protected # this is redundant (repeated from previous modifier) +# +# [1,2,3].each do |i| +# define_method("foo#{i}") do +# end +# end +# end +# +# # bad +# class Foo +# private # this is redundant (no following methods are defined) +# end +# +# # bad +# private # this is useless (access modifiers have no effect on top-level) +# +# def method +# end +# +# # good +# class Foo +# private # this is not redundant (a method is defined) +# +# def method2 +# end +# end +# +# # good +# class Foo +# # The following is not redundant (conditionally defined methods are +# # considered as always defining a method) +# private +# +# if condition? +# def method +# end +# end +# end +# +# # good +# class Foo +# protected # this is not redundant (a method is defined) +# +# define_method(:method2) do +# end +# end +# @example ContextCreatingMethods: concerning +# # Lint/UselessAccessModifier: +# # ContextCreatingMethods: +# # - concerning +# +# # good +# require 'active_support/concern' +# class Foo +# concerning :Bar do +# def some_public_method +# end +# +# private +# +# def some_private_method +# end +# end +# +# # this is not redundant because `concerning` created its own context +# private +# +# def some_other_private_method +# end +# end +# @example MethodCreatingMethods: delegate +# # Lint/UselessAccessModifier: +# # MethodCreatingMethods: +# # - delegate +# +# # good +# require 'active_support/core_ext/module/delegation' +# class Foo +# # this is not redundant because `delegate` creates methods +# private +# +# delegate :method_a, to: :method_b +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#133 +class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#184 + def class_or_instance_eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#179 + def dynamic_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#154 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#145 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#139 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#152 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#142 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#151 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#143 + def on_sclass(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#174 + def static_method_definition?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#200 + def access_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#302 + def any_context_creating_methods?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#275 + def any_method_definition?(child); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#167 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#214 + def check_child_nodes(node, unused, cur_vis); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#244 + def check_new_visibility(node, unused, new_vis, cur_vis); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#188 + def check_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#204 + def check_scope(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#233 + def check_send_node(node, cur_vis, unused); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#296 + def eval_call?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#265 + def included_block?(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#269 + def method_definition?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#292 + def start_of_new_scope?(child); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_access_modifier.rb#137 +RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for every useless assignment to local variable in every +# scope. +# The basic idea for this cop was from the warning of `ruby -cw`: +# +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- +# +# Currently this cop has advanced logic that detects unreferenced +# reassignments and properly handles varied cases such as branch, loop, +# rescue, ensure, etc. +# +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause `NameError` if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# +# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables +# can lead to a syntax error, so this case is not autocorrected. +# +# @example +# +# # bad +# def some_method +# some_var = 1 +# do_something +# end +# +# # good +# def some_method +# some_var = 1 +# do_something(some_var) +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 +class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#51 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#174 + def autocorrect(corrector, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#113 + def chained_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#63 + def check_for_unused_assignment(variable, assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#55 + def check_for_unused_assignments(variable); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 + def collect_variable_like_names(scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#84 + def ignored_assignment?(variable, assignment_node, assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#89 + def message_for_useless_assignment(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#119 + def message_specification(assignment, variable); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + def multiple_assignment_message(variable_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#95 + def offense_range(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#134 + def operator_assignment_message(scope, assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#191 + def remove_exception_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#215 + def remove_local_variable_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#204 + def remove_trailing_character_from_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#200 + def rename_variable_with_underscore(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#208 + def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end + + # TODO: More precise handling (rescue, ensure, nested begin, etc.) + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#148 + def return_value_node_of_scope(scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + def sequential_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#141 + def similar_name_message(variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#219 + def variable_in_loop_condition?(assignment_node, variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#167 + def variable_like_method_invocation?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#47 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 +RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless constant scoping. Private constants must be defined using +# `private_constant`. Even if `private` access modifier is used, it is public scope despite +# its appearance. +# +# It does not support autocorrection due to behavior change and multiple ways to fix it. +# Or a public constant may be intended. +# +# @example +# +# # bad +# class Foo +# private +# PRIVATE_CONST = 42 +# end +# +# # good +# class Foo +# PRIVATE_CONST = 42 +# private_constant :PRIVATE_CONST +# end +# +# # good +# class Foo +# PUBLIC_CONST = 42 # If private scope is not intended. +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#32 +class RuboCop::Cop::Lint::UselessConstantScoping < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#40 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#36 + def private_constants(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#49 + def after_private_modifier?(left_siblings); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#59 + def private_constantize?(right_siblings, const_value); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#33 +RuboCop::Cop::Lint::UselessConstantScoping::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of method `fetch` or `Array.new` with default value argument +# and block. In such cases, block will always be used as default value. +# +# This cop emulates Ruby warning "block supersedes default value argument" which +# applies to `Array.new`, `Array#fetch`, `Hash#fetch`, `ENV.fetch` and +# `Thread#fetch`. +# +# A `fetch` call without a receiver is considered a custom method and does not register +# an offense. +# +# @example +# # bad +# x.fetch(key, default_value) { block_value } +# Array.new(size, default_value) { block_value } +# +# # good +# x.fetch(key) { block_value } +# Array.new(size) { block_value } +# +# # also good - in case default value argument is desired instead +# x.fetch(key, default_value) +# Array.new(size, default_value) +# +# # good - keyword arguments aren't registered as offenses +# x.fetch(key, keyword: :arg) { block_value } +# @example AllowedReceivers: ['Rails.cache'] +# # good +# Rails.cache.fetch(name, options) { block } +# +# source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#50 +class RuboCop::Cop::Lint::UselessDefaultValueArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#59 + def default_value_argument_and_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#80 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#69 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#84 + def hash_without_braces?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#54 +RuboCop::Cop::Lint::UselessDefaultValueArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_default_value_argument.rb#56 +RuboCop::Cop::Lint::UselessDefaultValueArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calls to `defined?` with strings or symbols as the argument. +# Such calls will always return `'expression'`, you probably meant to +# check for the existence of a constant, method, or variable instead. +# +# `defined?` is part of the Ruby syntax and doesn't behave like normal methods. +# You can safely pass in what you are checking for directly, without encountering +# a `NameError`. +# +# When interpolation is used, oftentimes it is not possible to write the +# code with `defined?`. In these cases, switch to one of the more specific methods: +# +# * `class_variable_defined?` +# * `const_defined?` +# * `method_defined?` +# * `instance_variable_defined?` +# * `binding.local_variable_defined?` +# +# @example +# +# # bad +# defined?('FooBar') +# defined?(:FooBar) +# defined?(:foo_bar) +# defined?('foo_bar') +# +# # good +# defined?(FooBar) +# defined?(foo_bar) +# +# # bad - interpolation +# bar = 'Bar' +# defined?("Foo::#{bar}::Baz") +# +# # good +# bar = 'Bar' +# defined?(Foo) && Foo.const_defined?(bar) && Foo.const_get(bar).const_defined?(:Baz) +# +# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#42 +class RuboCop::Cop::Lint::UselessDefined < ::RuboCop::Cop::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#46 + def on_defined?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#43 +RuboCop::Cop::Lint::UselessDefined::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_defined.rb#44 +RuboCop::Cop::Lint::UselessDefined::TYPES = T.let(T.unsafe(nil), Hash) + +# Checks for useless `else` in `begin..end` without `rescue`. +# +# NOTE: This syntax is no longer valid on Ruby 2.6 or higher. +# +# @example +# +# # bad +# begin +# do_something +# else +# do_something_else # This will never be run. +# end +# +# # good +# begin +# do_something +# rescue +# handle_errors +# else +# do_something_else +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27 +class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30 +RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) + +# Checks for useless method definitions, specifically: empty constructors +# and methods just delegating to `super`. +# +# @example +# # bad +# def initialize +# super +# end +# +# def method +# super +# end +# +# # good - with default arguments +# def initialize(x = Object.new) +# super +# end +# +# # good +# def initialize +# super +# initialize_internals +# end +# +# def method(*args) +# super(:extra_arg, *args) +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#38 +class RuboCop::Cop::Lint::UselessMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#53 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#65 + def delegating?(node, def_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#57 + def method_definition_with_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#61 + def use_rest_or_optional_args?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 +RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#56 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#44 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#42 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#39 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#69 + def useless?(operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#36 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for useless OR (`||` and `or`) expressions. +# +# Some methods always return a truthy value, even when called +# on `nil` (e.g. `nil.to_i` evaluates to `0`). Therefore, OR expressions +# appended after these methods will never evaluate. +# +# @example +# +# # bad +# x.to_a || fallback +# x.to_c || fallback +# x.to_d || fallback +# x.to_i || fallback +# x.to_f || fallback +# x.to_h || fallback +# x.to_r || fallback +# x.to_s || fallback +# x.to_sym || fallback +# x.intern || fallback +# x.inspect || fallback +# x.hash || fallback +# x.object_id || fallback +# x.__id__ || fallback +# +# x.to_s or fallback +# +# # good - if fallback is same as return value of method called on nil +# x.to_a # nil.to_a returns [] +# x.to_c # nil.to_c returns (0+0i) +# x.to_d # nil.to_d returns 0.0 +# x.to_i # nil.to_i returns 0 +# x.to_f # nil.to_f returns 0.0 +# x.to_h # nil.to_h returns {} +# x.to_r # nil.to_r returns (0/1) +# x.to_s # nil.to_s returns '' +# x.to_sym # nil.to_sym raises an error +# x.intern # nil.intern raises an error +# x.inspect # nil.inspect returns "nil" +# x.hash # nil.hash returns an Integer +# x.object_id # nil.object_id returns an Integer +# x.__id__ # nil.object_id returns an Integer +# +# # good - if the intention is not to call the method on nil +# x&.to_a || fallback +# x&.to_c || fallback +# x&.to_d || fallback +# x&.to_i || fallback +# x&.to_f || fallback +# x&.to_h || fallback +# x&.to_r || fallback +# x&.to_s || fallback +# x&.to_sym || fallback +# x&.intern || fallback +# x&.inspect || fallback +# x&.hash || fallback +# x&.object_id || fallback +# x&.__id__ || fallback +# +# x&.to_s or fallback +# +# source://rubocop//lib/rubocop/cop/lint/useless_or.rb#73 +class RuboCop::Cop::Lint::UselessOr < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_or.rb#87 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_or.rb#83 + def truthy_return_value_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_or.rb#100 + def report_offense(or_node, truthy_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_or.rb#76 +RuboCop::Cop::Lint::UselessOr::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_or.rb#78 +RuboCop::Cop::Lint::UselessOr::TRUTHY_RETURN_VALUE_METHODS = T.let(T.unsafe(nil), Set) + +# Checks for useless ``rescue``s, which only reraise rescued exceptions. +# +# @example +# # bad +# def foo +# do_something +# rescue +# raise +# end +# +# # bad +# def foo +# do_something +# rescue => e +# raise # or 'raise e', or 'raise $!', or 'raise $ERROR_INFO' +# end +# +# # good +# def foo +# do_something +# rescue +# do_cleanup +# raise +# end +# +# # bad (latest rescue) +# def foo +# do_something +# rescue ArgumentError +# # noop +# rescue +# raise +# end +# +# # good (not the latest rescue) +# def foo +# do_something +# rescue ArgumentError +# raise +# rescue +# # noop +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#49 +class RuboCop::Cop::Lint::UselessRescue < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#52 + def on_rescue(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#83 + def exception_objects(resbody_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#60 + def only_reraising?(resbody_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#75 + def use_exception_variable_in_ensure?(resbody_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_rescue.rb#50 +RuboCop::Cop::Lint::UselessRescue::MSG = T.let(T.unsafe(nil), String) + +# Looks for `ruby2_keywords` calls for methods that do not need it. +# +# `ruby2_keywords` should only be called on methods that accept an argument splat +# (`\*args`) but do not explicit keyword arguments (`k:` or `k: true`) or +# a keyword splat (`**kwargs`). +# +# @example +# # good (splat argument without keyword arguments) +# ruby2_keywords def foo(*args); end +# +# # bad (no arguments) +# ruby2_keywords def foo; end +# +# # good +# def foo; end +# +# # bad (positional argument) +# ruby2_keywords def foo(arg); end +# +# # good +# def foo(arg); end +# +# # bad (double splatted argument) +# ruby2_keywords def foo(**args); end +# +# # good +# def foo(**args); end +# +# # bad (keyword arguments) +# ruby2_keywords def foo(i:, j:); end +# +# # good +# def foo(i:, j:); end +# +# # bad (splat argument with keyword arguments) +# ruby2_keywords def foo(*args, i:, j:); end +# +# # good +# def foo(*args, i:, j:); end +# +# # bad (splat argument with double splat) +# ruby2_keywords def foo(*args, **kwargs); end +# +# # good +# def foo(*args, **kwargs); end +# +# # bad (ruby2_keywords given a symbol) +# def foo; end +# ruby2_keywords :foo +# +# # good +# def foo; end +# +# # bad (ruby2_keywords with dynamic method) +# define_method(:foo) { |arg| } +# ruby2_keywords :foo +# +# # good +# define_method(:foo) { |arg| } +# +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#66 +class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base + # Looks for statically or dynamically defined methods with a given name + # + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#72 + def method_definition(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#79 + def on_send(node); end + + private + + # `ruby2_keywords` is only allowed if there's a `restarg` and no keyword arguments + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#118 + def allowed_arguments?(arguments); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#109 + def find_method_definition(node, method_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#91 + def inspect_def(node, def_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#97 + def inspect_sym(node, sym_node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#67 +RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_ruby2_keywords.rb#68 +RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for setter call to local variable as the final +# expression of a function definition. +# +# @example +# +# # bad +# def something +# x = Something.new +# x.attr = 5 +# end +# +# # good +# def something +# x = Something.new +# x.attr = 5 +# x +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31 +class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#54 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59 + def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 + def last_expression(body); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 +RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34 +RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) + +# This class tracks variable assignments in a method body +# and if a variable contains object passed as argument at the end of +# the method. +# +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72 +class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker + # @return [MethodVariableTracker] a new instance of MethodVariableTracker + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73 + def initialize(body_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 + def constructor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 + def contain_local_object?(variable_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#140 + def process_assignment(asgn_node, rhs_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 + def process_assignment_node(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#131 + def process_binary_operator_assignment(op_asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#123 + def process_logical_operator_assignment(asgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#109 + def process_multiple_assignment(masgn_node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 + def scan(node, &block); end +end + +# Checks for uses of `Integer#times` that will never yield +# (when the integer ``<= 0``) or that will only ever yield once +# (`1.times`). +# +# @example +# # bad +# -5.times { do_something } +# 0.times { do_something } +# 1.times { do_something } +# 1.times { |i| do_something(i) } +# +# # good +# do_something +# do_something(1) +# +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#24 +class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#37 + def block_arg(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#42 + def block_reassigns_arg?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#32 + def times_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#62 + def autocorrect(corrector, count, node, proc_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#84 + def autocorrect_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#80 + def autocorrect_block_pass(corrector, node, proc_name); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#94 + def fix_indentation(source, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#72 + def never_process?(count, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#106 + def own_line?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_times.rb#76 + def remove_node(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#28 +RuboCop::Cop::Lint::UselessTimes::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_times.rb#29 +RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#6 +module RuboCop::Cop::Lint::Utils; end + +# Utility class that checks if the receiver can't be nil. +# +# source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#8 +class RuboCop::Cop::Lint::Utils::NilReceiverChecker + # @return [NilReceiverChecker] a new instance of NilReceiverChecker + # + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#11 + def initialize(receiver, additional_nil_methods); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#17 + def cant_be_nil?; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#24 + def _cant_be_nil?(node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#108 + def else_branch?(node); end + + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#112 + def find_top_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#81 + def non_nil_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#86 + def sole_condition_of_parent_if?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/utils/nil_receiver_checker.rb#9 +RuboCop::Cop::Lint::Utils::NilReceiverChecker::NIL_METHODS = T.let(T.unsafe(nil), Set) + +# Checks for operators, variables, literals, lambda, proc and nonmutating +# methods used in void context. +# +# `each` blocks are allowed to prevent false positives. +# For example, the expression inside the `each` block below. +# It's not void, especially when the receiver is an `Enumerator`: +# +# [source,ruby] +# ---- +# enumerator = [1, 2, 3].filter +# enumerator.each { |item| item >= 2 } #=> [2, 3] +# ---- +# +# NOTE: Return values in assignment method definitions such as `def foo=(arg)` are +# detected because they are in a void context. However, autocorrection does not remove +# the return value, as that would change behavior. In such cases, whether to remove +# the return value or rename the method to something more appropriate should be left to +# the user. +# +# @example CheckForMethodsWithNoSideEffects: false (default) +# # bad +# def some_method +# some_num * 10 +# do_something +# end +# +# def some_method(some_var) +# some_var +# do_something +# end +# @example CheckForMethodsWithNoSideEffects: true +# # bad +# def some_method(some_array) +# some_array.sort +# do_something(some_array) +# end +# +# # good +# def some_method +# do_something +# some_num * 10 +# end +# +# def some_method(some_var) +# do_something +# some_var +# end +# +# def some_method(some_array) +# some_array.sort! +# do_something(some_array) +# end +# +# source://rubocop//lib/rubocop/cop/lint/void.rb#59 +class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/void.rb#98 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#87 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#103 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#96 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#101 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#289 + def all_keys_entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#293 + def all_values_entirely_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#267 + def autocorrect_nonmutating_send(corrector, node, suggestion); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#260 + def autocorrect_void_expression(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#247 + def autocorrect_void_op(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#109 + def check_begin(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#141 + def check_case_expression(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#146 + def check_case_match_expression(case_node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#232 + def check_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#119 + def check_expression(expr); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#137 + def check_if_expression(if_node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#188 + def check_literal(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#214 + def check_nonmutating(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#198 + def check_self(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + def check_var(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#206 + def check_void_expression(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#127 + def check_void_expression_nodes(expr); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#154 + def check_void_op(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#276 + def entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#240 + def in_void_context?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/void.rb#72 +RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#66 +RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 +RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#67 +RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#82 +RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#84 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#75 +RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#70 +RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#74 +RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#64 +RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#68 +RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#73 +RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#65 +RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for obtaining source ranges from regexp matches +# +# source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 +module RuboCop::Cop::MatchRange + include ::RuboCop::Cop::RangeHelp + + private + + # Return a new `Range` covering the first matching group number for each + # match of `regex` inside `range` + # + # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#13 + def each_match_range(range, regex); end + + # For a `match` inside `range`, return a new `Range` covering the match + # + # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#18 + def match_range(range, match); end +end + +# Message Annotator class annotates a basic offense message +# based on params passed into initializer. +# +# #=> 'Cop/CopName: message (http://example.org/styleguide)' +# +# @example +# RuboCop::Cop::MessageAnnotator.new( +# config, cop_name, cop_config, @options +# ).annotate('message') +# @see #initialize +# +# source://rubocop//lib/rubocop/cop/message_annotator.rb#15 +class RuboCop::Cop::MessageAnnotator + # @option cop_config + # @option cop_config + # @option cop_config + # @option options + # @option options + # @option options + # @option options + # @param config [RuboCop::Config] Check configs for all cops + # @note Message Annotator specifically checks the + # following config options for_all_cops + # :StyleGuideBaseURL [String] URL for styleguide + # :DisplayStyleGuide [Boolean] Include styleguide and reference URLs + # :ExtraDetails [Boolean] Include cop details + # :DisplayCopNames [Boolean] Include cop name + # @param cop_config [Hash] configs for specific cop, from config#for_cop + # @param cop_name [String] for specific cop name + # @param options [Hash, nil] optional + # @return [MessageAnnotator] a new instance of MessageAnnotator + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#47 + def initialize(config, cop_name, cop_config, options); end + + # Returns the annotated message, + # based on params passed into initializer + # + # @return [String] annotated message + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#58 + def annotate(message); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def config; end + + # Returns the value of attribute cop_config. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def cop_config; end + + # Returns the value of attribute cop_name. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def cop_name; end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#16 + def options; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#68 + def urls; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#115 + def debug?; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#128 + def details; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#119 + def display_cop_names?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#98 + def display_style_guide?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#111 + def extra_details?; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#102 + def reference_urls; end + + # Returns the base style guide URL from AllCops or the specific department + # + # @return [String] style guide URL + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#91 + def style_guide_base_url; end + + # source://rubocop//lib/rubocop/cop/message_annotator.rb#74 + def style_guide_url; end + + class << self + # Returns the value of attribute style_guide_urls. + # + # source://rubocop//lib/rubocop/cop/message_annotator.rb#21 + def style_guide_urls; end + end +end + +# This module handles measurement and reporting of complexity in methods. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#8 +module RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::ExcludeLimit + + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#38 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#15 + def max=(value); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#24 + def on_block(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#17 + def on_def(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#22 + def on_defs(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#33 + def on_itblock(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#32 + def on_numblock(node); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#43 + def check_complexity(node, method_name); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#62 + def complexity(body); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#74 + def location(node); end +end + +# Common code for cops that deal with preferred methods. +# +# source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#6 +module RuboCop::Cop::MethodPreference + private + + # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#25 + def default_cop_config; end + + # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#9 + def preferred_method(method); end + + # source://rubocop//lib/rubocop/cop/mixin/method_preference.rb#13 + def preferred_methods; end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#5 +module RuboCop::Cop::Metrics; end + +# Checks that the ABC size of methods is not higher than the +# configured maximum. The ABC size is based on assignments, branches +# (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric +# and https://en.wikipedia.org/wiki/ABC_Software_Metric. +# +# Interpreting ABC size: +# +# * ``<= 17`` satisfactory +# * `18..30` unsatisfactory +# * `>` 30 dangerous +# +# You can have repeated "attributes" calls count as a single "branch". +# For this purpose, attributes are any method with no argument; no attempt +# is meant to distinguish actual `attr_reader` from other methods. +# +# This cop also takes into account `AllowedMethods` (defaults to `[]`) +# And `AllowedPatterns` (defaults to `[]`) +# +# @example CountRepeatedAttributes: false (default is true) +# +# # `model` and `current_user`, referenced 3 times each, +# # are each counted as only 1 branch each if +# # `CountRepeatedAttributes` is set to 'false' +# +# def search +# @posts = model.active.visible_by(current_user) +# .search(params[:q]) +# @posts = model.some_process(@posts, current_user) +# @posts = model.another_process(@posts, current_user) +# +# render 'pages/search/page' +# end +# +# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#39 +class RuboCop::Cop::Metrics::AbcSize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + + private + + # source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#47 + def complexity(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/abc_size.rb#42 +RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a block exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# The cop can be configured to ignore blocks passed to certain methods. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop does not apply for `Struct` definitions. +# +# NOTE: The `ExcludedMethods` configuration is deprecated and only kept +# for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` +# instead. By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# something do +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# msg = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 +class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#60 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#59 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#82 + def cop_label; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#64 + def method_receiver_excluded?(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 +RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for excessive nesting of conditional and looping constructs. +# Deeply nested code is harder to read, understand, and maintain. +# Extracting nested logic into methods improves clarity. +# +# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` +# options. When both are set to `false` (the default) blocks and modifier forms are not +# counted towards the nesting level. Set them to `true` to include these in the nesting level +# calculation as well. +# +# The maximum level of nesting allowed is configurable. +# +# @example Max: 3 (default) +# # bad +# if condition1 +# if condition2 +# if condition3 +# if condition4 +# do_something +# end +# end +# end +# end +# +# # good +# if condition1 +# if condition2 +# if condition3 +# do_something +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#37 +class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#40 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#42 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#51 + def check_nesting_level(node, max, current_level); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#75 + def consider_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#85 + def count_blocks?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#67 + def count_if_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#89 + def count_modifier_forms?; end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#81 + def message(max); end +end + +# source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#38 +RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array) + +# Checks if the length of a class exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: This cop also applies for `Struct` definitions. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# class Foo +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 +class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#67 + def find_expression_within_parent(parent); end + + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#63 + def message(length, max_length); end +end + +# Checks for literals with extremely many entries. This is indicative of +# configuration or data that may be better extracted somewhere else, like +# a database, fetched from an API, or read from a non-code file (CSV, +# JSON, YAML, etc.). +# +# @example +# # bad +# # Huge Array literal +# [1, 2, '...', 999_999_999] +# +# # bad +# # Huge Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 999_999_999 => 999_999_999} +# +# # bad +# # Huge Set "literal" +# Set[1, 2, '...', 999_999_999] +# +# # good +# # Reasonably sized Array literal +# [1, 2, '...', 10] +# +# # good +# # Reading huge Array from external data source +# # File.readlines('numbers.txt', chomp: true).map!(&:to_i) +# +# # good +# # Reasonably sized Hash literal +# { 1 => 1, 2 => 2, '...' => '...', 10 => 10} +# +# # good +# # Reading huge Hash from external data source +# CSV.foreach('numbers.csv', headers: true).each_with_object({}) do |row, hash| +# hash[row["key"].to_i] = row["value"].to_i +# end +# +# # good +# # Reasonably sized Set "literal" +# Set[1, 2, '...', 10] +# +# # good +# # Reading huge Set from external data source +# SomeFramework.config_for(:something)[:numbers].to_set +# +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#50 +class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#63 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#65 + def on_index(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#71 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#56 + def set_const?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#77 + def collection_threshold; end +end + +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#51 +RuboCop::Cop::Metrics::CollectionLiteralLength::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#53 +RuboCop::Cop::Metrics::CollectionLiteralLength::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that the cyclomatic complexity of methods is not higher +# than the configured maximum. The cyclomatic complexity is the number of +# linearly independent paths through a method. The algorithm counts +# decision points and adds one. +# +# An if statement (or unless or ?:) increases the complexity by one. An +# else branch does not, since it doesn't add a decision point. The && +# operator (or keyword and) can be converted to a nested if statement, +# and ||/or is shorthand for a sequence of ifs, so they also add one. +# Loops can be said to have an exit condition, so they add one. +# Blocks that are calls to builtin iteration methods +# (e.g. `ary.map{...}`) also add one, others are ignored. +# +# @example +# +# def each_child_node(*types) # count begins: 1 +# unless block_given? # unless: +1 +# return to_enum(__method__, *types) +# end +# +# children.each do |child| # each{}: +1 +# next unless child.is_a?(Node) # unless: +1 +# +# yield child if types.empty? || # if: +1, ||: +1 +# types.include?(child.type) +# end +# +# self +# end # total: 6 +# +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#35 +class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + include ::RuboCop::Cop::MethodComplexity + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + + private + + # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#45 + def complexity_score_for(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#52 + def count_block?(block); end +end + +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#40 +RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/cyclomatic_complexity.rb#39 +RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) + +# Checks if the length of a method exceeds some maximum value. +# Comment lines can optionally be allowed. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is +# deprecated and only kept for backwards compatibility. +# Please use `AllowedMethods` and `AllowedPatterns` instead. +# By default, there are no methods to allowed. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# def m +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +1 +# key: 'value' +# } +# +# <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 +class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#55 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#66 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#74 + def allowed?(method_name); end + + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#70 + def cop_label; end +end + +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 +RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks if the length of a module exceeds some maximum value. +# Comment lines can optionally be ignored. +# The maximum allowed length is configurable. +# +# You can set constructs you want to fold with `CountAsOne`. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] +# +# module M +# ARRAY = [ # +1 +# 1, +# 2 +# ] +# +# HASH = { # +1 +# key: 'value' +# } +# +# MSG = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 4 points +# +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 +class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 + def module_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 + def message(length, max_length); end +end + +# Checks for methods with too many parameters. +# +# The maximum number of parameters is configurable. +# Keyword arguments can optionally be excluded from the total count, +# as they add less complexity than positional or optional parameters. +# +# Any number of arguments for `initialize` method inside a block of +# `Struct.new` and `Data.define` like this is always allowed: +# +# [source,ruby] +# ---- +# Struct.new(:one, :two, :three, :four, :five, keyword_init: true) do +# def initialize(one:, two:, three:, four:, five:) +# end +# end +# ---- +# +# This is because checking the number of arguments of the `initialize` method +# does not make sense. +# +# NOTE: Explicit block argument `&block` is not counted to prevent +# erroneous change that is avoided by making block argument implicit. +# +# This cop also checks for the maximum number of optional parameters. +# This can be configured using the `MaxOptionalParameters` config option. +# +# @example CountKeywordArgs: false +# # don't count keyword args towards the maximum +# +# # good (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# @example CountKeywordArgs: true (default) +# # counts keyword args towards the maximum +# +# # bad (assuming Max is 3) +# def foo(a, b, c, d: 1) +# end +# +# # good (assuming Max is 3) +# def foo(a, b, c: 1) +# end +# @example Max: 2 +# # bad +# def foo(a, b, c = 1) +# end +# @example Max: 3 +# # good +# def foo(a, b, c = 1) +# end +# @example MaxOptionalParameters: 2 +# # bad +# def foo(a = 1, b = 2, c = 3) +# end +# @example MaxOptionalParameters: 3 (default) +# # good +# def foo(a = 1, b = 2, c = 3) +# end +# +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#70 +class RuboCop::Cop::Metrics::ParameterLists < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#121 + def argument_to_lambda_or_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#71 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#72 + def max_optional_parameters=(value); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#104 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#90 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#102 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#81 + def struct_new_or_data_define_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#125 + def args_count(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#141 + def count_keyword_args?; end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#137 + def max_optional_parameters; end + + # source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#133 + def max_params; end +end + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#74 +RuboCop::Cop::Metrics::ParameterLists::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#77 +RuboCop::Cop::Metrics::ParameterLists::NAMED_KEYWORD_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/parameter_lists.rb#75 +RuboCop::Cop::Metrics::ParameterLists::OPTIONAL_PARAMETERS_MSG = T.let(T.unsafe(nil), String) + +# Tries to produce a complexity score that's a measure of the +# complexity the reader experiences when looking at a method. For that +# reason it considers `when` nodes as something that doesn't add as much +# complexity as an `if` or a `&&`. Except if it's one of those special +# `case`/`when` constructs where there's no expression after `case`. Then +# the cop treats it as an `if`/`elsif`/`elsif`... and lets all the `when` +# nodes count. In contrast to the CyclomaticComplexity cop, this cop +# considers `else` nodes as adding complexity. +# +# @example +# +# def my_method # 1 +# if cond # 1 +# case var # 2 (0.8 + 4 * 0.2, rounded) +# when 1 then func_one +# when 2 then func_two +# when 3 then func_three +# when 4..10 then func_other +# end +# else # 1 +# do_something until a && b # 2 +# end # === +# end # 7 complexity points +# +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#29 +class RuboCop::Cop::Metrics::PerceivedComplexity < ::RuboCop::Cop::Metrics::CyclomaticComplexity + private + + # source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#36 + def complexity_score_for(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#32 +RuboCop::Cop::Metrics::PerceivedComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/perceived_complexity.rb#30 +RuboCop::Cop::Metrics::PerceivedComplexity::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#6 +module RuboCop::Cop::Metrics::Utils; end + +# > ABC is .. a software size metric .. computed by counting the number +# > of assignments, branches and conditions for a section of code. +# > http://c2.com/cgi/wiki?AbcMetric +# +# We separate the *calculator* from the *cop* so that the calculation, +# the formula itself, is easier to test. +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#13 +class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator + include ::RuboCop::AST::Sexp + include ::RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::Cop::Metrics::Utils::IteratingBlock + include ::RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + + # @return [AbcSizeCalculator] a new instance of AbcSizeCalculator + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#34 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#42 + def calculate; end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#76 + def calculate_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#65 + def else_branch?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#51 + def evaluate_branch_nodes(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#60 + def evaluate_condition_node(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#128 + def argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#86 + def assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#124 + def branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#120 + def capturing_variable?(name); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#98 + def compound_assignment(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#132 + def condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#109 + def simple_assignment?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#71 + def visit_depth_last(node, &block); end + + class << self + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#30 + def calculate(node, discount_repeated_attributes: T.unsafe(nil)); end + end +end + +# > Branch -- an explicit forward program branch out of scope -- a +# > function call, class method call .. +# > http://c2.com/cgi/wiki?AbcMetric +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#21 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(nil), Array) + +# > Condition -- a logical/Boolean test, == != <= >= < > else case +# > default try catch ? and unary conditionals. +# > http://c2.com/cgi/wiki?AbcMetric +# +# source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#26 +RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array) + +# Helps to calculate code length for the provided node. +# +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#8 +class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + extend ::RuboCop::AST::NodePattern::Macros + + # @return [CodeLengthCalculator] a new instance of CodeLengthCalculator + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#16 + def initialize(node, processed_source, count_comments: T.unsafe(nil), foldable_types: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#24 + def calculate; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#181 + def another_args?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 + def build_foldable_checks(types); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#90 + def classlike_code_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#138 + def classlike_node?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#66 + def code_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#162 + def count_comments?; end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 + def each_top_level_descendant(node, types, &block); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#146 + def extract_body(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#142 + def foldable_node?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#121 + def heredoc_length(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#86 + def heredoc_node?(node); end + + # Returns true for lines that shall not be included in the count. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#158 + def irrelevant_line?(source_line); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 + def line_numbers_of_inner_nodes(node, *types); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#106 + def namespace_module?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#185 + def node_with_heredoc?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 + def normalize_foldable_types(types); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#166 + def omit_length(descendant); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#177 + def parenthesized?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#189 + def source_from_node_with_heredoc(node); end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::CLASSLIKE_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#12 +RuboCop::Cop::Metrics::Utils::CodeLengthCalculator::FOLDABLE_TYPES = T.let(T.unsafe(nil), Array) + +# Used to identify iterating blocks like `.map{}` and `.map(&:...)` +# +# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#8 +module RuboCop::Cop::Metrics::Utils::IteratingBlock + # Returns the name of the method called with a block + # if node is a block node, or a block-pass node. + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#37 + def block_method_name(node); end + + # Returns nil if node is neither a block node or a block-pass node. + # Otherwise returns true/false if method call is a known iterating call + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#53 + def iterating_block?(node); end + + # Returns true iff name is a known iterating type (e.g. :each, :transform_values) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#47 + def iterating_method?(name); end +end + +# source://rubocop//lib/rubocop/cop/metrics/utils/iterating_block.rb#33 +RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set) + +# Identifies repetitions `{c}send` calls with no arguments: +# +# foo.bar +# foo.bar # => repeated +# foo.bar.baz.qux # => inner send repeated +# foo.bar.baz.other # => both inner send repeated +# foo.bar(2) # => not repeated +# +# It also invalidates sequences if a receiver is reassigned: +# +# xx.foo.bar +# xx.foo.baz # => inner send repeated +# self.xx = any # => invalidates everything so far +# xx.foo.baz # => no repetition +# self.xx.foo.baz # => all repeated +# +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#25 +module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount + include ::RuboCop::AST::Sexp + extend ::RuboCop::AST::NodePattern::Macros + + # Plug into the calculator + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#37 + def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#68 + def attribute_call?(param0 = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#60 + def calculate_node(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#50 + def discount_repeated_attributes?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#54 + def evaluate_branch_nodes(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#99 + def root_node?(param0 = T.unsafe(nil)); end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#73 + def discount_repeated_attribute?(send_node); end + + # Returns the "known_attributes" for the `node` by walking the receiver tree + # If at any step the subdirectory does not exist, it is yielded with the + # associated key (method_name) + # If the node is not a series of `(c)send` calls with no arguments, + # then `nil` is yielded + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#110 + def find_attributes(node, &block); end + + # or `nil` if it is not a setter. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#126 + def setter_to_getter(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#87 + def update_repeated_attribute(node); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#29 +RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) + +# Identifies repetitions `&.` on the same variable: +# +# my_var&.foo +# my_var&.bar # => repeated +# my_var = baz # => reset +# my_var&.qux # => not repeated +# +# @api private +# +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#15 +module RuboCop::Cop::Metrics::Utils::RepeatedCsendDiscount + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#20 + def discount_for_repeated_csend?(csend_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#34 + def reset_on_lvasgn(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb#16 + def reset_repeated_csend; end +end + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#8 +module RuboCop::Cop::Migration; end + +# department name. +# +# @example +# # bad +# # rubocop:disable AbcSize +# +# # good +# # rubocop:disable Metrics/AbcSize +# +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#18 +class RuboCop::Cop::Migration::DepartmentName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#31 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#57 + def check_cop_name(name, comment, offset); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#79 + def contain_unexpected_character_for_department_name?(name); end + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#53 + def disable_comment_offset; end + + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#83 + def qualified_legacy_cop_name(cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/migration/department_name.rb#73 + def valid_content_token?(content_token); end +end + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#24 +RuboCop::Cop::Migration::DepartmentName::DISABLE_COMMENT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# The token that makes up a disable comment. +# `DepartmentName/CopName` or` all`. +# +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#29 +RuboCop::Cop::Migration::DepartmentName::DISABLING_COPS_CONTENT_TOKEN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/migration/department_name.rb#22 +RuboCop::Cop::Migration::DepartmentName::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking minimum body length. +# +# source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#6 +module RuboCop::Cop::MinBodyLength + private + + # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#13 + def min_body_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/min_body_length.rb#9 + def min_body_length?(node); end +end + +# Common functionality for checking minimum branches count. +# +# source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#6 +module RuboCop::Cop::MinBranchesCount + private + + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#29 + def if_conditional_branches(node, branches = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#22 + def min_branches_count; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/min_branches_count.rb#9 + def min_branches_count?(node); end +end + +# Common code for indenting the first elements in multiline +# array literals, hash literals, and method definitions. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#7 +module RuboCop::Cop::MultilineElementIndentation + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#42 + def check_expected_style(styles); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#26 + def check_first(first, left_brace, left_parenthesis, offset); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#80 + def detected_styles(actual_column, offset, left_parenthesis, left_brace); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#85 + def detected_styles_for_column(column, left_parenthesis, left_brace); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#10 + def each_argument_node(node, type); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#66 + def hash_pair_where_value_beginning_with(left_brace, first); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#98 + def incorrect_style_detected(styles, first, base_column_type); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#50 + def indent_base(left_brace, first, left_parenthesis); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#72 + def key_and_value_begin_on_same_line?(pair); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_indentation.rb#76 + def right_sibling_begins_on_subsequent_line?(pair); end +end + +# Common functionality for checking for a line break before each +# element in a multi-line collection. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#7 +module RuboCop::Cop::MultilineElementLineBreaks + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#23 + def all_on_same_line?(nodes, ignore_last: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_element_line_breaks.rb#10 + def check_line_breaks(_node, children, ignore_last: T.unsafe(nil)); end +end + +# Common functionality for checking multiline method calls and binary +# operations. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7 +module RuboCop::Cop::MultilineExpressionIndentation + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#25 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132 + def argument_in_method_call(node, kind); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188 + def assignment_rhs(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#67 + def check(range, node, lhs, rhs); end + + # The correct indentation of `node` is usually `IndentationWidth`, with + # one exception: prefix keywords. + # + # ``` + # while foo && # Here, `while` is called a "prefix keyword" + # bar # This is called "special indentation" + # baz + # end + # ``` + # + # Note that *postfix conditionals* do *not* get "special indentation". + # + # ``` + # next if foo && + # bar # normal indentation, not special + # ``` + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#57 + def correct_indentation(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160 + def disqualified_rhs?(candidate, ancestor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#202 + def grouped_expression?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#75 + def incorrect_style_detected(range, node, lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#87 + def indentation(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#124 + def indented_keyword_expression(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#206 + def inside_arg_list_parentheses?(node, ancestor); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#101 + def keyword_message_tail(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#109 + def kw_node_with_special_indentation(node); end + + # In a chain of method calls, we regard the top call node as the base + # for indentation of all lines following the first. For example: + # a. + # b c { block }. <-- b is indented relative to a + # d <-- d is indented relative to a + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#34 + def left_hand_side(lhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#196 + def not_for_this_cop?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#91 + def operation_description(node, rhs); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146 + def part_of_assignment_rhs(node, candidate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184 + def part_of_block_body?(candidate, block_node); end + + # Returns true if `node` is a conditional whose `body` and `condition` + # begin on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#215 + def postfix_conditional?(node); end + + # The []= operator and setters (a.b = c) are parsed as :send nodes. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176 + def valid_method_rhs_candidate?(candidate, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165 + def valid_rhs?(candidate, ancestor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180 + def valid_rhs_candidate?(candidate, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#219 + def within_node?(inner, outer); end +end + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#11 +RuboCop::Cop::MultilineExpressionIndentation::ASSIGNMENT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#10 +RuboCop::Cop::MultilineExpressionIndentation::DEFAULT_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#8 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#12 +RuboCop::Cop::MultilineExpressionIndentation::KEYWORD_MESSAGE_TAIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#9 +RuboCop::Cop::MultilineExpressionIndentation::UNALIGNED_RHS_TYPES = T.let(T.unsafe(nil), Array) + +# Autocorrection logic for the closing brace of a literal either +# on the same line as the last contained elements, or a new line. +# +# source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#7 +class RuboCop::Cop::MultilineLiteralBraceCorrector + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::RangeHelp + + # @return [MultilineLiteralBraceCorrector] a new instance of MultilineLiteralBraceCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#15 + def initialize(corrector, node, processed_source); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#21 + def call; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#61 + def content_if_comment_present(corrector, node); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#51 + def correct_heredoc_argument_method_chain(corrector, end_range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#46 + def correct_next_line_brace(corrector, end_range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#42 + def correct_same_line_brace(corrector); end + + # Returns the value of attribute corrector. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def corrector; end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#94 + def last_element_range_with_trailing_comma(node); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#103 + def last_element_trailing_comma_range(node); end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def node; end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#40 + def processed_source; end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#90 + def remove_trailing_content_of_comment(corrector, range); end + + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#80 + def select_content_to_be_inserted_after_last_element(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#73 + def use_heredoc_argument_method_chain?(parent); end + + class << self + # source://rubocop//lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb#11 + def correct(corrector, node, processed_source); end + end +end + +# Common functionality for checking the closing brace of a literal is +# either on the same line as the last contained elements or a new line. +# +# source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#7 +module RuboCop::Cop::MultilineLiteralBraceLayout + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + private + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#34 + def check(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#12 + def check_brace_layout(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#42 + def check_new_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#50 + def check_same_line(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#58 + def check_symmetrical(node); end + + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#86 + def children(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#98 + def closing_brace_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#74 + def empty_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#82 + def ignored_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#78 + def implicit_literal?(node); end + + # Starting with the parent node and recursively for the parent node's + # children, check if the node is a HEREDOC and if the HEREDOC ends below + # or on the last line of the parent node. + # + # Example: + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => false + # foo(a, + # b: { + # a: 1, + # c: <<-EOM + # baz + # EOM + # } + # ) + # + # # node is `b: ...` parameter + # # last_line_heredoc?(node) => true + # foo(a, + # b: <<-EOM + # baz + # EOM + # ) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#126 + def last_line_heredoc?(node, parent = T.unsafe(nil)); end + + # Returns true for the case + # [a, + # b # comment + # ].some_method + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#26 + def new_line_needed_before_closing_brace?(node); end + + # This method depends on the fact that we have guarded + # against implicit and empty literals. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb#92 + def opening_brace_on_same_line?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#5 +module RuboCop::Cop::Naming; end + +# Avoid prefixing accessor method names with `get_` or `set_`. +# Applies to both instance and class methods. +# +# NOTE: Method names starting with `get_` or `set_` only register an offense +# when the methods match the expected arity for getters and setters respectively. +# Getters (`get_attribute`) must have no arguments to be registered, +# and setters (`set_attribute(value)`) must have exactly one. +# +# @example +# # bad +# def set_attribute(value) +# end +# +# # good +# def attribute=(value) +# end +# +# # bad +# def get_attribute +# end +# +# # good +# def attribute +# end +# +# # accepted, incorrect arity for getter +# def get_value(attr) +# end +# +# # accepted, incorrect arity for setter +# def set_value +# end +# +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#38 +class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#42 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#50 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 + def bad_reader_name?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 + def bad_writer_name?(node); end + + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 + def proper_attribute_name?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 +RuboCop::Cop::Naming::AccessorMethodName::MSG_READER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#40 +RuboCop::Cop::Naming::AccessorMethodName::MSG_WRITER = T.let(T.unsafe(nil), String) + +# Checks for non-ascii characters in identifier and constant names. +# Identifiers are always checked and whether constants are checked +# can be controlled using AsciiConstants config. +# +# @example +# # bad +# def καλημερα # Greek alphabet (non-ascii) +# end +# +# # bad +# def こんにちはと言う # Japanese character (non-ascii) +# end +# +# # bad +# def hello_🍣 # Emoji (non-ascii) +# end +# +# # good +# def say_hello +# end +# +# # bad +# 신장 = 10 # Hangul character (non-ascii) +# +# # good +# height = 10 +# +# # bad +# params[:عرض_gteq] # Arabic character (non-ascii) +# +# # good +# params[:width_gteq] +# @example AsciiConstants: false +# # good +# class Foö +# end +# +# FOÖ = "foo" +# @example AsciiConstants: true (default) +# # bad +# class Foö +# end +# +# FOÖ = "foo" +# +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#53 +class RuboCop::Cop::Naming::AsciiIdentifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#59 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#84 + def first_non_ascii_chars(string); end + + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#74 + def first_offense_range(identifier); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#70 + def should_check?(token); end +end + +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#57 +RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/ascii_identifiers.rb#56 +RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String) + +# Makes sure that certain binary operator methods have their +# sole parameter named `other`. +# +# @example +# +# # bad +# def +(amount); end +# +# # good +# def +(other); end +# +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#16 +class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#29 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#25 + def op_method_candidate?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#45 + def op_method?(name); end +end + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#22 +RuboCop::Cop::Naming::BinaryOperatorParameterName::EXCLUDED = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#19 +RuboCop::Cop::Naming::BinaryOperatorParameterName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/binary_operator_parameter_name.rb#21 +RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`. +# +# It also supports the opposite style by alternative `explicit` option. +# You can specify the block variable name for autocorrection with `BlockForwardingName`. +# The default variable name is `block`. If the name is already in use, it will not be +# autocorrected. +# +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# +# @example EnforcedStyle: anonymous (default) +# +# # bad +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# @example EnforcedStyle: explicit +# +# # bad +# def foo(&) +# bar(&) +# end +# +# # good +# def foo(&block) +# bar(&block) +# end +# +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 +class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#68 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 + def anonymous_block_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#101 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#150 + def block_forwarding_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + def expected_block_forwarding_style?(node, last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 + def explicit_block_argument?(node); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 + def invalidates_syntax?(block_pass_node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#126 + def register_offense(block_argument, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#142 + def use_block_argument_as_local_variable?(node, last_argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 + def use_kwarg_in_method_definition?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#64 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#62 +RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) + +# Checks block parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 1. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# bar do |varOne, varTwo| +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# foo { |num1, num2| num1 * num2 } +# +# # With `MinNameLength` set to number greater than 1 +# baz { |a, b, c| do_stuff(a, b, c) } +# +# # good +# bar do |thud, fred| +# thud + fred +# end +# +# foo { |speed, distance| speed * distance } +# +# baz { |age, height, gender| do_stuff(age, height, gender) } +# +# source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#38 +class RuboCop::Cop::Naming::BlockParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # source://rubocop//lib/rubocop/cop/naming/block_parameter_name.rb#41 + def on_block(node); end +end + +# Checks for class and module names with +# an underscore in them. +# +# `AllowedNames` config takes an array of permitted names. +# Its default value is `['module_parent']`. +# These names can be full class/module names or part of the name. +# eg. Adding `my_class` to the `AllowedNames` config will allow names like +# `my_class`, `my_class::User`, `App::my_class`, `App::my_class::User`, etc. +# +# @example +# # bad +# class My_Class +# end +# module My_Module +# end +# +# # good +# class MyClass +# end +# module MyModule +# end +# class module_parent::MyModule +# end +# +# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#29 +class RuboCop::Cop::Naming::ClassAndModuleCamelCase < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#32 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#41 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/class_and_module_camel_case.rb#30 +RuboCop::Cop::Naming::ClassAndModuleCamelCase::MSG = T.let(T.unsafe(nil), String) + +# Checks whether constant names are written using +# SCREAMING_SNAKE_CASE. +# +# To avoid false positives, it ignores cases in which we cannot know +# for certain the type of value that would be assigned to a constant. +# +# @example +# # bad +# InchInCm = 2.54 +# INCHinCM = 2.54 +# Inch_In_Cm = 2.54 +# +# # good +# INCH_IN_CM = 2.54 +# +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#20 +class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 + def class_or_struct_return_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#67 + def literal_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 + def on_casgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#55 + def allowed_assignment?(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#72 + def allowed_conditional_expression_on_rhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#62 + def allowed_method_call_on_rhs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#76 + def contains_constant?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#21 +RuboCop::Cop::Naming::ConstantName::MSG = T.let(T.unsafe(nil), String) + +# Use POSIX character classes, so we allow accented characters rather +# than just standard ASCII characters +# +# source://rubocop//lib/rubocop/cop/naming/constant_name.rb#24 +RuboCop::Cop::Naming::ConstantName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Makes sure that Ruby source files have snake_case +# names. Ruby scripts (i.e. source files with a shebang in the +# first line) are ignored. +# +# The cop also ignores `.gemspec` files, because Bundler +# recommends using dashes to separate namespaces in nested gems +# (i.e. `bundler-console` becomes `Bundler::Console`). As such, the +# gemspec is supposed to be named `bundler-console.gemspec`. +# +# When `ExpectMatchingDefinition` (default: `false`) is `true`, the cop requires +# each file to have a class, module or `Struct` defined in it that matches +# the filename. This can be further configured using +# `CheckDefinitionPathHierarchy` (default: `true`) to determine whether the +# path should match the namespace of the above definition. +# +# When `IgnoreExecutableScripts` (default: `true`) is `true`, files that start +# with a shebang line are not considered by the cop. +# +# When `Regex` is set, the cop will flag any filename that does not match +# the regular expression. +# +# @example +# # bad +# lib/layoutManager.rb +# +# anything/usingCamelCase +# +# # good +# lib/layout_manager.rb +# +# anything/using_snake_case.rake +# +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#39 +class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#54 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#47 + def struct_definition(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#132 + def allowed_acronyms; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#94 + def bad_filename_allowed?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#120 + def check_definition_path_hierarchy?; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#167 + def defined_struct(node); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#124 + def definition_path_hierarchy_roots; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#116 + def expect_matching_definition?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#136 + def filename_good?(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#145 + def find_class_or_module(node, namespace); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#163 + def find_definition(node); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#63 + def for_bad_filename(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#112 + def ignore_executable_scripts?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#200 + def match?(expected); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#204 + def match_acronym?(expected, name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#90 + def matching_class?(file_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#86 + def matching_definition?(file_path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#172 + def namespace_matches?(node, namespace, expected); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#98 + def no_definition_message(basename, file_path); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#104 + def other_message(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#186 + def partial_matcher!(expected); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#75 + def perform_class_and_module_naming_checks(file_path, basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#128 + def regex; end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#238 + def to_module_name(basename); end + + # source://rubocop//lib/rubocop/cop/naming/file_name.rb#211 + def to_namespace(path); end +end + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#41 +RuboCop::Cop::Naming::FileName::MSG_NO_DEFINITION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#42 +RuboCop::Cop::Naming::FileName::MSG_REGEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#40 +RuboCop::Cop::Naming::FileName::MSG_SNAKE_CASE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/file_name.rb#44 +RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + +# Checks that your heredocs are using the configured case. +# By default it is configured to enforce uppercase heredocs. +# +# @example EnforcedStyle: lowercase +# # bad +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # good +# <<-sql +# SELECT * FROM foo +# sql +# @example EnforcedStyle: uppercase (default) +# # bad +# <<-sql +# SELECT * FROM foo +# sql +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#30 +class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#37 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#54 + def correct_case_delimiters?(node); end + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#58 + def correct_delimiters(source); end + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#50 + def message(_node); end +end + +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_case.rb#35 +RuboCop::Cop::Naming::HeredocDelimiterCase::MSG = T.let(T.unsafe(nil), String) + +# Checks that your heredocs are using meaningful delimiters. +# By default it disallows `END` and `EO*`, and can be configured through +# forbidden listing additional delimiters. +# +# @example +# +# # good +# <<-SQL +# SELECT * FROM foo +# SQL +# +# # bad +# <<-END +# SELECT * FROM foo +# END +# +# # bad +# <<-EOS +# SELECT * FROM foo +# EOS +# +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#26 +class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#31 + def on_heredoc(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 + def forbidden_delimiters; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 + def meaningful_delimiters?(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#29 +RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) + +# Recommends the use of inclusive language instead of problematic terms. +# The cop can check the following locations for offenses: +# +# - identifiers +# - constants +# - variables +# - strings +# - symbols +# - comments +# - file paths +# +# Each of these locations can be individually enabled/disabled via configuration, +# for example CheckIdentifiers = true/false. +# +# Flagged terms are configurable for the cop. For each flagged term an optional +# Regex can be specified to identify offenses. Suggestions for replacing a flagged term can +# be configured and will be displayed as part of the offense message. +# An AllowedRegex can be specified for a flagged term to exempt allowed uses of the term. +# `WholeWord: true` can be set on a flagged term to indicate the cop should only match when +# a term matches the whole word (partial matches will not be offenses). +# +# The cop supports autocorrection when there is only one suggestion. When there are multiple +# suggestions, the best suggestion cannot be identified and will not be autocorrected. +# +# @example FlaggedTerms: { master: { AllowedRegex: 'master\'?s degree' } } +# # Specify allowed uses of the flagged term as a string or regexp. +# +# # bad +# # They had a masters +# +# # good +# # They had a master's degree +# @example FlaggedTerms: { master: { Suggestions: ['main', 'primary', 'leader'] } } +# # Suggest replacing master in an instance variable name with main, primary, or leader +# +# # bad +# @master_node = 'node1.example.com' +# +# # good +# @primary_node = 'node1.example.com' +# @example FlaggedTerms: { slave: { WholeWord: true } } +# # Specify that only terms that are full matches will be flagged. +# +# # bad +# Slave +# +# # good (won't be flagged despite containing `slave`) +# TeslaVehicle +# @example FlaggedTerms: { whitelist: { Regex: !ruby/regexp '/white[-_\s]?list' } } +# # Identify problematic terms using a Regexp +# +# # bad +# white_list = %w(user1 user2) +# +# # good +# allow_list = %w(user1 user2) +# @example FlaggedTerms: { whitelist: { Suggestions: ['allowlist'] } } +# # Suggest replacing identifier whitelist with allowlist +# +# # bad +# whitelist_users = %w(user1 user1) +# +# # good +# allowlist_users = %w(user1 user2) +# +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#74 +class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [InclusiveLanguage] a new instance of InclusiveLanguage + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#84 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#93 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 + def add_offenses_for_token(token, word_locations); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#176 + def add_to_flagged_term_hash(regex_string, term, term_definition); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#202 + def array_to_ignorecase_regex(strings); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 + def check_token?(type); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 + def create_message(word, message = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#226 + def create_multiple_word_message_for_file(words); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 + def create_single_word_message_for_file(word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#198 + def ensure_regex_string(regex); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#169 + def extract_regexp(term, term_definition); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#260 + def find_flagged_term(word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#274 + def format_suggestions(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#206 + def investigate_filepath; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 + def investigate_tokens; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#240 + def mask_input(str); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#289 + def offense_range(token, word); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + def preferred_sole_term(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 + def preprocess_check_config; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 + def preprocess_flagged_terms; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#267 + def preprocess_suggestions(suggestions); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#188 + def process_allowed_regex(allowed); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#230 + def scan_for_words(input); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#183 + def set_regexes(flagged_term_strings, allowed_strings); end +end + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#78 +RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#79 +RuboCop::Cop::Naming::InclusiveLanguage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#80 +RuboCop::Cop::Naming::InclusiveLanguage::MSG_FOR_FILE_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 +class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct + # Returns the value of attribute position + # + # @return [Object] the current value of position + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def position; end + + # Sets the attribute position + # + # @param value [Object] the value to set the attribute position to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def position=(_); end + + # Returns the value of attribute word + # + # @return [Object] the current value of word + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def word; end + + # Sets the attribute word + # + # @param value [Object] the value to set the attribute word to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def word=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def inspect; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def members; end + + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#82 + def new(*_arg0); end + end +end + +# Checks for memoized methods whose instance variable name +# does not match the method name. Applies to both regular methods +# (defined with `def`) and dynamic methods (defined with +# `define_method` or `define_singleton_method`). +# +# This cop can be configured with the EnforcedStyleForLeadingUnderscores +# directive. It can be configured to allow for memoized instance variables +# prefixed with an underscore. Prefixing ivars with an underscore is a +# convention that is used to implicitly indicate that an ivar should not +# be set or referenced outside of the memoization method. +# +# @example EnforcedStyleForLeadingUnderscores :optional +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# @example EnforcedStyleForLeadingUnderscores: disallowed (default) +# # bad +# # Method foo is memoized using an instance variable that is +# # not `@foo`. This can cause confusion and bugs. +# def foo +# @something ||= calculate_expensive_thing +# end +# +# def foo +# return @something if defined?(@something) +# @something = calculate_expensive_thing +# end +# +# # good +# def _foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# # good +# def foo +# @foo ||= begin +# calculate_expensive_thing +# end +# end +# +# # good +# def foo +# helper_variable = something_we_need_to_calculate_foo +# @foo ||= calculate_expensive_thing(helper_variable) +# end +# +# # good +# define_method(:foo) do +# @foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# @example EnforcedStyleForLeadingUnderscores: required +# # bad +# def foo +# @something ||= calculate_expensive_thing +# end +# +# # bad +# def foo +# @foo ||= calculate_expensive_thing +# end +# +# def foo +# return @foo if defined?(@foo) +# @foo = calculate_expensive_thing +# end +# +# # good +# def foo +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# def _foo +# @_foo ||= calculate_expensive_thing +# end +# +# def foo +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# @_foo ||= calculate_expensive_thing +# end +# +# # good +# define_method(:foo) do +# return @_foo if defined?(@_foo) +# @_foo = calculate_expensive_thing +# end +# +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148 +class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#198 + def defined_memoized?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#161 + def method_definition?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#206 + def on_defined?(node); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#171 + def on_or_asgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#242 + def find_definition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253 + def matches?(method_name, ivar_assign); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#262 + def message(variable); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 + def style_parameter_name; end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#270 + def suggested_var(method_name); end + + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#276 + def variable_name_candidates(method_name); end +end + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#158 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::INITIALIZE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#155 +RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) + +# Makes sure that all methods use the configured style, +# snake_case or camelCase, for their names. +# +# Method names matching patterns are always allowed. +# +# The cop can be configured with `AllowedPatterns` to allow certain regexp patterns: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# AllowedPatterns: +# - '\AonSelectionBulkChange\z' +# - '\AonSelectionCleared\z' +# ---- +# +# As well, you can also forbid specific method names or regexp patterns +# using `ForbiddenIdentifiers` or `ForbiddenPatterns`: +# +# [source,yaml] +# ---- +# Naming/MethodName: +# ForbiddenIdentifiers: +# - 'def' +# - 'super' +# ForbiddenPatterns: +# - '_v1\z' +# - '_gen1\z' +# ---- +# +# @example EnforcedStyle: camelCase +# # bad +# def foo_bar; end +# +# # good +# def fooBar; end +# +# # bad +# define_method :foo_bar do +# end +# +# # good +# define_method :fooBar do +# end +# +# # bad +# Struct.new(:foo_bar) +# +# # good +# Struct.new(:fooBar) +# +# # bad +# alias_method :foo_bar, :some_method +# +# # good +# alias_method :fooBar, :some_method +# @example EnforcedStyle: snake_case (default) +# # bad +# def fooBar; end +# +# # good +# def foo_bar; end +# +# # bad +# define_method :fooBar do +# end +# +# # good +# define_method :foo_bar do +# end +# +# # bad +# Struct.new(:fooBar) +# +# # good +# Struct.new(:foo_bar) +# +# # bad +# alias_method :fooBar, :some_method +# +# # good +# alias_method :foo_bar, :some_method +# @example ForbiddenIdentifiers: ['def', 'super'] +# # bad +# def def; end +# def super; end +# @example ForbiddenPatterns: ['_v1\z', '_gen1\z'] +# # bad +# def release_v1; end +# def api_gen1; end +# +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#99 +class RuboCop::Cop::Naming::MethodName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#122 + def define_data?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#119 + def new_struct?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#149 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#138 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#147 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#124 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#116 + def str_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#113 + def sym_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#232 + def attr_name(name_item); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#208 + def forbidden_name?(name); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#176 + def handle_alias_method(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#183 + def handle_attr_accessor(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#170 + def handle_define_data(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#157 + def handle_define_method(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#198 + def handle_method_name(node, name); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#163 + def handle_new_struct(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#247 + def message(style); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#236 + def range_position(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_name.rb#213 + def register_forbidden_name(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#106 +RuboCop::Cop::Naming::MethodName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#107 +RuboCop::Cop::Naming::MethodName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/method_name.rb#109 +RuboCop::Cop::Naming::MethodName::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + +# Checks method parameter names for how descriptive they +# are. It is highly configurable. +# +# The `MinNameLength` config option takes an integer. It represents +# the minimum amount of characters the name must be. Its default is 3. +# The `AllowNamesEndingInNumbers` config option takes a boolean. When +# set to false, this cop will register offenses for names ending with +# numbers. Its default is false. The `AllowedNames` config option +# takes an array of permitted names that will never register an +# offense. The `ForbiddenNames` config option takes an array of +# restricted names that will always register an offense. +# +# @example +# # bad +# def bar(varOne, varTwo) +# varOne + varTwo +# end +# +# # With `AllowNamesEndingInNumbers` set to false +# def foo(num1, num2) +# num1 * num2 +# end +# +# # With `MinNameLength` set to number greater than 1 +# def baz(a, b, c) +# do_stuff(a, b, c) +# end +# +# # good +# def bar(thud, fred) +# thud + fred +# end +# +# def foo(speed, distance) +# speed * distance +# end +# +# def baz(age_a, height_b, gender_c) +# do_stuff(age_a, height_b, gender_c) +# end +# +# source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#46 +class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::UncommunicativeName + + # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#49 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/method_parameter_name.rb#54 + def on_defs(node); end +end + +# Checks that predicate methods end with `?` and non-predicate methods do not. +# +# The names of predicate methods (methods that return a boolean value) should end +# in a question mark. Methods that don't return a boolean, shouldn't +# end in a question mark. +# +# The cop assesses a predicate method as one that returns boolean values. Likewise, +# a method that only returns literal values is assessed as non-predicate. Other predicate +# method calls are assumed to return boolean values. The cop does not make an assessment +# if the return type is unknown (non-predicate method calls, variables, etc.). +# +# NOTE: The `initialize` method and operator methods (`def ==`, etc.) are ignored. +# +# By default, the cop runs in `conservative` mode, which allows a method to be named +# with a question mark as long as at least one return value is boolean. In `aggressive` +# mode, methods with a question mark will register an offense if any known non-boolean +# return values are detected. +# +# The cop also has `AllowedMethods` configuration in order to prevent the cop from +# registering an offense from a method name that does not confirm to the naming +# guidelines. By default, `call` is allowed. The cop also has `AllowedPatterns` +# configuration to allow method names by regular expression. +# +# Although returning a call to another predicate method is treated as a boolean value, +# certain method names can be known to not return a boolean, despite ending in a `?` +# (for example, `Numeric#nonzero?` returns `self` or `nil`). These methods can be +# configured using `NonBooleanPredicates`. +# +# The cop can furthermore be configured to allow all bang methods (method names +# ending with `!`), with `AllowBangMethods: true` (default false). +# +# @example AllowBangMethods: false (default) +# # bad +# def save! +# true +# end +# @example AllowBangMethods: true +# # good +# def save! +# true +# end +# @example AllowedMethods: [call] (default) +# # good +# def call +# foo == bar +# end +# @example AllowedPatterns: [\Afoo] +# # good +# def foo? +# 'foo' +# end +# @example Mode: aggressive +# # bad - the method returns nil in some cases +# def foo? +# return unless bar? +# true +# end +# @example Mode: conservative (default) +# # bad +# def foo +# bar == baz +# end +# +# # good +# def foo? +# bar == baz +# end +# +# # bad +# def foo? +# 5 +# end +# +# # good +# def foo +# 5 +# end +# +# # bad +# def foo +# x == y +# end +# +# # good +# def foo? +# x == y +# end +# +# # bad +# def foo +# !x +# end +# +# # good +# def foo? +# !x +# end +# +# # bad - returns the value of another predicate method +# def foo +# bar? +# end +# +# # good +# def foo? +# bar? +# end +# +# # good - operator method +# def ==(other) +# hash == other.hash +# end +# +# # good - at least one return value is boolean +# def foo? +# return unless bar? +# true +# end +# +# # ok - return type is not known +# def foo? +# bar +# end +# +# # ok - return type is not known +# def foo +# bar? +# end +# @example WaywardPredicates: ['infinite?', 'nonzero?'] (default) +# # good +# def non_predicate_method(num) +# num.infinite? +# end +# +# # good +# def non_predicate_method(num) +# num.nonzero? +# end +# +# source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#151 +class RuboCop::Cop::Naming::PredicateMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#158 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#170 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#183 + def acceptable?(return_values); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#212 + def all_return_values_boolean?(return_values); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#313 + def allow_bang_methods?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#174 + def allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#307 + def allowed_bang_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#277 + def and_or?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#219 + def boolean_return?(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#303 + def conservative?; end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#281 + def extract_and_or_clauses(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#288 + def extract_conditional_branches(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#246 + def extract_return_value(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#259 + def last_value(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#225 + def method_returning_boolean?(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#232 + def potential_non_predicate?(return_values); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#265 + def process_return_values(return_values); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#199 + def return_values(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#193 + def unknown_method_call?(value); end + + # If a method ending in `?` is known to not return a boolean value, + # (for example, `Numeric#nonzero?`) it should be treated as a non-boolean + # value, despite the method naming. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#320 + def wayward_predicate?(name); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#324 + def wayward_predicates; end +end + +# source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#156 +RuboCop::Cop::Naming::PredicateMethod::MSG_NON_PREDICATE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/predicate_method.rb#155 +RuboCop::Cop::Naming::PredicateMethod::MSG_PREDICATE = T.let(T.unsafe(nil), String) + +# Checks that predicate method names end with a question mark and +# do not start with a forbidden prefix. +# +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. +# +# Predicate methods must end with a question mark. +# +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. +# +# When `UseSorbetSigs` set to true (optional), the cop will only report +# offenses if the method has a Sorbet `sig` with a return type of +# `T::Boolean`. Dynamic methods are not supported with this configuration. +# +# @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed +# # good +# def is_a?(value) +# end +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# def_node_matcher(:even?) { |value| } +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } +# +# # good +# define_method(:even?) { |value| } +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) +# # bad +# def is_even(value) +# end +# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def is_even?(value) +# end +# @example NamePrefix: ['seems_to_be_'] +# # bad +# def seems_to_be_even(value) +# end +# +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def seems_to_be_even?(value) +# end +# @example UseSorbetSigs: false (default) +# # bad +# sig { returns(String) } +# def is_this_thing_on +# "yes" +# end +# +# # good - Sorbet signature is not evaluated +# sig { returns(String) } +# def is_this_thing_on? +# "yes" +# end +# @example UseSorbetSigs: true +# # bad +# sig { returns(T::Boolean) } +# def odd(value) +# end +# +# # good +# sig { returns(T::Boolean) } +# def odd?(value) +# end +# +# source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#103 +class RuboCop::Cop::Naming::PredicatePrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#107 + def dynamic_method_define(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#126 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#139 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#113 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#154 + def sorbet_return_type(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#141 + def validate_config; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#164 + def allowed_method_name?(method_name, prefix); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#172 + def expected_name(method_name, prefix); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#186 + def forbidden_prefixes; end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#182 + def message(method_name, new_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#198 + def method_definition_macro?(macro_name); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#190 + def predicate_prefixes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#158 + def sorbet_sig?(node, return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_prefix.rb#194 + def use_sorbet_sigs?; end +end + +# Makes sure that rescued exceptions variables are named as +# expected. +# +# The `PreferredName` config option takes a `String`. It represents +# the required name of the variable. Its default is `e`. +# +# NOTE: This cop does not consider nested rescues because it cannot +# guarantee that the variable from the outer rescue is not used within +# the inner rescue (in which case, changing the inner variable would +# shadow the outer variable). +# +# @example PreferredName: e (default) +# # bad +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _e +# # do something +# end +# @example PreferredName: exception +# # bad +# begin +# # do something +# rescue MyException => e +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => exception +# # do something +# end +# +# # good +# begin +# # do something +# rescue MyException => _exception +# # do something +# end +# +# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#61 +class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#66 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 + def autocorrect(corrector, node, range, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#117 + def correct_node(corrector, node, offending_name, preferred_name); end + + # If the exception variable is reassigned, that assignment needs to be corrected. + # Further `lvar` nodes will not be corrected though since they now refer to a + # different variable. + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 + def correct_reassignment(corrector, node, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#160 + def message(node); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 + def offense_range(resbody); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#147 + def preferred_name(variable_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#166 + def shadowed_variable_name?(node); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#156 + def variable_name(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106 + def variable_name_matches?(node, name); end +end + +# source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#64 +RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), String) + +# Checks that the configured style (snake_case or camelCase) is used for all variable names. +# This includes local variables, instance variables, class variables, method arguments +# (positional, keyword, rest or block), and block arguments. +# +# The cop can also be configured to forbid using specific names for variables, using +# `ForbiddenIdentifiers` or `ForbiddenPatterns`. In addition to the above, this applies +# to global variables as well. +# +# Method definitions and method calls are not affected by this cop. +# +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) +# fooBar = 1 +# @example AllowedPatterns: ['_v\d+\z'] +# # good (with EnforcedStyle: camelCase) +# release_v1 = true +# @example EnforcedStyle: camelCase +# # bad +# foo_bar = 1 +# +# # good +# fooBar = 1 +# @example EnforcedStyle: snake_case (default) +# # bad +# fooBar = 1 +# +# # good +# foo_bar = 1 +# @example ForbiddenIdentifiers: ['fooBar'] +# # bad (in all cases) +# fooBar = 1 +# @fooBar = 1 +# @@fooBar = 1 +# $fooBar = 1 +# @example ForbiddenPatterns: ['_v\d+\z'] +# # bad (in all cases) +# release_v1 = true +# @release_v1 = true +# @@release_v1 = true +# $release_v1 = true +# +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#52 +class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::ForbiddenIdentifiers + include ::RuboCop::Cop::ForbiddenPattern + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#78 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#84 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#77 + def on_cvasgn(node); end + + # Only forbidden names are checked for global variable assignment + # + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#88 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#76 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#82 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#81 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#83 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#85 + def on_lvar(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#66 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#79 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#80 + def on_restarg(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#97 + def forbidden_name?(name); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#101 + def message(style); end + + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#105 + def register_forbidden_name(node); end +end + +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#59 +RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#60 +RuboCop::Cop::Naming::VariableName::MSG_FORBIDDEN = T.let(T.unsafe(nil), String) + +# Makes sure that all numbered variables use the +# configured style, snake_case, normalcase, or non_integer, +# for their numbering. +# +# Additionally, `CheckMethodNames` and `CheckSymbols` configuration options +# can be used to specify whether method names and symbols should be checked. +# Both are enabled by default. +# +# @example AllowedIdentifiers: [capture3] +# # good +# expect(Open3).to receive(:capture3) +# @example AllowedPatterns: ['_v\d+\z'] +# # good +# :some_sym_v1 +# @example CheckMethodNames: false +# # good +# def some_method_1; end +# @example CheckMethodNames: true (default) +# # bad +# def some_method_1; end +# @example CheckSymbols: false +# # good +# :some_sym_1 +# @example CheckSymbols: true (default) +# # bad +# :some_sym_1 +# @example EnforcedStyle: non_integer +# # bad +# :some_sym1 +# :some_sym_1 +# +# variable1 = 1 +# variable_1 = 1 +# +# def some_method1; end +# +# def some_method_1; end +# +# def some_methodone(arg1); end +# def some_methodone(arg_1); end +# +# # good +# :some_symone +# :some_sym_one +# +# variableone = 1 +# variable_one = 1 +# +# def some_methodone; end +# +# def some_method_one; end +# +# def some_methodone(argone); end +# def some_methodone(arg_one); end +# +# # In the following examples, we assume `EnforcedStyle: normalcase` (default). +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# +# # good +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end +# @example EnforcedStyle: snake_case +# # bad +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method_1(arg1); end +# +# # good +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method_1(arg_1); end +# +# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 +class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNumbering + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#114 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#122 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#125 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#131 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#123 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#121 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#120 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#133 + def on_sym(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#110 + def valid_name?(node, name, given_style = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#142 + def message(style); end +end + +# source://rubocop//lib/rubocop/cop/naming/variable_number.rb#108 +RuboCop::Cop::Naming::VariableNumber::MSG = T.let(T.unsafe(nil), String) + +# Some common code shared between `NegatedIf` and +# `NegatedWhile` cops. +# +# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#7 +module RuboCop::Cop::NegativeConditional + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#18 + def empty_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#15 + def single_negative?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#20 + def check_negative_conditional(node, message:, &block); end +end + +# source://rubocop//lib/rubocop/cop/mixin/negative_conditional.rb#10 +RuboCop::Cop::NegativeConditional::MSG = T.let(T.unsafe(nil), String) + +# This module provides a list of methods that are: +# 1. In the NilClass by default +# 2. Added to NilClass by explicitly requiring any standard libraries +# 3. Cop's configuration parameter AllowedMethods. +# +# source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#9 +module RuboCop::Cop::NilMethods + include ::RuboCop::Cop::AllowedMethods + + private + + # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#14 + def nil_methods; end + + # source://rubocop//lib/rubocop/cop/mixin/nil_methods.rb#18 + def other_stdlib_methods; end +end + +# An offense represents a style violation detected by RuboCop. +# +# source://rubocop//lib/rubocop/cop/offense.rb#6 +class RuboCop::Cop::Offense + include ::Comparable + + # @api private + # @return [Offense] a new instance of Offense + # + # source://rubocop//lib/rubocop/cop/offense.rb#90 + def initialize(severity, location, message, cop_name, status = T.unsafe(nil), corrector = T.unsafe(nil)); end + + # Returns `-1`, `0`, or `+1` + # if this offense is less than, equal to, or greater than `other`. + # + # @api public + # @return [Integer] comparison result + # + # source://rubocop//lib/rubocop/cop/offense.rb#237 + def <=>(other); end + + # @api public + # @return [Boolean] returns `true` if two offenses contain same attributes + # + # source://rubocop//lib/rubocop/cop/offense.rb#218 + def ==(other); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#167 + def column; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#177 + def column_length; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#201 + def column_range; end + + # @api public + # @example + # 'Layout/LineLength' + # @return [String] the cop name as a String for which this offense is for. + # + # source://rubocop//lib/rubocop/cop/offense.rb#50 + def cop_name; end + + # @api public + # @return [Boolean] whether this offense can be automatically corrected via autocorrect. + # This includes todo comments, for example when requested with `--disable-uncorrectable`. + # + # source://rubocop//lib/rubocop/cop/offense.rb#108 + def correctable?; end + + # @api public + # @return [Boolean] whether this offense is automatically corrected via + # autocorrect or a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#119 + def corrected?; end + + # @api public + # @return [Boolean] whether this offense is automatically disabled via a todo. + # + # source://rubocop//lib/rubocop/cop/offense.rb#129 + def corrected_with_todo?; end + + # @api public + # @return [Corrector | nil] the autocorrection for this offense, or `nil` when not available + # + # source://rubocop//lib/rubocop/cop/offense.rb#61 + def corrector; end + + # @api public + # @return [Boolean] whether this offense was locally disabled with a + # disable or todo where it occurred. + # + # source://rubocop//lib/rubocop/cop/offense.rb#140 + def disabled?; end + + # @api public + # @return [Boolean] returns `true` if two offenses contain same attributes + # + # source://rubocop//lib/rubocop/cop/offense.rb#224 + def eql?(other); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#186 + def first_line; end + + # source://rubocop//lib/rubocop/cop/offense.rb#226 + def hash; end + + # @api public + # @return [Parser::Source::Range] the range of the code that is highlighted + # + # source://rubocop//lib/rubocop/cop/offense.rb#148 + def highlighted_area; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#196 + def last_column; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#191 + def last_line; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#162 + def line; end + + # @api public + # @return [Parser::Source::Range] the location where the violation is detected. + # @see https://www.rubydoc.info/gems/parser/Parser/Source/Range Parser::Source::Range + # + # source://rubocop//lib/rubocop/cop/offense.rb#28 + def location; end + + # @api public + # @example + # 'Line is too long. [90/80]' + # @return [String] human-readable message + # + # source://rubocop//lib/rubocop/cop/offense.rb#39 + def message; end + + # Internally we use column number that start at 0, but when + # outputting column numbers, we want them to start at 1. One + # reason is that editors, such as Emacs, expect this. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#210 + def real_column; end + + # @api public + # @return [RuboCop::Cop::Severity] + # + # source://rubocop//lib/rubocop/cop/offense.rb#17 + def severity; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#172 + def source_line; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#53 + def status; end + + # This is just for debugging purpose. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/offense.rb#155 + def to_s; end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/offense.rb#10 +RuboCop::Cop::Offense::COMPARISON_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/offense.rb#87 +RuboCop::Cop::Offense::NO_LOCATION = T.let(T.unsafe(nil), RuboCop::Cop::Offense::PseudoSourceRange) + +# source://rubocop//lib/rubocop/cop/offense.rb#63 +class RuboCop::Cop::Offense::PseudoSourceRange < ::Struct + # @return [PseudoSourceRange] a new instance of PseudoSourceRange + # + # source://rubocop//lib/rubocop/cop/offense.rb#71 + def initialize(line, column, source_line, begin_pos, end_pos); end + + # Returns the value of attribute begin_pos + # + # @return [Object] the current value of begin_pos + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def begin_pos; end + + # Sets the attribute begin_pos + # + # @param value [Object] the value to set the attribute begin_pos to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def begin_pos=(_); end + + # Returns the value of attribute column + # + # @return [Object] the current value of column + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def column; end + + # Sets the attribute column + # + # @param value [Object] the value to set the attribute column to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def column=(_); end + + # source://rubocop//lib/rubocop/cop/offense.rb#76 + def column_range; end + + # Returns the value of attribute end_pos + # + # @return [Object] the current value of end_pos + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def end_pos; end + + # Sets the attribute end_pos + # + # @param value [Object] the value to set the attribute end_pos to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def end_pos=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + # + # source://rubocop//lib/rubocop/cop/offense.rb#65 + def first_line; end + + # Returns the value of attribute column + # + # @return [Object] the current value of column + # + # source://rubocop//lib/rubocop/cop/offense.rb#67 + def last_column; end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + # + # source://rubocop//lib/rubocop/cop/offense.rb#66 + def last_line; end + + # source://rubocop//lib/rubocop/cop/offense.rb#83 + def length; end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def line=(_); end + + # source://rubocop//lib/rubocop/cop/offense.rb#80 + def size; end + + # Returns the value of attribute source_buffer. + # + # source://rubocop//lib/rubocop/cop/offense.rb#69 + def source_buffer; end + + # Returns the value of attribute source_line + # + # @return [Object] the current value of source_line + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def source_line; end + + # Sets the attribute source_line + # + # @param value [Object] the value to set the attribute source_line to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def source_line=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def inspect; end + + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def members; end + + # source://rubocop//lib/rubocop/cop/offense.rb#63 + def new(*_arg0); end + end +end + +# Common functionality for cops checking if and unless expressions. +# +# source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#6 +module RuboCop::Cop::OnNormalIfUnless + # source://rubocop//lib/rubocop/cop/mixin/on_normal_if_unless.rb#7 + def on_if(node); end +end + +# This autocorrects gem dependency order +# +# source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#6 +class RuboCop::Cop::OrderedGemCorrector + extend ::RuboCop::Cop::OrderedGemNode + extend ::RuboCop::Cop::RangeHelp + + class << self + # Returns the value of attribute comments_as_separators. + # + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 + def comments_as_separators; end + + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#13 + def correct(processed_source, node, previous_declaration, comments_as_separators); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#11 + def processed_source; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/ordered_gem_corrector.rb#26 + def declaration_with_comment(node); end + end +end + +# Common functionality for Bundler/OrderedGems and +# Gemspec/OrderedDependencies. +# +# source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#7 +module RuboCop::Cop::OrderedGemNode + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#23 + def case_insensitive_out_of_order?(string_a, string_b); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#27 + def consecutive_lines?(previous, current); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#55 + def find_gem_name(gem_node); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#18 + def gem_canonical_name(name); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#49 + def gem_name(declaration_node); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#10 + def get_source_range(node, comments_as_separators); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#32 + def register_offense(previous, current); end + + # source://rubocop//lib/rubocop/cop/mixin/ordered_gem_node.rb#61 + def treat_comments_as_separators; end +end + +# Common functionality for handling parentheses. +# +# source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#6 +module RuboCop::Cop::Parentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/parentheses.rb#9 + def parens_required?(node); end +end + +# This autocorrects parentheses +# +# source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#6 +class RuboCop::Cop::ParenthesesCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#12 + def correct(corrector, node); end + + private + + # Add a comma back after the heredoc identifier + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#77 + def add_heredoc_comma(corrector, node); end + + # If the node contains a heredoc, remove the comma too + # It'll be added back in the right place later + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#67 + def extend_range_for_heredoc(node, range); end + + # If removing parentheses leaves a comma on its own line, remove all the whitespace + # preceding it to prevent a syntax error. + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#44 + def handle_orphaned_comma(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#83 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#31 + def next_char_is_question_mark?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#35 + def only_closing_paren_before_comma?(node); end + + # Get a range for the closing parenthesis and all whitespace to the left of it + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#54 + def parens_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/parentheses_corrector.rb#27 + def ternary_condition?(node); end + end +end + +# Common functionality for handling percent arrays. +# +# source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#6 +module RuboCop::Cop::PercentArray + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#26 + def allowed_bracket_array?(node); end + + # @param elements [Array] + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#83 + def build_bracketed_array_with_appropriate_whitespace(elements:, node:); end + + # @param preferred_array_code [String] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#56 + def build_message_for_bracketed_array(preferred_array_code); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#67 + def check_bracketed_array(node, literal_prefix); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#36 + def check_percent_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#31 + def comments_in_array?(node); end + + # Override to determine values that are invalid in a percent array + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#22 + def invalid_percent_array_contents?(_node); end + + # Ruby does not allow percent arrays in an ambiguous block context. + # + # @example + # + # foo %i[bar baz] { qux } + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#14 + def invalid_percent_array_context?(node); end + + # Provides whitespace between elements for building a bracketed array. + # %w[ a b c ] + # ^^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#98 + def whitespace_between(node); end + + # Provides leading whitespace for building a bracketed array. + # %w[ a b c ] + # ^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#111 + def whitespace_leading(node); end + + # Provides trailing whitespace for building a bracketed array. + # %w[ a b c ] + # ^^^^ + # + # @param node [RuboCop::AST::ArrayNode] + # @return [String] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_array.rb#120 + def whitespace_trailing(node); end +end + +# Common functionality for handling percent literals. +# +# source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#6 +module RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::RangeHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#23 + def begin_source(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#11 + def percent_literal?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#17 + def process(node, *types); end + + # source://rubocop//lib/rubocop/cop/mixin/percent_literal.rb#27 + def type(node); end +end + +# This autocorrects percent literals +# +# source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#6 +class RuboCop::Cop::PercentLiteralCorrector + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + + # @return [PercentLiteralCorrector] a new instance of PercentLiteralCorrector + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#11 + def initialize(config, preferred_delimiters); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 + def config; end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#16 + def correct(corrector, node, char); end + + # Returns the value of attribute preferred_delimiters. + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#9 + def preferred_delimiters; end + + private + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#46 + def autocorrect_multiline_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#52 + def autocorrect_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#34 + def delimiters_for(type); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#110 + def end_content(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#30 + def escape_words?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#78 + def first_line?(node, previous_line_num); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#89 + def fix_escaped_content(word_node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#69 + def line_breaks(node, source, previous_line_num, base_line_num, node_index); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#38 + def new_contents(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#82 + def process_lines(node, previous_line_num, base_line_num, source_in_lines); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#58 + def process_multiline_words(node, escape, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#96 + def substitute_escaped_delimiters(content, delimiters); end + + # source://rubocop//lib/rubocop/cop/correctors/percent_literal_corrector.rb#26 + def wrap_contents(corrector, node, contents, char, delimiters); end +end + +# Common functionality for checking whether an AST node/token is aligned +# with something on a preceding or following line +# +# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#8 +module RuboCop::Cop::PrecedingFollowingAlignment + private + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#79 + def aligned_comment_lines; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#102 + def aligned_equals_operator?(range, lineno); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133 + def aligned_identical?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#90 + def aligned_operator?(range, line, lineno); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#86 + def aligned_token?(range, line, lineno); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#43 + def aligned_with_adjacent_line?(range, predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#61 + def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#51 + def aligned_with_any_line_range?(line_ranges, range, &predicate); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#125 + def aligned_with_append_operator?(range, token); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#137 + def aligned_with_equals_sign(token, line_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#65 + def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#23 + def aligned_with_operator?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#119 + def aligned_with_preceding_equals?(range, token); end + + # Allows alignment with a preceding operator that ends with an `=`, + # including assignment and comparison operators. + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#29 + def aligned_with_preceding_equals_operator(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#19 + def aligned_with_something?(range); end + + # Allows alignment with a subsequent operator that ends with an `=`, + # including assignment and comparison operators. + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#37 + def aligned_with_subsequent_equals_operator(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#94 + def aligned_words?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#15 + def allow_for_alignment?; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#152 + def assignment_lines; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#156 + def assignment_tokens; end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176 + def relevant_assignment_lines(line_range); end + + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#203 + def remove_equals_in_def(asgn_tokens, processed_source); end +end + +# Tokens that end with an `=`, as well as `<<`, that can be aligned together: +# `=`, `==`, `===`, `!=`, `<=`, `>=`, `<<` and operator assignment (`+=`, etc). +# +# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#11 +RuboCop::Cop::PrecedingFollowingAlignment::ASSIGNMENT_OR_COMPARISON_TOKENS = T.let(T.unsafe(nil), Array) + +# Common functionality for handling percent literal delimiters. +# +# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#6 +class RuboCop::Cop::PreferredDelimiters + # @return [PreferredDelimiters] a new instance of PreferredDelimiters + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#11 + def initialize(type, config, preferred_delimiters); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 + def config; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#17 + def delimiters; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#7 + def type; end + + private + + # @raise [ArgumentError] + # + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#23 + def ensure_valid_preferred_delimiters; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#30 + def preferred_delimiters; end + + # source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#45 + def preferred_delimiters_config; end +end + +# source://rubocop//lib/rubocop/cop/mixin/preferred_delimiters.rb#9 +RuboCop::Cop::PreferredDelimiters::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# This autocorrects punctuation +# +# source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#6 +class RuboCop::Cop::PunctuationCorrector + class << self + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#12 + def add_space(corrector, token); end + + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#8 + def remove_space(corrector, space_before); end + + # source://rubocop//lib/rubocop/cop/correctors/punctuation_corrector.rb#16 + def swap_comma(corrector, range); end + end +end + +# Methods that calculate and return Parser::Source::Ranges +# +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 +module RuboCop::Cop::RangeHelp + private + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#152 + def add_range(range1, range2); end + + # A range containing the first to the last argument + # of a method call or method definition. + # def foo(a, b:) + # ^^^^^ + # bar(1, 2, 3, &blk) + # ^^^^^^^^^^^^^ + # baz { |x, y:, z:| } + # ^^^^^^^^^ + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#45 + def arguments_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#93 + def column_offset_between(base_range, range); end + + # A range containing only the contents of a literal with delimiters (e.g. in + # `%i{1 2 3}` this will be the range covering `1 2 3` only). + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#33 + def contents_range(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#111 + def directions(side); end + + # Returns the column attribute of the range, except if the range is on + # the first line and there's a byte order mark at the beginning of that + # line, in which case 1 is subtracted from the column value. This gives + # the column as it appears when viewing the file in an editor. + # + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#103 + def effective_column(range); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#120 + def final_pos(src, pos, increment, continuations, newlines, whitespace); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#128 + def move_pos(src, pos, step, condition, regexp); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#134 + def move_pos_str(src, pos, step, condition, needle); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#49 + def range_between(start_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#84 + def range_by_whole_lines(range, include_final_newline: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#145 + def range_with_comments(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#141 + def range_with_comments_and_lines(node); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#53 + def range_with_surrounding_comma(range, side = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#67 + def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#12 + def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end +end + +# The Unicode codepoint +# +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#7 +RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#8 +module RuboCop::Cop::RangeHelp::NOT_GIVEN; end + +# Common functionality for handling Rational literals. +# +# source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#6 +module RuboCop::Cop::RationalLiteral + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/rational_literal.rb#12 + def rational_literal?(param0 = T.unsafe(nil)); end +end + +# Registry that tracks all cops by their badge and department. +# +# source://rubocop//lib/rubocop/cop/registry.rb#19 +class RuboCop::Cop::Registry + include ::Enumerable + + # @return [Registry] a new instance of Registry + # + # source://rubocop//lib/rubocop/cop/registry.rb#51 + def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#232 + def ==(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#97 + def contains_cop_matching?(names); end + + # source://rubocop//lib/rubocop/cop/registry.rb#179 + def cops; end + + # source://rubocop//lib/rubocop/cop/registry.rb#224 + def cops_for_department(department); end + + # @return [Boolean] Checks if given name is department + # + # source://rubocop//lib/rubocop/cop/registry.rb#93 + def department?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#147 + def department_missing?(badge, name); end + + # @return [Array] list of departments for current cops. + # + # source://rubocop//lib/rubocop/cop/registry.rb#72 + def departments; end + + # source://rubocop//lib/rubocop/cop/registry.rb#193 + def disabled(config); end + + # source://rubocop//lib/rubocop/cop/registry.rb#67 + def dismiss(cop); end + + # source://rubocop//lib/rubocop/cop/registry.rb#247 + def each(&block); end + + # source://rubocop//lib/rubocop/cop/registry.rb#189 + def enabled(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#197 + def enabled?(cop, config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#213 + def enabled_pending_cop?(cop_cfg, config); end + + # source://rubocop//lib/rubocop/cop/registry.rb#63 + def enlist(cop); end + + # @param cop_name [String] + # @return [Class, nil] + # + # source://rubocop//lib/rubocop/cop/registry.rb#253 + def find_by_cop_name(cop_name); end + + # When a cop name is given returns a single-element array with the cop class. + # When a department name is given returns an array with all the cop classes + # for that department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#260 + def find_cops_by_directive(directive); end + + # source://rubocop//lib/rubocop/cop/registry.rb#265 + def freeze; end + + # source://rubocop//lib/rubocop/cop/registry.rb#184 + def length; end + + # source://rubocop//lib/rubocop/cop/registry.rb#220 + def names; end + + # source://rubocop//lib/rubocop/cop/registry.rb#228 + def names_for_department(department); end + + # Returns the value of attribute options. + # + # source://rubocop//lib/rubocop/cop/registry.rb#49 + def options; end + + # source://rubocop//lib/rubocop/cop/registry.rb#151 + def print_warning(name, path); end + + # Convert a user provided cop name into a properly namespaced name + # + # @example fixes incorrect namespaces + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine' + # @example gives back a correctly qualified cop name + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine' + # @example namespaces bare cop identifiers + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine' + # @example passes back unrecognized cop names + # + # registry = RuboCop::Cop::Registry + # registry.qualified_cop_name('NotACop', '') # => 'NotACop' + # @note Emits a warning if the provided name has an incorrect namespace + # @param name [String] Cop name extracted from config + # @param path [String, nil] Path of file that `name` was extracted from + # @param warn [Boolean] Print a warning if no department given for `name` + # @raise [AmbiguousCopName] if a bare identifier with two possible namespaces is provided + # @return [String] Qualified cop name + # + # source://rubocop//lib/rubocop/cop/registry.rb#133 + def qualified_cop_name(name, path, warn: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#166 + def qualify_badge(badge); end + + # source://rubocop//lib/rubocop/cop/registry.rb#243 + def select(&block); end + + # source://rubocop//lib/rubocop/cop/registry.rb#236 + def sort!; end + + # @return [Hash{String => Array}] + # + # source://rubocop//lib/rubocop/cop/registry.rb#174 + def to_h; end + + # source://rubocop//lib/rubocop/cop/registry.rb#159 + def unqualified_cop_names; end + + # @return [Registry] Cops for that specific department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#78 + def with_department(department); end + + # @return [Registry] Cops not for a specific department. + # + # source://rubocop//lib/rubocop/cop/registry.rb#84 + def without_department(department); end + + private + + # source://rubocop//lib/rubocop/cop/registry.rb#283 + def clear_enrollment_queue; end + + # source://rubocop//lib/rubocop/cop/registry.rb#279 + def initialize_copy(reg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#312 + def registered?(badge); end + + # source://rubocop//lib/rubocop/cop/registry.rb#299 + def resolve_badge(given_badge, real_badge, source_path, warn: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#295 + def with(cops); end + + class << self + # source://rubocop//lib/rubocop/cop/registry.rb#22 + def all; end + + # Returns the value of attribute global. + # + # source://rubocop//lib/rubocop/cop/registry.rb#274 + def global; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/registry.rb#44 + def qualified_cop?(name); end + + # source://rubocop//lib/rubocop/cop/registry.rb#26 + def qualified_cop_name(name, origin, warn: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/registry.rb#40 + def reset!; end + + # Changes momentarily the global registry + # Intended for testing purposes + # + # source://rubocop//lib/rubocop/cop/registry.rb#32 + def with_temporary_global(temp_global = T.unsafe(nil)); end + end +end + +# Ensure a require statement is present for a standard library determined +# by variable library_name +# +# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#7 +module RuboCop::Cop::RequireLibrary + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#12 + def ensure_required(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#24 + def remove_subsequent_requires(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#51 + def require_any_library?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#56 + def require_library_name?(param0 = T.unsafe(nil), param1); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/require_library.rb#44 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/mixin/require_library.rb#10 +RuboCop::Cop::RequireLibrary::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# This class ensures a require statement is present for a standard library +# determined by the variable library_name +# +# source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#7 +class RuboCop::Cop::RequireLibraryCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#11 + def correct(corrector, node, library_name); end + + # source://rubocop//lib/rubocop/cop/correctors/require_library_corrector.rb#17 + def require_statement(library_name); end + end +end + +# Common functionality for checking `rescue` nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#6 +module RuboCop::Cop::RescueNode + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#7 + def modifier_locations; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#13 + def rescue_modifier?(node); end + + # @deprecated Use ResbodyNode#exceptions instead + # + # source://rubocop//lib/rubocop/cop/mixin/rescue_node.rb#20 + def rescued_exceptions(resbody); end +end + +# Common functionality for safe assignment. By safe assignment we mean +# putting parentheses around an assignment to indicate "I know I'm using an +# assignment as a condition. It's not a mistake." +# +# source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#8 +module RuboCop::Cop::SafeAssignment + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#14 + def empty_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#20 + def safe_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#17 + def setter_method?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/safe_assignment.rb#22 + def safe_assignment_allowed?; end +end + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#5 +module RuboCop::Cop::Security; end + +# Checks for implementations of the `hash` method which combine +# values using custom logic instead of delegating to `Array#hash`. +# +# Manually combining hashes is error prone and hard to follow, especially +# when there are many values. Poor implementations may also introduce +# performance or security concerns if they are prone to collisions. +# Delegating to `Array#hash` is clearer and safer, although it might be slower +# depending on the use case. +# +# @example +# +# # bad +# def hash +# @foo ^ @bar +# end +# +# # good +# def hash +# [@foo, @bar].hash +# end +# +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#30 +class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#59 + def bad_hash_combinator?(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#76 + def contained_in_hash_method?(node, &block); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#43 + def dynamic_hash_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#38 + def hash_method_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#64 + def monuple_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#103 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#104 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#88 + def on_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#82 + def outer_bad_hash_combinator?(node); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#69 + def redundant_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#52 + def static_hash_method_definition?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#31 +RuboCop::Cop::Security::CompoundHash::COMBINATOR_IN_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#32 +RuboCop::Cop::Security::CompoundHash::MONUPLE_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#34 +RuboCop::Cop::Security::CompoundHash::REDUNDANT_HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/compound_hash.rb#35 +RuboCop::Cop::Security::CompoundHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#eval` and `Binding#eval` with +# dynamic strings as arguments. Evaluating non-literal strings +# can enable code injection attacks and makes it difficult to +# reason about what code will actually be executed. +# +# Calls to `eval` with literal strings are not flagged by this cop, +# as they do not pose the same injection risk. +# +# @example +# +# # bad +# eval(something) +# binding.eval(something) +# Kernel.eval(something) +# +# # good - use safer alternatives +# obj.public_send(method_name) +# obj.send(method_name, *args) +# +# # good - literal strings are allowed +# eval("1 + 1") +# binding.eval("foo") +# +# source://rubocop//lib/rubocop/cop/security/eval.rb#28 +class RuboCop::Cop::Security::Eval < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/eval.rb#33 + def eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/eval.rb#37 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/eval.rb#29 +RuboCop::Cop::Security::Eval::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/eval.rb#30 +RuboCop::Cop::Security::Eval::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`, +# `IO.foreach`, and `IO.readlines`. +# +# If argument starts with a pipe character (`'|'`) and the receiver is the `IO` class, +# a subprocess is created in the same way as `Kernel#open`, and its output is returned. +# `Kernel#open` may allow unintentional command injection, which is the reason these +# `IO` methods are a security risk. +# Consider to use `File.read` to disable the behavior of subprocess invocation. +# +# @example +# +# # bad +# IO.read(path) +# IO.read('path') +# +# # good +# File.read(path) +# File.read('path') +# IO.read('| command') # Allow intentional command invocation. +# +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#30 +class RuboCop::Cop::Security::IoMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/io_methods.rb#36 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#33 +RuboCop::Cop::Security::IoMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/io_methods.rb#34 +RuboCop::Cop::Security::IoMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of JSON class methods which have potential +# security issues. +# +# `JSON.load` and similar methods allow deserialization of arbitrary ruby objects: +# +# [source,ruby] +# ---- +# require 'json/add/string' +# result = JSON.load('{ "json_class": "String", "raw": [72, 101, 108, 108, 111] }') +# pp result # => "Hello" +# ---- +# +# Never use `JSON.load` for untrusted user input. Prefer `JSON.parse` unless you have +# a concrete use-case for `JSON.load`. +# +# NOTE: Starting with `json` gem version 2.8.0, triggering this behavior without explicitly +# passing the `create_additions` keyword argument emits a deprecation warning, with the +# goal of being secure by default in the next major version 3.0.0. +# +# @example +# # bad +# JSON.load('{}') +# JSON.restore('{}') +# +# # good +# JSON.parse('{}') +# JSON.unsafe_load('{}') +# +# # good - explicit use of `create_additions` option +# JSON.load('{}', create_additions: true) +# JSON.load('{}', create_additions: false) +# +# source://rubocop//lib/rubocop/cop/security/json_load.rb#44 +class RuboCop::Cop::Security::JSONLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/security/json_load.rb#51 + def insecure_json_load(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/json_load.rb#59 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/json_load.rb#47 +RuboCop::Cop::Security::JSONLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/json_load.rb#48 +RuboCop::Cop::Security::JSONLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of Marshal class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# @example +# # bad +# Marshal.load("{}") +# Marshal.restore("{}") +# +# # good +# Marshal.dump("{}") +# +# # okish - deep copy hack +# Marshal.load(Marshal.dump({})) +# +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#21 +class RuboCop::Cop::Security::MarshalLoad < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#26 + def marshal_load(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/security/marshal_load.rb#31 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#22 +RuboCop::Cop::Security::MarshalLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/marshal_load.rb#23 +RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of `Kernel#open` and `URI.open` with dynamic +# data. +# +# `Kernel#open` and `URI.open` enable not only file access but also process +# invocation by prefixing a pipe symbol (e.g., `open("| ls")`). +# So, it may lead to a serious security risk by using variable input to +# the argument of `Kernel#open` and `URI.open`. It would be better to use +# `File.open`, `IO.popen` or `URI.parse#open` explicitly. +# +# NOTE: `open` and `URI.open` with literal strings are not flagged by this +# cop. +# +# @example +# # bad +# open(something) +# open("| #{something}") +# open("| foo") +# URI.open(something) +# +# # good +# File.open(something) +# IO.popen(something) +# URI.parse(something).open +# +# # good (literal strings) +# open("foo.text") +# URI.open("http://example.com") +# URI.parse(url).open +# +# source://rubocop//lib/rubocop/cop/security/open.rb#38 +class RuboCop::Cop::Security::Open < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/security/open.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/security/open.rb#43 + def open?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#76 + def composite_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#84 + def concatenated_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#80 + def interpolated_string?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#58 + def safe?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#68 + def safe_argument?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/security/open.rb#72 + def simple_string?(node); end +end + +# source://rubocop//lib/rubocop/cop/security/open.rb#39 +RuboCop::Cop::Security::Open::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/open.rb#40 +RuboCop::Cop::Security::Open::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of YAML class methods which have +# potential security issues leading to remote code execution when +# loading from an untrusted source. +# +# NOTE: Ruby 3.1+ (Psych 4) uses `Psych.load` as `Psych.safe_load` by default. +# +# @example +# # bad +# YAML.load("--- !ruby/object:Foo {}") # Psych 3 is unsafe by default +# +# # good +# YAML.safe_load("--- !ruby/object:Foo {}", [Foo]) # Ruby 2.5 (Psych 3) +# YAML.safe_load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.0- (Psych 3) +# YAML.load("--- !ruby/object:Foo {}", permitted_classes: [Foo]) # Ruby 3.1+ (Psych 4) +# YAML.dump(foo) +# +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#26 +class RuboCop::Cop::Security::YAMLLoad < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#40 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/security/yaml_load.rb#36 + def yaml_load(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#30 +RuboCop::Cop::Security::YAMLLoad::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/security/yaml_load.rb#31 +RuboCop::Cop::Security::YAMLLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Severity class is simple value object about severity +# +# source://rubocop//lib/rubocop/cop/severity.rb#6 +class RuboCop::Cop::Severity + include ::Comparable + + # @api private + # @raise [ArgumentError] + # @return [Severity] a new instance of Severity + # + # source://rubocop//lib/rubocop/cop/severity.rb#30 + def initialize(name_or_code); end + + # source://rubocop//lib/rubocop/cop/severity.rb#62 + def <=>(other); end + + # source://rubocop//lib/rubocop/cop/severity.rb#50 + def ==(other); end + + # source://rubocop//lib/rubocop/cop/severity.rb#42 + def code; end + + # source://rubocop//lib/rubocop/cop/severity.rb#58 + def hash; end + + # source://rubocop//lib/rubocop/cop/severity.rb#46 + def level; end + + # @api public + # @return [Symbol] severity. + # any of `:info`, `:refactor`, `:convention`, `:warning`, `:error` or `:fatal`. + # + # source://rubocop//lib/rubocop/cop/severity.rb#22 + def name; end + + # source://rubocop//lib/rubocop/cop/severity.rb#38 + def to_s; end + + class << self + # source://rubocop//lib/rubocop/cop/severity.rb#24 + def name_from_code(code); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/severity.rb#12 +RuboCop::Cop::Severity::CODE_TABLE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/severity.rb#9 +RuboCop::Cop::Severity::NAMES = T.let(T.unsafe(nil), Array) + +# Common functionality for cops checking for missing space after +# punctuation. +# +# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#7 +module RuboCop::Cop::SpaceAfterPunctuation + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#10 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#39 + def allowed_type?(token); end + + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#20 + def each_missing_space(tokens); end + + # The normal offset, i.e., the distance from the punctuation + # token where a space should be, is 1. + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#50 + def offset; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#43 + def space_forbidden_before_rcurly?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#31 + def space_missing?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#35 + def space_required_before?(token); end +end + +# source://rubocop//lib/rubocop/cop/mixin/space_after_punctuation.rb#8 +RuboCop::Cop::SpaceAfterPunctuation::MSG = T.let(T.unsafe(nil), String) + +# Common functionality for cops checking for space before +# punctuation. +# +# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#7 +module RuboCop::Cop::SpaceBeforePunctuation + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#12 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#22 + def each_missing_space(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#34 + def space_missing?(token1, token2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#38 + def space_required_after?(token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#42 + def space_required_after_lcurly?; end +end + +# source://rubocop//lib/rubocop/cop/mixin/space_before_punctuation.rb#10 +RuboCop::Cop::SpaceBeforePunctuation::MSG = T.let(T.unsafe(nil), String) + +# This autocorrects whitespace +# +# source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#6 +class RuboCop::Cop::SpaceCorrector + extend ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::SurroundingSpace + + class << self + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#36 + def add_space(processed_source, corrector, left_token, right_token); end + + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#12 + def empty_corrections(processed_source, corrector, empty_config, left_token, right_token); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#10 + def processed_source; end + + # source://rubocop//lib/rubocop/cop/correctors/space_corrector.rb#24 + def remove_space(processed_source, corrector, left_token, right_token); end + end +end + +# Common functionality for modifier cops. +# +# source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#6 +module RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + + private + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 + def code_after(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 + def comment_disables_cop?(comment); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#77 + def first_line_comment(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#57 + def if_body_source(if_body); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#43 + def length_in_modifier_form(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 + def method_source(if_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#37 + def modifier_fits_on_single_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#26 + def non_eligible_body?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#33 + def non_eligible_condition?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#19 + def non_eligible_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#65 + def omitted_value_in_last_hash_arg?(if_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#91 + def parenthesize?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#11 + def single_line_as_modifier?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#50 + def to_modifier_form(node); end +end + +# Classes that include this module just implement functions to determine +# what is an offense and how to do autocorrection. They get help with +# adding offenses for the faulty string nodes, and with filtering out +# nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/string_help.rb#9 +module RuboCop::Cop::StringHelp + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#26 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#10 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_help.rb#32 + def inside_interpolation?(node); end +end + +# This autocorrects string literals +# +# source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#6 +class RuboCop::Cop::StringLiteralCorrector + extend ::RuboCop::PathUtil + extend ::RuboCop::Cop::Util + + class << self + # source://rubocop//lib/rubocop/cop/correctors/string_literal_corrector.rb#10 + def correct(corrector, node, style); end + end +end + +# Common functionality for cops checking single/double quotes. +# +# source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#6 +module RuboCop::Cop::StringLiteralsHelp + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 + def string_literals_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 + def wrong_quotes?(src_or_node); end +end + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#5 +module RuboCop::Cop::Style; end + +# Access modifiers should be declared to apply to a group of methods +# or inline before each method, depending on configuration. +# EnforcedStyle config covers only method definitions. +# Applications of visibility methods to symbols can be controlled +# using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. +# +# @example AllowModifiersOnAliasMethod: false +# # bad +# class Foo +# +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo +# +# end +# @example AllowModifiersOnAliasMethod: true (default) +# # good +# class Foo +# +# public alias_method :bar, :foo +# protected alias_method :baz, :foo +# private alias_method :qux, :foo +# +# end +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# @example AllowModifiersOnSymbols: false +# # bad +# class Foo +# +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods +# +# end +# @example AllowModifiersOnSymbols: true (default) +# # good +# class Foo +# +# private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES +# private *private_methods +# +# end +# @example EnforcedStyle: group (default) +# # bad +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# # good +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# @example EnforcedStyle: inline +# # bad +# class Foo +# +# private +# +# def bar; end +# def baz; end +# +# end +# +# # good +# class Foo +# +# private def bar; end +# private def baz; end +# +# end +# +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 +class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#167 + def access_modifier_with_alias_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#161 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#154 + def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#172 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#263 + def access_modifier_is_inlined?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#267 + def access_modifier_is_not_inlined?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#234 + def allow_modifiers_on_alias_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 + def allow_modifiers_on_attrs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#226 + def allow_modifiers_on_symbols?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 + def allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#204 + def autocorrect_group_style(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#211 + def autocorrect_inline_style(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#248 + def correctable_group_offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#355 + def def_source(node, def_nodes); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#310 + def find_argument_less_modifier_node(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#291 + def find_corresponding_def_nodes(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#255 + def group_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#259 + def inline_style?; end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#339 + def insert_inline_modifier(corrector, node, modifier_name); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#281 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#222 + def percent_symbol_array?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#349 + def remove_modifier_node_within_begin(corrector, modifier_node, begin_node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#343 + def remove_nodes(corrector, *nodes); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#324 + def replace_defs(corrector, node, def_nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#271 + def right_siblings_same_inline_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#318 + def select_grouped_def_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 +RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#146 +RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#151 +RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for grouping of accessors in `class` and `module` bodies. +# By default it enforces accessors to be placed in grouped +# declarations, reducing boilerplate. It can also be configured +# to enforce separating them into individual declarations for +# easier diffing and per-attribute documentation. +# +# NOTE: If there is a method call before the accessor method it is always allowed +# as it might be intended like Sorbet. +# +# NOTE: If there is a RBS::Inline annotation comment just after the accessor method +# it is always allowed. +# +# @example EnforcedStyle: grouped (default) +# # bad +# class Foo +# attr_reader :bar +# attr_reader :bax +# attr_reader :baz +# end +# +# # good +# class Foo +# attr_reader :bar, :bax, :baz +# end +# +# # good +# class Foo +# # may be intended comment for bar. +# attr_reader :bar +# +# sig { returns(String) } +# attr_reader :bax +# +# may_be_intended_annotation :baz +# attr_reader :baz +# end +# @example EnforcedStyle: separated +# # bad +# class Foo +# attr_reader :bar, :baz +# end +# +# # good +# class Foo +# attr_reader :bar +# attr_reader :baz +# end +# +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#55 +class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#64 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#72 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 + def on_sclass(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#87 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#76 + def check(send_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#127 + def class_send_elements(class_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#184 + def group_accessors(node, accessors); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#104 + def groupable_accessor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#147 + def groupable_sibling_accessor?(node, sibling); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#154 + def groupable_sibling_accessors(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#139 + def grouped_style?; end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#160 + def message(send_node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#165 + def preferred_accessors(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#99 + def previous_line_comment?(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#205 + def range_with_trailing_argument_comment(node); end + + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#190 + def separate_accessors(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 + def separated_style?; end + + # Group after constants + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#179 + def skip_for_grouping?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#61 +RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 +RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of either `#alias` or `#alias_method` +# depending on configuration. Consistent use of one or the +# other prevents confusion about their different semantics +# (e.g., `alias` is resolved at parse time, while `alias_method` +# is resolved at runtime). +# It also flags uses of `alias :symbol` rather than `alias bareword`. +# +# However, it will always enforce `method_alias` when used `alias` +# in an instance method definition and in a singleton method definition. +# If used in a block, always enforce `alias_method` +# unless it is an `instance_eval` block. +# +# @example EnforcedStyle: prefer_alias (default) +# # bad +# alias_method :bar, :foo +# alias :bar :foo +# +# # good +# alias bar foo +# @example EnforcedStyle: prefer_alias_method +# # bad +# alias :bar :foo +# alias bar foo +# +# # good +# alias_method :bar, :foo +# +# source://rubocop//lib/rubocop/cop/style/alias.rb#34 +class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/alias.rb#55 + def on_alias(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#44 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/alias.rb#89 + def add_offense_for_args(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#79 + def alias_keyword_possible?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#83 + def alias_method_possible?(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#69 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#128 + def bareword?(sym_node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#132 + def correct_alias_method_to_alias(corrector, send_node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#139 + def correct_alias_to_alias_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#146 + def correct_alias_with_symbol_args(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#151 + def identifier(node); end + + # source://rubocop//lib/rubocop/cop/style/alias.rb#117 + def lexical_scope_type(node); end + + # In this expression, will `self` be the same as the innermost enclosing + # class or module block (:lexical)? Or will it be something else + # (:dynamic)? If we're in an instance_eval block, return that. + # + # source://rubocop//lib/rubocop/cop/style/alias.rb#100 + def scope_type(node); end +end + +# source://rubocop//lib/rubocop/cop/style/alias.rb#38 +RuboCop::Cop::Style::Alias::MSG_ALIAS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#39 +RuboCop::Cop::Style::Alias::MSG_ALIAS_METHOD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#40 +RuboCop::Cop::Style::Alias::MSG_SYMBOL_ARGS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/alias.rb#42 +RuboCop::Cop::Style::Alias::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for endless methods inside operations of lower precedence (`and`, `or`, and +# modifier forms of `if`, `unless`, `while`, `until`) that are ambiguous due to +# lack of parentheses. This may lead to unexpected behavior as the code may appear +# to use these keywords as part of the method but in fact they modify +# the method definition itself. +# +# In these cases, using a normal method definition is more clear. +# +# @example +# +# # bad +# def foo = true if bar +# +# # good - using a non-endless method is more explicit +# def foo +# true +# end if bar +# +# # ok - method body is explicit +# def foo = (true if bar) +# +# # ok - method definition is explicit +# (def foo = true) if bar +# +# source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#29 +class RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EndlessMethodRewriter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#40 + def ambiguous_endless_method_body(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#48 + def on_def(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#69 + def keyword(operation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#63 + def modifier_form?(operation); end +end + +# source://rubocop//lib/rubocop/cop/style/ambiguous_endless_method_definition.rb#37 +RuboCop::Cop::Style::AmbiguousEndlessMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `and` and `or`, and suggests using `&&` and +# `||` instead. It can be configured to check only in conditions or in +# all contexts. +# +# @example EnforcedStyle: always +# # bad +# foo.save and return +# +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# if foo && bar +# end +# @example EnforcedStyle: conditionals (default) +# # bad +# if foo and bar +# end +# +# # good +# foo.save && return +# +# # good +# foo.save and return +# +# # good +# if foo && bar +# end +# +# source://rubocop//lib/rubocop/cop/style/and_or.rb#44 +class RuboCop::Cop::Style::AndOr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#51 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#56 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#54 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#61 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#62 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#59 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#60 + def on_while_post(node); end + + private + + # ! is a special case: + # 'x and !obj.method arg' can be autocorrected if we + # recurse down a level and add parens to 'obj.method arg' + # however, 'not x' also parses as (send x :!) + # + # source://rubocop//lib/rubocop/cop/style/and_or.rb#117 + def correct_not(node, receiver, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#129 + def correct_other(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#95 + def correct_send(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#108 + def correct_setter(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/and_or.rb#143 + def correctable_send?(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#135 + def keep_operator_precedence(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#91 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#85 + def on_conditionals(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#66 + def process_logical_operator(node); end + + # source://rubocop//lib/rubocop/cop/style/and_or.rb#147 + def whitespace_before_arg(node); end +end + +# source://rubocop//lib/rubocop/cop/style/and_or.rb#49 +RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) + +# In Ruby 2.7, arguments forwarding has been added. +# +# This cop identifies places where `do_something(*args, &block)` +# can be replaced by `do_something(...)`. +# +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# +# In Ruby 3.2, anonymous args/kwargs forwarding has been added. +# +# This cop also identifies places where `+use_args(*args)+`/`+use_kwargs(**kwargs)+` can be +# replaced by `+use_args(*)+`/`+use_kwargs(**)+`; if desired, this functionality can be +# disabled by setting `UseAnonymousForwarding: false`. +# +# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`, +# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names +# that are sufficient for anonymizing meaningless naming. +# +# Meaningless names that are commonly used can be anonymized by default: +# e.g., `+*args+`, `+**options+`, `&block`, and so on. +# +# Names not on this list are likely to be meaningful and are allowed by default. +# +# This cop handles not only method forwarding but also forwarding to `super`. +# +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) +# end +# +# # good +# def foo(...) +# bar(...) +# end +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) +# # bad +# # The following code can replace the arguments with `...`, +# # but it will change the behavior. Because `...` forwards block also. +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) +# # good +# def foo(*args) +# bar(*args) +# end +# +# def foo(**kwargs) +# bar(**kwargs) +# end +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) +# end +# +# # good +# def foo(&) +# bar(&) +# end +# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) +# # bad +# def foo(**kwargs) +# bar(**kwargs) +# end +# +# # good +# def foo(**) +# bar(**) +# end +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) +# # bad +# def foo(*args) +# bar(*args) +# end +# +# # good +# def foo(*) +# bar(*) +# end +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) +# # bad +# def foo(*args, **kwargs, &block) +# args_only(*args) +# kwargs_only(**kwargs) +# block_only(&block) +# end +# +# # good +# def foo(*, **, &) +# args_only(*) +# kwargs_only(**) +# block_only(&) +# end +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#141 +class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#179 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#201 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#379 + def add_parens_if_missing(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#230 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + + # Checks if forwarding is uses both in blocks and outside of blocks. + # On Ruby 3.3.0, anonymous block forwarding in blocks can be is a syntax + # error, so we only want to register an offense if we can change all occurrences. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#312 + def all_forwarding_offenses_correctable?(send_classifications); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#323 + def allow_anonymous_forwarding_in_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#371 + def allow_only_rest_arguments?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 + def arguments_range(node, first_node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#280 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#558 + def explicit_block_name?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#183 + def extract_forwardable_args(args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#225 + def forward_all_first_argument(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#255 + def non_splat_or_block_pass_lvar_references(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#195 + def only_forwards_all?(send_classifications); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#299 + def redundant_named_arg(arg, config_name, keyword); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#357 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#330 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#346 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#338 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#375 + def use_anonymous_forwarding?; end + + class << self + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#155 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#151 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#153 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#148 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#150 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#152 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # @return [SendNodeClassifier] a new instance of SendNodeClassifier + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#416 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#444 + def classification; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 + def def_all_anonymous_args?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 + def forwarded_block_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#432 + def forwarded_kwrest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 + def forwarded_rest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#391 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#409 + def send_all_anonymous_args?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#529 + def additional_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#525 + def additional_kwargs_or_forwarded_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#539 + def allow_offense_for_no_block?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#510 + def any_arg_referenced?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#494 + def arguments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#459 + def can_forward_all?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#533 + def forward_additional_kwargs?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#490 + def forwarded_rest_and_kwrest_args; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#552 + def missing_rest_arg_or_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#543 + def no_additional_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#518 + def no_post_splat_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#486 + def offensive_block_forwarding?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#506 + def referenced_block_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 + def referenced_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#498 + def referenced_rest_arg?; end + + # def foo(a = 41, ...) is a syntax error in 3.0. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#471 + def ruby_30_or_lower_optarg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#475 + def ruby_32_only_anonymous_forwarding?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 + def ruby_32_or_higher_missing_rest_or_kwest?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#514 + def target_ruby_version; end +end + +# Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. +# +# The cop is disabled by default due to safety concerns. +# +# @example +# # bad +# paths = [paths] unless paths.is_a?(Array) +# paths.each { |path| do_something(path) } +# +# # bad (always creates a new Array instance) +# [*paths].each { |path| do_something(path) } +# +# # good (and a bit more readable) +# Array(paths).each { |path| do_something(path) } +# +# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#41 +class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#48 + def array_splat?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#63 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#74 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#53 + def unless_array?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#45 +RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_coercion.rb#44 +RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `arr[0]` and `arr[-1]` and suggests to change +# them to use `arr.first` and `arr.last` instead. +# +# The cop is disabled by default due to safety concerns. +# +# @example +# # bad +# arr[0] +# arr[-1] +# +# # good +# arr.first +# arr.last +# arr[0] = 2 +# arr[0][-2] +# +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#28 +class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#52 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#74 + def brace_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#61 + def find_offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#69 + def innermost_braces_node(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#56 + def preferred_value(node, value); end +end + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31 +RuboCop::Cop::Style::ArrayFirstLast::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#32 +RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# In Ruby 3.1, `Array#intersect?` has been added. +# +# This cop identifies places where: +# +# * `(array1 & array2).any?` +# * `(array1.intersection(array2)).any?` +# * `array1.any? { |elem| array2.member?(elem) }` +# * `(array1 & array2).count > 0` +# * `(array1 & array2).size > 0` +# +# can be replaced with `array1.intersect?(array2)`. +# +# `array1.intersect?(array2)` is faster and more readable. +# +# In cases like the following, compatibility is not ensured, +# so it will not be detected when using block argument. +# +# [source,ruby] +# ---- +# ([1] & [1,2]).any? { |x| false } # => false +# [1].intersect?([1,2]) { |x| false } # => true +# ---- +# +# NOTE: Although `Array#intersection` can take zero or multiple arguments, +# only cases where exactly one argument is provided can be replaced with +# `Array#intersect?` and are handled by this cop. +# +# @example +# # bad +# (array1 & array2).any? +# (array1 & array2).empty? +# (array1 & array2).none? +# +# # bad +# array1.intersection(array2).any? +# array1.intersection(array2).empty? +# array1.intersection(array2).none? +# +# # bad +# array1.any? { |elem| array2.member?(elem) } +# array1.none? { |elem| array2.member?(elem) } +# +# # good +# array1.intersect?(array2) +# !array1.intersect?(array2) +# +# # bad +# (array1 & array2).count > 0 +# (array1 & array2).count.positive? +# (array1 & array2).count != 0 +# +# (array1 & array2).count == 0 +# (array1 & array2).count.zero? +# +# # good +# array1.intersect?(array2) +# +# !array1.intersect?(array2) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# (array1 & array2).present? +# (array1 & array2).blank? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# (array1 & array2).present? +# (array1 & array2).blank? +# +# # good +# array1.intersect?(array2) +# !array1.intersect?(array2) +# +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#82 +class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#119 + def any_none_block_intersection(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 + def bad_intersection_check?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#105 + def intersection_size_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#154 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#152 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#164 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#163 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#142 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#168 + def bad_intersection?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#173 + def bad_intersection_predicates; end + + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#185 + def register_offense(node, replacement); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#181 + def straight?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#89 +RuboCop::Cop::Style::ArrayIntersect::ACTIVE_SUPPORT_PREDICATES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#91 +RuboCop::Cop::Style::ArrayIntersect::ARRAY_SIZE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#137 +RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#139 +RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#88 +RuboCop::Cop::Style::ArrayIntersect::PREDICATES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#140 +RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#138 +RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) + +# Use `include?(element)` instead of `intersect?([element])`. +# +# @example +# # bad +# array.intersect?([element]) +# +# # good +# array.include?(element) +# +# source://rubocop//lib/rubocop/cop/style/array_intersect_with_single_element.rb#17 +class RuboCop::Cop::Style::ArrayIntersectWithSingleElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_intersect_with_single_element.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect_with_single_element.rb#29 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/array_intersect_with_single_element.rb#25 + def single_element(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/array_intersect_with_single_element.rb#20 +RuboCop::Cop::Style::ArrayIntersectWithSingleElement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_intersect_with_single_element.rb#22 +RuboCop::Cop::Style::ArrayIntersectWithSingleElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `*` as a substitute for `Array#join`. +# Using `join` is clearer about intent and more readable than +# overloading the `*` operator for string conversion. +# +# Not all cases can be reliably checked, due to Ruby's dynamic +# types, so we consider only cases when the first argument is an +# array literal or the second is a string literal. +# +# @example +# +# # bad +# %w(foo bar baz) * "," +# +# # good +# %w(foo bar baz).join(",") +# +# source://rubocop//lib/rubocop/cop/style/array_join.rb#22 +class RuboCop::Cop::Style::ArrayJoin < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_join.rb#29 + def join_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/array_join.rb#31 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/array_join.rb#25 +RuboCop::Cop::Style::ArrayJoin::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_join.rb#26 +RuboCop::Cop::Style::ArrayJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#19 +class RuboCop::Cop::Style::AsciiComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#24 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#54 + def allowed_non_ascii_chars; end + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#45 + def first_non_ascii_chars(string); end + + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#35 + def first_offense_range(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#49 + def only_allowed_non_ascii_chars?(string); end +end + +# source://rubocop//lib/rubocop/cop/style/ascii_comments.rb#22 +RuboCop::Cop::Style::AsciiComments::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `Module#attr`. The `attr` method has confusing +# behavior: with a single argument it creates a reader (like `attr_reader`), +# but with a second boolean argument it creates an accessor (deprecated in +# Ruby 1.9). Use `attr_reader` or `attr_accessor` to make intent explicit. +# +# @example +# # bad +# attr :something, true +# attr :one, :two, :three # behaves as attr_reader +# +# # good +# attr_accessor :something +# attr_reader :one, :two, :three +# +# source://rubocop//lib/rubocop/cop/style/attr.rb#20 +class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/attr.rb#77 + def class_eval?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#27 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#40 + def allowed_context?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#50 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#46 + def define_attr_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#62 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#66 + def replacement_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/attr.rb#24 +RuboCop::Cop::Style::Attr::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/attr.rb#25 +RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for cases when you could use a block +# accepting version of a method that does automatic +# resource cleanup. +# +# @example +# +# # bad +# f = File.open('file') +# +# # good +# File.open('file') do |f| +# # ... +# end +# +# # bad +# f = Tempfile.open('temp') +# +# # good +# Tempfile.open('temp') do |f| +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#27 +class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#32 + def file_open_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#36 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#46 + def cleanup?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#28 +RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#29 +RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if usage of `%()` or `%Q()` matches configuration. +# Consistent use of one style makes the codebase easier +# to read. +# +# @example EnforcedStyle: bare_percent (default) +# # bad +# %Q(He said: "#{greeting}") +# %q{She said: 'Hi'} +# +# # good +# %(He said: "#{greeting}") +# %{She said: 'Hi'} +# @example EnforcedStyle: percent_q +# # bad +# %|He said: "#{greeting}"| +# %/She said: 'Hi'/ +# +# # good +# %Q|He said: "#{greeting}"| +# %q/She said: 'Hi'/ +# +# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#28 +class RuboCop::Cop::Style::BarePercentLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#34 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#38 + def on_str(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#64 + def add_offense_for_wrong_style(node, good, bad); end + + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#44 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#60 + def requires_bare_percent?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#56 + def requires_percent_q?(source); end +end + +# source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#32 +RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) + +# Checks for `BEGIN` blocks. They are Perl-style constructs that execute +# code before the rest of the file is parsed, making the control flow +# harder to follow and reason about. +# +# @example +# # bad +# BEGIN { test } +# +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#14 +class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/begin_block.rb#17 + def on_preexe(node); end +end + +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#15 +RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where `attr_reader` and `attr_writer` +# for the same method can be combined into single `attr_accessor`. +# +# @example +# # bad +# class Foo +# attr_reader :bar +# attr_writer :bar +# end +# +# # good +# class Foo +# attr_accessor :bar +# end +# +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#21 +class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#55 + def after_class(class_node); end + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#70 + def after_module(class_node); end + + # Each offending macro is captured and registered in `on_class` but correction + # happens in `after_class` because a macro might have multiple attributes + # rewritten from it + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#69 + def after_sclass(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#33 + def on_class(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#50 + def on_module(class_node); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#29 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#49 + def on_sclass(class_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#102 + def correct_reader(corrector, macro, node, range); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#114 + def correct_writer(corrector, macro, node, range); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#91 + def find_bisection(macros); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#74 + def find_macros(class_def); end + + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#98 + def register_offense(attr); end +end + +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor.rb#27 +RuboCop::Cop::Style::BisectedAttrAccessor::MSG = T.let(T.unsafe(nil), String) + +# Representation of an `attr_reader`, `attr_writer` or `attr` macro +# for use by `Style/BisectedAttrAccessor`. +# +# @api private +# +# source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#10 +class RuboCop::Cop::Style::BisectedAttrAccessor::Macro + include ::RuboCop::Cop::VisibilityHelp + + # @api private + # @return [Macro] a new instance of Macro + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#19 + def initialize(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#49 + def all_bisected?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#29 + def attr_names; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def attrs; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#25 + def bisect(*names); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#33 + def bisected_names; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def bisection; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#13 + def node; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#41 + def reader?; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#53 + def rest; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#37 + def visibility; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#45 + def writer?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/bisected_attr_accessor/macro.rb#15 + def macro?(node); end + end +end + +# Prefer bitwise predicate methods over direct comparison operations. +# +# @example +# +# # bad - checks any set bits +# (variable & flags).positive? +# +# # good +# variable.anybits?(flags) +# +# # bad - checks all set bits +# (variable & flags) == flags +# +# # good +# variable.allbits?(flags) +# +# # bad - checks no set bits +# (variable & flags).zero? +# +# # good +# variable.nobits?(flags) +# +# source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#32 +class RuboCop::Cop::Style::BitwisePredicate < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#52 + def allbits?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#42 + def anybits?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#68 + def bit_operation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#60 + def nobits?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#74 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#95 + def preferred_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#36 +RuboCop::Cop::Style::BitwisePredicate::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/bitwise_predicate.rb#37 +RuboCop::Cop::Style::BitwisePredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of block comments (=begin...=end). +# +# @example +# # bad +# =begin +# Multiple lines +# of comments... +# =end +# +# # good +# # Multiple lines +# # of comments... +# +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#19 +class RuboCop::Cop::Style::BlockComments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#27 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#56 + def eq_end_part(comment, expr); end + + # source://rubocop//lib/rubocop/cop/style/block_comments.rb#48 + def parts(comment); end +end + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#24 +RuboCop::Cop::Style::BlockComments::BEGIN_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#25 +RuboCop::Cop::Style::BlockComments::END_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/block_comments.rb#23 +RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of braces or do/end around single line or +# multi-line blocks. +# +# Methods that can be either procedural or functional and cannot be +# categorised from their usage alone is ignored. +# `lambda`, `proc`, and `it` are their defaults. +# Additional methods can be added to the `AllowedMethods`. +# +# @example AllowedMethods: ['lambda', 'proc', 'it' ] (default) +# +# # good +# foo = lambda do |x| +# puts "Hello, #{x}" +# end +# +# foo = lambda do |x| +# x * 100 +# end +# @example AllowedPatterns: ['map'] +# +# # good +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# @example AllowedPatterns: [] (default) +# +# # bad +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# @example BracesRequiredMethods: ['sig'] +# +# # Methods listed in the BracesRequiredMethods list, such as 'sig' +# # in this example, will require `{...}` braces. This option takes +# # precedence over all other configurations except AllowedMethods. +# +# # bad +# sig do +# params( +# foo: string, +# ).void +# end +# def bar(foo) +# puts foo +# end +# +# # good +# sig { +# params( +# foo: string, +# ).void +# } +# def bar(foo) +# puts foo +# end +# @example EnforcedStyle: always_braces +# # bad +# words.each do |word| +# word.flip.flop +# end +# +# # good +# words.each { |word| +# word.flip.flop +# } +# @example EnforcedStyle: braces_for_chaining +# # bad +# words.each do |word| +# word.flip.flop +# end.join("-") +# +# # good +# words.each { |word| +# word.flip.flop +# }.join("-") +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end +# +# # good - single line block +# items.each { |item| item / 5 } +# +# # bad - multi-line block +# things.map { |thing| +# something = thing.some_method +# process(something) +# } +# +# # good - multi-line block +# things.map do |thing| +# something = thing.some_method +# process(something) +# end +# @example EnforcedStyle: semantic +# # Prefer `do...end` over `{...}` for procedural blocks. +# +# # return value is used/assigned +# # bad +# foo = map do |x| +# x +# end +# puts (map do |x| +# x +# end) +# +# # return value is not used out of scope +# # good +# map do |x| +# x +# end +# +# # Prefer `{...}` over `do...end` for functional blocks. +# +# # return value is not used out of scope +# # bad +# each { |x| +# x +# } +# +# # return value is used/assigned +# # good +# foo = map { |x| +# x +# } +# map { |x| +# x +# }.inspect +# +# # The AllowBracesOnProceduralOneLiners option is allowed unless the +# # EnforcedStyle is set to `semantic`. If so: +# +# # If the AllowBracesOnProceduralOneLiners option is unspecified, or +# # set to `false` or any other falsey value, then semantic purity is +# # maintained, so one-line procedural blocks must use do-end, not +# # braces. +# +# # bad +# collection.each { |element| puts element } +# +# # good +# collection.each do |element| puts element end +# +# # If the AllowBracesOnProceduralOneLiners option is set to `true`, or +# # any other truthy value, then one-line procedural blocks may use +# # either style. (There is no setting for requiring braces on them.) +# +# # good +# collection.each { |element| puts element } +# +# # also good +# collection.each do |element| puts element end +# +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#168 +class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#198 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#212 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#211 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#485 + def array_or_range?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#216 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#489 + def begin_required?(block_node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#244 + def braces_for_chaining_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#430 + def braces_for_chaining_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#256 + def braces_required_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#407 + def braces_required_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#411 + def braces_required_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#440 + def braces_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#444 + def correction_would_break_code?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#332 + def end_of_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#454 + def functional_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#450 + def functional_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#350 + def get_blocks(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#415 + def line_count_based_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 + def line_count_based_message(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#260 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#308 + def move_comment_before_block(corrector, comment, block_node, closing_brace); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#462 + def procedural_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#458 + def procedural_oneliners_may_have_braces?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#375 + def proper_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#339 + def remove_trailing_whitespace(corrector, range, comment); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#271 + def replace_braces_with_do_end(corrector, loc); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#287 + def replace_do_end_with_braces(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#387 + def require_do_end?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#478 + def return_value_of_scope?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#466 + def return_value_used?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#419 + def semantic_block_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#234 + def semantic_message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#495 + def single_argument_operator_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#322 + def source_range_before_comment(range, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#394 + def special_method?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 + def special_method_proper_block_style?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#304 + def whitespace_after?(range, length = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 + def whitespace_before?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#345 + def with_block?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 +RuboCop::Cop::Style::BlockDelimiters::ALWAYS_BRACES_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#177 +RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(nil), String) + +# Corrector to correct conditional assignment in `case` statements. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#612 +class RuboCop::Cop::Style::CaseCorrector + extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper + + class << self + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#617 + def correct(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#627 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#647 + def extract_branches(case_node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#641 + def extract_tail_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#657 + def move_branch_inside_condition(corrector, branch, condition, assignment, column); end + end +end + +# Checks for uses of the case equality operator (`===`). +# The `===` operator has different behavior depending on the +# receiver and its use outside of `case`/`when` is confusing. +# Prefer more explicit alternatives like `is_a?`, `include?`, +# or `match?`. +# +# If `AllowOnConstant` option is enabled, the cop will ignore violations when the receiver of +# the case equality operator is a constant. +# +# If `AllowOnSelfClass` option is enabled, the cop will ignore violations when the receiver of +# the case equality operator is `self.class`. Note intermediate variables are not accepted. +# +# NOTE: Regexp case equality (`/regexp/ === var`) is allowed because changing it to +# `/regexp/.match?(var)` needs to take into account `Regexp.last_match?`, `$~`, `$1`, etc. +# This potentially incompatible transformation is handled by `Performance/RegexpMatch` cop. +# +# @example +# # bad +# (1..100) === 7 +# +# # good +# (1..100).include?(7) +# @example AllowOnConstant: false (default) +# # bad +# Array === something +# +# # good +# something.is_a?(Array) +# @example AllowOnConstant: true +# # good +# Array === something +# something.is_a?(Array) +# @example AllowOnSelfClass: false (default) +# # bad +# self.class === something +# @example AllowOnSelfClass: true +# # good +# self.class === something +# +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#49 +class RuboCop::Cop::Style::CaseEquality < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#56 + def case_equality?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#61 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#59 + def self_class?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#92 + def begin_replacement(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#98 + def const_replacement(lhs, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#74 + def offending_receiver?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#81 + def replacement(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/case_equality.rb#102 + def send_replacement(lhs, rhs); end +end + +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#52 +RuboCop::Cop::Style::CaseEquality::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/case_equality.rb#53 +RuboCop::Cop::Style::CaseEquality::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `if-elsif` constructions +# can be replaced with `case-when`. +# +# @example MinBranchesCount: 3 (default) +# # bad +# if status == :active +# perform_action +# elsif status == :inactive || status == :hibernating +# check_timeout +# elsif status == :invalid +# report_invalid +# else +# final_action +# end +# +# # good +# case status +# when :active +# perform_action +# when :inactive, :hibernating +# check_timeout +# when :invalid +# report_invalid +# else +# final_action +# end +# @example MinBranchesCount: 4 +# # good +# if status == :active +# perform_action +# elsif status == :inactive || status == :hibernating +# check_timeout +# elsif status == :invalid +# report_invalid +# else +# final_action +# end +# +# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#50 +class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MinBranchesCount + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#57 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#81 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#228 + def branch_conditions(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#246 + def class_reference?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#166 + def collect_conditions(node, target, conditions); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#217 + def condition_from_binary_op(lhs, rhs, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#201 + def condition_from_equality_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#210 + def condition_from_include_or_cover_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#206 + def condition_from_match_node(node, target); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#185 + def condition_from_send_node(node, target); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#237 + def const_reference?(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#255 + def correction_range(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#250 + def deparenthesize(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#102 + def find_target(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#136 + def find_target_in_equality_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#148 + def find_target_in_include_or_cover_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#154 + def find_target_in_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#121 + def find_target_in_send_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#271 + def regexp_with_named_captures?(node); end + + # Named captures work with `=~` (if regexp is on lhs) and with `match` (both sides) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#260 + def regexp_with_working_captures?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/case_like_if.rb#96 + def should_check?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/case_like_if.rb#55 +RuboCop::Cop::Style::CaseLikeIf::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the character literal ?x. +# Starting with Ruby 1.9 character literals are +# essentially one-character strings, so this syntax +# is mostly redundant at this point. +# +# ? character literal can be used to express meta and control character. +# That's a good use case of ? literal so it doesn't count it as an offense. +# +# @example +# # bad +# ?x +# +# # good +# 'x' +# +# # good - control & meta escapes +# ?\C-\M-d +# "\C-\M-d" # same as above +# +# source://rubocop//lib/rubocop/cop/style/character_literal.rb#24 +class RuboCop::Cop::Style::CharacterLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#35 + def autocorrect(corrector, node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#53 + def correct_style_detected; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#30 + def offense?(node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/character_literal.rb#49 + def opposite_style_detected; end +end + +# source://rubocop//lib/rubocop/cop/style/character_literal.rb#28 +RuboCop::Cop::Style::CharacterLiteral::MSG = T.let(T.unsafe(nil), String) + +# Checks that namespaced classes and modules are defined with a consistent style. +# +# With `nested` style, classes and modules should be defined separately (one constant +# on each line, without `::`). With `compact` style, classes and modules should be +# defined with fully qualified names (using `::` for namespaces). +# +# NOTE: The style chosen will affect `Module.nesting` for the class or module. Using +# `nested` style will result in each level being added, whereas `compact` style will +# only include the fully qualified class or module name. +# +# By default, `EnforcedStyle` applies to both classes and modules. If desired, separate +# styles can be defined for classes and modules by using `EnforcedStyleForClasses` and +# `EnforcedStyleForModules` respectively. If not set, or set to nil, the `EnforcedStyle` +# value will be used. +# +# The compact style is only forced for classes/modules with one child. +# +# @example EnforcedStyle: compact +# # bad +# class Foo +# class Bar +# end +# end +# +# # good +# class Foo::Bar +# end +# @example EnforcedStyle: nested (default) +# # bad +# class Foo::Bar +# end +# +# # good +# class Foo +# class Bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#53 +class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#62 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#68 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#111 + def add_trailing_end(corrector, node, padding); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#212 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#201 + def check_compact_style(node, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#192 + def check_nested_style(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#182 + def check_style(node, body, style); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#116 + def compact_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#137 + def compact_identifier_name(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#122 + def compact_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#222 + def compact_node_name?(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#127 + def compact_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#168 + def leading_spaces(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#218 + def needs_compacting?(body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#84 + def nest_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#74 + def nest_or_compact(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#143 + def remove_end(corrector, body); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#93 + def replace_namespace_keyword(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#172 + def spaces_size(spaces_string); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#102 + def split_on_double_colon(corrector, node, padding); end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#226 + def style_for_classes; end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#230 + def style_for_modules; end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#177 + def tab_indentation_width; end + + # source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#156 + def unindent(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#60 +RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_and_module_children.rb#59 +RuboCop::Cop::Style::ClassAndModuleChildren::NESTED_MSG = T.let(T.unsafe(nil), String) + +# Enforces consistent use of `Object#is_a?` or `Object#kind_of?`. +# +# @example EnforcedStyle: is_a? (default) +# # bad +# var.kind_of?(Date) +# var.kind_of?(Integer) +# +# # good +# var.is_a?(Date) +# var.is_a?(Integer) +# @example EnforcedStyle: kind_of? +# # bad +# var.is_a?(Time) +# var.is_a?(String) +# +# # good +# var.kind_of?(Time) +# var.kind_of?(String) +# +# source://rubocop//lib/rubocop/cop/style/class_check.rb#26 +class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#45 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_check.rb#30 +RuboCop::Cop::Style::ClassCheck::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_check.rb#31 +RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `Object#instance_of?` instead of class comparison +# for equality. +# `==`, `equal?`, and `eql?` custom method definitions are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# var.class == Date +# var.class.equal?(Date) +# var.class.eql?(Date) +# var.class.name == 'Date' +# +# # good +# var.instance_of?(Date) +# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default) +# # good +# def ==(other) +# self.class == other.class && name == other.name +# end +# +# def equal?(other) +# self.class.equal?(other.class) && name.equal?(other.name) +# end +# +# def eql?(other) +# self.class.eql?(other.class) && name.eql?(other.name) +# end +# @example AllowedPatterns: ['eq'] +# # good +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end +# @example AllowedPatterns: [] (default) +# # bad +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end +# +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52 +class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64 + def class_comparison_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92 + def class_name(class_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112 + def class_name_method?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128 + def offense_range(receiver_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116 + def require_cbase?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124 + def trim_string_quotes(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120 + def unable_to_determine_type?(class_node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61 +RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58 +RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60 +RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of the class/module name instead of +# self, when defining class/module methods. +# +# @example +# # bad +# class SomeClass +# def SomeClass.class_method +# # ... +# end +# end +# +# # good +# class SomeClass +# def self.class_method +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_methods.rb#23 +class RuboCop::Cop::Style::ClassMethods < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#28 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#37 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/class_methods.rb#41 + def check_defs(name, node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_methods.rb#26 +RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `def self.method_name` or `class << self` to define class methods. +# +# @example EnforcedStyle: def_self (default) +# # bad +# class SomeClass +# class << self +# attr_accessor :class_accessor +# +# def class_method +# # ... +# end +# end +# end +# +# # good +# class SomeClass +# def self.class_method +# # ... +# end +# +# class << self +# attr_accessor :class_accessor +# end +# end +# +# # good - contains private method +# class SomeClass +# class << self +# attr_accessor :class_accessor +# +# private +# +# def private_class_method +# # ... +# end +# end +# end +# @example EnforcedStyle: self_class +# # bad +# class SomeClass +# def self.class_method +# # ... +# end +# end +# +# # good +# class SomeClass +# class << self +# def class_method +# # ... +# end +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#61 +class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#81 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#71 + def on_sclass(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#95 + def all_methods_public?(sclass_node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#115 + def autocorrect_sclass(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#102 + def def_nodes(sclass_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#91 + def def_self_style?; end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#141 + def extract_def_from_sclass(def_node, sclass_node); end + + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#152 + def indentation_diff(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#137 + def sclass_only_has_methods?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#68 +RuboCop::Cop::Style::ClassMethodsDefinitions::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_methods_definitions.rb#69 +RuboCop::Cop::Style::ClassMethodsDefinitions::MSG_SCLASS = T.let(T.unsafe(nil), String) + +# Checks for uses of class variables. Offenses +# are signaled only on assignment to class variables to +# reduce the number of offenses that would be reported. +# +# You have to be careful when setting a value for a class +# variable; if a class has been inherited, changing the +# value of a class variable also affects the inheriting +# classes. This means that it's almost always better to +# use a class instance variable instead. +# +# @example +# # bad +# class A +# @@test = 10 +# end +# +# class A +# def self.test(name, value) +# class_variable_set("@@#{name}", value) +# end +# end +# +# class A; end +# A.class_variable_set(:@@test, 10) +# +# # good +# class A +# @test = 10 +# end +# +# class A +# def test +# @@test # you can access class variable without offense +# end +# end +# +# class A +# def self.test(name) +# class_variable_get("@@#{name}") # you can access without offense +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#48 +class RuboCop::Cop::Style::ClassVars < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/class_vars.rb#52 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/class_vars.rb#56 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#49 +RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/class_vars.rb#50 +RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where custom logic on rejection nils from arrays +# and hashes can be replaced with `{Array,Hash}#{compact,compact!}`. +# +# @example +# # bad +# array.reject(&:nil?) +# array.reject { |e| e.nil? } +# array.select { |e| !e.nil? } +# array.filter { |e| !e.nil? } +# array.grep_v(nil) +# array.grep_v(NilClass) +# +# # good +# array.compact +# +# # bad +# hash.reject!(&:nil?) +# hash.reject! { |k, v| v.nil? } +# hash.select! { |k, v| !v.nil? } +# hash.filter! { |k, v| !v.nil? } +# +# # good +# hash.compact! +# @example AllowedReceivers: ['params'] +# # good +# params.reject(&:nil?) +# +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#44 +class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#86 + def grep_v_with_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#101 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#65 + def reject_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#58 + def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#75 + def select_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#129 + def good_method_name(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#106 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#137 + def range(begin_pos_node, end_pos_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#123 + def to_enum_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#53 +RuboCop::Cop::Style::CollectionCompact::FILTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 +RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#51 +RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#52 +RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array) + +# Enforces the use of consistent method names +# from the Enumerable module. +# +# You can customize the mapping from undesired method to desired method. +# +# e.g. to use `detect` over `find`: +# +# Style/CollectionMethods: +# PreferredMethods: +# find: detect +# +# @example +# # These examples are based on the default mapping for `PreferredMethods`. +# +# # bad +# items.collect +# items.collect! +# items.collect_concat +# items.inject +# items.detect +# items.find_all +# items.member? +# +# # good +# items.map +# items.map! +# items.flat_map +# items.reduce +# items.find +# items.select +# items.include? +# +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43 +class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#60 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#53 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#52 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#64 + def check_method_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#73 + def implicit_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#81 + def message(node); end + + # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead + # of a block. + # + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#87 + def methods_accepting_symbol; end +end + +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 +RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) + +# Prefer `Enumerable` predicate methods over expressions with `count`. +# +# The cop checks calls to `count` without arguments, or with a +# block. It doesn't register offenses for `count` with a positional +# argument because its behavior differs from predicate methods (`count` +# matches the argument using `==`, while `any?`, `none?` and `one?` use +# `===`). +# +# NOTE: This cop doesn't check `length` and `size` methods because they +# would yield false positives. For example, `String` implements `length` +# and `size`, but it doesn't include `Enumerable`. +# +# @example +# +# # bad +# x.count.positive? +# x.count > 0 +# x.count != 0 +# +# x.count(&:foo?).positive? +# x.count { |item| item.foo? }.positive? +# +# # good +# x.any? +# +# x.any?(&:foo?) +# x.any? { |item| item.foo? } +# +# # bad +# x.count.zero? +# x.count == 0 +# +# # good +# x.none? +# +# # bad +# x.count == 1 +# x.one? +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# x.count > 1 +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# x.count > 1 +# +# # good +# x.many? +# +# source://rubocop//lib/rubocop/cop/style/collection_querying.rb#96 +class RuboCop::Cop::Style::CollectionQuerying < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/collection_querying.rb#115 + def count_predicate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_querying.rb#132 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/collection_querying.rb#159 + def removal_range(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_querying.rb#149 + def replacement_method(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/collection_querying.rb#153 + def replacement_supported?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/collection_querying.rb#100 +RuboCop::Cop::Style::CollectionQuerying::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/collection_querying.rb#104 +RuboCop::Cop::Style::CollectionQuerying::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/collection_querying.rb#102 +RuboCop::Cop::Style::CollectionQuerying::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for methods invoked via the `::` operator instead +# of the `.` operator (like `FileUtils::rmdir` instead of +# `FileUtils.rmdir`). The `::` operator is conventionally used to +# reference constants, so using it for method calls can be misleading. +# +# @example +# # bad +# Timeout::timeout(500) { do_something } +# FileUtils::rmdir(dir) +# Marshal::dump(obj) +# +# # good +# Timeout.timeout(500) { do_something } +# FileUtils.rmdir(dir) +# Marshal.dump(obj) +# +# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#22 +class RuboCop::Cop::Style::ColonMethodCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#28 + def java_type_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#37 + def on_send(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#33 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/colon_method_call.rb#25 +RuboCop::Cop::Style::ColonMethodCall::MSG = T.let(T.unsafe(nil), String) + +# Checks for class methods that are defined using the `::` +# operator instead of the `.` operator. +# +# @example +# # bad +# class Foo +# def self::bar +# end +# end +# +# # good +# class Foo +# def self.bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#22 +class RuboCop::Cop::Style::ColonMethodDefinition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#27 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/colon_method_definition.rb#25 +RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for multiple `defined?` calls joined by `&&` that can be combined +# into a single `defined?`. +# +# When checking that a nested constant or chained method is defined, it is +# not necessary to check each ancestor or component of the chain. +# +# @example +# # bad +# defined?(Foo) && defined?(Foo::Bar) && defined?(Foo::Bar::Baz) +# +# # good +# defined?(Foo::Bar::Baz) +# +# # bad +# defined?(foo) && defined?(foo.bar) && defined?(foo.bar.baz) +# +# # good +# defined?(foo.bar.baz) +# +# source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#24 +class RuboCop::Cop::Style::CombinableDefined < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#31 + def on_and(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#55 + def defined_calls(nodes); end + + # If the redundant `defined?` node is the LHS of an `and` node, + # the term as well as the subsequent `&&`/`and` operator will be removed. + # + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#85 + def lhs_range_to_remove(term); end + + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#62 + def namespaces(nodes); end + + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#72 + def remove_term(corrector, term); end + + # If the redundant `defined?` node is the RHS of an `and` node, + # the term as well as the preceding `&&`/`and` operator will be removed. + # + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#100 + def rhs_range_to_remove(term); end + + # source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#49 + def terms(node); end +end + +# source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#28 +RuboCop::Cop::Style::CombinableDefined::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/combinable_defined.rb#29 +RuboCop::Cop::Style::CombinableDefined::OPERATORS = T.let(T.unsafe(nil), Array) + +# Checks for places where multiple consecutive loops over the same data +# can be combined into a single loop. It is very likely that combining them +# will make the code more efficient and more concise. +# +# NOTE: Autocorrection is not applied when the block variable names differ in separate loops, +# as it is impossible to determine which variable name should be prioritized. +# +# @example +# # bad +# def method +# items.each do |item| +# do_something(item) +# end +# +# items.each do |item| +# do_something_else(item) +# end +# end +# +# # good +# def method +# items.each do |item| +# do_something(item) +# do_something_else(item) +# end +# end +# +# # bad +# def method +# for item in items do +# do_something(item) +# end +# +# for item in items do +# do_something_else(item) +# end +# end +# +# # good +# def method +# for item in items do +# do_something(item) +# do_something_else(item) +# end +# end +# +# # good +# def method +# each_slice(2) { |slice| do_something(slice) } +# each_slice(3) { |slice| do_something(slice) } +# end +# +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 +class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#85 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#83 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#82 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#96 + def collection_looping_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#113 + def combine_with_left_sibling(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#120 + def correct_end_of_block(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + def same_collection_looping_block?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#109 + def same_collection_looping_for?(node, sibling); end +end + +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#65 +RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) + +# Enforces using `` or %x around command literals. +# +# @example AllowInnerBackticks: false (default) +# # If `false`, the cop will always recommend using `%x` if one or more +# # backticks are found in the command string. +# +# # bad +# `echo \`ls\`` +# +# # good +# %x(echo `ls`) +# @example AllowInnerBackticks: true +# # good +# `echo \`ls\`` +# @example EnforcedStyle: backticks (default) +# # bad +# folders = %x(find . -type d).split +# +# # bad +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# +# # good +# folders = `find . -type d`.split +# +# # good +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# @example EnforcedStyle: mixed +# # bad +# folders = %x(find . -type d).split +# +# # bad +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# +# # good +# folders = `find . -type d`.split +# +# # good +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# @example EnforcedStyle: percent_x +# # bad +# folders = `find . -type d`.split +# +# # bad +# ` +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ` +# +# # good +# folders = %x(find . -type d).split +# +# # good +# %x( +# ln -s foo.example.yml foo.example +# ln -s bar.example.yml bar.example +# ) +# +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#78 +class RuboCop::Cop::Style::CommandLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#85 + def on_xstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#146 + def allow_inner_backticks?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#122 + def allowed_backtick_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#131 + def allowed_percent_x_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#109 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#159 + def backtick_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#97 + def check_backtick_literal(node, message); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#103 + def check_percent_x_literal(node, message); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#167 + def command_delimiter; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#150 + def contains_backtick?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#142 + def contains_disallowed_backtick?(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#171 + def default_delimiter; end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#154 + def node_body(node); end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#163 + def preferred_delimiter; end + + # source://rubocop//lib/rubocop/cop/style/command_literal.rb#175 + def preferred_delimiters_config; end +end + +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#82 +RuboCop::Cop::Style::CommandLiteral::MSG_USE_BACKTICKS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/command_literal.rb#83 +RuboCop::Cop::Style::CommandLiteral::MSG_USE_PERCENT_X = T.let(T.unsafe(nil), String) + +# Checks that comment annotation keywords are written according +# to guidelines. +# +# Annotation keywords can be specified by overriding the cop's `Keywords` +# configuration. Keywords are allowed to be single words or phrases. +# +# NOTE: With a multiline comment block (where each line is only a +# comment), only the first line will be able to register an offense, even +# if an annotation keyword starts another line. This is done to prevent +# incorrect registering of keywords (eg. `review`) inside a paragraph as an +# annotation. +# +# @example RequireColon: false +# # bad +# # TODO: make better +# +# # good +# # TODO make better +# +# # bad +# # fixme does not work +# +# # good +# # FIXME does not work +# +# # bad +# # Optimize does not work +# +# # good +# # OPTIMIZE does not work +# @example RequireColon: true (default) +# # bad +# # TODO make better +# +# # good +# # TODO: make better +# +# # bad +# # TODO:make better +# +# # good +# # TODO: make better +# +# # bad +# # fixme: does not work +# +# # good +# # FIXME: does not work +# +# # bad +# # Optimize does not work +# +# # good +# # OPTIMIZE: does not work +# +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#61 +class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#73 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#110 + def annotation_range(annotation); end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#114 + def correct_offense(corrector, range, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#102 + def first_comment_line?(comments, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#106 + def inline_comment?(comment); end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#124 + def keywords; end + + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#87 + def register_offense(annotation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#120 + def requires_colon?; end +end + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#71 +RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#65 +RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comment_annotation.rb#68 +RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) + +# Checks for comments put on the same line as some keywords. +# These keywords are: `class`, `module`, `def`, `begin`, `end`. +# +# Note that some comments +# RBS::Inline annotation, and Steep annotation (`steep:ignore`) are allowed. +# +# Autocorrection removes comments from `end` keyword and keeps comments +# for `class`, `module`, `def` and `begin` above the keyword. +# +# @example +# # bad +# if condition +# statement +# end # end if +# +# # bad +# class X # comment +# statement +# end +# +# # bad +# def x; end # comment +# +# # good +# if condition +# statement +# end +# +# # good +# class X # :nodoc: +# y +# end +# +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#45 +class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#65 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#88 + def offensive?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#101 + def rbs_inline_annotation?(line, comment); end + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#75 + def register_offense(comment, matched_keyword); end + + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#97 + def source_line(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#112 + def steep_annotation?(comment); end +end + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#54 +RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 +RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#51 +RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 +RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#61 +RuboCop::Cop::Style::CommentedKeyword::METHOD_OR_END_DEFINITIONS = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 +RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 +RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#63 +RuboCop::Cop::Style::CommentedKeyword::STEEP_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 +RuboCop::Cop::Style::CommentedKeyword::SUBCLASS_DEFINITION = T.let(T.unsafe(nil), Regexp) + +# Checks for logical comparison which can be replaced with `Comparable#between?`. +# +# NOTE: `Comparable#between?` is on average slightly slower than logical comparison, +# although the difference generally isn't observable. If you require maximum +# performance, consider using logical comparison. +# +# @example +# +# # bad +# x >= min && x <= max +# +# # bad +# x <= max && x >= min +# +# # good +# x.between?(min, max) +# +# source://rubocop//lib/rubocop/cop/style/comparable_between.rb#26 +class RuboCop::Cop::Style::ComparableBetween < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#41 + def logical_comparison_between_by_max_first?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#32 + def logical_comparison_between_by_min_first?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#49 + def on_and(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/comparable_between.rb#65 + def register_offense(node, min_and_value, max_and_value); end +end + +# source://rubocop//lib/rubocop/cop/style/comparable_between.rb#29 +RuboCop::Cop::Style::ComparableBetween::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. +# +# This cop supports autocorrection for `if/elsif/else` bad style only. +# Because `ArgumentError` occurs if the minimum and maximum of `clamp` arguments are reversed. +# When these are variables, it is not possible to determine which is the minimum and maximum: +# +# [source,ruby] +# ---- +# [1, [2, 3].max].min # => 1 +# 1.clamp(3, 1) # => min argument must be smaller than max argument (ArgumentError) +# ---- +# +# @example +# +# # bad +# [[x, low].max, high].min +# +# # bad +# if x < low +# low +# elsif high < x +# high +# else +# x +# end +# +# # good +# x.clamp(low, high) +# +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#35 +class RuboCop::Cop::Style::ComparableClamp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#61 + def array_min_max?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#47 + def if_elsif_else_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#78 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#100 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#108 + def autocorrect(corrector, node, prefer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#117 + def min_condition?(if_condition, else_body); end +end + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#42 +RuboCop::Cop::Style::ComparableClamp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#43 +RuboCop::Cop::Style::ComparableClamp::MSG_MIN_MAX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/comparable_clamp.rb#44 +RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of `Array#push(item)` instead of `Array#concat([item])` +# to avoid redundant array literals. +# +# @example +# +# # bad +# list.concat([foo]) +# list.concat([bar, baz]) +# list.concat([qux, quux], [corge]) +# +# # good +# list.push(foo) +# list.push(bar, baz) +# list.push(qux, quux, corge) +# +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#25 +class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#66 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#70 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#87 + def percent_literals_includes_only_basic_literals?(node); end + + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#74 + def preferred_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#28 +RuboCop::Cop::Style::ConcatArrayLiterals::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#29 +RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#31 +RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `if` and `case` statements where each branch is used for +# both the assignment and comparison of the same variable +# when using the return of the condition can be used instead. +# +# @example EnforcedStyle: assign_inside_condition +# # bad +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# +# # good +# if foo +# bar = 1 +# else +# bar = 2 +# end +# +# case foo +# when 'a' +# bar += 1 +# else +# bar += 2 +# end +# +# if foo +# some_method +# bar = 1 +# else +# some_other_method +# bar = 2 +# end +# @example EnforcedStyle: assign_to_condition (default) +# # bad +# if foo +# bar = 1 +# else +# bar = 2 +# end +# +# case foo +# when 'a' +# bar += 1 +# else +# bar += 2 +# end +# +# if foo +# some_method +# bar = 1 +# else +# some_other_method +# bar = 2 +# end +# +# # good +# bar = if foo +# 1 +# else +# 2 +# end +# +# bar += case foo +# when 'a' +# 1 +# else +# 2 +# end +# +# bar << if foo +# some_method +# 1 +# else +# some_other_method +# 2 +# end +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#207 +class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Style::ConditionalAssignmentHelper + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # The shovel operator `<<` does not have its own type. It is a `send` + # type. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#222 + def assignment_type?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#303 + def candidate_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#258 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#268 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#244 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#230 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#238 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#309 + def allowed_single_line?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#383 + def allowed_statements?(branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#305 + def allowed_ternary?(assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#313 + def assignment_node(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#360 + def assignment_types_match?(*nodes); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#375 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#298 + def candidate_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#280 + def check_assignment_to_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#366 + def check_node(node, branches); end + + # If `Layout/LineLength` is enabled, we do not want to introduce an + # offense by autocorrecting this cop. Find the max configured line + # length. Find the longest line of condition. Remove the assignment + # from lines that contain the offending assignment because after + # correcting, this will not be on the line anymore. Check if the length + # of the longest line + the length of the corrected assignment is + # greater than the max configured line length + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#399 + def correction_exceeds_line_limit?(node, branches); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#422 + def include_ternary?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#353 + def lhs_all_match?(branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#411 + def longest_line(node, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#407 + def longest_line_exceeds_line_limit?(node, assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#337 + def move_assignment_inside_condition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#327 + def move_assignment_outside_condition(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#418 + def single_line_conditions_only?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#349 + def ternary_condition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#215 +RuboCop::Cop::Style::ConditionalAssignment::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#213 +RuboCop::Cop::Style::ConditionalAssignment::ASSIGN_TO_CONDITION_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#216 +RuboCop::Cop::Style::ConditionalAssignment::ENABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#212 +RuboCop::Cop::Style::ConditionalAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#217 +RuboCop::Cop::Style::ConditionalAssignment::SINGLE_LINE_CONDITIONS_ONLY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#214 +RuboCop::Cop::Style::ConditionalAssignment::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# Helper module to provide common methods to classes needed for the +# ConditionalAssignment Cop. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#8 +module RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#60 + def end_with_eq?(sym); end + + # `elsif` branches show up in the `node` as an `else`. We need + # to recursively iterate over all `else` branches and consider all + # but the last `node` an `elsif` branch and consider the last `node` + # the actual `else` branch. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#20 + def expand_elses(branch); end + + # `when` nodes contain the entire branch including the condition. + # We only need the contents of the branch, not the condition. + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#28 + def expand_when_branches(when_branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#51 + def indent(cop, source); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#36 + def lhs(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#32 + def tail(branch); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#106 + def assignment_rhs_exist?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#66 + def expand_elsif(node, elsif_branches = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#92 + def lhs_for_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#79 + def lhs_for_send(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#102 + def setter_method?(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#13 +RuboCop::Cop::Style::ConditionalAssignmentHelper::ALIGN_WITH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#12 +RuboCop::Cop::Style::ConditionalAssignmentHelper::END_ALIGNMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#11 +RuboCop::Cop::Style::ConditionalAssignmentHelper::EQUAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#14 +RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), String) + +# Helper module to provide common methods to ConditionalAssignment +# correctors +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#429 +module RuboCop::Cop::Style::ConditionalCorrectorHelper + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 + def assignment(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#496 + def correct_branches(corrector, branches); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#473 + def correct_if_branches(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#431 + def remove_whitespace_in_branches(corrector, branch, condition, column); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#483 + def replace_branch_assignment(corrector, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#452 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#456 + def white_space_range(node, column); end +end + +# Checks that constants defined in classes and modules have +# an explicit visibility declaration. By default, Ruby makes all class- +# and module constants public, which litters the public API of the +# class or module. Explicitly declaring a visibility makes intent more +# clear, and prevents outside actors from touching private state. +# +# @example +# +# # bad +# class Foo +# BAR = 42 +# BAZ = 43 +# end +# +# # good +# class Foo +# BAR = 42 +# private_constant :BAR +# +# BAZ = 43 +# public_constant :BAZ +# end +# @example IgnoreModules: false (default) +# # bad +# class Foo +# MyClass = Struct.new +# end +# +# # good +# class Foo +# MyClass = Struct.new +# public_constant :MyClass +# end +# @example IgnoreModules: true +# # good +# class Foo +# MyClass = Struct.new +# end +# +# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#47 +class RuboCop::Cop::Style::ConstantVisibility < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#56 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#52 + def visibility_declaration_for(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#74 + def class_or_module_scope?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#66 + def ignore_modules?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#70 + def module?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#86 + def visibility_declaration?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#48 +RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#21 +class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#28 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#45 + def autocorrect(corrector); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#56 + def autocorrect_notice; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#86 + def encoding_token?(processed_source, token_index); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 + def insert_notice_before(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 + def notice; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 + def notice_found?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#79 + def shebang_token?(processed_source, token_index); end + + # @raise [Warning] + # + # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 + def verify_autocorrect_notice!; end +end + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#26 +RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/copyright.rb#25 +RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) + +# Checks for inheritance from `Data.define` to avoid creating the anonymous parent class. +# Inheriting from `Data.define` adds a superfluous level in inheritance tree. +# +# @example +# # bad +# class Person < Data.define(:first_name, :last_name) +# def age +# 42 +# end +# end +# +# Person.ancestors +# # => [Person, #, Data, (...)] +# +# # good +# Person = Data.define(:first_name, :last_name) do +# def age +# 42 +# end +# end +# +# Person.ancestors +# # => [Person, Data, (...)] +# +# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#33 +class RuboCop::Cop::Style::DataInheritance < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#55 + def data_define?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#43 + def on_class(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#62 + def correct_parent(parent, corrector); end + + # source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#72 + def range_for_empty_class_body(class_node, data_define); end +end + +# source://rubocop//lib/rubocop/cop/style/data_inheritance.rb#38 +RuboCop::Cop::Style::DataInheritance::MSG = T.let(T.unsafe(nil), String) + +# Checks for consistent usage of the `DateTime` class over the +# `Time` class. This cop is disabled by default since these classes, +# although highly overlapping, have particularities that make them not +# replaceable in certain situations when dealing with multiple timezones +# and/or DST. +# +# @example +# +# # bad - uses `DateTime` for current time +# DateTime.now +# +# # good - uses `Time` for current time +# Time.now +# +# # bad - uses `DateTime` for modern date +# DateTime.iso8601('2016-06-29') +# +# # good - uses `Time` for modern date +# Time.iso8601('2016-06-29') +# +# # good - uses `DateTime` with start argument for historical date +# DateTime.iso8601('1751-04-23', Date::ENGLAND) +# @example AllowCoercion: false (default) +# +# # bad - coerces to `DateTime` +# something.to_datetime +# +# # good - coerces to `Time` +# something.to_time +# @example AllowCoercion: true +# +# # good +# something.to_datetime +# +# # good +# something.to_time +# +# source://rubocop//lib/rubocop/cop/style/date_time.rb#49 +class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#56 + def date_time?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#61 + def historic_date?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#78 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#66 + def to_datetime?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/date_time.rb#86 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/date_time.rb#82 + def disallow_coercion?; end +end + +# source://rubocop//lib/rubocop/cop/style/date_time.rb#52 +RuboCop::Cop::Style::DateTime::CLASS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/date_time.rb#53 +RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) + +# Checks for parentheses in the definition of a method, +# that does not take any arguments. Both instance and +# class/singleton methods are checked. +# +# @example +# +# # bad +# def foo() +# do_something +# end +# +# # good +# def foo +# do_something +# end +# +# # bad +# def foo() = do_something +# +# # good +# def foo = do_something +# +# # good - without parentheses it's a syntax error +# def foo() do_something end +# def foo()=do_something +# +# # bad +# def Baz.foo() +# do_something +# end +# +# # good +# def Baz.foo +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#41 +class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#55 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#59 + def parentheses_required?(node, arguments_range); end +end + +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 +RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for chained `dig` calls that can be collapsed into a single `dig`. +# +# @example +# # bad +# x.dig(:foo).dig(:bar).dig(:baz) +# x.dig(:foo, :bar).dig(:baz) +# x.dig(:foo, :bar)&.dig(:baz) +# +# # good +# x.dig(:foo, :bar, :baz) +# +# # good - `dig`s cannot be combined +# x.dig(:foo).bar.dig(:baz) +# +# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#25 +class RuboCop::Cop::Style::DigChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::DigHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#44 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#33 + def on_send(node); end + + private + + # Walk up the method chain while the receiver is `dig` with arguments. + # + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#49 + def inspect_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#64 + def invalid_arguments?(arguments); end + + # source://rubocop//lib/rubocop/cop/style/dig_chain.rb#74 + def register_offense(node, range, arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#30 +RuboCop::Cop::Style::DigChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dig_chain.rb#31 +RuboCop::Cop::Style::DigChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where the `#\_\_dir\_\_` method can replace more +# complex constructs to retrieve a canonicalized absolute path to the +# current file. +# +# @example +# # bad +# path = File.expand_path(File.dirname(__FILE__)) +# +# # bad +# path = File.dirname(File.realpath(__FILE__)) +# +# # good +# path = __dir__ +# +# source://rubocop//lib/rubocop/cop/style/dir.rb#19 +class RuboCop::Cop::Style::Dir < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/dir.rb#29 + def dir_replacement?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/dir.rb#34 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/dir.rb#44 + def file_keyword?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/dir.rb#25 +RuboCop::Cop::Style::Dir::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dir.rb#26 +RuboCop::Cop::Style::Dir::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty. +# +# @example +# # bad +# Dir.entries('path/to/dir').size == 2 +# Dir.children('path/to/dir').empty? +# Dir.children('path/to/dir').size == 0 +# Dir.each_child('path/to/dir').none? +# +# # good +# Dir.empty?('path/to/dir') +# +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#18 +class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48 + def bang(node); end +end + +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#22 +RuboCop::Cop::Style::DirEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/dir_empty.rb#23 +RuboCop::Cop::Style::DirEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detects comments to enable/disable RuboCop. +# This is useful if want to make sure that every RuboCop error gets fixed +# and not quickly disabled with a comment. +# +# Specific cops can be allowed with the `AllowedCops` configuration. Note that +# +# @example +# # bad +# # rubocop:disable Metrics/AbcSize +# def foo +# end +# # rubocop:enable Metrics/AbcSize +# +# # good +# def foo +# end +# @example AllowedCops: [Metrics/AbcSize] +# # good +# # rubocop:disable Metrics/AbcSize +# def foo +# end +# # rubocop:enable Metrics/AbcSize +# +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#33 +class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#40 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#77 + def allowed_cops; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#81 + def any_cops_allowed?; end + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#72 + def directive_cops(comment); end + + # source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#53 + def register_offense(comment, directive_cops, disallowed_cops); end +end + +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#37 +RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb#38 +RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG_FOR_COPS = T.let(T.unsafe(nil), String) + +# When using `class_eval` (or other `eval`) with string interpolation, +# add a comment block showing its appearance if interpolated (a practice used in Rails code). +# +# @example +# # from activesupport/lib/active_support/core_ext/string/output_safety.rb +# +# # bad +# UNSAFE_STRING_METHODS.each do |unsafe_method| +# if 'String'.respond_to?(unsafe_method) +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}(*params, &block) +# to_str.#{unsafe_method}(*params, &block) +# end +# +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# end +# end +# +# # good, inline comments in heredoc +# UNSAFE_STRING_METHODS.each do |unsafe_method| +# if 'String'.respond_to?(unsafe_method) +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}(*params, &block) # def capitalize(*params, &block) +# to_str.#{unsafe_method}(*params, &block) # to_str.capitalize(*params, &block) +# end # end +# +# def #{unsafe_method}!(*params) # def capitalize!(*params) +# @dirty = true # @dirty = true +# super # super +# end # end +# EOT +# end +# end +# +# # good, block comments in heredoc +# class_eval <<-EOT, __FILE__, __LINE__ + 1 +# # def capitalize!(*params) +# # @dirty = true +# # super +# # end +# +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# +# # good, block comments before heredoc +# class_eval( +# # def capitalize!(*params) +# # @dirty = true +# # super +# # end +# +# <<-EOT, __FILE__, __LINE__ + 1 +# def #{unsafe_method}!(*params) +# @dirty = true +# super +# end +# EOT +# ) +# +# # bad - interpolated string without comment +# class_eval("def #{unsafe_method}!(*params); end") +# +# # good - with inline comment or replace it with block comment using heredoc +# class_eval("def #{unsafe_method}!(*params); end # def capitalize!(*params); end") +# +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#77 +class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#84 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#107 + def comment_block_docs?(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#147 + def comment_regexp(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#126 + def heredoc_comment_blocks(heredoc_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#100 + def inline_comment_docs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#96 + def interpolated?(arg_node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#136 + def merge_adjacent_comments(line, index, hash); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#117 + def preceding_comment_blocks(node); end + + # source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#156 + def source_to_regexp(source); end +end + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#78 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::BLOCK_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#79 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#80 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/document_dynamic_eval_definition.rb#82 +RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for missing top-level documentation of classes and +# modules. Classes with no body are exempt from the check and so are +# namespace modules - modules that have nothing in their bodies except +# classes, other modules, constant definitions or constant visibility +# declarations. +# +# The documentation requirement is annulled if the class or module has +# same for all its children. +# +# @example +# # bad +# class Person +# # ... +# end +# +# module Math +# end +# +# # good +# # Description/Explanation of Person class +# class Person +# # ... +# end +# +# # allowed +# # Class without body +# class Person +# end +# +# # Namespace - A namespace can be a class or a module +# # Containing a class +# module Namespace +# # Description/Explanation of Person class +# class Person +# # ... +# end +# end +# +# # Containing constant visibility declaration +# module Namespace +# class Private +# end +# +# private_constant :Private +# end +# +# # Containing constant definition +# module Namespace +# Public = Class.new +# end +# +# # Macro calls +# module Namespace +# extend Foo +# end +# @example AllowedConstants: ['ClassMethods'] +# +# # good +# module A +# module ClassMethods +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation.rb#72 +class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DocumentationComment + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#79 + def constant_definition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#85 + def constant_visibility_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#90 + def include_statement?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#94 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#100 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#82 + def outer_module(param0); end + + private + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#174 + def allowed_constants; end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#106 + def check(node, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#147 + def compact_namespace?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#143 + def constant_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#139 + def constant_declaration?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#178 + def identifier(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#123 + def include_statement_only?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#129 + def namespace?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#170 + def nodoc(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#166 + def nodoc?(comment, require_all: T.unsafe(nil)); end + + # Note: How end-of-line comments are associated with code changed in + # parser-2.2.0.4. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#156 + def nodoc_comment?(node, require_all: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation.rb#118 + def nodoc_self_or_outer_module?(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation.rb#186 + def qualify_const(node); end +end + +# source://rubocop//lib/rubocop/cop/style/documentation.rb#76 +RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) + +# Checks for missing documentation comment for public methods. +# It can optionally be configured to also require documentation for +# non-public methods. +# +# NOTE: This cop allows `initialize` method because `initialize` is +# a special method called from `new`. In some programming languages +# they are called constructor to distinguish it from method. +# +# @example +# +# # bad +# +# class Foo +# def bar +# puts baz +# end +# end +# +# module Foo +# def bar +# puts baz +# end +# end +# +# def foo.bar +# puts baz +# end +# +# # good +# +# class Foo +# # Documentation +# def bar +# puts baz +# end +# end +# +# module Foo +# # Documentation +# def bar +# puts baz +# end +# end +# +# # Documentation +# def foo.bar +# puts baz +# end +# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] +# +# # good +# class Foo +# def method_missing(name, *args) +# end +# +# def respond_to_missing?(symbol, include_private) +# end +# end +# @example RequireForNonPublicMethods: false (default) +# # good +# class Foo +# protected +# def do_something +# end +# end +# +# class Foo +# private +# def do_something +# end +# end +# @example RequireForNonPublicMethods: true +# # bad +# class Foo +# protected +# def do_something +# end +# end +# +# class Foo +# private +# def do_something +# end +# end +# +# # good +# class Foo +# protected +# # Documentation +# def do_something +# end +# end +# +# class Foo +# private +# # Documentation +# def do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 +class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DocumentationComment + include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::DefNode + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 + def modifier_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#126 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 + def method_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 + def require_for_non_public_methods?; end +end + +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 +RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) + +# Detects double disable comments on one line. This is mostly to catch +# automatically generated comments that need to be regenerated. +# +# @example +# # bad +# def f # rubocop:disable Style/For # rubocop:disable Metrics/AbcSize +# end +# +# # good +# # rubocop:disable Metrics/AbcSize +# def f # rubocop:disable Style/For +# end +# # rubocop:enable Metrics/AbcSize +# +# # if both fit on one line +# def f # rubocop:disable Style/For, Metrics/AbcSize +# end +# +# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#27 +class RuboCop::Cop::Style::DoubleCopDisableDirective < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#34 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/style/double_cop_disable_directive.rb#32 +RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of double negation (`!!`) to convert something to a boolean value. +# +# When using `EnforcedStyle: allowed_in_returns`, allow double negation in contexts +# that use boolean as a return value. When using `EnforcedStyle: forbidden`, double negation +# should be forbidden always. +# +# NOTE: when `something` is a boolean value +# `!!something` and `!something.nil?` are not the same thing. +# As you're unlikely to write code that can accept values of any type +# this is rarely a problem in practice. +# +# @example +# # bad +# !!something +# +# # good +# !something.nil? +# @example EnforcedStyle: allowed_in_returns (default) +# # good +# def foo? +# !!return_value +# end +# +# define_method :foo? do +# !!return_value +# end +# +# define_singleton_method :foo? do +# !!return_value +# end +# @example EnforcedStyle: forbidden +# # bad +# def foo? +# !!return_value +# end +# +# define_method :foo? do +# !!return_value +# end +# +# define_singleton_method :foo? do +# !!return_value +# end +# +# source://rubocop//lib/rubocop/cop/style/double_negation.rb#61 +class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#69 + def double_negative?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#71 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#84 + def allowed_in_returns?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#111 + def define_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#138 + def double_negative_condition_return_value?(node, last_child, conditional_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#88 + def end_of_method_definition?(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#120 + def find_conditional_node_from_ascendant(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#103 + def find_def_node_from_ascendant(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#127 + def find_last_child(node); end + + # source://rubocop//lib/rubocop/cop/style/double_negation.rb#147 + def find_parent_not_enumerable(node); end +end + +# source://rubocop//lib/rubocop/cop/style/double_negation.rb#65 +RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/double_negation.rb#66 +RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for loops which iterate a constant number of times, +# using a `Range` literal and `#each`. This can be done more readably using +# `Integer#times`. +# +# This check only applies if the block takes no parameters. +# +# @example +# # bad +# (1..5).each { } +# +# # good +# 5.times { } +# +# # bad +# (0...10).each {} +# +# # good +# 10.times {} +# +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24 +class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52 + def each_range(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#63 + def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#74 + def each_range_without_block_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45 + def offending?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27 +RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) + +# Looks for inject / reduce calls where the passed in object is +# returned at the end and so could be replaced by each_with_object without +# the need to return the object at the end. +# +# However, we can't replace with each_with_object if the accumulator +# parameter is assigned to within the block. +# +# @example +# # bad +# [1, 2].inject({}) { |a, e| a[e] = e; a } +# +# # good +# [1, 2].each_with_object({}) { |e, a| a[e] = e } +# +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#19 +class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#62 + def each_with_object_block_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#67 + def each_with_object_numblock_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#26 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#43 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#45 + def on_numblock(node); end + + private + + # if the accumulator parameter is assigned to in the block, + # then we can't convert to each_with_object + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#103 + def accumulator_param_assigned_to?(body, args); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#71 + def autocorrect_block(corrector, node, return_value); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#85 + def autocorrect_numblock(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#122 + def first_argument_returned?(args, return_value); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#115 + def return_value(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#130 + def return_value_occupies_whole_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#97 + def simple_method_arg?(method_arg); end + + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#134 + def whole_line_expression(node); end +end + +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#24 +RuboCop::Cop::Style::EachWithObject::METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/each_with_object.rb#23 +RuboCop::Cop::Style::EachWithObject::MSG = T.let(T.unsafe(nil), String) + +# Checks for pipes for empty block parameters. Pipes for empty +# block parameters do not cause syntax errors, but they are redundant. +# +# @example +# # bad +# a do || +# do_something +# end +# +# # bad +# a { || do_something } +# +# # good +# a do +# end +# +# # good +# a { do_something } +# +# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#24 +class RuboCop::Cop::Style::EmptyBlockParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EmptyParameter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#31 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#38 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_block_parameter.rb#29 +RuboCop::Cop::Style::EmptyBlockParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for case statements with an empty condition. +# +# @example +# +# # bad: +# case +# when x == 0 +# puts 'x is 0' +# when y == 0 +# puts 'y is 0' +# else +# puts 'neither is 0' +# end +# +# # good: +# if x == 0 +# puts 'x is 0' +# elsif y == 0 +# puts 'y is 0' +# else +# puts 'neither is 0' +# end +# +# # good: (the case condition node is not empty) +# case n +# when 0 +# puts 'zero' +# when 1 +# puts 'one' +# else +# puts 'more' +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#38 +class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 + def on_case(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 + def autocorrect(corrector, case_node); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 + def correct_case_when(corrector, case_node, when_nodes); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 + def correct_when_conditions(corrector, when_nodes); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 + def keep_first_when_comment(case_range, corrector); end + + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 + def replace_then_with_line_break(corrector, conditions, when_node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 +RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 +RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) + +# Enforces consistent style for empty class definitions. +# +# This cop can enforce either a standard class definition or `Class.new` +# for classes with no body. +# +# The supported styles are: +# +# * class_definition (default) - prefer standard class definition over `Class.new` +# * class_new - prefer `Class.new` over class definition +# +# One difference between the two styles is that the `Class.new` form does not make +# the subclass name available to the base class's `inherited` callback. +# For this reason, `EnforcedStyle: class_definition` is set as the default style. +# Class definitions without a superclass, which are not involved in inheritance, +# are not detected. This ensures safe detection regardless of the applied style. +# This avoids overlapping responsibilities with the `Lint/EmptyClass` cop. +# +# @example EnforcedStyle: class_keyword (default) +# # bad +# FooError = Class.new(StandardError) +# +# # okish +# class FooError < StandardError; end +# +# # good +# class FooError < StandardError +# end +# @example EnforcedStyle: class_new +# # bad +# class FooError < StandardError +# end +# +# # bad +# class FooError < StandardError; end +# +# # good +# FooError = Class.new(StandardError) +# +# source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#45 +class RuboCop::Cop::Style::EmptyClassDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#54 + def class_new_assignment(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#58 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#68 + def on_class(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#88 + def autocorrect_class_definition(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#80 + def autocorrect_class_new(corrector, node, class_new_node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#49 +RuboCop::Cop::Style::EmptyClassDefinition::MSG_CLASS_KEYWORD = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_class_definition.rb#51 +RuboCop::Cop::Style::EmptyClassDefinition::MSG_CLASS_NEW = T.let(T.unsafe(nil), String) + +# Checks for empty else-clauses, possibly including comments and/or an +# explicit `nil` depending on the EnforcedStyle. +# +# @example AllowComments: false (default) +# +# # bad +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # bad +# if condition +# statement +# else +# # something comment +# end +# @example AllowComments: true +# +# # good +# if condition +# statement +# else +# # something comment +# nil +# end +# +# # good +# if condition +# statement +# else +# # something comment +# end +# @example EnforcedStyle: both (default) +# # warn on empty else and else with nil in it +# +# # bad +# if condition +# statement +# else +# nil +# end +# +# # bad +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example EnforcedStyle: empty +# # warn only on empty else +# +# # bad +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# nil +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# @example EnforcedStyle: nil +# # warn on else with nil in it +# +# # bad +# if condition +# statement +# else +# nil +# end +# +# # good +# if condition +# statement +# else +# end +# +# # good +# if condition +# statement +# else +# statement +# end +# +# # good +# if condition +# statement +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#127 +class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#141 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#137 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#174 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#196 + def autocorrect_forbidden?(type); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#189 + def base_node(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#147 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#182 + def comment_in_else?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#162 + def empty_check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#158 + def empty_style?; end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#200 + def missing_else_style; end + + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#168 + def nil_check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#154 + def nil_style?; end +end + +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#135 +RuboCop::Cop::Style::EmptyElse::EMPTY_STYLES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#133 +RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_else.rb#134 +RuboCop::Cop::Style::EmptyElse::NIL_STYLES = T.let(T.unsafe(nil), Array) + +# Checks for using empty heredoc to reduce redundancy. +# +# @example +# +# # bad +# <<~EOS +# EOS +# +# <<-EOS +# EOS +# +# < () { do_something } +# +# # good +# -> { do_something } +# +# # good +# -> (arg) { do_something(arg) } +# +# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#19 +class RuboCop::Cop::Style::EmptyLambdaParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::EmptyParameter + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#26 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#35 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_lambda_parameter.rb#24 +RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of a method, the result of which +# would be a literal, like an empty array, hash, or string. +# +# NOTE: When frozen string literals are enabled, `String.new` +# isn't corrected to an empty string since the former is +# mutable and the latter would be frozen. +# +# @example +# # bad +# a = Array.new +# a = Array[] +# h = Hash.new +# h = Hash[] +# s = String.new +# +# # good +# a = [] +# h = {} +# s = '' +# +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 +class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#38 + def array_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#47 + def array_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#58 + def array_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#41 + def hash_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 + def hash_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#66 + def hash_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#73 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#44 + def str_node(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#122 + def correction(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#93 + def first_argument_unparenthesized?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#140 + def frozen_strings?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 + def offense_array_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#117 + def offense_hash_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#83 + def offense_message(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#100 + def replacement_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 +RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#32 +RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#35 +RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#33 +RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) + +# Checks for the formatting of empty method definitions. +# By default it enforces empty method definitions to go on a single +# line (compact style), but it can be configured to enforce the `end` +# to go on its own line (expanded style). +# +# NOTE: A method definition is not considered empty if it contains +# comments. +# +# NOTE: Autocorrection will not be applied for the `compact` style +# if the resulting code is longer than the `Max` configuration for +# `Layout/LineLength`, but an offense will still be registered. +# +# @example EnforcedStyle: compact (default) +# # bad +# def foo(bar) +# end +# +# def self.foo(bar) +# end +# +# # good +# def foo(bar); end +# +# def foo(bar) +# # baz +# end +# +# def self.foo(bar); end +# @example EnforcedStyle: expanded +# # bad +# def foo(bar); end +# +# def self.foo(bar); end +# +# # good +# def foo(bar) +# end +# +# def self.foo(bar) +# end +# +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#47 +class RuboCop::Cop::Style::EmptyMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#54 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#65 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#95 + def compact?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#103 + def compact_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#73 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#77 + def corrected(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#99 + def expanded?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#107 + def expanded_style?; end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#89 + def joint(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_method.rb#69 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#51 +RuboCop::Cop::Style::EmptyMethod::MSG_COMPACT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_method.rb#52 +RuboCop::Cop::Style::EmptyMethod::MSG_EXPANDED = T.let(T.unsafe(nil), String) + +# Checks for empty strings being assigned inside string interpolation. +# +# Empty strings are a meaningless outcome inside of string interpolation, so we remove them. +# Alternatively, when configured to do so, we prioritise using empty strings. +# +# While this cop would also apply to variables that are only going to be used as strings, +# RuboCop can't detect that, so we only check inside of string interpolation. +# +# @example EnforcedStyle: ternary +# # bad +# "#{'foo' if condition}" +# +# # good +# "#{condition ? 'foo' : ''}" +# +# # bad +# "#{'foo' unless condition}" +# +# # good +# "#{condition ? '' : 'foo'}" +# @example EnforcedStyle: trailing_conditional (default) +# # bad +# "#{condition ? 'foo' : ''}" +# +# # good +# "#{'foo' if condition}" +# +# # bad +# "#{condition ? '' : 'foo'}" +# +# # good +# "#{'foo' unless condition}" +# +# source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#40 +class RuboCop::Cop::Style::EmptyStringInsideInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#49 + def on_interpolation(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#86 + def empty_branch_outcome?(branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#82 + def empty_else_outcome?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#78 + def empty_if_outcome?(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#92 + def ternary_style_autocorrect(node, outcome, condition); end +end + +# source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#46 +RuboCop::Cop::Style::EmptyStringInsideInterpolation::MSG_TERNARY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/empty_string_inside_interpolation.rb#45 +RuboCop::Cop::Style::EmptyStringInsideInterpolation::MSG_TRAILING_CONDITIONAL = T.let(T.unsafe(nil), String) + +# Checks that source files have no utf-8 encoding comments. +# Since Ruby 2.0, UTF-8 is the default source encoding, so +# these comments are no longer necessary and just add noise. +# +# @example +# # bad +# # encoding: UTF-8 +# # coding: UTF-8 +# # -*- coding: UTF-8 -*- +# +# # good +# # No encoding comment needed +# +# source://rubocop//lib/rubocop/cop/style/encoding.rb#18 +class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#26 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#38 + def comments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/encoding.rb#49 + def offense?(comment); end + + # source://rubocop//lib/rubocop/cop/style/encoding.rb#53 + def register_offense(line_number, comment); end +end + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#23 +RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#22 +RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/encoding.rb#24 +RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String) + +# Checks for `END` blocks. `END` blocks are Perl-style constructs +# and `Kernel#at_exit` is the idiomatic Ruby alternative, as it's +# explicit and can be used anywhere. +# +# @example +# # bad +# END { puts 'Goodbye!' } +# +# # good +# at_exit { puts 'Goodbye!' } +# +# source://rubocop//lib/rubocop/cop/style/end_block.rb#17 +class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/end_block.rb#22 + def on_postexe(node); end +end + +# source://rubocop//lib/rubocop/cop/style/end_block.rb#20 +RuboCop::Cop::Style::EndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for endless methods. +# +# It can enforce endless method definitions whenever possible or with single line methods. +# It can also disallow multiline endless method definitions or all endless definitions. +# +# `require_single_line` style enforces endless method definitions for single line methods. +# `require_always` style enforces endless method definitions for single statement methods. +# +# Other method definition types are not considered by this cop. +# +# The supported styles are: +# +# * allow_single_line (default) - only single line endless method definitions are allowed. +# * allow_always - all endless method definitions are allowed. +# * disallow - all endless method definitions are disallowed. +# * require_single_line - endless method definitions are required for single line methods. +# * require_always - all endless method definitions are required. +# +# NOTE: Incorrect endless method definitions will always be +# corrected to a multi-line definition. +# +# @example EnforcedStyle: allow_always +# # good +# def my_method +# x +# end +# +# # good +# def my_method = x +# +# # good +# def my_method = x.foo +# .bar +# .baz +# +# # good +# def my_method +# x.foo +# .bar +# .baz +# end +# @example EnforcedStyle: allow_single_line (default) +# # bad, multi-line endless method +# def my_method = x.foo +# .bar +# .baz +# +# # good +# def my_method +# x +# end +# +# # good +# def my_method = x +# +# # good +# def my_method +# x.foo +# .bar +# .baz +# end +# @example EnforcedStyle: disallow +# # bad +# def my_method = x +# +# # bad +# def my_method = x.foo +# .bar +# .baz +# +# # good +# def my_method +# x +# end +# +# # good +# def my_method +# x.foo +# .bar +# .baz +# end +# @example EnforcedStyle: require_always +# # bad +# def my_method +# x +# end +# +# # bad +# def my_method +# x.foo +# .bar +# .baz +# end +# +# # good +# def my_method = x +# +# # good +# def my_method = x.foo +# .bar +# .baz +# @example EnforcedStyle: require_single_line +# # bad +# def my_method +# x +# end +# +# # bad +# def my_method = x.foo +# .bar +# .baz +# +# # good +# def my_method = x +# +# # good +# def my_method +# x.foo +# .bar +# .baz +# end +# +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#132 +class RuboCop::Cop::Style::EndlessMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::EndlessMethodRewriter + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#146 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#160 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#229 + def arguments(node, missing = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#233 + def can_be_made_endless?(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#209 + def correct_to_multiline(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#219 + def endless_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#164 + def handle_allow_style(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#196 + def handle_disallow_style(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#187 + def handle_require_always_style(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#173 + def handle_require_single_line_style(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#245 + def modifier_offset(node); end + + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#225 + def receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#237 + def too_long_when_made_endless?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/endless_method.rb#202 + def use_heredoc?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#140 +RuboCop::Cop::Style::EndlessMethod::CORRECTION_STYLES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#141 +RuboCop::Cop::Style::EndlessMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#142 +RuboCop::Cop::Style::EndlessMethod::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#144 +RuboCop::Cop::Style::EndlessMethod::MSG_REQUIRE_ALWAYS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/endless_method.rb#143 +RuboCop::Cop::Style::EndlessMethod::MSG_REQUIRE_SINGLE = T.let(T.unsafe(nil), String) + +# Checks for consistent usage of `ENV['HOME']`. If `nil` is used as +# the second argument of `ENV.fetch`, it is treated as a bad case like `ENV[]`. +# +# @example +# +# # bad +# ENV['HOME'] +# ENV.fetch('HOME', nil) +# +# # good +# Dir.home +# +# # good +# ENV.fetch('HOME', default) +# +# source://rubocop//lib/rubocop/cop/style/env_home.rb#31 +class RuboCop::Cop::Style::EnvHome < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/env_home.rb#38 + def env_home?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/env_home.rb#45 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/env_home.rb#34 +RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/env_home.rb#35 +RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensures that eval methods (`eval`, `instance_eval`, `class_eval` +# and `module_eval`) are given filename and line number values (`+__FILE__+` +# and `+__LINE__+`). This data is used to ensure that any errors raised +# within the evaluated code will be given the correct identification +# in a backtrace. +# +# The cop also checks that the line number given relative to `+__LINE__+` is +# correct. +# +# This cop will autocorrect incorrect or missing filename and line number +# values. However, if `eval` is called without a binding argument, the cop +# will not attempt to automatically add a binding, or add filename and +# line values. +# +# NOTE: This cop works only when a string literal is given as a code string. +# No offense is reported if a string variable is given as below: +# +# [source,ruby] +# ---- +# code = <<-RUBY +# def do_something +# end +# RUBY +# eval code # not checked. +# ---- +# +# @example +# # bad +# eval <<-RUBY +# def do_something +# end +# RUBY +# +# # bad +# C.class_eval <<-RUBY +# def do_something +# end +# RUBY +# +# # good +# eval <<-RUBY, binding, __FILE__, __LINE__ + 1 +# def do_something +# end +# RUBY +# +# # good +# C.class_eval <<-RUBY, __FILE__, __LINE__ + 1 +# def do_something +# end +# RUBY +# +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57 +class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75 + def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70 + def valid_eval_receiver?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187 + def add_offense_for_different_line(node, line_node, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132 + def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 + def add_offense_for_missing_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209 + def add_offense_for_missing_location(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 + def add_offense_for_same_line(node, line_node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144 + def check_file(node, file_node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157 + def check_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96 + def check_location(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194 + def expected_line(sign, line_diff); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123 + def file_and_line(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169 + def line_difference(line_node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221 + def missing_line(node, code); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110 + def register_offense(node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115 + def special_file_keyword?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119 + def special_line_keyword?(node); end + + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173 + def string_first_line(str_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128 + def with_binding?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 +RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 +RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62 +RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64 +RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67 +RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where `Integer#even?` or `Integer#odd?` +# can be used. +# +# @example +# +# # bad +# if x % 2 == 0 +# end +# +# # good +# if x.even? +# end +# +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#18 +class RuboCop::Cop::Style::EvenOdd < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#25 + def even_odd_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/even_odd.rb#45 + def replacement_method(arg, method); end +end + +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#21 +RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/even_odd.rb#22 +RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for exact regexp match inside `Regexp` literals. +# +# @example +# +# # bad +# string =~ /\Astring\z/ +# string === /\Astring\z/ +# string.match(/\Astring\z/) +# string.match?(/\Astring\z/) +# +# # good +# string == 'string' +# +# # bad +# string !~ /\Astring\z/ +# +# # good +# string != 'string' +# +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#25 +class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#32 + def exact_regexp_match(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#52 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#56 + def exact_match_pattern?(parsed_regexp); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#63 + def new_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#28 +RuboCop::Cop::Style::ExactRegexpMatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#29 +RuboCop::Cop::Style::ExactRegexpMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of the `File.expand_path` arguments. +# Likewise, it also checks for the `Pathname.new` argument. +# +# Contrastive bad case and good case are alternately shown in +# the following examples. +# +# @example +# # bad +# File.expand_path('..', __FILE__) +# +# # good +# File.expand_path(__dir__) +# +# # bad +# File.expand_path('../..', __FILE__) +# +# # good +# File.expand_path('..', __dir__) +# +# # bad +# File.expand_path('.', __FILE__) +# +# # good +# File.expand_path(__FILE__) +# +# # bad +# Pathname(__FILE__).parent.expand_path +# +# # good +# Pathname(__dir__).expand_path +# +# # bad +# Pathname.new(__FILE__).parent.expand_path +# +# # good +# Pathname.new(__dir__).expand_path +# +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#43 +class RuboCop::Cop::Style::ExpandPathArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#58 + def file_expand_path(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#82 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#74 + def pathname_new_parent_expand_path(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#66 + def pathname_parent_expand_path(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#100 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#135 + def autocorrect_expand_path(corrector, current_path, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#162 + def depth(current_path); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#113 + def inspect_offense_for_expand_path(node, current_path, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#168 + def parent_path(current_path); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#182 + def remove_parent_method(corrector, default_dir); end + + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#155 + def strip_surrounded_quotes!(path_string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#109 + def unrecommended_argument?(default_dir); end +end + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#47 +RuboCop::Cop::Style::ExpandPathArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#49 +RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#51 +RuboCop::Cop::Style::ExpandPathArguments::PATHNAME_NEW_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/expand_path_arguments.rb#55 +RuboCop::Cop::Style::ExpandPathArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of explicit block argument to avoid writing +# block literal that just passes its arguments to another block. +# +# NOTE: This cop only registers an offense if the block args match the +# yield args exactly. +# +# @example +# # bad +# def with_tmp_dir +# Dir.mktmpdir do |tmp_dir| +# Dir.chdir(tmp_dir) { |dir| yield dir } # block just passes arguments +# end +# end +# +# # bad +# def nine_times +# 9.times { yield } +# end +# +# # good +# def with_tmp_dir(&block) +# Dir.mktmpdir do |tmp_dir| +# Dir.chdir(tmp_dir, &block) +# end +# end +# +# with_tmp_dir do |dir| +# puts "dir is accessible as a parameter and pwd is set: #{dir}" +# end +# +# # good +# def nine_times(&block) +# 9.times(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#41 +class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # @return [ExplicitBlockArgument] a new instance of ExplicitBlockArgument + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#57 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#62 + def on_yield(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#49 + def yielding_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#108 + def add_block_argument(node, corrector, block_name); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#160 + def block_body_range(block_node, send_node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#153 + def build_new_arguments_for_zsuper(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#125 + def call_like?(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#137 + def correct_call_node(node, corrector, block_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#120 + def empty_arguments?(node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#87 + def extract_block_name(def_node); end + + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#129 + def insert_argument(node, corrector, block_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#95 + def yielding_arguments?(block_args, yield_args); end + + class << self + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#53 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#45 +RuboCop::Cop::Style::ExplicitBlockArgument::MSG = T.let(T.unsafe(nil), String) + +# Enforces consistency when using exponential notation +# for numbers in the code (eg 1.2e4). Different styles are supported: +# +# * `scientific` which enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# * `engineering` which enforces the exponent to be a multiple of 3 and the mantissa +# to be between 0.1 (inclusive) and 1000 (exclusive). +# * `integral` which enforces the mantissa to always be a whole number without +# trailing zeroes. +# +# @example EnforcedStyle: engineering +# # Enforces using multiple of 3 exponents, +# # mantissa should be between 0.1 (inclusive) and 1000 (exclusive) +# +# # bad +# 3.2e7 +# 0.1e5 +# 12e5 +# 1232e6 +# +# # good +# 32e6 +# 10e3 +# 1.2e6 +# 1.232e9 +# @example EnforcedStyle: integral +# # Enforces the mantissa to have no decimal part and no +# # trailing zeroes. +# +# # bad +# 3.2e7 +# 0.1e5 +# 120e4 +# +# # good +# 32e6 +# 1e4 +# 12e5 +# @example EnforcedStyle: scientific (default) +# # Enforces a mantissa between 1 (inclusive) and 10 (exclusive). +# +# # bad +# 10e6 +# 0.3e4 +# 11.7e5 +# 3.14e0 +# +# # good +# 1e7 +# 3e3 +# 1.17e6 +# 3.14 +# +# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#60 +class RuboCop::Cop::Style::ExponentialNotation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#69 + def on_float(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#80 + def engineering?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#91 + def integral?(node); end + + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#111 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#96 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#75 + def scientific?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exponential_notation.rb#63 +RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Suggests `ENV.fetch` for the replacement of `ENV[]`. +# `ENV[]` silently fails and returns `nil` when the environment variable is unset, +# which may cause unexpected behaviors when the developer forgets to set it. +# On the other hand, `ENV.fetch` raises `KeyError` or returns the explicitly +# specified default value. +# +# @example DefaultToNil: false +# # bad +# ENV['X'] +# x = ENV['X'] +# +# # good +# ENV.fetch('X') +# x = ENV.fetch('X') +# +# # also good +# !ENV['X'] +# ENV['X'].some_method # (e.g. `.nil?`) +# @example DefaultToNil: true (default) +# # bad +# ENV['X'] +# x = ENV['X'] +# +# # good +# ENV.fetch('X', nil) +# x = ENV.fetch('X', nil) +# +# # also good +# !ENV['X'] +# ENV['X'].some_method # (e.g. `.nil?`) +# +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#38 +class RuboCop::Cop::Style::FetchEnvVar < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#46 + def env_with_bracket?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#50 + def on_send(node); end + + private + + # The following are allowed cases: + # + # - Used as a flag (e.g., `if ENV['X']` or `!ENV['X']`) because + # it simply checks whether the variable is set. + # - Receiving a message with dot syntax, e.g. `ENV['X'].nil?`. + # - `ENV['key']` assigned by logical AND/OR assignment. + # - `ENV['key']` is the LHS of a `||`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#128 + def allowable_use?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#71 + def allowed_var?(node); end + + # The following are allowed cases: + # + # - `ENV['key']` is a receiver of `||=`, e.g. `ENV['X'] ||= y`. + # - `ENV['key']` is a receiver of `&&=`, e.g. `ENV['X'] &&= y`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#136 + def assigned?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#63 + def default_to_nil?; end + + # Check if the node is a receiver and receives a message with dot syntax. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#112 + def message_chained_with_dot?(node); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#149 + def new_code(name_node); end + + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#67 + def offense_message; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#107 + def offensive?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#143 + def or_lhs?(node); end + + # Avoid offending in the following cases: + # `ENV['key'] if ENV['key'] = x` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#103 + def partial_matched?(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#76 + def used_as_flag?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#83 + def used_if_condition_in_body?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#92 + def used_in_condition?(node, condition); end +end + +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#42 +RuboCop::Cop::Style::FetchEnvVar::MSG_WITHOUT_NIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#41 +RuboCop::Cop::Style::FetchEnvVar::MSG_WITH_NIL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/fetch_env_var.rb#43 +RuboCop::Cop::Style::FetchEnvVar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer to use `File.empty?('path/to/file')` when checking if a file is empty. +# +# @example +# # bad +# File.zero?('path/to/file') +# File.size('path/to/file') == 0 +# File.size('path/to/file') >= 0 +# File.size('path/to/file').zero? +# File.read('path/to/file').empty? +# File.binread('path/to/file') == '' +# FileTest.zero?('path/to/file') +# +# # good +# File.empty?('path/to/file') +# FileTest.empty?('path/to/file') +# +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#27 +class RuboCop::Cop::Style::FileEmpty < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#37 + def offensive?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#49 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/file_empty.rb#62 + def bang(node); end +end + +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#31 +RuboCop::Cop::Style::FileEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_empty.rb#32 +RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use `File::NULL` instead of hardcoding the null device (`/dev/null` on Unix-like +# OSes, `NUL` or `NUL:` on Windows), so that code is platform independent. +# Only looks for full string matches, substrings within a longer string are not +# considered. +# +# However, only files that use the string `'/dev/null'` are targeted for detection. +# This is because the string `'NUL'` is not limited to the null device. +# This behavior results in false negatives when the `'/dev/null'` string is not used, +# but it is a trade-off to avoid false positives. `NULL:` +# Unlike `'NUL'`, `'NUL:'` is regarded as something like `C:` and is always detected. +# +# NOTE: Uses inside arrays and hashes are ignored. +# +# @example +# # bad +# '/dev/null' +# 'NUL' +# 'NUL:' +# +# # good +# File::NULL +# +# # ok - inside an array +# null_devices = %w[/dev/null nul] +# +# # ok - inside a hash +# { unix: "/dev/null", windows: "nul" } +# +# source://rubocop//lib/rubocop/cop/style/file_null.rb#45 +class RuboCop::Cop::Style::FileNull < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_null.rb#51 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/file_null.rb#61 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_null.rb#79 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_null.rb#75 + def valid_string?(value); end +end + +# source://rubocop//lib/rubocop/cop/style/file_null.rb#49 +RuboCop::Cop::Style::FileNull::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_null.rb#48 +RuboCop::Cop::Style::FileNull::REGEXP = T.let(T.unsafe(nil), Regexp) + +# Checks for `File.open` without a block, which can leak file descriptors. +# +# When `File.open` is called without a block, the caller is responsible +# for closing the file descriptor. If it is not explicitly closed, it +# will only be closed when the garbage collector runs, which may lead +# to resource exhaustion. Using the block form ensures the file is +# automatically closed when the block exits. +# +# This cop only registers an offense when the result of `File.open` is +# assigned to a variable or has a method chained on it, as those are the +# clearest indicators that the block form should be used instead. When +# `File.open` is used as a return value or passed as an argument, the +# caller is likely managing the file descriptor intentionally. +# +# @example +# # bad +# f = File.open('file') +# +# # bad +# File.open('file').read +# +# # good +# File.open('file') do |f| +# f.read +# end +# +# # good +# File.open('file', &:read) +# +# # good - pass an open file object to an API that manages its lifecycle +# process(io: File.open('file')) +# +# # good - return an open file object for the caller to manage +# def json_key_io +# File.open('file') +# end +# +# # good - use File.read for one-shot reads +# File.read('file') +# +# source://rubocop//lib/rubocop/cop/style/file_open.rb#52 +class RuboCop::Cop::Style::FileOpen < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/file_open.rb#57 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_open.rb#68 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/file_open.rb#61 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_open.rb#72 + def offensive_usage?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_open.rb#78 + def receiver_of_chained_call?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/file_open.rb#53 +RuboCop::Cop::Style::FileOpen::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_open.rb#54 +RuboCop::Cop::Style::FileOpen::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Favor `File.(bin)read` convenience methods. +# +# @example +# # bad - text mode +# File.open(filename).read +# File.open(filename, &:read) +# File.open(filename) { |f| f.read } +# File.open(filename) do |f| +# f.read +# end +# File.open(filename, 'r').read +# File.open(filename, 'r', &:read) +# File.open(filename, 'r') do |f| +# f.read +# end +# +# # good +# File.read(filename) +# +# # bad - binary mode +# File.open(filename, 'rb').read +# File.open(filename, 'rb', &:read) +# File.open(filename, 'rb') do |f| +# f.read +# end +# +# # good +# File.binread(filename) +# +# source://rubocop//lib/rubocop/cop/style/file_read.rb#35 +class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#62 + def block_read?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#46 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#66 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#57 + def send_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#81 + def evidence(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_read.rb#97 + def file_open_read?(node); end + + # source://rubocop//lib/rubocop/cop/style/file_read.rb#103 + def read_method(mode); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_read.rb#89 + def read_node?(node, block_pass); end +end + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#39 +RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#43 +RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_read.rb#41 +RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usage of `File.open` in append mode with empty block. +# +# Such a usage only creates a new file, but it doesn't update +# timestamps for an existing file, which might have been the intention. +# +# For example, for an existing file `foo.txt`: +# +# ruby -e "puts File.mtime('foo.txt')" +# # 2024-11-26 12:17:23 +0100 +# +# ruby -e "File.open('foo.txt', 'a') {}" +# +# ruby -e "puts File.mtime('foo.txt')" +# # 2024-11-26 12:17:23 +0100 -> unchanged +# +# If the intention was to update timestamps, `FileUtils.touch('foo.txt')` +# should be used instead. +# +# @example +# # bad +# File.open(filename, 'a') {} +# File.open(filename, 'a+') {} +# +# # good +# FileUtils.touch(filename) +# +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#36 +class RuboCop::Cop::Style::FileTouch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_touch.rb#47 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_touch.rb#54 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_touch.rb#69 + def empty_block?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#44 +RuboCop::Cop::Style::FileTouch::APPEND_FILE_MODES = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#39 +RuboCop::Cop::Style::FileTouch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_touch.rb#42 +RuboCop::Cop::Style::FileTouch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Favor `File.(bin)write` convenience methods. +# +# NOTE: There are different method signatures between `File.write` (class method) +# and `File#write` (instance method). The following case will be allowed because +# static analysis does not know the contents of the splat argument: +# +# [source,ruby] +# ---- +# File.open(filename, 'w') do |f| +# f.write(*objects) +# end +# ---- +# +# @example +# # bad - text mode +# File.open(filename, 'w').write(content) +# File.open(filename, 'w') do |f| +# f.write(content) +# end +# +# # good +# File.write(filename, content) +# +# # bad - binary mode +# File.open(filename, 'wb').write(content) +# File.open(filename, 'wb') do |f| +# f.write(content) +# end +# +# # good +# File.binwrite(filename, content) +# +# source://rubocop//lib/rubocop/cop/style/file_write.rb#38 +class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#65 + def block_write?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#82 + def evidence(node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#49 + def file_open?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#60 + def send_write?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # @yield [content] + # + # source://rubocop//lib/rubocop/cop/style/file_write.rb#92 + def file_open_write?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/file_write.rb#120 + def heredoc?(write_node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#125 + def heredoc_range(first_argument); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#105 + def replacement(mode, filename, content, write_node); end + + # source://rubocop//lib/rubocop/cop/style/file_write.rb#101 + def write_method(mode); end +end + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#42 +RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#44 +RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/file_write.rb#46 +RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) + +# Checks for division with integers coerced to floats. +# It is recommended to either always use `fdiv` or coerce one side only. +# This cop also provides other options for code consistency. +# +# For `Regexp.last_match` and nth reference (e.g., `$1`), it assumes that the value +# is a string matched by a regular expression, and allows conversion with `#to_f`. +# +# @example EnforcedStyle: fdiv +# # bad +# a / b.to_f +# a.to_f / b +# a.to_f / b.to_f +# +# # good +# a.fdiv(b) +# @example EnforcedStyle: left_coerce +# # bad +# a / b.to_f +# a.to_f / b.to_f +# +# # good +# a.to_f / b +# @example EnforcedStyle: right_coerce +# # bad +# a.to_f / b +# a.to_f / b.to_f +# +# # good +# a / b.to_f +# @example EnforcedStyle: single_coerce (default) +# # bad +# a.to_f / b.to_f +# +# # good +# a.to_f / b +# a / b.to_f +# +# source://rubocop//lib/rubocop/cop/style/float_division.rb#56 +class RuboCop::Cop::Style::FloatDivision < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#82 + def any_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#78 + def both_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#74 + def left_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#98 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#91 + def regexp_last_match?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#70 + def right_coerce?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#86 + def to_f_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#139 + def add_to_f_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#148 + def correct_from_slash_to_fdiv(corrector, node, receiver, argument); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#159 + def extract_receiver_source(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#135 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/float_division.rb#117 + def offense_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/float_division.rb#143 + def remove_to_f_method(corrector, send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/float_division.rb#60 +RuboCop::Cop::Style::FloatDivision::MESSAGES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/float_division.rb#67 +RuboCop::Cop::Style::FloatDivision::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of the `for` keyword or `each` method. The +# preferred alternative is set in the EnforcedStyle configuration +# parameter. An `each` call with a block on a single line is always +# allowed. +# +# NOTE: `each` is preferred in idiomatic Ruby because `for` leaks +# its loop variable into the surrounding scope. +# +# @example EnforcedStyle: each (default) +# # bad +# def foo +# for n in [1, 2, 3] do +# puts n +# end +# end +# +# # good +# def foo +# [1, 2, 3].each do |n| +# puts n +# end +# end +# @example EnforcedStyle: for +# # bad +# def foo +# [1, 2, 3].each do |n| +# puts n +# end +# end +# +# # good +# def foo +# for n in [1, 2, 3] do +# puts n +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/for.rb#48 +class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/for.rb#67 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#56 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#83 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/for.rb#82 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/for.rb#87 + def suspect_enumerable?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/for.rb#52 +RuboCop::Cop::Style::For::EACH_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/for.rb#53 +RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/for.rb#54 +RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) + +# Enforces the use of a single string formatting utility. +# Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`. +# +# The detection of `String#%` cannot be implemented in a reliable +# manner for all cases, so only two scenarios are considered - +# if the first argument is a string literal and if the second +# argument is an array literal. +# +# Autocorrection will be applied when using argument is a literal or known built-in conversion +# methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables, +# provided that their return value is not an array. For example, when using `to_s`, +# `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility: +# +# [source,ruby] +# ---- +# '%s' % [1, 2, 3] #=> '1' +# format('%s', [1, 2, 3]) #=> '[1, 2, 3]' +# '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]' +# ---- +# +# @example EnforcedStyle: format (default) +# # bad +# puts sprintf('%10s', 'foo') +# puts '%10s' % 'foo' +# +# # good +# puts format('%10s', 'foo') +# @example EnforcedStyle: percent +# # bad +# puts format('%10s', 'foo') +# puts sprintf('%10s', 'foo') +# +# # good +# puts '%10s' % 'foo' +# @example EnforcedStyle: sprintf +# # bad +# puts format('%10s', 'foo') +# puts '%10s' % 'foo' +# +# # good +# puts sprintf('%10s', 'foo') +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#50 +class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#61 + def formatter(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#74 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#70 + def variable_argument?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#102 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#118 + def autocorrect_from_percent(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#132 + def autocorrect_to_percent(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string.rb#88 + def autocorrectable?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#145 + def format_single_parameter(arg); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#94 + def message(detected_style); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#98 + def method_name(style_name); end +end + +# Known conversion methods whose return value is not an array. +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#58 +RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#54 +RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#55 +RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use a consistent style for tokens within a format string. +# +# By default, all strings are evaluated. In some cases, this may be undesirable, +# as they could be used as arguments to a method that does not consider +# them to be tokens, but rather other identifiers or just part of the string. +# +# `AllowedMethods` or `AllowedPatterns` can be configured with in order to mark specific +# methods as always allowed, thereby avoiding an offense from the cop. By default, there +# are no allowed methods. +# +# Additionally, the cop can be made conservative by configuring it with +# `Mode: conservative` (default `aggressive`). In this mode, tokens (regardless +# of `EnforcedStyle`) are only considered if used in the format string argument to the +# methods `printf`, `sprintf`, `format` and `%`. +# +# NOTE: In `aggressive` mode, offenses are registered for all strings containing tokens, +# but autocorrection is only applied when the string appears in a known formatting context +# (`format`, `sprintf`, `printf`, or `%`). This is done in order to prevent false +# autocorrections for strings that are not actually format strings. +# +# NOTE: Tokens in the `unannotated` style (eg. `%s`) are always treated as if +# configured with `Conservative: true`. This is done in order to prevent false positives, +# because this format is very similar to encoded URLs or Date/Time formatting strings. +# +# It is allowed to contain unannotated token +# if the number of them is less than or equals to +# `MaxUnannotatedPlaceholdersAllowed`. +# +# @example AllowedMethods: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example AllowedMethods: [redirect] +# +# # good +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: ['redirect'] +# +# # good +# redirect('foo/%{bar_id}') +# @example AllowedPatterns: [] (default) +# +# # bad +# redirect('foo/%{bar_id}') +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%s', greeting: 'Hello') +# @example EnforcedStyle: template +# +# # bad +# format('%s', greeting: 'Hello') +# format('%s', 'Hello') +# +# # good +# format('%{greeting}', greeting: 'Hello') +# @example EnforcedStyle: unannotated +# +# # bad +# format('%s', greeting: 'Hello') +# format('%{greeting}', greeting: 'Hello') +# +# # good +# format('%s', 'Hello') +# @example MaxUnannotatedPlaceholdersAllowed: 0 +# +# # bad +# format('%06d', 10) +# format('%s %s.', 'Hello', 'world') +# +# # good +# format('%06d', number: 10) +# @example MaxUnannotatedPlaceholdersAllowed: 1 (default) +# +# # bad +# format('%s %s.', 'Hello', 'world') +# +# # good +# format('%06d', 10) +# @example Mode: aggressive (default), EnforcedStyle: annotated +# +# # bad +# "%{greeting}" +# foo("%{greeting}") +# +# # bad +# format("%{greeting}", greeting: 'Hello') +# printf("%{greeting}", greeting: 'Hello') +# sprintf("%{greeting}", greeting: 'Hello') +# "%{greeting}" % { greeting: 'Hello' } +# +# # good +# format("%s", greeting: 'Hello') +# printf("%s", greeting: 'Hello') +# sprintf("%s", greeting: 'Hello') +# "%s" % { greeting: 'Hello' } +# @example Mode: conservative, EnforcedStyle: annotated +# +# # good +# "%{greeting}" +# foo("%{greeting}") +# +# # bad +# format("%{greeting}", greeting: 'Hello') +# printf("%{greeting}", greeting: 'Hello') +# sprintf("%{greeting}", greeting: 'Hello') +# "%{greeting}" % { greeting: 'Hello' } +# +# # good +# format("%s", greeting: 'Hello') +# printf("%s", greeting: 'Hello') +# sprintf("%s", greeting: 'Hello') +# "%s" % { greeting: 'Hello' } +# +# source://rubocop//lib/rubocop/cop/style/format_string_token.rb#134 +class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#155 + def format_string_in_typical_context?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#140 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#222 + def allowed_string?(node, detected_style); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#280 + def allowed_unannotated?(detections); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#205 + def autocorrect_sequence(corrector, detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#173 + def check_sequence(node, detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#270 + def collect_detections(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#293 + def conservative?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#201 + def correctable_sequence?(detected_type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#194 + def format_string_context?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#162 + def format_string_token?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#289 + def max_unannotated_placeholders_allowed; end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#227 + def message(detected_style); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#232 + def message_text(style); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#182 + def register_offense(node, detected_sequence, token_range); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#247 + def str_contents(source_map); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#257 + def token_ranges(contents); end + + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#241 + def tokens(str_node, &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#166 + def use_allowed_method?(node); end +end + +# Helps you transition from mutable string literals +# to frozen string literals. +# of files to enable frozen string literals. Frozen string literals may be +# default in future Ruby. The comment will be added below a shebang and +# encoding comment. The frozen string literal comment is only valid in Ruby 2.3+. +# +# Note that the cop will accept files where the comment exists but is set +# to `false` instead of `true`. +# +# To require a blank line after this comment, please see +# `Layout/EmptyLineAfterMagicComment` cop. +# +# @example EnforcedStyle: always (default) +# # The `always` style will always add the frozen string literal comment +# # to a file, regardless of the Ruby version or if `freeze` or `<<` are +# # called on a string literal. +# # bad +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: true +# +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: false +# +# module Bar +# # ... +# end +# @example EnforcedStyle: always_true +# # The `always_true` style enforces that the frozen string literal +# # comment is set to `true`. This is a stricter option than `always` +# # and forces projects to use frozen string literals. +# # bad +# # frozen_string_literal: false +# +# module Baz +# # ... +# end +# +# # bad +# module Baz +# # ... +# end +# +# # good +# # frozen_string_literal: true +# +# module Bar +# # ... +# end +# @example EnforcedStyle: never +# # The `never` will enforce that the frozen string literal comment does +# # not exist in a file. +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# module Baz +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#84 +class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#99 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 + def disabled_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 + def enable_comment(corrector); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 + def ensure_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#126 + def ensure_enabled_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 + def ensure_no_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#215 + def following_comment; end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 + def frozen_string_literal_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#197 + def insert_comment(corrector); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 + def last_special_comment(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#207 + def line_range(line); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 + def missing_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 + def missing_true_offense(processed_source); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#211 + def preceding_comment; end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 + def remove_comment(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 + def unnecessary_comment_offense(processed_source); end +end + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#96 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_DISABLED = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#94 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#93 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_MISSING_TRUE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#95 +RuboCop::Cop::Style::FrozenStringLiteralComment::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#97 +RuboCop::Cop::Style::FrozenStringLiteralComment::SHEBANG = T.let(T.unsafe(nil), String) + +# Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`. +# `STDOUT/STDERR/STDIN` are constants, and while you can actually +# reassign (possibly to redirect some stream) constants in Ruby, you'll get +# an interpreter warning if you do so. +# +# Additionally, `$stdout/$stderr/$stdin` can safely be accessed in a Ractor because they +# are ractor-local, while `STDOUT/STDERR/STDIN` will raise `Ractor::IsolationError`. +# +# @example +# # bad +# STDOUT.puts('hello') +# +# hash = { out: STDOUT, key: value } +# +# def m(out = STDOUT) +# out.puts('hello') +# end +# +# # good +# $stdout.puts('hello') +# +# hash = { out: $stdout, key: value } +# +# def m(out = $stdout) +# out.puts('hello') +# end +# +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 +class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#45 + def const_to_gvar_assignment?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#49 + def on_const(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#73 + def gvar_name(const_name); end + + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#65 + def message(const_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#69 + def namespaced?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#40 +RuboCop::Cop::Style::GlobalStdStream::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#42 +RuboCop::Cop::Style::GlobalStdStream::STD_STREAMS = T.let(T.unsafe(nil), Set) + +# Looks for uses of global variables. Global variables introduce +# shared mutable state that makes code harder to test, debug, +# and reason about, since any part of the program can read or modify them. +# +# It does not report offenses for built-in global variables. +# Built-in global variables are allowed by default. Additionally +# users can allow additional variables via the AllowedVariables option. +# +# Note that backreferences like $1, $2, etc are not global variables. +# +# @example +# # bad +# $foo = 2 +# bar = $foo + 5 +# +# # good +# FOO = 2 +# foo = 2 +# $stdin.read +# +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#25 +class RuboCop::Cop::Style::GlobalVars < ::RuboCop::Cop::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#63 + def allowed_var?(global_var); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#75 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#67 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#71 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/global_vars.rb#59 + def user_vars; end +end + +# built-in global variables and their English aliases +# https://www.zenspider.com/ruby/quickref.html +# +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#30 +RuboCop::Cop::Style::GlobalVars::BUILT_IN_VARS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/global_vars.rb#26 +RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) + +# Use a guard clause instead of wrapping the code inside a conditional +# expression +# +# A condition with an `elsif` or `else` branch is allowed unless +# one of `return`, `break`, `next`, `raise`, or `fail` is used +# in the body of the conditional expression. +# +# NOTE: Autocorrect works in most cases except with if-else statements +# that contain logical operators such as `foo || raise('exception')` +# +# @example +# # bad +# def test +# if something +# work +# end +# end +# +# # good +# def test +# return unless something +# +# work +# end +# +# # also good +# def test +# work if something +# end +# +# # bad +# if something +# raise 'exception' +# else +# ok +# end +# +# # good +# raise 'exception' if something +# ok +# +# # bad +# define_method(:test) do +# if something +# work +# end +# end +# +# # good +# define_method(:test) do +# return unless something +# +# work +# end +# +# # also good +# define_method(:test) do +# work if something +# end +# @example AllowConsecutiveConditionals: false (default) +# # bad +# def test +# if foo? +# work +# end +# +# if bar? # <- reports an offense +# work +# end +# end +# @example AllowConsecutiveConditionals: true +# # good +# def test +# if foo? +# work +# end +# +# if bar? +# work +# end +# end +# +# # bad +# def test +# if foo? +# work +# end +# +# do_something +# +# if bar? # <- reports an offense +# work +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#103 +class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#121 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#112 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#119 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#129 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#127 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#126 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#278 + def accepted_form?(node, ending: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#288 + def accepted_if?(node, ending); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#315 + def allowed_consecutive_conditionals?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#268 + def and_or_guard_clause?(guard_clause); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#299 + def assigned_lvar_used_in_if_branch?(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#200 + def autocorrect(corrector, node, condition, replacement, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#238 + def autocorrect_heredoc_argument(corrector, node, heredoc_node, leave_branch, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#149 + def check_ending_body(body); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#160 + def check_ending_if(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170 + def consecutive_conditionals?(parent, node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#226 + def find_heredoc_argument(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#260 + def guard_clause_source(guard_clause); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#222 + def heredoc?(argument); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#251 + def range_of_branch_to_remove(node, guard); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#178 + def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#311 + def remove_whole_lines(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#273 + def too_long_for_single_line?(node, example); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#282 + def trivial?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#109 +RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) + +# Checks for presence or absence of braces around hash literal as a last +# array item depending on configuration. +# +# NOTE: This cop will ignore arrays where multiple items are all hashes, +# regardless of `EnforcedStyle`. +# +# [source,ruby] +# ---- +# [{ one: 1 }, { two: 2 }] +# ---- +# +# @example EnforcedStyle: braces (default) +# # bad +# [1, 2, one: 1, two: 2] +# +# # good +# [1, 2, { one: 1, two: 2 }] +# +# # bad +# [one: 1, two: 2] +# +# # good +# [{ one: 1, two: 2 }] +# @example EnforcedStyle: no_braces +# # bad +# [1, 2, { one: 1, two: 2 }] +# +# # good +# [1, 2, one: 1, two: 2] +# +# # bad +# [{ one: 1, two: 2 }] +# +# # good +# [one: 1, two: 2] +# +# source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#42 +class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#47 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#103 + def braces_style?; end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#79 + def check_braces(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#92 + def check_no_braces(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#61 + def containing_array(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#66 + def expected_braced_last_array_item?(array, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#74 + def explicit_array?(array); end + + # source://rubocop//lib/rubocop/cop/style/hash_as_last_array_item.rb#107 + def remove_last_element_trailing_comma(corrector, node); end +end + +# Checks the usage of pre-2.1 `Hash[args]` method of converting enumerables and +# sequences of values to hashes. +# +# Correction code from splat argument (`Hash[*ary]`) is not simply determined. For example, +# `Hash[*ary]` can be replaced with `ary.each_slice(2).to_h` but it will be complicated. +# So, `AllowSplatArgument` option is true by default to allow splat argument for simple code. +# +# @example +# # bad +# Hash[ary] +# +# # good +# ary.to_h +# +# # bad +# Hash[key1, value1, key2, value2] +# +# # good +# {key1 => value1, key2 => value2} +# @example AllowSplatArgument: false +# # bad +# Hash[*ary] +# @example AllowSplatArgument: true (default) +# # good +# Hash[*ary] +# +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 +class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 + def hash_from_array?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#145 + def allowed_splat_argument?; end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 + def args_to_hash(args); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#123 + def multi_argument(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#95 + def register_offense_for_hash(node, hash_argument); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#104 + def register_offense_for_zip_method(node, zip_method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#114 + def requires_parens?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#72 + def single_argument(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#89 + def use_zip_method_without_argument?(first_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 +RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 +RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 +RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 +RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 +RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `each_key` and `each_value` `Hash` methods. +# +# NOTE: If you have an array of two-element arrays, you can put +# parentheses around the block arguments to indicate that you're not +# working with a hash, and suppress RuboCop offenses. +# +# @example +# # bad +# hash.keys.each { |k| p k } +# hash.each { |k, unused_value| p k } +# +# # good +# hash.each_key { |k| p k } +# +# # bad +# hash.values.each { |v| p v } +# hash.each { |unused_key, v| p v } +# +# # good +# hash.each_value { |v| p v } +# @example AllowedReceivers: ['execute'] +# # good +# execute(sql).keys.each { |v| p v } +# execute(sql).values.each { |v| p v } +# +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#36 +class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers + include ::RuboCop::Cop::Lint::UnusedArgument + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#80 + def check_unused_block_args(node, key, value); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 + def each_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#61 + def hash_mutated?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 + def kv_each(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#56 + def kv_each_with_block_pass(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101 + def on_block_pass(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#77 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#76 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#184 + def check_argument(variable); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#208 + def correct_args(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#194 + def correct_implicit(node, corrector, method_name); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#199 + def correct_key_value_each(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 + def format_message(method_name, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#109 + def handleable?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#215 + def kv_range(outer_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#140 + def message(prefer, method_name, unused_code); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 + def register_each_args_offense(node, message, prefer, unused_range); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117 + def register_kv_offense(target, method); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#153 + def register_kv_with_block_pass_offense(node, target, method); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#171 + def root_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#128 + def unused_block_arg_exist?(node, block_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#164 + def use_array_converter_method_as_preceding?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 + def used?(arg); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43 +RuboCop::Cop::Style::HashEachMethods::ARRAY_CONVERTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#41 +RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42 +RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil), String) + +# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods +# that can be replaced with `Hash#except` method. +# +# This cop should only be enabled on Ruby version 3.0 or higher. +# (`Hash#except` was added in Ruby 3.0.) +# +# For safe detection, it is limited to commonly used string and symbol comparisons +# when using `==` or `!=`. +# +# This cop doesn't check for `Hash#delete_if` and `Hash#keep_if` because they +# modify the receiver. +# +# @example +# +# # bad +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.eql?(:bar) } +# +# # bad +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.except(:bar) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !k.in?(%i[bar]) } +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) } +# +# # bad +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !k.in?(%i[bar]) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.except(:bar) +# +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#61 +class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::HashSubset + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + private + + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#74 + def preferred_method_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#70 + def semantically_subset_method?(node); end +end + +# Use `Hash#dig` instead of chaining potentially null `fetch` calls. +# +# When `fetch(identifier, nil)` calls are chained on a hash, the expectation +# is that each step in the chain returns either `nil` or another hash, +# and in both cases, these can be simplified with a single call to `dig` with +# multiple arguments. +# +# If the 2nd parameter is `{}` or `Hash.new`, an offense will also be registered, +# as long as the final call in the chain is a nil value. If a non-nil value is given, +# the chain will not be registered as an offense, as the default value cannot be safely +# given with `dig`. +# +# NOTE: See `Style/DigChain` for replacing chains of `dig` calls with +# a single method call. +# +# @example +# # bad +# hash.fetch('foo', nil)&.fetch('bar', nil) +# +# # bad +# # earlier members of the chain can return `{}` as long as the final `fetch` +# # has `nil` as a default value +# hash.fetch('foo', {}).fetch('bar', nil) +# +# # good +# hash.dig('foo', 'bar') +# +# # ok - not handled by the cop since the final `fetch` value is non-nil +# hash.fetch('foo', {}).fetch('bar', {}) +# +# source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#40 +class RuboCop::Cop::Style::HashFetchChain < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#50 + def diggable?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#70 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#54 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#84 + def inspect_chain(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#74 + def last_fetch_non_nil?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#97 + def replacement(arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#44 +RuboCop::Cop::Style::HashFetchChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_fetch_chain.rb#45 +RuboCop::Cop::Style::HashFetchChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where `case-when` represents a simple 1:1 +# mapping and can be replaced with a hash lookup. +# +# @example MinBranchesCount: 3 (default) +# # bad +# case country +# when 'europe' +# 'http://eu.example.com' +# when 'america' +# 'http://us.example.com' +# when 'australia' +# 'http://au.example.com' +# end +# +# # good +# SITES = { +# 'europe' => 'http://eu.example.com', +# 'america' => 'http://us.example.com', +# 'australia' => 'http://au.example.com' +# } +# SITES[country] +# @example MinBranchesCount: 4 +# # good +# case country +# when 'europe' +# 'http://eu.example.com' +# when 'america' +# 'http://us.example.com' +# when 'australia' +# 'http://au.example.com' +# end +# +# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#39 +class RuboCop::Cop::Style::HashLikeCase < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MinBranchesCount + + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#45 + def hash_like_case?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#53 + def on_case(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#65 + def nodes_of_same_type?(nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#42 +RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of either `Hash#[]` or `Hash#fetch` for hash lookup. +# +# This cop can be configured to prefer either bracket-style (`[]`) +# or fetch-style lookup. It is disabled by default. +# +# When enforcing `fetch` style, only single-argument bracket access is flagged. +# When enforcing `brackets` style, only `fetch` calls with a single key +# argument are flagged (not those with default values or blocks). +# +# @example EnforcedStyle: brackets (default) +# # bad +# hash.fetch(key) +# +# # good +# hash[key] +# +# # good - fetch with default value is allowed +# hash.fetch(key, default) +# +# # good - fetch with block is allowed +# hash.fetch(key) { default } +# @example EnforcedStyle: fetch +# # bad +# hash[key] +# +# # good +# hash.fetch(key) +# +# source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#44 +class RuboCop::Cop::Style::HashLookupMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#64 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#53 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#85 + def correct_brackets_to_fetch(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#77 + def correct_fetch_to_brackets(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#68 + def offense_for_brackets?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#73 + def offense_for_fetch?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#48 +RuboCop::Cop::Style::HashLookupMethod::BRACKET_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#49 +RuboCop::Cop::Style::HashLookupMethod::FETCH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_lookup_method.rb#51 +RuboCop::Cop::Style::HashLookupMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods +# that can be replaced with `Hash#slice` method. +# +# This cop should only be enabled on Ruby version 2.5 or higher. +# (`Hash#slice` was added in Ruby 2.5.) +# +# For safe detection, it is limited to commonly used string and symbol comparisons +# when using `==` or `!=`. +# +# This cop doesn't check for `Hash#delete_if` and `Hash#keep_if` because they +# modify the receiver. +# +# @example +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.eql?(:bar) } +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| %i[bar].include?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.slice(:bar) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].exclude?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !k.in?(%i[bar]) } +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].exclude?(k) } +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !k.in?(%i[bar]) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.slice(:bar) +# +# source://rubocop//lib/rubocop/cop/style/hash_slice.rb#61 +class RuboCop::Cop::Style::HashSlice < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::HashSubset + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + private + + # source://rubocop//lib/rubocop/cop/style/hash_slice.rb#74 + def preferred_method_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_slice.rb#70 + def semantically_subset_method?(node); end +end + +# Checks hash literal syntax. +# +# It can enforce either the use of the class hash rocket syntax or +# the use of the newer Ruby 1.9 syntax (when applicable). +# +# A separate offense is registered for each problematic pair. +# +# The supported styles are: +# +# * ruby19 - forces use of the 1.9 syntax (e.g. `{a: 1}`) when hashes have +# all symbols for keys +# * hash_rockets - forces use of hash rockets for all hashes +# * no_mixed_keys - simply checks for hashes with mixed syntaxes +# * ruby19_no_mixed_keys - forces use of ruby 1.9 syntax and forbids mixed +# syntax hashes +# +# This cop has `EnforcedShorthandSyntax` option. +# It can enforce either the use of the explicit hash value syntax or +# the use of Ruby 3.1's hash value shorthand syntax. +# +# The supported styles are: +# +# * always - forces use of the 3.1 syntax (e.g. {foo:}) +# * never - forces use of explicit hash literal value +# * either - accepts both shorthand and explicit use of hash literal value +# * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash +# * either_consistent - accepts both shorthand and explicit use of hash literal value, +# but they must be consistent +# +# @example EnforcedShorthandSyntax: always +# +# # bad +# {foo: foo, bar: bar} +# +# # good +# {foo:, bar:} +# +# # good - allowed to mix syntaxes +# {foo:, bar: baz} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# @example EnforcedShorthandSyntax: either (default) +# +# # good +# {foo: foo, bar: bar} +# +# # good +# {foo: foo, bar:} +# +# # good +# {foo:, bar:} +# @example EnforcedShorthandSyntax: either_consistent +# +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# @example EnforcedShorthandSyntax: never +# +# # bad +# {foo:, bar:} +# +# # good +# {foo: foo, bar: bar} +# @example EnforcedStyle: hash_rockets +# # bad +# {a: 1, b: 2} +# {c: 1, 'd' => 5} +# +# # good +# {:a => 1, :b => 2} +# @example EnforcedStyle: no_mixed_keys +# # bad +# {:a => 1, b: 2} +# {c: 1, 'd' => 2} +# +# # good +# {:a => 1, :b => 2} +# {c: 1, d: 2} +# @example EnforcedStyle: ruby19 (default) +# # bad +# {:a => 2} +# {b: 1, :c => 2} +# +# # good +# {a: 2, b: 1} +# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol +# {d: 1, 'e' => 2} # technically not forbidden +# @example EnforcedStyle: ruby19_no_mixed_keys +# # bad +# {:a => 1, :b => 2} +# {c: 2, 'd' => 3} # should just use hash rockets +# +# # good +# {a: 1, b: 2} +# {:c => 3, 'd' => 4} +# +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#134 +class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::HashShorthandSyntax + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#189 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 + def hash_rockets_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#181 + def no_mixed_keys_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#145 + def on_hash(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 + def ruby19_check(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#171 + def ruby19_no_mixed_keys_check(pairs); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#221 + def acceptable_19_syntax_symbol?(sym_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 + def argument_without_space?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#200 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#284 + def autocorrect_hash_rockets(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#293 + def autocorrect_no_mixed_keys(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#257 + def autocorrect_ruby19(corrector, pair_node); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#242 + def check(pairs, delim, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#301 + def force_hash_rockets?(pairs); end + + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#270 + def range_for_autocorrect_ruby19(pair_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 + def sym_indices?(pairs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#214 + def word_symbol_pair?(pair); end +end + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#140 +RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#142 +RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 +RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#143 +RuboCop::Cop::Style::HashSyntax::NO_MIXED_KEYS_STYLES = T.let(T.unsafe(nil), Array) + +# Looks for uses of `+_.each_with_object({}) {...}+`, +# `+_.map {...}.to_h+`, and `+Hash[_.map {...}]+` that are actually just +# transforming the keys of a hash, and tries to use a simpler & faster +# call to `transform_keys` instead. +# It should only be enabled on Ruby version 2.5 or newer. +# (`transform_keys` was added in Ruby 2.5.) +# +# @example +# # bad +# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[foo(k)] = v } +# Hash[{a: 1, b: 2}.collect { |k, v| [foo(k), v] }] +# {a: 1, b: 2}.map { |k, v| [k.to_s, v] }.to_h +# {a: 1, b: 2}.to_h { |k, v| [k.to_s, v] } +# foo.to_h.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } +# foo.merge(bar).map { |k, v| [k.to_s, v] }.to_h +# +# # good +# {a: 1, b: 2}.transform_keys { |k| foo(k) } +# {a: 1, b: 2}.transform_keys { |k| k.to_s } +# foo.to_h.transform_keys { |k| k.to_sym } +# foo.merge(bar).transform_keys { |k| k.to_s } +# +# # Won't register an offense - receiver is not known to be a hash +# foo.bar.each_with_object({}) { |(k, v), h| h[k.to_s] = v } +# baz.map { |k, v| [k.to_s, v] }.to_h +# +# source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#38 +class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashTransformMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#46 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#58 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#71 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#83 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#94 + def extract_captures(match); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_keys.rb#99 + def new_method_name; end +end + +# Looks for uses of `+_.each_with_object({}) {...}+`, +# `+_.map {...}.to_h+`, and `+Hash[_.map {...}]+` that are actually just +# transforming the values of a hash, and tries to use a simpler & faster +# call to `transform_values` instead. +# +# @example +# # bad +# {a: 1, b: 2}.each_with_object({}) { |(k, v), h| h[k] = foo(v) } +# Hash[{a: 1, b: 2}.collect { |k, v| [k, foo(v)] }] +# {a: 1, b: 2}.map { |k, v| [k, v * v] }.to_h +# {a: 1, b: 2}.to_h { |k, v| [k, v * v] } +# foo.to_h.each_with_object({}) { |(k, v), h| h[k] = foo(v) } +# foo.merge(bar).map { |k, v| [k, v.to_s] }.to_h +# +# # good +# {a: 1, b: 2}.transform_values { |v| foo(v) } +# {a: 1, b: 2}.transform_values { |v| v * v } +# foo.to_h.transform_values { |v| foo(v) } +# foo.merge(bar).transform_values { |v| v.to_s } +# +# # Won't register an offense - receiver is not known to be a hash +# foo.bar.each_with_object({}) { |(k, v), h| h[k] = v.to_s } +# baz.map { |k, v| [k, v.to_s] }.to_h +# +# source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#36 +class RuboCop::Cop::Style::HashTransformValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::HashTransformMethod + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#44 + def on_bad_each_with_object(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#56 + def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#69 + def on_bad_map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#81 + def on_bad_to_h(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#92 + def extract_captures(match); end + + # source://rubocop//lib/rubocop/cop/style/hash_transform_values.rb#97 + def new_method_name; end +end + +# Checks for identical expressions at the beginning or end of +# each branch of a conditional expression. Such expressions should normally +# be placed outside the conditional expression - before or after it. +# +# NOTE: The cop is poorly named and some people might think that it actually +# checks for duplicated conditional branches. The name will probably be changed +# in a future major RuboCop release. +# +# @example +# # bad +# if condition +# do_x +# do_z +# else +# do_y +# do_z +# end +# +# # good +# if condition +# do_x +# else +# do_y +# end +# do_z +# +# # bad +# if condition +# do_z +# do_x +# else +# do_z +# do_y +# end +# +# # good +# do_z +# if condition +# do_x +# else +# do_y +# end +# +# # bad +# case foo +# when 1 +# do_x +# when 2 +# do_x +# else +# do_x +# end +# +# # good +# case foo +# when 1 +# do_x +# do_y +# when 2 +# # nothing +# else +# do_x +# do_z +# end +# +# # bad +# case foo +# in 1 +# do_x +# in 2 +# do_x +# else +# do_x +# end +# +# # good +# case foo +# in 1 +# do_x +# do_y +# in 2 +# # nothing +# else +# do_x +# do_z +# end +# +# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#110 +class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#123 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#130 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#116 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#184 + def assignable_condition_value(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 + def check_branches(node, branches); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 + def check_expressions(node, expressions, insert_position); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#218 + def correct_assignment(corrector, node, expression, insert_position); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#228 + def correct_no_assignment(corrector, node, expression, insert_position); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173 + def duplicated_expressions?(node, expressions); end + + # `elsif` branches show up in the if node as nested `else` branches. We + # need to recursively iterate over all `else` branches. + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#252 + def expand_elses(branch); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#267 + def head(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#236 + def last_child_of_parent?(node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#246 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#242 + def single_child_branch?(branch_node); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#263 + def tail(node); end +end + +# source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#114 +RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), String) + +# Corrector to correct conditional assignment in `if` statements. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#565 +class RuboCop::Cop::Style::IfCorrector + extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper + + class << self + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#570 + def correct(corrector, cop, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#574 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#588 + def extract_tail_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#595 + def move_branch_inside_condition(corrector, branch, condition, assignment, column); end + end +end + +# If the `else` branch of a conditional consists solely of an `if` node, +# it can be combined with the `else` to become an `elsif`. +# This helps to keep the nesting level from getting too deep. +# +# @example +# # bad +# if condition_a +# action_a +# else +# if condition_b +# action_b +# else +# action_c +# end +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# else +# action_c +# end +# @example AllowIfModifier: false (default) +# # bad +# if condition_a +# action_a +# else +# action_b if condition_b +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# end +# @example AllowIfModifier: true +# # good +# if condition_a +# action_a +# else +# action_b if condition_b +# end +# +# # good +# if condition_a +# action_a +# elsif condition_b +# action_b +# end +# +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#61 +class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#68 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 + def allow_if_modifier?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 + def allow_if_modifier_in_else_branch?(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#87 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#111 + def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#102 + def correct_to_elsif_from_modifier_form(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 + def find_end_range(node); end + + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#138 + def if_condition_range(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#127 + def then?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#65 +RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for `if` and `unless` statements that would fit on one line if +# written as modifier `if`/`unless`. The cop also checks for modifier +# `if`/`unless` lines that exceed the maximum line length. +# +# The maximum line length is configured in the `Layout/LineLength` +# cop. The tab size is configured in the `IndentationWidth` of the +# `Layout/IndentationStyle` cop. +# +# One-line pattern matching is always allowed. To ensure that there are few cases +# where the match variable is not used, and to prevent oversights. The variable `x` +# becomes undefined and raises `NameError` when the following example is changed to +# the modifier form: +# +# [source,ruby] +# ---- +# if [42] in [x] +# x # `x` is undefined when using modifier form. +# end +# ---- +# +# The code `def method_name = body if condition` is considered a bad case by +# `Style/AmbiguousEndlessMethodDefinition` cop. So, to respect the user's intention to use +# an endless method definition in the `if` body, the following code is allowed: +# +# [source,ruby] +# ---- +# if condition +# def method_name = body +# end +# ---- +# +# NOTE: It is allowed when `defined?` argument has an undefined value, +# because using the modifier form causes the following incompatibility: +# +# [source,ruby] +# ---- +# unless defined?(undefined_foo) +# undefined_foo = 'default_value' +# end +# undefined_foo # => 'default_value' +# +# undefined_bar = 'default_value' unless defined?(undefined_bar) +# undefined_bar # => nil +# ---- +# +# @example +# # bad +# if condition +# do_stuff(bar) +# end +# +# unless qux.empty? +# Foo.do_something +# end +# +# do_something_with_a_long_name(arg) if long_condition_that_prevents_code_fit_on_single_line +# +# # good +# do_stuff(bar) if condition +# Foo.do_something unless qux.empty? +# +# if long_condition_that_prevents_code_fit_on_single_line +# do_something_with_a_long_name(arg) +# end +# +# if short_condition # a long comment that makes it too long if it were just a single line +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#75 +class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::StatementModifier + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#93 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#190 + def allowed_patterns; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#287 + def another_statement_on_same_line?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#151 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#277 + def collection_from_ancestor(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#341 + def comment_on_node_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#125 + def defined_argument_is_undefined?(if_node, defined_node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#117 + def defined_nodes(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#113 + def endless_method?(body); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#328 + def extract_heredoc_from(last_argument); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#270 + def find_containing_collection(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#234 + def line_length_enabled_at_line?(line); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#143 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#247 + def multiline_inside_collection?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#238 + def named_capture_in_condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#242 + def non_eligible_node?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#283 + def non_simple_if_unless?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#135 + def pattern_matching_nodes(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#345 + def remove_comment(corrector, _node, comment); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#335 + def remove_heredoc(corrector, heredoc); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#160 + def replacement_for_modifier_form(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#266 + def shares_line_with?(inner, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#254 + def sibling_if_shares_line?(child, node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#321 + def to_modifier_form_with_move_comment(node, indentation, comment); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#301 + def to_normal_form(node, indentation); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#309 + def to_normal_form_with_heredoc(node, indentation, heredoc); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#184 + def too_long_due_to_comment_after_modifier?(node, comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#179 + def too_long_due_to_modifier?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#217 + def too_long_line_based_on_allow_cop_directives?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#225 + def too_long_line_based_on_allow_uri?(line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#208 + def too_long_line_based_on_config?(range, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#195 + def too_long_single_line?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#259 + def unwrap_begin(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#88 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#83 +RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_MODIFIER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#86 +RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), String) + +# Checks for if and unless statements used as modifiers of other if or +# unless statements. +# +# @example +# +# # bad +# tired? ? 'stop' : 'go faster' if running? +# +# # bad +# if tired? +# "please stop" +# else +# "keep going" +# end if running? +# +# # good +# if running? +# tired? ? 'stop' : 'go faster' +# end +# +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#25 +class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#32 + def on_if(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb#29 +RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `if` with boolean literal branches. +# It checks only conditions to return boolean value (`true` or `false`) for safe detection. +# The conditions to be checked are comparison methods, predicate methods, and +# double negation (!!). +# `nonzero?` method is allowed by default. +# These are customizable with `AllowedMethods` option. +# +# This cop targets only ``if``s with a single `elsif` or `else` branch. The following +# code will be allowed, because it has two `elsif` branches: +# +# [source,ruby] +# ---- +# if foo +# true +# elsif bar > baz +# true +# elsif qux > quux # Single `elsif` is warned, but two or more `elsif`s are not. +# true +# else +# false +# end +# ---- +# +# @example +# # bad +# if foo == bar +# true +# else +# false +# end +# +# # bad +# foo == bar ? true : false +# +# # good +# foo == bar +# +# # bad +# if foo.do_something? +# true +# else +# false +# end +# +# # good (but potentially an unsafe correction) +# foo.do_something? +# @example AllowedMethods: ['infinite?', 'nonzero?'] (default) +# # good +# num.infinite? ? true : false +# +# # good +# num.nonzero? ? true : false +# +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#64 +class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76 + def double_negative?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#72 + def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#78 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#138 + def assume_boolean_value?(condition); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#116 + def message(node, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#98 + def multiple_elsif?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#104 + def offense_range_with_keyword(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#155 + def opposite_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#145 + def replacement_condition(node, condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#160 + def require_parentheses?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#124 + def return_boolean_value?(condition); end +end + +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#68 +RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69 +RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) + +# Checks for uses of semicolon in if statements. +# +# @example +# +# # bad +# result = if some_condition; something else another_thing end +# +# # good +# result = some_condition ? something : another_thing +# +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#16 +class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#55 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#104 + def build_else_branch(second_condition); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#95 + def build_expression(expr); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#86 + def correct_elsif(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#42 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#77 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#124 + def require_argument_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#63 + def require_newline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#67 + def use_masgn_or_block_in_branches?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#73 + def use_return_with_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 +RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 +RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 +RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) + +# Checks for `raise` or `fail` statements which do not specify an +# explicit exception class. (This raises a `RuntimeError`. Some projects +# might prefer to use exception classes which more precisely identify the +# nature of the error.) +# +# @example +# # bad +# raise 'Error message here' +# +# # good +# raise ArgumentError, 'Error message here' +# +# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#17 +class RuboCop::Cop::Style::ImplicitRuntimeError < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#23 + def implicit_runtime_error_raise_or_fail(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#26 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#18 +RuboCop::Cop::Style::ImplicitRuntimeError::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/implicit_runtime_error.rb#20 +RuboCop::Cop::Style::ImplicitRuntimeError::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `in;` uses in `case` expressions. +# +# @example +# # bad +# case expression +# in pattern_a; foo +# in pattern_b; bar +# end +# +# # good +# case expression +# in pattern_a then foo +# in pattern_b then bar +# end +# +# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#21 +class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#29 + def on_in_pattern(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 + def alternative_pattern_source(pattern); end + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 + def collect_alternative_patterns(pattern); end +end + +# source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 +RuboCop::Cop::Style::InPatternThen::MSG = T.let(T.unsafe(nil), String) + +# Use `Kernel#loop` for infinite loops. +# +# @example +# # bad +# while true +# work +# end +# +# # good +# loop do +# work +# end +# +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#23 +class RuboCop::Cop::Style::InfiniteLoop < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#35 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#44 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#49 + def on_until_post(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#40 + def on_while(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#48 + def on_while_post(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#84 + def assigned_before_loop?(var, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#80 + def assigned_inside_loop?(var, range); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#103 + def modifier_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#114 + def non_modifier_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#89 + def referenced_after_loop?(var, range); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#94 + def replace_begin_end_with_modifier(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#99 + def replace_source(corrector, range, replacement); end + + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#53 + def while_or_until(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#31 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#27 +RuboCop::Cop::Style::InfiniteLoop::LEADING_SPACE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/infinite_loop.rb#29 +RuboCop::Cop::Style::InfiniteLoop::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing inline comments. Inline comments can +# make lines harder to read, especially when they are long. +# Placing comments on their own line above the code they +# describe is often clearer. +# +# @example +# +# # good +# foo.each do |f| +# # Standalone comment +# f.bar +# end +# +# # bad +# foo.each do |f| +# f.bar # Trailing inline comment +# end +# +# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#23 +class RuboCop::Cop::Style::InlineComment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/inline_comment.rb#26 + def on_new_investigation; end +end + +# source://rubocop//lib/rubocop/cop/style/inline_comment.rb#24 +RuboCop::Cop::Style::InlineComment::MSG = T.let(T.unsafe(nil), String) + +# Checks for usages of not (`not` or `!`) called on a method +# when an inverse of that method can be used instead. +# +# Methods that can be inverted by a not (`not` or `!`) should be defined +# in `InverseMethods`. +# +# Methods that are inverted by inverting the return +# of the block that is passed to the method should be defined in +# `InverseBlocks`. +# +# @example +# # bad +# !foo.none? +# !foo.any? { |f| f.even? } +# !foo.blank? +# !(foo == bar) +# foo.select { |f| !f.even? } +# foo.reject { |f| f != 7 } +# +# # good +# foo.none? +# foo.blank? +# foo.any? { |f| f.even? } +# foo != bar +# foo == bar +# !!('foo' =~ /^\w+$/) +# !(foo.class < Numeric) # Checking class hierarchy is allowed +# # Blocks with guard clauses are ignored: +# foo.select do |f| +# next if f.zero? +# f != 1 +# end +# +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#43 +class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#70 + def inverse_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 + def inverse_candidate?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#90 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#109 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#108 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180 + def camel_case_constant?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#122 + def correct_inverse_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#113 + def correct_inverse_method(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#129 + def correct_inverse_selector(block, corrector); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184 + def dot_range(loc); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#163 + def end_parentheses(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#151 + def inverse_blocks; end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#146 + def inverse_methods; end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#194 + def message(method, inverse); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#155 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#159 + def not_to_receiver(node, method_call); end + + # When comparing classes, `!(Integer < Numeric)` is not the same as + # `Integer > Numeric`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#175 + def possible_class_hierarchy_check?(lhs, rhs, method); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#188 + def remove_end_parenthesis(corrector, node, method, method_call); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#167 + def safe_navigation_incompatible?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#56 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#52 +RuboCop::Cop::Style::InverseMethods::CAMEL_CASE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#48 +RuboCop::Cop::Style::InverseMethods::CLASS_COMPARISON_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#50 +RuboCop::Cop::Style::InverseMethods::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#47 +RuboCop::Cop::Style::InverseMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#51 +RuboCop::Cop::Style::InverseMethods::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#54 +RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#49 +RuboCop::Cop::Style::InverseMethods::SAFE_NAVIGATION_INCOMPATIBLE_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for usages of `unless` which can be replaced by `if` with inverted condition. +# Code without `unless` is easier to read, but that is subjective, so this cop +# is disabled by default. +# +# Methods that can be inverted should be defined in `InverseMethods`. Note that +# the relationship of inverse methods needs to be defined in both directions. +# For example, +# +# [source,yaml] +# ---- +# InverseMethods: +# :!=: :== +# :even?: :odd? +# :odd?: :even? +# ---- +# +# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). +# +# @example +# # bad (simple condition) +# foo unless !bar +# foo unless x != y +# foo unless x >= 10 +# foo unless x.even? +# foo unless odd? +# +# # good +# foo if bar +# foo if x == y +# foo if x < 10 +# foo if x.odd? +# foo if even? +# +# # bad (complex condition) +# foo unless x != y || x.even? +# +# # good +# foo if x == y && x.odd? +# +# # good (if) +# foo if !condition +# +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#53 +class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#58 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#133 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#146 + def autocorrect_send_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#90 + def inheritance_check?(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#154 + def inverse_methods; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#75 + def invertible?(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#96 + def preferred_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#126 + def preferred_logical_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104 + def preferred_send_condition(node); end +end + +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 +RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) + +# Checks for hardcoded IP addresses, which can make code +# brittle. IP addresses are likely to need to be changed when code +# is deployed to a different server or environment, which may break +# a deployment if forgotten. Prefer setting IP addresses in ENV or +# other configuration. +# +# @example +# +# # bad +# ip_address = '127.59.241.29' +# +# # good +# ip_address = ENV['DEPLOYMENT_IP_ADDRESS'] +# +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#21 +class RuboCop::Cop::Style::IpAddresses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringHelp + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#46 + def correct_style_detected; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#27 + def offense?(node); end + + # Dummy implementation of method in ConfigurableEnforcedStyle that is + # called from StringHelp. + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#42 + def opposite_style_detected; end + + private + + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#50 + def allowed_addresses; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#55 + def potential_ip?(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#68 + def starts_with_hex_or_colon?(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#64 + def too_long?(str); end +end + +# IPv4-mapped IPv6 is the longest +# +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#24 +RuboCop::Cop::Style::IpAddresses::IPV6_MAX_SIZE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/ip_addresses.rb#25 +RuboCop::Cop::Style::IpAddresses::MSG = T.let(T.unsafe(nil), String) + +# Checks for local variables and method parameters named `it`, +# where `it` can refer to the first anonymous parameter as of Ruby 3.4. +# Use a meaningful variable name instead. +# +# NOTE: Although Ruby allows reassigning `it` in these cases, it could +# cause confusion if `it` is used as a block parameter elsewhere. +# +# @example +# # bad +# it = 5 +# +# # good +# var = 5 +# +# # bad +# def foo(it) +# end +# +# # good +# def foo(arg) +# end +# +# # bad +# def foo(it = 5) +# end +# +# # good +# def foo(arg = 5) +# end +# +# # bad +# def foo(*it) +# end +# +# # good +# def foo(*args) +# end +# +# # bad +# def foo(it:) +# end +# +# # good +# def foo(arg:) +# end +# +# # bad +# def foo(it: 5) +# end +# +# # good +# def foo(arg: 5) +# end +# +# # bad +# def foo(**it) +# end +# +# # good +# def foo(**kwargs) +# end +# +# # bad +# def foo(&it) +# end +# +# # good +# def foo(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/it_assignment.rb#75 +class RuboCop::Cop::Style::ItAssignment < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#83 + def on_arg(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#86 + def on_blockarg(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#87 + def on_kwarg(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#88 + def on_kwoptarg(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#89 + def on_kwrestarg(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#78 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#84 + def on_optarg(node); end + + # source://rubocop//lib/rubocop/cop/style/it_assignment.rb#85 + def on_restarg(node); end +end + +# source://rubocop//lib/rubocop/cop/style/it_assignment.rb#76 +RuboCop::Cop::Style::ItAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for blocks with one argument where `it` block parameter can be used. +# +# It provides four `EnforcedStyle` options: +# +# 1. `allow_single_line` (default) ... Always uses the `it` block parameter in a single line. +# 2. `only_numbered_parameters` ... Detects only numbered block parameters. +# 3. `always` ... Always uses the `it` block parameter. +# 4. `disallow` ... Disallows the `it` block parameter. +# +# A single numbered parameter is detected when `allow_single_line`, +# `only_numbered_parameters`, or `always`. +# +# @example EnforcedStyle: allow_single_line (default) +# # bad +# block do +# do_something(it) +# end +# block { do_something(_1) } +# +# # good +# block { do_something(it) } +# block { |named_param| do_something(named_param) } +# @example EnforcedStyle: always +# # bad +# block { do_something(_1) } +# block { |named_param| do_something(named_param) } +# +# # good +# block { do_something(it) } +# @example EnforcedStyle: disallow +# # bad +# block { do_something(it) } +# +# # good +# block { do_something(_1) } +# block { |named_param| do_something(named_param) } +# @example EnforcedStyle: only_numbered_parameters +# # bad +# block { do_something(_1) } +# +# # good +# block { do_something(it) } +# block { |named_param| do_something(named_param) } +# +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#53 +class RuboCop::Cop::Style::ItBlockParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#64 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#94 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#81 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#111 + def find_block_variables(node, block_argument_name); end +end + +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#59 +RuboCop::Cop::Style::ItBlockParameter::MSG_AVOID_IT_PARAMETER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#60 +RuboCop::Cop::Style::ItBlockParameter::MSG_AVOID_IT_PARAMETER_MULTILINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/it_block_parameter.rb#58 +RuboCop::Cop::Style::ItBlockParameter::MSG_USE_IT_PARAMETER = T.let(T.unsafe(nil), String) + +# When passing an existing hash as keyword arguments, provide additional arguments +# directly rather than using `merge`. +# +# Providing arguments directly is more performant than using `merge`, and +# also leads to shorter and simpler code. +# +# @example +# # bad +# some_method(**opts.merge(foo: true)) +# some_method(**opts.merge(other_opts)) +# +# # good +# some_method(**opts, foo: true) +# some_method(**opts, **other_opts) +# +# source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#21 +class RuboCop::Cop::Style::KeywordArgumentsMerging < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#27 + def merge_kwargs?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#36 + def on_kwsplat(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#48 + def autocorrect(corrector, kwsplat_node, hash_node, other_hash_node); end +end + +# source://rubocop//lib/rubocop/cop/style/keyword_arguments_merging.rb#24 +RuboCop::Cop::Style::KeywordArgumentsMerging::MSG = T.let(T.unsafe(nil), String) + +# Enforces that optional keyword parameters are placed at the +# end of the parameters list. +# +# This improves readability, because when looking through the source, +# it is expected to find required parameters at the beginning of parameters list +# and optional parameters at the end. +# +# @example +# # bad +# def some_method(first: false, second:, third: 10) +# # body omitted +# end +# +# # good +# def some_method(second:, first: false, third: 10) +# # body omitted +# end +# +# # bad +# do_something do |first: false, second:, third: 10| +# # body omitted +# end +# +# # good +# do_something do |second:, first: false, third: 10| +# # body omitted +# end +# +# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#34 +class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#40 + def on_kwoptarg(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#64 + def append_newline_to_last_kwoptarg(arguments, corrector); end + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#55 + def autocorrect(corrector, node, defining_node, kwarg_nodes); end + + # source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#72 + def remove_kwargs(kwarg_nodes, corrector); end +end + +# source://rubocop//lib/rubocop/cop/style/keyword_parameters_order.rb#38 +RuboCop::Cop::Style::KeywordParametersOrder::MSG = T.let(T.unsafe(nil), String) + +# (by default) checks for uses of the lambda literal syntax for +# single line lambdas, and the method call syntax for multiline lambdas. +# It is configurable to enforce one of the styles for both single line +# and multiline lambdas as well. +# +# @example EnforcedStyle: lambda +# # bad +# f = ->(x) { x } +# f = ->(x) do +# x +# end +# +# # good +# f = lambda { |x| x } +# f = lambda do |x| +# x +# end +# @example EnforcedStyle: line_count_dependent (default) +# # bad +# f = lambda { |x| x } +# f = ->(x) do +# x +# end +# +# # good +# f = ->(x) { x } +# f = lambda do |x| +# x +# end +# @example EnforcedStyle: literal +# # bad +# f = lambda { |x| x } +# f = lambda do |x| +# x +# end +# +# # good +# f = ->(x) { x } +# f = ->(x) do +# x +# end +# +# source://rubocop//lib/rubocop/cop/style/lambda.rb#49 +class RuboCop::Cop::Style::Lambda < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#64 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#80 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#79 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#116 + def arguments_with_whitespace(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#105 + def autocorrect_method_to_literal(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#120 + def lambda_arg_string(args); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#90 + def message(node, selector); end + + # source://rubocop//lib/rubocop/cop/style/lambda.rb#96 + def message_line_modifier(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda.rb#84 + def offending_selector?(node, selector); end +end + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#53 +RuboCop::Cop::Style::Lambda::LITERAL_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#54 +RuboCop::Cop::Style::Lambda::METHOD_MESSAGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda.rb#56 +RuboCop::Cop::Style::Lambda::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) + +# Checks for use of the lambda.(args) syntax. +# +# @example EnforcedStyle: braces +# # bad +# lambda.call(x, y) +# +# # good +# lambda.(x, y) +# @example EnforcedStyle: call (default) +# # bad +# lambda.(x, y) +# +# # good +# lambda.call(x, y) +# +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#21 +class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#28 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#73 + def explicit_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#69 + def implicit_style?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 + def prefer(node); end +end + +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#25 +RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for string literal concatenation at +# the end of a line. +# +# @example +# +# # bad +# some_str = 'ala' + +# 'bala' +# +# some_str = 'ala' << +# 'bala' +# +# # good +# some_str = 'ala' \ +# 'bala' +# +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#35 +class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#51 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#80 + def autocorrect(corrector, operator_range); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#57 + def check_token_set(index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#107 + def eligible_next_successor?(next_successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#103 + def eligible_operator?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#111 + def eligible_predecessor?(predecessor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#99 + def eligible_successor?(successor); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#93 + def eligible_token_set?(predecessor, operator, successor); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#72 + def register_offense(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#130 + def standard_string_literal?(token); end + + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#115 + def token_after_last_string(successor, base_index); end + + class << self + # source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#47 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#42 +RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_BEGIN_TOKEN = T.let(T.unsafe(nil), Symbol) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#43 +RuboCop::Cop::Style::LineEndConcatenation::COMPLEX_STRING_END_TOKEN = T.let(T.unsafe(nil), Symbol) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#40 +RuboCop::Cop::Style::LineEndConcatenation::CONCAT_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#44 +RuboCop::Cop::Style::LineEndConcatenation::HIGH_PRECEDENCE_OP_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#39 +RuboCop::Cop::Style::LineEndConcatenation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#45 +RuboCop::Cop::Style::LineEndConcatenation::QUOTE_DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/line_end_concatenation.rb#41 +RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.unsafe(nil), Symbol) + +# Ensures magic comments are written consistently throughout your code base. +# Looks for discrepancies in separators (`-` vs `_`) and capitalization for +# both magic comment directives and values. +# +# Required capitalization can be set with the `DirectiveCapitalization` and +# `ValueCapitalization` configuration keys. +# +# NOTE: If one of these configuration is set to nil, any capitalization is allowed. +# +# @example DirectiveCapitalization: lowercase (default) +# # bad +# # FROZEN-STRING-LITERAL: true +# +# # good +# # frozen-string-literal: true +# @example DirectiveCapitalization: nil +# # any capitalization is accepted +# +# # good +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example DirectiveCapitalization: uppercase +# # bad +# # frozen-string-literal: true +# +# # good +# # FROZEN-STRING-LITERAL: true +# @example EnforcedStyle: kebab_case +# # The `kebab_case` style will enforce that the frozen string literal +# # comment is written in kebab case. (Words separated by hyphens) +# # bad +# # frozen_string_literal: true +# +# module Baz +# # ... +# end +# +# # good +# # frozen-string-literal: true +# +# module Baz +# # ... +# end +# @example EnforcedStyle: snake_case (default) +# # The `snake_case` style will enforce that the frozen string literal +# # comment is written in snake case. (Words separated by underscores) +# # bad +# # frozen-string-literal: true +# +# module Bar +# # ... +# end +# +# # good +# # frozen_string_literal: false +# +# module Bar +# # ... +# end +# @example ValueCapitalization: lowercase +# # when a value is not given, any capitalization is accepted +# +# # bad +# # frozen-string-literal: TRUE +# +# # good +# # frozen-string-literal: TRUE +# @example ValueCapitalization: nil (default) +# # any capitalization is accepted +# +# # good +# # frozen-string-literal: true +# +# # good +# # frozen-string-literal: TRUE +# @example ValueCapitalization: uppercase +# # bad +# # frozen-string-literal: true +# +# # good +# # frozen-string-literal: TRUE +# +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 +class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#156 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#241 + def correct_separator; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#279 + def directive_capitalization; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#197 + def directive_offends?(directive); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#233 + def expected_style; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#183 + def find_issues(comment); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#207 + def fix_directives(issues); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#221 + def fix_values(issues); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#245 + def incorrect_separator?(text); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#173 + def leading_comment_lines; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#275 + def line_range(line); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#167 + def magic_comments; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#202 + def register_offenses(issues); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#264 + def replace_capitalization(text, style); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#260 + def replace_separator(text); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#301 + def supported_capitalizations; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#295 + def valid_capitalization?(style); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#287 + def value_capitalization; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#249 + def wrong_capitalization?(text, expected_case); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#237 + def wrong_separator; end +end + +# Value object to extract source ranges for the different parts of a magic comment +# +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 +class RuboCop::Cop::Style::MagicCommentFormat::CommentRange + extend ::RuboCop::SimpleForwardable + + # @return [CommentRange] a new instance of CommentRange + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#119 + def initialize(comment); end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#117 + def comment; end + + # A magic comment can contain one directive (normal style) or + # multiple directives (emacs style) + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 + def directives; end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#116 + def loc(*_arg0, **_arg1, &_arg2); end + + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#116 + def text(*_arg0, **_arg1, &_arg2); end + + # A magic comment can contain one value (normal style) or + # multiple directives (emacs style) + # + # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#141 + def values; end +end + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#110 +RuboCop::Cop::Style::MagicCommentFormat::CommentRange::DIRECTIVE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#114 +RuboCop::Cop::Style::MagicCommentFormat::CommentRange::VALUE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#102 +RuboCop::Cop::Style::MagicCommentFormat::KEBAB_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#103 +RuboCop::Cop::Style::MagicCommentFormat::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#104 +RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#101 +RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String) + +# Prefer `select` or `reject` over `map { ... }.compact`. +# This cop also handles `filter_map { ... }`, similar to `map { ... }.compact`. +# +# @example +# +# # bad +# array.map { |e| some_condition? ? e : next }.compact +# +# # bad +# array.filter_map { |e| some_condition? ? e : next } +# +# # bad +# array.map do |e| +# if some_condition? +# e +# else +# next +# end +# end.compact +# +# # bad +# array.map do |e| +# next if some_condition? +# +# e +# end.compact +# +# # bad +# array.map do |e| +# e if some_condition? +# end.compact +# +# # good +# array.select { |e| some_condition? } +# +# # good +# array.reject { |e| some_condition? } +# +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#44 +class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#51 + def conditional_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#148 + def current(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#162 + def filter_map_range(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 + def inspect(node, block_argument_node, condition_node, return_value_node, range); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#158 + def map_with_compact_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#114 + def returns_block_argument?(block_argument_node, return_value_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#118 + def truthy_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#138 + def truthy_branch_for_guard?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#128 + def truthy_branch_for_if?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#47 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#48 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usages of `each` with `<<`, `push`, or `append` which +# can be replaced by `map`. +# +# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`, +# this cop uses the specified method for replacement. +# +# NOTE: The return value of `Enumerable#each` is `self`, whereas the +# return value of `Enumerable#map` is an `Array`. They are not autocorrected +# when a return value could be used because these types differ. +# +# NOTE: It only detects when the mapping destination is either: +# * a local variable initialized as an empty array and referred to only by the +# pushing operation; +# * or, if it is the single block argument to a `[].tap` block. +# This is because, if not, it's challenging to statically guarantee that the +# mapping destination variable remains an empty array: +# +# [source,ruby] +# ---- +# ret = [] +# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret` +# +# dest = [] +# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest` +# ---- +# +# @example +# # bad +# dest = [] +# src.each { |e| dest << e * 2 } +# dest +# +# # good +# dest = src.map { |e| e * 2 } +# +# # bad +# [].tap do |dest| +# src.each { |e| dest << e * 2 } +# end +# +# # good +# dest = src.map { |e| e * 2 } +# +# # good - contains another operation +# dest = [] +# src.each { |e| dest << e * 2; puts e } +# dest +# +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#60 +class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#109 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#72 + def each_block_with_push?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#81 + def empty_array_asgn?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#93 + def empty_array_tap(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#103 + def lvar_ref?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#113 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#130 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#129 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#67 + def suitable_argument_node?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#214 + def correct_push_node(corrector, push_node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#224 + def correct_return_value_handling(corrector, block, dest_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#157 + def dest_used_only_for_mapping?(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#151 + def find_closest_assignment(block, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#134 + def find_dest_var(block); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#182 + def new_method_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#142 + def offending_empty_array_tap?(node, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#165 + def register_offense(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#201 + def remove_assignment(corrector, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#208 + def remove_tap(corrector, node, block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#188 + def return_value_used?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#105 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#64 +RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) + +# Checks for `map { |x| x.to_s }.join` and similar calls where the +# `map` is redundant because `Array#join` implicitly calls `#to_s` on +# each element. +# +# @example +# # bad +# array.map(&:to_s).join(', ') +# +# # bad +# array.map { |x| x.to_s }.join(', ') +# +# # bad +# array.collect(&:to_s).join +# +# # good +# array.join(', ') +# +# # good +# array.join +# +# source://rubocop//lib/rubocop/cop/style/map_join.rb#32 +class RuboCop::Cop::Style::MapJoin < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # map { |x| x.to_s }.join(...) + # + # source://rubocop//lib/rubocop/cop/style/map_join.rb#49 + def map_to_s_block_join?(param0 = T.unsafe(nil)); end + + # map { it.to_s }.join(...) + # + # source://rubocop//lib/rubocop/cop/style/map_join.rb#71 + def map_to_s_itblock_join?(param0 = T.unsafe(nil)); end + + # map(&:to_s).join(...) + # + # source://rubocop//lib/rubocop/cop/style/map_join.rb#41 + def map_to_s_join?(param0 = T.unsafe(nil)); end + + # map { _1.to_s }.join(...) + # + # source://rubocop//lib/rubocop/cop/style/map_join.rb#60 + def map_to_s_numblock_join?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_join.rb#86 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_join.rb#80 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_join.rb#117 + def no_receiver_range(map_node, join_node); end + + # source://rubocop//lib/rubocop/cop/style/map_join.rb#90 + def register_offense(join_node, map_node, method_name); end + + # source://rubocop//lib/rubocop/cop/style/map_join.rb#108 + def removal_range(receiver, map_node, map_send); end + + # source://rubocop//lib/rubocop/cop/style/map_join.rb#99 + def remove_map_call(corrector, join_node, map_node, map_send); end +end + +# source://rubocop//lib/rubocop/cop/style/map_join.rb#36 +RuboCop::Cop::Style::MapJoin::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_join.rb#37 +RuboCop::Cop::Style::MapJoin::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of `map.to_h` or `collect.to_h` that could be +# written with just `to_h` in Ruby >= 2.6. +# +# NOTE: `Style/HashTransformKeys` and `Style/HashTransformValues` will +# also change this pattern if only hash keys or hash values are being +# transformed. +# +# @example +# # bad +# something.map { |v| [v, v * 2] }.to_h +# +# # good +# something.to_h { |v| [v, v * 2] } +# +# # bad +# {foo: bar}.collect { |k, v| [k.to_s, v.do_something] }.to_h +# +# # good +# {foo: bar}.to_h { |k, v| [k.to_s, v.do_something] } +# +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#30 +class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#49 + def destructuring_argument(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 + def map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#66 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#57 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#71 + def autocorrect(corrector, to_h, map); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#53 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37 +RuboCop::Cop::Style::MapToHash::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#38 +RuboCop::Cop::Style::MapToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for uses of `map.to_set` or `collect.to_set` that could be +# written with just `to_set`. +# +# @example +# # bad +# something.map { |i| i * 2 }.to_set +# +# # good +# something.to_set { |i| i * 2 } +# +# # bad +# [1, 2, 3].collect { |i| i.to_s }.to_set +# +# # good +# [1, 2, 3].to_set { |i| i.to_s } +# +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#26 +class RuboCop::Cop::Style::MapToSet < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#34 + def map_to_set?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#50 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#54 + def autocorrect(corrector, to_set, map); end +end + +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#30 +RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/map_to_set.rb#31 +RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the presence (default) or absence of parentheses in +# method calls containing arguments. +# +# In the default style (require_parentheses), macro methods are allowed. +# Additional methods can be added to the `AllowedMethods` or +# `AllowedPatterns` list. These options are valid only in the default +# style. Macros can be included by either setting `IgnoreMacros` to false, +# adding specific macros to the `IncludedMacros` list, or using +# `IncludedMacroPatterns` for pattern-based matching. +# +# Precedence of options is as follows: +# +# 1. `AllowedMethods` +# 2. `AllowedPatterns` +# 3. `IncludedMacros` +# 4. `IncludedMacroPatterns` +# +# If a method is listed in both `IncludedMacros`/`IncludedMacroPatterns` +# and `AllowedMethods`, then the latter takes precedence (that is, the +# method is allowed). +# +# In the alternative style (omit_parentheses), there are three additional +# options. +# +# 1. `AllowParenthesesInChaining` is `false` by default. Setting it to +# `true` allows the presence of parentheses in the last call during +# method chaining. +# +# 2. `AllowParenthesesInMultilineCall` is `false` by default. Setting it +# to `true` allows the presence of parentheses in multi-line method +# calls. +# +# 3. `AllowParenthesesInCamelCaseMethod` is `false` by default. This +# allows the presence of parentheses when calling a method whose name +# begins with a capital letter and which has no arguments. Setting it +# to `true` allows the presence of parentheses in such a method call +# even with arguments. +# +# NOTE: The style of `omit_parentheses` allows parentheses in cases where +# omitting them results in ambiguous or syntactically incorrect code. +# +# Non-exhaustive list of examples: +# +# - Parentheses are required allowed in method calls with arguments inside +# literals, logical operators, setting default values in position and +# keyword arguments, chaining and more. +# - Parentheses are allowed in method calls with arguments inside +# operators to avoid ambiguity. +# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an +# endless range. +# - Parentheses are allowed when forwarding arguments with the +# triple-dot syntax introduced in Ruby 2.7 as omitting them starts an +# endless range. +# - Parentheses are required in calls with arguments when inside an +# endless method definition introduced in Ruby 3.0. +# - Ruby 3.1's hash omission syntax allows parentheses if the method call +# is in conditionals and requires parentheses if the call +# is not the value-returning expression. See +# https://bugs.ruby-lang.org/issues/18396. +# - Parentheses are required in anonymous arguments, keyword arguments +# and block passing in Ruby 3.2. +# - Parentheses are required when the first argument is a beginless range or +# the last argument is an endless range. +# +# @example AllowParenthesesInCamelCaseMethod: false (default) +# +# # bad +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInCamelCaseMethod: true +# +# # good +# Array(1) +# +# # good +# Array 1 +# @example AllowParenthesesInChaining: false (default) +# +# # bad +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInChaining: true +# +# # good +# foo().bar(1) +# +# # good +# foo().bar 1 +# @example AllowParenthesesInMultilineCall: false (default) +# +# # bad +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInMultilineCall: true +# +# # good +# foo.enforce( +# strict: true +# ) +# +# # good +# foo.enforce \ +# strict: true +# @example AllowParenthesesInStringInterpolation: false (default) +# +# # bad +# "#{t('this.is.bad')}" +# +# # good +# "#{t 'this.is.better'}" +# @example AllowParenthesesInStringInterpolation: true +# +# # good +# "#{t('this.is.good')}" +# +# # good +# "#{t 'this.is.also.good'}" +# @example AllowedMethods: ["puts", "print"] +# +# # good +# puts "Hello world" +# print "Hello world" +# # still enforces parentheses on other methods +# array.delete(e) +# @example AllowedPatterns: ["^assert"] +# +# # good +# assert_equal 'test', x +# assert_match(/foo/, bar) +# # still enforces parentheses on other methods +# array.delete(e) +# @example EnforcedStyle: omit_parentheses +# +# # bad +# array.delete(e) +# +# # good +# array.delete e +# +# # bad +# action.enforce(strict: true) +# +# # good +# action.enforce strict: true +# +# # good +# # Parentheses are allowed for code that can be ambiguous without +# # them. +# action.enforce(condition) || other_condition +# +# # good +# # Parentheses are allowed for calls that won't produce valid Ruby +# # without them. +# yield path, File.basename(path) +# +# # good +# # Omitting the parentheses in Ruby 3.1 hash omission syntax can lead +# # to ambiguous code. We allow them in conditionals and non-last +# # expressions. See https://bugs.ruby-lang.org/issues/18396 +# if meets(criteria:, action:) +# safe_action(action) || dangerous_action(action) +# end +# @example EnforcedStyle: require_parentheses (default) +# +# # bad +# array.delete e +# +# # good +# array.delete(e) +# +# # good +# # Operators don't need parens +# foo == bar +# +# # good +# # Setter methods don't need parens +# foo.bar = baz +# +# # okay with `puts` listed in `AllowedMethods` +# puts 'test' +# +# # okay with `^assert` listed in `AllowedPatterns` +# assert_equal 'test', x +# @example IgnoreMacros: false +# +# # bad +# class Foo +# bar :baz +# end +# @example IgnoreMacros: true (default) +# +# # good +# class Foo +# bar :baz +# end +# @example IncludedMacroPatterns: ["^assert", "^refute"] +# +# # bad +# assert_equal 'test', x +# refute_nil value +# +# # good +# assert_equal('test', x) +# refute_nil(value) +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 +class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#251 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#248 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#252 + def on_yield(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#256 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#264 + def args_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#268 + def args_parenthesized?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#244 + def autocorrect_incompatible_with; end + end +end + +# Style omit_parentheses +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 +module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + include ::RuboCop::Cop::RangeHelp + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + def allowed_camel_case_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 + def allowed_chained_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 + def allowed_multiline_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 + def allowed_string_interpolation_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + def ambiguous_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 + def ambiguous_range_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 + def assigned_before?(node, target); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#238 + def assignment_in_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#34 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 + def call_as_argument_or_chain?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#155 + def call_in_argument_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 + def call_in_literals?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 + def call_in_logical_operators?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 + def call_in_match_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 + def call_in_optional_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#132 + def call_in_single_line_inheritance?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#137 + def call_with_ambiguous_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 + def call_with_braced_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#248 + def forwards_anonymous_rest_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 + def hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#173 + def hash_literal_in_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 + def inside_endless_method_def?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#234 + def inside_string_interpolation?(node); end + + # Require hash value omission be enclosed in parentheses to prevent the following issue: + # https://bugs.ruby-lang.org/issues/18396. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#64 + def last_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#97 + def legitimate_call_with_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 + def logical_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#72 + def method_call_before_constant_resolution?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#46 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#18 + def omit_parentheses(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#90 + def parentheses_at_the_end_of_multiline_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 + def regexp_slash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#55 + def require_parentheses_for_hash_value_omission?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + def splat?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#76 + def super_call_without_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#68 + def syntax_like_method_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 + def ternary_if?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#224 + def unary_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#13 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#12 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Style require_parentheses +# +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#8 +module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#27 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#31 + def eligible_for_parentheses_omission?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#49 + def ignored_macro?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#39 + def included_macro_patterns; end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#35 + def included_macros_list; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#43 + def matches_included_macro_pattern?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#14 + def require_parentheses(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb#9 +RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_MSG = T.let(T.unsafe(nil), String) + +# Checks for unwanted parentheses in parameterless method calls. +# +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. +# +# NOTE: This cop allows the use of `it()` without arguments in blocks, +# as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. +# +# @example +# # bad +# object.some_method() +# +# # good +# object.some_method +# @example AllowedMethods: [] (default) +# # bad +# object.foo() +# @example AllowedMethods: [foo] +# # good +# object.foo() +# +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#29 +class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#48 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#67 + def allowed_method_name?(name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#97 + def any_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#63 + def default_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#59 + def ineligible_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#114 + def offense_range(node); end + + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#89 + def parenthesized_it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#52 + def register_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#71 + def same_name_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 + def variable_in_mass_assignment?(variable_name, node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#34 +RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) + +# Checks for methods called on a do...end block. The point of +# this check is that it's easy to miss the call tacked on to the block +# when reading code. +# +# @example +# # bad +# a do +# b +# end.c +# +# # good +# a { b }.c +# +# # good +# foo = a do +# b +# end +# foo.c +# +# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#24 +class RuboCop::Cop::Style::MethodCalledOnDoEndBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#29 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#51 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#39 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#38 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#41 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/method_called_on_do_end_block.rb#27 +RuboCop::Cop::Style::MethodCalledOnDoEndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for parentheses around the arguments in method +# definitions. Both instance and class/singleton methods are checked. +# +# Regardless of style, parentheses are necessary for: +# +# 1. Endless methods +# 2. Argument lists containing a `forward-arg` (`...`) +# 3. Argument lists containing an anonymous rest arguments forwarding (`*`) +# 4. Argument lists containing an anonymous keyword rest arguments forwarding (`**`) +# 5. Argument lists containing an anonymous block forwarding (`&`) +# +# Removing the parens would be a syntax error here. +# +# @example EnforcedStyle: require_no_parentheses +# # The `require_no_parentheses` style requires method definitions +# # to never use parentheses +# +# # bad +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# +# # good +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# @example EnforcedStyle: require_no_parentheses_except_multiline +# # The `require_no_parentheses_except_multiline` style prefers no +# # parentheses when method definition arguments fit on single line, +# # but prefers parentheses when arguments span multiple lines. +# +# # bad +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# +# # good +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# @example EnforcedStyle: require_parentheses (default) +# # The `require_parentheses` style requires method definitions +# # to always use parentheses +# +# # bad +# def bar num1, num2 +# num1 + num2 +# end +# +# def foo descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name +# do_something +# end +# +# # good +# def bar(num1, num2) +# num1 + num2 +# end +# +# def foo(descriptive_var_name, +# another_descriptive_var_name, +# last_descriptive_var_name) +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#97 +class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#105 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#120 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#167 + def anonymous_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#145 + def arguments_without_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#124 + def correct_arguments(arg_node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#129 + def forced_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#149 + def missing_parentheses(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#140 + def require_parentheses?(args); end + + # source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#159 + def unwanted_parentheses(args); end +end + +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#103 +RuboCop::Cop::Style::MethodDefParentheses::MSG_MISSING = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/method_def_parentheses.rb#102 +RuboCop::Cop::Style::MethodDefParentheses::MSG_PRESENT = T.let(T.unsafe(nil), String) + +# Checks for potential uses of `Enumerable#minmax`. +# +# @example +# +# # bad +# bar = [foo.min, foo.max] +# return foo.min, foo.max +# +# # good +# bar = foo.minmax +# return foo.minmax +# +# source://rubocop//lib/rubocop/cop/style/min_max.rb#17 +class RuboCop::Cop::Style::MinMax < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#38 + def min_max_candidate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#22 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#33 + def on_return(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#55 + def argument_range(node); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#42 + def message(offender, receiver); end + + # source://rubocop//lib/rubocop/cop/style/min_max.rb#46 + def offending_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/min_max.rb#20 +RuboCop::Cop::Style::MinMax::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of `max` or `min` instead of comparison for greater or less. +# +# NOTE: It can be used if you want to present limit or threshold in Ruby 2.7+. +# That it is slow though. So autocorrection will apply generic `max` or `min`: +# +# [source,ruby] +# ---- +# a.clamp(b..) # Same as `[a, b].max` +# a.clamp(..b) # Same as `[a, b].min` +# ---- +# +# @example +# +# # bad +# a > b ? a : b +# a >= b ? a : b +# +# # good +# [a, b].max +# +# # bad +# a < b ? a : b +# a <= b ? a : b +# +# # good +# [a, b].min +# +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#37 +class RuboCop::Cop::Style::MinMaxComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#47 + def comparison_condition(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#54 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#80 + def autocorrect(corrector, node, replacement); end + + # source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#72 + def preferred_method(operator, lhs, rhs, if_branch, else_branch); end +end + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#44 +RuboCop::Cop::Style::MinMaxComparison::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#42 +RuboCop::Cop::Style::MinMaxComparison::GREATER_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#43 +RuboCop::Cop::Style::MinMaxComparison::LESS_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/min_max_comparison.rb#41 +RuboCop::Cop::Style::MinMaxComparison::MSG = T.let(T.unsafe(nil), String) + +# Checks for `if` expressions that do not have an `else` branch. +# +# NOTE: Pattern matching is allowed to have no `else` branch because unlike `if` and `case`, +# it raises `NoMatchingPatternError` if the pattern doesn't match and without having `else`. +# +# Supported styles are: if, case, both. +# +# @example EnforcedStyle: both (default) +# # warn when an `if` or `case` expression is missing an `else` branch. +# +# # bad +# if condition +# statement +# end +# +# # bad +# case var +# when condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# @example EnforcedStyle: case +# # warn when a `case` expression is missing an `else` branch. +# +# # bad +# case var +# when condition +# statement +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# if condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# @example EnforcedStyle: if +# # warn when an `if` expression is missing an `else` branch. +# +# # bad +# if condition +# statement +# end +# +# # good +# if condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# # good +# case var +# when condition +# statement +# end +# +# # good +# case var +# when condition +# statement +# else +# # the content of `else` branch will be determined by Style/EmptyElse +# end +# +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#99 +class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#115 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#121 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#108 + def on_normal_if_unless(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#146 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#161 + def case_style?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#179 + def empty_else_config; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#173 + def empty_else_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#157 + def if_style?; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#135 + def message_template; end + + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#169 + def unless_else_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#165 + def unless_else_cop_enabled?; end +end + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#104 +RuboCop::Cop::Style::MissingElse::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#106 +RuboCop::Cop::Style::MissingElse::MSG_EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/missing_else.rb#105 +RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) + +# Checks for the presence of `method_missing` without also +# defining `respond_to_missing?`. +# +# Not defining `respond_to_missing?` will cause metaprogramming +# methods like `respond_to?` to behave unexpectedly: +# +# [source,ruby] +# ---- +# class StringDelegator +# def initialize(string) +# @string = string +# end +# +# def method_missing(name, *args) +# @string.send(name, *args) +# end +# end +# +# delegator = StringDelegator.new("foo") +# # Claims to not respond to `upcase`. +# delegator.respond_to?(:upcase) # => false +# # But you can call it. +# delegator.upcase # => FOO +# ---- +# +# @example +# # bad +# def method_missing(name, *args) +# if @delegate.respond_to?(name) +# @delegate.send(name, *args) +# else +# super +# end +# end +# +# # good +# def respond_to_missing?(name, include_private) +# @delegate.respond_to?(name) || super +# end +# +# def method_missing(name, *args) +# if @delegate.respond_to?(name) +# @delegate.send(name, *args) +# else +# super +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#54 +class RuboCop::Cop::Style::MissingRespondToMissing < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#57 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#63 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#67 + def implements_respond_to_missing?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/missing_respond_to_missing.rb#55 +RuboCop::Cop::Style::MissingRespondToMissing::MSG = T.let(T.unsafe(nil), String) + +# Checks for grouping of mixins in `class` and `module` bodies. +# By default it enforces mixins to be placed in separate declarations, +# but it can be configured to enforce grouping them in one declaration. +# +# @example EnforcedStyle: grouped +# # bad +# class Foo +# extend Bar +# extend Qox +# end +# +# # good +# class Foo +# extend Qox, Bar +# end +# @example EnforcedStyle: separated (default) +# # bad +# class Foo +# include Bar, Qox +# end +# +# # good +# class Foo +# include Qox +# include Bar +# end +# +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#33 +class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#40 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#49 + def on_module(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#64 + def check(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#72 + def check_grouped_style(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#91 + def check_separated_style(send_node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#127 + def group_mixins(node, mixins); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#110 + def grouped_style?; end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#53 + def range_to_remove_for_subsequent_mixin(mixins, node); end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#118 + def separate_mixins(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#114 + def separated_style?; end + + # source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#104 + def sibling_mixins(send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#37 +RuboCop::Cop::Style::MixinGrouping::MIXIN_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/mixin_grouping.rb#38 +RuboCop::Cop::Style::MixinGrouping::MSG = T.let(T.unsafe(nil), String) + +# Checks that `include`, `extend` and `prepend` statements appear +# inside classes and modules, not at the top level, so as to not affect +# the behavior of `Object`. +# +# @example +# # bad +# include M +# +# class C +# end +# +# # bad +# extend M +# +# class C +# end +# +# # bad +# prepend M +# +# class C +# end +# +# # good +# class C +# include M +# end +# +# # good +# class C +# extend M +# end +# +# # good +# class C +# prepend M +# end +# +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#43 +class RuboCop::Cop::Style::MixinUsage < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#54 + def in_top_level_scope?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#48 + def include_statement(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#62 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#44 +RuboCop::Cop::Style::MixinUsage::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/mixin_usage.rb#45 +RuboCop::Cop::Style::MixinUsage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for use of `extend self` or `module_function` in a module. +# +# Supported styles are: `module_function` (default), `extend_self` and `forbidden`. +# +# A couple of things to keep in mind: +# +# - `forbidden` style prohibits the usage of both styles +# - in default mode (`module_function`), the cop won't be activated when the module +# contains any private methods +# +# @example EnforcedStyle: extend_self +# # bad +# module Test +# module_function +# # ... +# end +# +# # good +# module Test +# extend self +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# @example EnforcedStyle: forbidden +# # bad +# module Test +# module_function +# # ... +# end +# +# # bad +# module Test +# extend self +# # ... +# end +# +# # bad +# module Test +# extend self +# # ... +# private +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# @example EnforcedStyle: module_function (default) +# # bad +# module Test +# extend self +# # ... +# end +# +# # good +# module Test +# module_function +# # ... +# end +# +# # good +# module Test +# extend self +# # ... +# private +# # ... +# end +# +# # good +# module Test +# class << self +# # ... +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/module_function.rb#95 +class RuboCop::Cop::Style::ModuleFunction < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#107 + def extend_self_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#104 + def module_function_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#112 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#110 + def private_directive?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#149 + def check_extend_self(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#155 + def check_forbidden(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#141 + def check_module_function(nodes); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#130 + def each_wrong_style(nodes, &block); end + + # source://rubocop//lib/rubocop/cop/style/module_function.rb#162 + def message(_range); end +end + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#100 +RuboCop::Cop::Style::ModuleFunction::EXTEND_SELF_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#101 +RuboCop::Cop::Style::ModuleFunction::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_function.rb#99 +RuboCop::Cop::Style::ModuleFunction::MODULE_FUNCTION_MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of `Module` methods returning arrays that can be replaced +# with equivalent predicates. +# +# Calling a method returning an array then checking if an element is inside +# it is much slower than using an equivalent predicate method. For example, +# `instance_methods.include?` will return an array of all public and protected +# instance methods in the module, then check if a given method is inside that +# array, while `method_defined?` will do direct method lookup, which is much +# faster and consumes less memory. +# +# @example +# # bad +# Array.instance_methods.include?(:size) +# Array.instance_methods.member?(:size) +# Array.instance_methods(true).include?(:size) +# +# Array.instance_methods(false).include?(:find) +# +# # good +# Array.method_defined?(:size) +# +# Array.method_defined?(:find, false) +# +# # bad +# Array.class_variables.include?(:foo) +# Array.constants.include?(:foo) +# Array.private_instance_methods.include?(:foo) +# Array.protected_instance_methods.include?(:foo) +# Array.public_instance_methods.include?(:foo) +# Array.included_modules.include?(:foo) +# +# # good +# Array.class_variable_defined?(:foo) +# Array.const_defined?(:foo) +# Array.private_method_defined?(:foo) +# Array.protected_method_defined?(:foo) +# Array.public_method_defined?(:foo) +# Array.include?(:foo) +# @example AllowedMethods: [included_modules] +# +# # good +# Array.included_modules.include?(:foo) +# +# source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#50 +class RuboCop::Cop::Style::ModuleMemberExistenceCheck < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#57 + def module_member_inclusion?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#93 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#80 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#97 + def replacement_for(node, parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#108 + def simple_method_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#74 +RuboCop::Cop::Style::ModuleMemberExistenceCheck::METHODS_WITHOUT_INHERIT_PARAM = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#75 +RuboCop::Cop::Style::ModuleMemberExistenceCheck::METHODS_WITH_INHERIT_PARAM = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#64 +RuboCop::Cop::Style::ModuleMemberExistenceCheck::METHOD_REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#54 +RuboCop::Cop::Style::ModuleMemberExistenceCheck::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/module_member_existence_check.rb#78 +RuboCop::Cop::Style::ModuleMemberExistenceCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for chaining of a block after another block that spans +# multiple lines. +# +# @example +# +# # bad +# Thread.list.select do |t| +# t.alive? +# end.map do |t| +# t.object_id +# end +# +# # good +# alive_threads = Thread.list.select do |t| +# t.alive? +# end +# alive_threads.map do |t| +# t.object_id +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#25 +class RuboCop::Cop::Style::MultilineBlockChain < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#30 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#47 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#46 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_block_chain.rb#28 +RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of if/unless modifiers with multiple-lines bodies. +# +# @example +# +# # bad +# { +# result: 'this should not happen' +# } unless cond +# +# # good +# { result: 'ok' } if cond +# +# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#17 +class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#25 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#45 + def indented_body(body, node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#37 + def to_normal_if(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_if_modifier.rb#22 +RuboCop::Cop::Style::MultilineIfModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of the `then` keyword in multi-line `if` statements. +# In multi-line `if` statements, `then` is redundant because the newline +# already separates the condition from the body. +# +# @example +# # bad +# # This is considered bad practice. +# if cond then +# end +# +# # good +# # If statements can contain `then` on the same line. +# if cond then a +# elsif cond then b +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#21 +class RuboCop::Cop::Style::MultilineIfThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::OnNormalIfUnless + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#28 + def on_normal_if_unless(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#38 + def non_modifier_then?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_if_then.rb#26 +RuboCop::Cop::Style::MultilineIfThen::MSG = T.let(T.unsafe(nil), String) + +# Checks uses of the `then` keyword in multi-line `in` statement. +# +# @example +# # bad +# case expression +# in pattern then +# end +# +# # good +# case expression +# in pattern +# end +# +# # good +# case expression +# in pattern then do_something +# end +# +# # good +# case expression +# in pattern then do_something(arg1, +# arg2) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#30 +class RuboCop::Cop::Style::MultilineInPatternThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#39 + def on_in_pattern(node); end + + private + + # Requires `then` for write `in` and its body on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#51 + def require_then?(in_pattern_node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_in_pattern_then.rb#37 +RuboCop::Cop::Style::MultilineInPatternThen::MSG = T.let(T.unsafe(nil), String) + +# Checks expressions wrapping styles for multiline memoization. +# +# @example EnforcedStyle: braces +# # bad +# foo ||= begin +# bar +# baz +# end +# +# # good +# foo ||= ( +# bar +# baz +# ) +# @example EnforcedStyle: keyword (default) +# # bad +# foo ||= ( +# bar +# baz +# ) +# +# # good +# foo ||= begin +# bar +# baz +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#33 +class RuboCop::Cop::Style::MultilineMemoization < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#56 + def message(_node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#41 + def on_or_asgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#62 + def bad_rhs?(rhs); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#72 + def keyword_autocorrect(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#78 + def keyword_begin_str(node, node_buf); end + + # source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#86 + def keyword_end_str(node, node_buf); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#39 +RuboCop::Cop::Style::MultilineMemoization::BRACES_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_memoization.rb#38 +RuboCop::Cop::Style::MultilineMemoization::KEYWORD_MSG = T.let(T.unsafe(nil), String) + +# Checks for method signatures that span multiple lines. +# +# @example +# +# # good +# +# def foo(bar, baz) +# end +# +# # bad +# +# def foo(bar, +# baz) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#21 +class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#27 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#37 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#42 + def autocorrect(corrector, node, begin_of_arguments); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#73 + def closing_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 + def correction_exceeds_max_line_length?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#87 + def definition_width(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#83 + def indentation_width(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#65 + def last_line_source_of_arguments(arguments); end + + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 + def opening_line(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#25 +RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) + +# Checks for multi-line ternary op expressions. +# +# NOTE: `return if ... else ... end` is syntax error. If `return` is used before +# multiline ternary operator expression, it will be autocorrected to single-line +# ternary operator. The same is true for `break`, `next`, and method call. +# +# @example +# # bad +# a = cond ? +# b : c +# a = cond ? b : +# c +# a = cond ? +# b : +# c +# +# return cond ? +# b : +# c +# +# # good +# a = cond ? b : c +# a = if cond +# b +# else +# c +# end +# +# return cond ? b : c +# +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#36 +class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#44 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#64 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#86 + def comments_in_condition(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 + def enforce_single_line_ternary_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#72 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#96 + def use_assignment_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#40 +RuboCop::Cop::Style::MultilineTernaryOperator::MSG_IF = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#41 +RuboCop::Cop::Style::MultilineTernaryOperator::MSG_SINGLE_LINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#42 +RuboCop::Cop::Style::MultilineTernaryOperator::SINGLE_LINE_TYPES = T.let(T.unsafe(nil), Array) + +# Checks uses of the `then` keyword +# in multi-line when statements. +# +# @example +# # bad +# case foo +# when bar then +# end +# +# # good +# case foo +# when bar +# end +# +# # good +# case foo +# when bar then do_something +# end +# +# # good +# case foo +# when bar then do_something(arg1, +# arg2) +# end +# +# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#31 +class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#37 + def on_when(node); end + + private + + # Requires `then` for write `when` and its body on the same line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#49 + def require_then?(when_node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#35 +RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) + +# Checks against comparing a variable with multiple items, where +# `Array#include?`, `Set#include?` or a `case` could be used instead +# to avoid code repetition. +# It accepts comparisons of multiple method calls to avoid unnecessary method calls +# by default. It can be configured by `AllowMethodComparison` option. +# +# @example +# # bad +# a = 'a' +# foo if a == 'a' || a == 'b' || a == 'c' +# +# # good +# a = 'a' +# foo if ['a', 'b', 'c'].include?(a) +# +# VALUES = Set['a', 'b', 'c'].freeze +# # elsewhere... +# foo if VALUES.include?(a) +# +# case foo +# when 'a', 'b', 'c' then foo +# # ... +# end +# +# # accepted (but consider `case` as above) +# foo if a == b.lightweight || a == b.heavyweight +# @example AllowMethodComparison: false +# # bad +# foo if a == b.lightweight || a == b.heavyweight +# +# # good +# foo if [b.lightweight, b.heavyweight].include?(a) +# @example AllowMethodComparison: true (default) +# # good +# foo if a == b.lightweight || a == b.heavyweight +# @example ComparisonsThreshold: 2 (default) +# # bad +# foo if a == 'a' || a == 'b' +# @example ComparisonsThreshold: 3 +# # good +# foo if a == 'a' || a == 'b' +# +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52 +class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#74 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#64 + def simple_comparison_lhs(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#69 + def simple_comparison_rhs(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#59 + def simple_double_comparison?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#154 + def allow_method_comparison?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#132 + def comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#158 + def comparisons_threshold; end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 + def find_offending_var(node, variables = T.unsafe(nil), values = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 + def nested_comparison?(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#116 + def offense_range(values); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#144 + def root_of_or_node(or_node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 + def simple_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#120 + def variable_name(node); end +end + +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55 +RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) + +# Checks whether some constant value isn't a +# mutable literal (e.g. array or hash). +# +# Strict mode can be used to freeze all constants, rather than +# just literals. +# Strict mode is considered an experimental feature. It has not been +# updated with an exhaustive list of all methods that will produce +# frozen objects so there is a decent chance of getting some false +# positives. Luckily, there is no harm in freezing an already +# frozen object. +# +# From Ruby 3.0, this cop honours the magic comment +# 'shareable_constant_value'. When this magic comment is set to any +# acceptable value other than none, it will suppress the offenses +# raised by this cop. It enforces frozen state. +# +# NOTE: `Regexp` and `Range` literals are frozen objects since Ruby 3.0. +# +# NOTE: From Ruby 3.0, interpolated strings are not frozen when +# `# frozen-string-literal: true` is used, so this cop enforces explicit +# freezing for such strings. +# +# NOTE: From Ruby 3.0, this cop allows explicit freezing of constants when +# the `shareable_constant_value` directive is used. +# +# @example +# # Magic comment - shareable_constant_value: literal +# +# # bad +# CONST = [1, 2, 3] +# +# # good +# # shareable_constant_value: literal +# CONST = [1, 2, 3] +# @example EnforcedStyle: literals (default) +# # bad +# CONST = [1, 2, 3] +# +# # good +# CONST = [1, 2, 3].freeze +# +# # good +# CONST = <<~TESTING.freeze +# This is a heredoc +# TESTING +# +# # good +# CONST = Something.new +# @example EnforcedStyle: strict +# # bad +# CONST = Something.new +# +# # bad +# CONST = Struct.new do +# def foo +# puts 1 +# end +# end +# +# # good +# CONST = Something.new.freeze +# +# # good +# CONST = Struct.new do +# def foo +# puts 1 +# end +# end.freeze +# +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 +class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 + def on_casgn(node); end + + # Some of these patterns may not actually return an immutable object, + # but we want to consider them immutable for this cop. + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#223 + def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#240 + def range_enclosed_in_parentheses?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#216 + def splat_value(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#168 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#157 + def check(value); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#207 + def correct_splat_expansion(corrector, expr, splat_value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#199 + def frozen_regexp_or_range_literals?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#189 + def immutable_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#183 + def mutable_literal?(value); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#140 + def on_assignment(value); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#203 + def requires_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#193 + def shareable_constant_value?(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#148 + def strict_check(value); end +end + +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#125 +RuboCop::Cop::Style::MutableConstant::MSG = T.let(T.unsafe(nil), String) + +# Handles magic comment shareable_constant_value with O(n ^ 2) complexity +# n - number of lines in the source +# Iterates over all lines before a CONSTANT +# until it reaches shareable_constant_value +# +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#88 +module RuboCop::Cop::Style::MutableConstant::ShareableConstantValue + private + + # Identifies the most recent magic comment with valid shareable constant values + # that's in scope for this node + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 + def magic_comment_in_scope(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#110 + def processed_source_till_node(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 + def recent_shareable_value?(node); end + + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#114 + def shareable_constant_value_enabled?(value); end + + class << self + # Identifies the most recent magic comment with valid shareable constant values + # that's in scope for this node + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#102 + def magic_comment_in_scope(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#91 + def recent_shareable_value?(node); end + end +end + +# Checks for uses of if with a negated condition. Only ifs +# without else are considered. There are three different styles: +# +# * both +# * prefix +# * postfix +# +# @example EnforcedStyle: both (default) +# # enforces `unless` for `prefix` and `postfix` conditionals +# +# # bad +# +# if !foo +# bar +# end +# +# # good +# +# unless foo +# bar +# end +# +# # bad +# +# bar if !foo +# +# # good +# +# bar unless foo +# @example EnforcedStyle: postfix +# # enforces `unless` for just `postfix` conditionals +# +# # bad +# +# bar if !foo +# +# # good +# +# bar unless foo +# +# # good +# +# if !foo +# bar +# end +# @example EnforcedStyle: prefix +# # enforces `unless` for just `prefix` conditionals +# +# # bad +# +# if !foo +# bar +# end +# +# # good +# +# unless foo +# bar +# end +# +# # good +# +# bar if !foo +# +# source://rubocop//lib/rubocop/cop/style/negated_if.rb#71 +class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#76 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#92 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if.rb#88 + def message(node); end +end + +# Checks for uses of `if-else` and ternary operators with a negated condition +# which can be simplified by inverting condition and swapping branches. +# +# @example +# # bad +# if !x +# do_something +# else +# do_something_else +# end +# +# # good +# if x +# do_something_else +# else +# do_something +# end +# +# # bad +# !x ? do_something : do_something_else +# +# # good +# x ? do_something_else : do_something +# +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#30 +class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#39 + def double_negation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#50 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#45 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#97 + def correct_negated_condition(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#93 + def corrected_ancestor?(node); end + + # Collect the entire else branch, including whitespace and comments + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#127 + def else_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#71 + def if_else?(node); end + + # Collect the entire if branch, including whitespace and comments + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#118 + def if_range(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#87 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#82 + def negated_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#109 + def swap_branches(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#76 + def unwrap_begin_nodes(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#41 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#34 +RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/negated_if_else_condition.rb#36 +RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for uses of unless with a negated condition. Only unless +# without else are considered. There are three different styles: +# +# * both +# * prefix +# * postfix +# +# @example EnforcedStyle: both (default) +# # enforces `if` for `prefix` and `postfix` conditionals +# +# # bad +# unless !foo +# bar +# end +# +# # good +# if foo +# bar +# end +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# @example EnforcedStyle: postfix +# # enforces `if` for just `postfix` conditionals +# +# # bad +# bar unless !foo +# +# # good +# bar if foo +# +# # good +# unless !foo +# bar +# end +# @example EnforcedStyle: prefix +# # enforces `if` for just `prefix` conditionals +# +# # bad +# unless !foo +# bar +# end +# +# # good +# if foo +# bar +# end +# +# # good +# bar unless !foo +# +# source://rubocop//lib/rubocop/cop/style/negated_unless.rb#61 +class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#66 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#82 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_unless.rb#78 + def message(node); end +end + +# Checks for uses of while with a negated condition. +# +# @example +# # bad +# while !foo +# bar +# end +# +# # good +# until foo +# bar +# end +# +# # bad +# bar until !foo +# +# # good +# bar while foo +# bar while !foo && baz +# +# source://rubocop//lib/rubocop/cop/style/negated_while.rb#25 +class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base + include ::RuboCop::Cop::NegativeConditional + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negated_while.rb#36 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/negated_while.rb#29 + def on_while(node); end +end + +# Identifies usages of `arr[arr.length - n]`, `arr[arr.size - n]`, or +# `arr[arr.count - n]` and suggests to change them to use `arr[-n]` instead. +# Also handles range patterns like `arr[0..(arr.length - n)]`. +# +# The cop recognizes preserving methods (`sort`, `reverse`, `shuffle`, `rotate`) +# and their combinations, allowing safe replacement when the receiver matches. +# It works with variables, instance variables, class variables, and constants. +# +# @example +# # bad +# arr[arr.count - 2] +# arr[0..(arr.length - 2)] +# arr[0...(arr.length - 4)] +# arr.sort[arr.reverse.length - 2] +# arr.sort.reverse[arr.sort.size - 2] +# +# # good +# arr[-2] +# arr[0..-2] +# arr[0...-4] +# arr.sort[-2] +# arr.sort.reverse[-2] +# +# source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#29 +class RuboCop::Cop::Style::NegativeArrayIndex < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#42 + def length_subtraction?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#61 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#48 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#82 + def add_offense_for_subtraction(node, index_arg, negative_index); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#168 + def build_current_source(receiver, range_without_parens, index_arg); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#151 + def build_message_for_range(receiver, start, range_op, index, current); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#126 + def build_range_offense_data(receiver, range_node, range_end, inner_end, negative_index, index_arg); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#178 + def build_range_without_parens(range_start, range_op, range_end, inner_end); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#158 + def build_replacement_string(range_start, range_op, negative_index, index_arg); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#200 + def extract_base_receiver(node); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#78 + def extract_inner_end(node); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#74 + def extract_range_from_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#143 + def format_range_message_parts(range_start, negative_index, index_arg); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#111 + def handle_range_pattern(receiver, range_node, index_arg); end + + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#65 + def handle_simple_index_pattern(node, index_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#209 + def preserving_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#94 + def range_with_length_subtraction?(range_node, array_receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#184 + def receivers_match?(length_receiver, array_receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#195 + def receivers_match_strict?(length_receiver, array_receiver); end +end + +# source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#37 +RuboCop::Cop::Style::NegativeArrayIndex::LENGTH_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#33 +RuboCop::Cop::Style::NegativeArrayIndex::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#34 +RuboCop::Cop::Style::NegativeArrayIndex::MSG_RANGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#39 +RuboCop::Cop::Style::NegativeArrayIndex::PRESERVING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/negative_array_index.rb#35 +RuboCop::Cop::Style::NegativeArrayIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for nested `File.dirname`. +# It replaces nested `File.dirname` with the level argument introduced in Ruby 3.1. +# +# @example +# +# # bad +# File.dirname(File.dirname(path)) +# +# # good +# File.dirname(path, 2) +# +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#17 +class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#28 + def file_dirname?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#60 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#49 + def path_with_dir_level(node, level); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#22 +RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nested_file_dirname.rb#23 +RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for nested use of if, unless, while and until in their +# modifier form. +# +# @example +# +# # bad +# something if a if b +# +# # good +# something if b && a +# +# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#16 +class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#26 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#25 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#22 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#85 + def add_parentheses_to_method_arguments(send_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#42 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#30 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#65 + def left_hand_operand(node, operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#38 + def modifier?(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#51 + def new_expression(inner_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#61 + def replacement_operator(keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#94 + def requires_parens?(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#71 + def right_hand_operand(node, left_hand_keyword); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_modifier.rb#20 +RuboCop::Cop::Style::NestedModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for unparenthesized method calls in the argument list +# of a parenthesized method call. +# `be`, `be_a`, `be_an`, `be_between`, `be_falsey`, `be_kind_of`, `be_instance_of`, +# `be_truthy`, `be_within`, `eq`, `eql`, `end_with`, `include`, `match`, `raise_error`, +# `respond_to`, and `start_with` methods are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # good +# method1(method2(arg)) +# +# # bad +# method1(method2 arg) +# @example AllowedMethods: [foo] +# # good +# method1(foo arg) +# +# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#24 +class RuboCop::Cop::Style::NestedParenthesizedCalls < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#71 + def allowed?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#65 + def allowed_omission?(send_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#51 + def autocorrect(corrector, nested); end + + class << self + # source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#31 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/nested_parenthesized_calls.rb#29 +RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String) + +# Checks for nested ternary op expressions. +# +# @example +# # bad +# a ? (b ? b1 : b2) : a2 +# +# # good +# if a +# b ? b1 : b2 +# else +# a2 +# end +# +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#18 +class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#24 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#39 + def autocorrect(corrector, if_node); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#46 + def remove_parentheses(source); end + + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#54 + def replace_loc_and_whitespace(corrector, range, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#22 +RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String) + +# Use `next` to skip iteration instead of a condition at the end. +# +# @example AllowConsecutiveConditionals: false (default) +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# if a == 2 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# next unless a == 2 +# puts a +# end +# @example AllowConsecutiveConditionals: true +# # good +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# if a == 2 +# puts a +# end +# end +# @example EnforcedStyle: always +# # With `always` all conditions at the end of an iteration needs to be +# # replaced by next - with `skip_modifier_ifs` the modifier if like +# # this one are ignored: `[1, 2].each { |a| puts a if a == 1 }` +# +# # bad +# [1, 2].each do |a| +# puts a if a == 1 +# end +# +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# next unless a == 1 +# puts a +# end +# @example EnforcedStyle: skip_modifier_ifs (default) +# # bad +# [1, 2].each do |a| +# if a == 1 +# puts a +# end +# end +# +# # good +# [1, 2].each do |a| +# next unless a == 1 +# puts a +# end +# +# # good +# [1, 2].each do |a| +# puts a if a == 1 +# end +# +# source://rubocop//lib/rubocop/cop/style/next.rb#81 +class RuboCop::Cop::Style::Next < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/next.rb#100 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#113 + def on_for(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#107 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#94 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/next.rb#106 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#112 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#109 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/next.rb#249 + def actual_indent(lines, buffer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#271 + def allowed_consecutive_conditionals?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#148 + def allowed_modifier_if?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#191 + def autocorrect_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#181 + def autocorrect_modifier(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#117 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#206 + def cond_range(node, cond); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#267 + def consecutive_conditionals?(if_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#225 + def end_followed_by_whitespace_only?(source_buffer, end_pos); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#216 + def end_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#134 + def ends_with_condition?(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#164 + def exit_body_type?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#253 + def heredoc_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#156 + def if_else_children?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#160 + def if_without_else?(node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#176 + def offense_location(offense_node); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#170 + def offense_node(body); end + + # Adjust indentation of `lines` to match `node` + # + # source://rubocop//lib/rubocop/cop/style/next.rb#240 + def reindent(lines, node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#260 + def reindent_line(corrector, lineno, delta, buffer); end + + # source://rubocop//lib/rubocop/cop/style/next.rb#229 + def reindentable_lines(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/next.rb#140 + def simple_if_without_break?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/next.rb#90 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/next.rb#88 +RuboCop::Cop::Style::Next::EXIT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/next.rb#87 +RuboCop::Cop::Style::Next::MSG = T.let(T.unsafe(nil), String) + +# Checks for comparison of something with nil using `==` and +# `nil?`. Enforcing a consistent style (either the `nil?` +# predicate or `==` comparison) improves readability. +# +# @example EnforcedStyle: comparison +# +# # bad +# if x.nil? +# end +# +# # good +# if x == nil +# end +# @example EnforcedStyle: predicate (default) +# +# # bad +# if x == nil +# end +# +# # good +# if x.nil? +# end +# +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#30 +class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#43 + def nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#40 + def nil_comparison?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#46 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#68 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#80 + def prefer_comparison?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#72 + def style_check?(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#35 +RuboCop::Cop::Style::NilComparison::EXPLICIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#34 +RuboCop::Cop::Style::NilComparison::PREDICATE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#37 +RuboCop::Cop::Style::NilComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for lambdas and procs that always return nil, +# which can be replaced with an empty lambda or proc instead. +# +# @example +# # bad +# -> { nil } +# +# lambda do +# next nil +# end +# +# proc { nil } +# +# Proc.new do +# break nil +# end +# +# # good +# -> {} +# +# lambda do +# end +# +# -> (x) { nil if x } +# +# proc {} +# +# Proc.new { nil if x } +# +# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#35 +class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#42 + def nil_return?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#46 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#58 + def autocorrect(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/nil_lambda.rb#39 +RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) + +# Checks for non-nil checks, which are usually redundant. +# +# With `IncludeSemanticChanges` set to `false` by default, this cop +# does not report offenses for `!x.nil?` and does no changes that might +# change behavior. +# Also `IncludeSemanticChanges` set to `false` with `EnforcedStyle: comparison` of +# `Style/NilComparison` cop, this cop does not report offenses for `x != nil` and +# does no changes to `!x.nil?` style. +# +# With `IncludeSemanticChanges` set to `true`, this cop reports offenses +# for `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which +# is *usually* OK, but might change behavior. +# +# @example +# # bad +# if x != nil +# end +# +# # good +# if x +# end +# +# # Non-nil checks are allowed if they are the final nodes of predicate. +# # good +# def signed_in? +# !current_user.nil? +# end +# @example IncludeSemanticChanges: false (default) +# # good +# if !x.nil? +# end +# @example IncludeSemanticChanges: true +# # bad +# if !x.nil? +# end +# +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#44 +class RuboCop::Cop::Style::NonNilCheck < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#59 + def nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#62 + def not_and_nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#53 + def not_equal_to_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#73 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#84 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#64 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#56 + def unless_check?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#93 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#123 + def autocorrect_comparison(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#137 + def autocorrect_non_nil(corrector, node, inner_node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#145 + def autocorrect_unless_nil(corrector, node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#119 + def include_semantic_changes?; end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#110 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#150 + def nil_comparison_style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#88 + def register_offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#104 + def unless_and_nil_check?(send_node); end +end + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#48 +RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REDUNDANCY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#47 +RuboCop::Cop::Style::NonNilCheck::MSG_FOR_REPLACEMENT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/non_nil_check.rb#50 +RuboCop::Cop::Style::NonNilCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of the keyword `not` instead of `!`. +# The `not` keyword has lower precedence than `!`, which can +# lead to surprising behavior and often requires parentheses. +# +# @example +# +# # bad - parentheses are required because of op precedence +# x = (not something) +# +# # good +# x = !something +# +# source://rubocop//lib/rubocop/cop/style/not.rb#18 +class RuboCop::Cop::Style::Not < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/not.rb#34 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/not.rb#62 + def correct_opposite_method(corrector, range, child); end + + # source://rubocop//lib/rubocop/cop/style/not.rb#67 + def correct_with_parens(corrector, range, node); end + + # source://rubocop//lib/rubocop/cop/style/not.rb#72 + def correct_without_parens(corrector, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/not.rb#52 + def opposite_method?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/not.rb#56 + def requires_parens?(child); end +end + +# source://rubocop//lib/rubocop/cop/style/not.rb#22 +RuboCop::Cop::Style::Not::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/not.rb#25 +RuboCop::Cop::Style::Not::OPPOSITE_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/not.rb#23 +RuboCop::Cop::Style::Not::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for numbered parameters. +# +# It can either restrict the use of numbered parameters to +# single-lined blocks, or disallow completely numbered parameters. +# +# @example EnforcedStyle: allow_single_line (default) +# # bad +# collection.each do +# puts _1 +# end +# +# # good +# collection.each { puts _1 } +# @example EnforcedStyle: disallow +# # bad +# collection.each { puts _1 } +# +# # good +# collection.each { |item| puts item } +# +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#27 +class RuboCop::Cop::Style::NumberedParameters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#36 + def on_numblock(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#31 +RuboCop::Cop::Style::NumberedParameters::MSG_DISALLOW = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters.rb#32 +RuboCop::Cop::Style::NumberedParameters::MSG_MULTI_LINE = T.let(T.unsafe(nil), String) + +# Detects use of an excessive amount of numbered parameters in a +# single block. Having too many numbered parameters can make code too +# cryptic and hard to read. +# +# The cop defaults to registering an offense if there is more than 1 numbered +# parameter but this maximum can be configured by setting `Max`. +# +# @example Max: 1 (default) +# # bad +# use_multiple_numbered_parameters { _1.call(_2, _3, _4) } +# +# # good +# array.each { use_array_element_as_numbered_parameter(_1) } +# hash.each { use_only_hash_value_as_numbered_parameter(_2) } +# +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#20 +class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#27 + def max=(value); end + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#32 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#49 + def max_count; end + + # source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#43 + def numbered_parameter_nodes(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#24 +RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#29 +RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numbered_parameters_limit.rb#30 +RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for octal, hex, binary, and decimal literals using +# uppercase prefixes and corrects them to lowercase prefix +# or no prefix (in case of decimals). +# +# @example EnforcedOctalStyle: zero_only +# # bad +# num = 0o1234 +# num = 0O1234 +# +# # good +# num = 01234 +# @example EnforcedOctalStyle: zero_with_o (default) +# # bad - missing octal prefix +# num = 01234 +# +# # bad - uppercase prefix +# num = 0O1234 +# num = 0X12AB +# num = 0B10101 +# +# # bad - redundant decimal prefix +# num = 0D1234 +# num = 0d1234 +# +# # good +# num = 0o1234 +# num = 0x12AB +# num = 0b10101 +# num = 1234 +# +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#36 +class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IntegerNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#52 + def on_int(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#109 + def format_binary(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#113 + def format_decimal(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#105 + def format_hex(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#97 + def format_octal(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#101 + def format_octal_zero_only(source); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#82 + def hex_bin_dec_literal_type(literal); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#68 + def literal_type(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#64 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#74 + def octal_literal_type(literal); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#93 + def octal_zero_only?; end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#49 +RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#43 +RuboCop::Cop::Style::NumericLiteralPrefix::BINARY_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#50 +RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#44 +RuboCop::Cop::Style::NumericLiteralPrefix::DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#48 +RuboCop::Cop::Style::NumericLiteralPrefix::HEX_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#42 +RuboCop::Cop::Style::NumericLiteralPrefix::HEX_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#47 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#41 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#46 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_literal_prefix.rb#40 +RuboCop::Cop::Style::NumericLiteralPrefix::OCTAL_ZERO_ONLY_REGEX = T.let(T.unsafe(nil), Regexp) + +# Checks for big numeric literals without `_` between groups +# of digits in them. Underscores make large numbers easier to +# read by visually separating groups of digits. +# +# Additional allowed patterns can be added by adding regexps to +# the `AllowedPatterns` configuration. All regexps are treated +# as anchored even if the patterns do not contain anchors (so +# `\d{4}_\d{4}` will allow `1234_5678` but not `1234_5678_9012`). +# +# NOTE: Even if `AllowedPatterns` are given, autocorrection will +# only correct to the standard pattern of an `_` every 3 digits. +# +# @example +# +# # bad +# 1000000 +# 1_00_000 +# 1_0000 +# +# # good +# 1_000_000 +# 1000 +# @example AllowedNumbers: [3000] +# +# # good +# 3000 # You can specify allowed numbers. (e.g. port number) +# @example Strict: false (default) +# +# # good +# 10_000_00 # typical representation of $10,000 in cents +# @example Strict: true +# +# # bad +# 10_000_00 # typical representation of $10,000 in cents +# +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#44 +class RuboCop::Cop::Style::NumericLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::IntegerNode + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#55 + def min_digits=(value); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#61 + def on_float(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#57 + def on_int(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#119 + def allowed_numbers; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#123 + def allowed_patterns; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#67 + def check(node); end + + # @param int_part [String] + # + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#108 + def format_int_part(int_part); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#94 + def format_number(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#115 + def min_digits; end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#83 + def register_offense(node, &_block); end + + # source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#90 + def short_group_regex; end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#50 +RuboCop::Cop::Style::NumericLiterals::DELIMITER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/numeric_literals.rb#49 +RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of comparison operators (`==`, +# `>`, `<`) to test numbers as zero, positive, or negative. +# These can be replaced by their respective predicate methods. +# This cop can also be configured to do the reverse. +# +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. +# +# This cop disregards `#nonzero?` as its value is truthy or falsey, +# but not `true` and `false`, and thus not always interchangeable with +# `!= 0`. +# +# This cop allows comparisons to global variables, since they are often +# populated with objects which can be compared with integers, but are +# not themselves `Integer` polymorphic. +# +# @example AllowedMethods: [==] with EnforcedStyle: predicate +# # good +# foo == 0 +# +# # bad +# 0 > foo +# bar.baz > 0 +# @example AllowedMethods: [] (default) with EnforcedStyle: predicate +# # bad +# foo == 0 +# 0 > foo +# bar.baz > 0 +# @example AllowedPatterns: ['zero'] with EnforcedStyle: predicate +# # good +# # bad +# foo.zero? +# +# # bad +# foo.negative? +# bar.baz.positive? +# @example AllowedPatterns: [] (default) with EnforcedStyle: comparison +# # bad +# foo.zero? +# foo.negative? +# bar.baz.positive? +# @example EnforcedStyle: comparison +# # bad +# foo.zero? +# foo.negative? +# bar.baz.positive? +# +# # good +# foo == 0 +# 0 > foo +# bar.baz > 0 +# @example EnforcedStyle: predicate (default) +# # bad +# foo == 0 +# 0 > foo +# bar.baz > 0 +# +# # good +# foo.zero? +# foo.negative? +# bar.baz.positive? +# +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#78 +class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174 + def comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179 + def inverted_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 + def predicate(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#107 + def allowed_method_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 + def check(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 + def invert; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134 + def parenthesized_source(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 + def replacement(node, numeric, operation); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146 + def replacement_supported?(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 + def require_parentheses?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#84 +RuboCop::Cop::Style::NumericPredicate::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#86 +RuboCop::Cop::Style::NumericPredicate::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#88 +RuboCop::Cop::Style::NumericPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces the use of consistent method names +# `Object#yield_self` or `Object#then`. +# +# @example EnforcedStyle: then (default) +# +# # bad +# obj.yield_self { |x| x.do_something } +# +# # good +# obj.then { |x| x.do_something } +# @example EnforcedStyle: yield_self +# +# # bad +# obj.then { |x| x.do_something } +# +# # good +# obj.yield_self { |x| x.do_something } +# +# source://rubocop//lib/rubocop/cop/style/object_then.rb#25 +class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#35 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#48 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#41 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#40 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#52 + def check_method_node(node); end + + # source://rubocop//lib/rubocop/cop/style/object_then.rb#70 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/object_then.rb#66 + def preferred_method?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/object_then.rb#32 +RuboCop::Cop::Style::ObjectThen::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/object_then.rb#33 +RuboCop::Cop::Style::ObjectThen::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that each source file defines at most one top-level class or module. +# +# Keeping one class or module per file makes it easier to find and navigate +# code, and follows the convention used by most Ruby projects. +# +# Classes and modules listed in `AllowedClasses` are not counted toward the +# limit. This is useful for small ancillary classes like custom exception +# classes that logically belong with the main class. +# +# @example +# # bad +# class Foo +# end +# +# class Bar +# end +# +# # bad +# class Foo +# end +# +# module Bar +# end +# +# # good +# class Foo +# end +# +# # good +# class Foo +# class Bar +# end +# end +# @example AllowedClasses: ['AllowedClass'] +# # good +# class Foo +# end +# +# class AllowedClass +# end +# +# source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#48 +class RuboCop::Cop::Style::OneClassPerFile < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#57 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#61 + def on_module(node); end + + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#53 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#85 + def allowed_class?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#89 + def allowed_classes; end + + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#67 + def check_top_level(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#77 + def top_level_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/one_class_per_file.rb#51 +RuboCop::Cop::Style::OneClassPerFile::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `if/then/else/end` constructs on a single line. +# A ternary operator (`?:`) or multi-line `if` is more readable. +# `AlwaysCorrectToMultiline` config option can be set to `true` to autocorrect all offenses to +# multi-line constructs. When `AlwaysCorrectToMultiline` is `false` (default case) the +# autocorrect will first try converting them to ternary operators. +# +# @example +# # bad +# if foo then bar else baz end +# +# # bad +# unless foo then baz else bar end +# +# # good +# foo ? bar : baz +# +# # good +# bar if foo +# +# # good +# if foo then bar end +# +# # good +# if foo +# bar +# else +# baz +# end +# @example AlwaysCorrectToMultiline: false (default) +# # bad +# if cond then run else dont end +# +# # good +# cond ? run : dont +# @example AlwaysCorrectToMultiline: true +# # bad +# if cond then run else dont end +# +# # good +# if cond +# run +# else +# dont +# end +# +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#53 +class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::OnNormalIfUnless + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#63 + def on_normal_if_unless(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#109 + def always_multiline?; end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#91 + def autocorrect(corrector, node, multiline); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#113 + def cannot_replace_to_ternary?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#127 + def expr_replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#148 + def keyword_with_changed_precedence?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 + def message(node, multiline); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#141 + def method_call_with_changed_precedence?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 + def multiline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#133 + def requires_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#99 + def ternary_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#119 + def ternary_replacement(node); end +end + +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#61 +RuboCop::Cop::Style::OneLineConditional::MSG_MULTILINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 +RuboCop::Cop::Style::OneLineConditional::MSG_SUFFIX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#60 +RuboCop::Cop::Style::OneLineConditional::MSG_TERNARY = T.let(T.unsafe(nil), String) + +# Flags uses of `OpenStruct`, as it is now officially discouraged +# to be used for performance, version compatibility, and potential security issues. +# +# @example +# +# # bad +# point = OpenStruct.new(x: 0, y: 1) +# +# # good +# Point = Struct.new(:x, :y) +# point = Point.new(0, 1) +# +# # also good +# point = { x: 0, y: 1 } +# +# # bad +# test_double = OpenStruct.new(a: 'b') +# +# # good (assumes test using rspec-mocks) +# test_double = double +# allow(test_double).to receive(:a).and_return('b') +# +# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#44 +class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#52 + def on_const(node); end + + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#48 + def uses_open_struct?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#61 + def custom_class_or_module_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/open_struct_use.rb#45 +RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant dot before operator method call. +# The target operator methods are `|`, `^`, `&`, ``<=>``, `==`, `===`, `=~`, `>`, `>=`, `<`, +# ``<=``, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. +# +# @example +# +# # bad +# foo.+ bar +# foo.& bar +# +# # good +# foo + bar +# foo & bar +# +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#20 +class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#30 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#83 + def insert_space_after?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#66 + def invalid_syntax_argument?(argument); end + + # Checks for an acceptable case of `foo.+(bar).baz`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 + def method_call_with_parenthesized_arg?(argument); end + + # `foo.~@` and `foo.!@` call the method `~` and `!` respectively. While those + # are operator methods, we don't want to actually consider them as such. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 + def unary_method_no_operator?(node); end + + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#72 + def wrap_in_parentheses_if_chained(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#25 +RuboCop::Cop::Style::OperatorMethodCall::INVALID_SYNTAX_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 +RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#24 +RuboCop::Cop::Style::OperatorMethodCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for options hashes and discourages them if the +# current Ruby version supports keyword arguments. +# +# @example +# +# # bad +# def fry(options = {}) +# temperature = options.fetch(:temperature, 300) +# # ... +# end +# +# # good +# def fry(temperature: 300) +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/option_hash.rb#22 +class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#30 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#26 + def option_hash(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#39 + def allowlist; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#48 + def super_used?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/option_hash.rb#43 + def suspicious_name?(arg_name); end +end + +# source://rubocop//lib/rubocop/cop/style/option_hash.rb#23 +RuboCop::Cop::Style::OptionHash::MSG = T.let(T.unsafe(nil), String) + +# Checks for optional arguments to methods +# that do not come at the end of the argument list. +# +# @example +# # bad +# def foo(a = 1, b, c) +# end +# +# # good +# def baz(a, b, c = 1) +# end +# +# def foobar(a = 1, b = 2, c = 3) +# end +# +# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#24 +class RuboCop::Cop::Style::OptionalArguments < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#27 + def on_def(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#45 + def argument_positions(arguments); end + + # source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#33 + def each_misplaced_optional_arg(arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/optional_arguments.rb#25 +RuboCop::Cop::Style::OptionalArguments::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where keyword arguments can be used instead of +# boolean arguments when defining methods. `respond_to_missing?` method is allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# def some_method(bar = false) +# puts bar +# end +# +# # bad - common hack before keyword args were introduced +# def some_method(options = {}) +# bar = options.fetch(:bar, false) +# puts bar +# end +# +# # good +# def some_method(bar: false) +# puts bar +# end +# @example AllowedMethods: ['some_method'] +# # good +# def some_method(bar = false) +# puts bar +# end +# +# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#37 +class RuboCop::Cop::Style::OptionalBooleanParameter < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#52 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#56 + def format_message(argument); end +end + +# source://rubocop//lib/rubocop/cop/style/optional_boolean_parameter.rb#40 +RuboCop::Cop::Style::OptionalBooleanParameter::MSG = T.let(T.unsafe(nil), String) + +# Checks for potential usage of the `||=` operator. +# +# @example +# # bad +# name = name ? name : 'Bozhidar' +# +# # bad +# name = if name +# name +# else +# 'Bozhidar' +# end +# +# # bad +# unless name +# name = 'Bozhidar' +# end +# +# # bad +# name = 'Bozhidar' unless name +# +# # good - set name to 'Bozhidar', only if it's nil or false +# name ||= 'Bozhidar' +# +# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#29 +class RuboCop::Cop::Style::OrAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#65 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#66 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#51 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#64 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#57 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#35 + def ternary_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#44 + def unless_assignment?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#80 + def take_variable_and_default_from_ternary(node); end + + # source://rubocop//lib/rubocop/cop/style/or_assignment.rb#84 + def take_variable_and_default_from_unless(node); end +end + +# source://rubocop//lib/rubocop/cop/style/or_assignment.rb#32 +RuboCop::Cop::Style::OrAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for simple usages of parallel assignment. +# Parallel assignment is less readable than individual +# assignments and makes it harder to follow what each +# variable is being set to. +# +# This will only complain when the number of variables +# being assigned matched the number of assigning variables. +# +# @example +# # bad +# a, b, c = 1, 2, 3 +# a, b, c = [1, 2, 3] +# +# # good +# one, two = *foo +# a, b = foo +# a, b = b, a +# +# a = 1 +# b = 2 +# c = 3 +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#27 +class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#114 + def implicit_self_getter?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#33 + def on_masgn(node); end + + private + + # Converts (send nil :something) nodes to (send (:self) :something). + # This makes the sorting algorithm work for expressions such as + # `self.a, self.b = b, a`. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#107 + def add_self_to_getters(right_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#66 + def allowed_lhs?(elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#60 + def allowed_masign?(lhs_elements, rhs_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#72 + def allowed_rhs?(node); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 + def assignment_corrector(node, rhs, order); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#53 + def autocorrect(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#96 + def find_valid_order(left_elements, right_elements); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 + def modifier_statement?(node); end +end + +# Topologically sorts the assignments with Kahn's algorithm. +# https://en.wikipedia.org/wiki/Topological_sorting#Kahn's_algorithm +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#118 +class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter + extend ::RuboCop::AST::NodePattern::Macros + + # @return [AssignmentSorter] a new instance of AssignmentSorter + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#130 + def initialize(assignments); end + + # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. + # Does `rhs` access the same value which is assigned by `lhs`? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#177 + def accesses?(rhs, lhs); end + + # Returns all the assignments which must come after `assignment` + # (due to dependencies on the previous value of the assigned var) + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#156 + def dependencies_for_assignment(assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#170 + def dependency?(lhs, rhs); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 + def matching_calls(param0, param1, param2); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#134 + def tsort; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#125 + def uses_var?(param0, param1); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#122 + def var_name(param0 = T.unsafe(nil)); end +end + +# An internal class for correcting parallel assignment +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#197 +class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + include ::RuboCop::Cop::Alignment + + # @return [GenericCorrector] a new instance of GenericCorrector + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#202 + def initialize(node, rhs, modifier, config, new_elements); end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#200 + def config; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#210 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#214 + def correction_range; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#200 + def node; end + + # Returns the value of attribute rescue_result. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#200 + def rescue_result; end + + # Returns the value of attribute rhs. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#200 + def rhs; end + + protected + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#220 + def assignment; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 + def cop_config; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#237 + def extract_sources(node); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#226 + def source(node, loc); end +end + +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 +RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) + +# An internal class for correcting parallel assignment +# guarded by if, unless, while, or until +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#283 +class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#284 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#293 + def correction_range; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#299 + def modifier_range(node); end +end + +# An internal class for correcting parallel assignment +# protected by rescue +# +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#248 +class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#249 + def correction; end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#260 + def correction_range; end + + private + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#271 + def begin_correction(rescue_result); end + + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#266 + def def_correction(rescue_result); end +end + +# Checks for the presence of superfluous parentheses around the +# condition of if/unless/while/until. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example +# # bad +# x += 1 while (x < 10) +# foo unless (bar || baz) +# +# if (x > 10) +# elsif (x < 3) +# end +# +# # good +# x += 1 while x < 10 +# foo unless bar || baz +# +# if x > 10 +# elsif x < 3 +# end +# @example AllowInMultilineConditions: false (default) +# # bad +# if (x > 10 && +# y > 10) +# end +# +# # good +# if x > 10 && +# y > 10 +# end +# @example AllowInMultilineConditions: true +# # good +# if (x > 10 && +# y > 10) +# end +# @example AllowSafeAssignment: false +# # bad +# foo unless (bar = baz) +# @example AllowSafeAssignment: true (default) +# # good +# foo unless (bar = baz) +# +# source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#56 +class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + include ::RuboCop::Cop::Parentheses + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#76 + def control_op_condition(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#62 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#71 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#68 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#130 + def allow_multiline_conditions?; end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#118 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#111 + def modifier_op?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#124 + def parens_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#80 + def process_control_op(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#96 + def require_parentheses?(node, condition_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 + def semicolon_separated_expressions?(first_exp, rest_exps); end +end + +# Checks for consecutive calls to `select`/`filter`/`find_all` and `reject` +# on the same receiver with the same block body, where `partition` could be +# used instead. Also detects two `select` or two `reject` calls where one +# block negates the other with `!`. Using `partition` reduces two collection +# traversals to one. +# +# @example +# # bad +# positives = array.select { |x| x > 0 } +# negatives = array.reject { |x| x > 0 } +# +# # bad +# positives = array.filter { |x| x > 0 } +# negatives = array.reject { |x| x > 0 } +# +# # bad +# negatives = array.reject { |x| x > 0 } +# positives = array.select { |x| x > 0 } +# +# # bad +# positives = array.select(&:positive?) +# negatives = array.reject(&:positive?) +# +# # bad +# positives = array.select(&:positive?) +# negatives = array.reject { |x| x.positive? } +# +# # bad +# positives = array.select { |x| x.positive? } +# non_positives = array.select { |x| !x.positive? } +# +# # good +# positives, negatives = array.partition { |x| x > 0 } +# +# # good +# positives, non_positives = array.partition { |x| x.positive? } +# +# # good +# positives, negatives = array.partition(&:positive?) +# +# source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#56 +class RuboCop::Cop::Style::PartitionInsteadOfDoubleSelect < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#71 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#84 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#77 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#76 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#79 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#67 + def symbol_proc_method?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#209 + def autocorrect(corrector, node, sibling, container, sibling_container); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#175 + def block_matches_block_pass?(block_node, send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#205 + def both_lvasgn?(container, sibling_container); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#257 + def build_partition_call(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#145 + def complementary_pair?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#227 + def complementary_variable_order(sibling, container, sibling_container); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#152 + def equivalent_predicate?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#128 + def extract_block(container); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#137 + def extract_block_pass_send(container); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#124 + def extract_candidate(container); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#88 + def find_and_register_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#108 + def find_matching_candidate(node, sibling_container); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#119 + def matching_pair?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#191 + def negated_body?(body1, body2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#183 + def negated_predicate?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#235 + def negation_partition_args(node, sibling, container, sibling_container); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#99 + def node_container(node); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#195 + def register_offense(node, sibling, container, sibling_container); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#164 + def same_block_contents?(block1, block2); end + + # source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#249 + def select_node_for(sibling, container); end +end + +# source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#63 +RuboCop::Cop::Style::PartitionInsteadOfDoubleSelect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#60 +RuboCop::Cop::Style::PartitionInsteadOfDoubleSelect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#64 +RuboCop::Cop::Style::PartitionInsteadOfDoubleSelect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/partition_instead_of_double_select.rb#62 +RuboCop::Cop::Style::PartitionInsteadOfDoubleSelect::SELECT_METHODS = T.let(T.unsafe(nil), Array) + +# Enforces the consistent usage of `%`-literal delimiters. +# Using consistent delimiters across the codebase reduces +# cognitive load when reading `%`-literals. +# +# Specify the 'default' key to set all preferred delimiters at once. You +# can continue to specify individual preferred delimiters to override the +# default. +# +# @example +# # Style/PercentLiteralDelimiters: +# # PreferredDelimiters: +# # default: '[]' +# # '%i': '()' +# +# # good +# %w[alpha beta] + %i(gamma delta) +# +# # bad +# %W(alpha #{beta}) +# +# # bad +# %I(alpha beta) +# +# source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#28 +class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#32 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#43 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#36 + def on_regexp(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#40 + def on_str(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#45 + def on_sym(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#49 + def on_xstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#95 + def contains_delimiter?(node, delimiters); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#84 + def contains_preferred_delimiter?(node, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#88 + def include_same_character_as_used_for_delimiter?(node, type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#109 + def matchpairs(begin_delimiter); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#69 + def message(type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#55 + def on_percent_literal(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#76 + def preferred_delimiters_for(type); end + + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#101 + def string_source(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_literal_delimiters.rb#80 + def uses_preferred_delimiter?(node, type); end +end + +# Checks for usage of the %Q() syntax when %q() would do. +# +# @example EnforcedStyle: lower_case_q (default) +# # The `lower_case_q` style prefers `%q` unless +# # interpolation is needed. +# # bad +# %Q[Mix the foo into the baz.] +# %Q(They all said: 'Hooray!') +# +# # good +# %q[Mix the foo into the baz] +# %q(They all said: 'Hooray!') +# @example EnforcedStyle: upper_case_q +# # The `upper_case_q` style requires the sole use of `%Q`. +# # bad +# %q/Mix the foo into the baz./ +# %q{They all said: 'Hooray!'} +# +# # good +# %Q/Mix the foo into the baz./ +# %Q{They all said: 'Hooray!'} +# +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#28 +class RuboCop::Cop::Style::PercentQLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#36 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#55 + def correct_literal_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#64 + def corrected(src); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#60 + def message(_range); end + + # source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#42 + def on_percent_literal(node); end +end + +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#33 +RuboCop::Cop::Style::PercentQLiterals::LOWER_CASE_Q_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/percent_q_literals.rb#34 +RuboCop::Cop::Style::PercentQLiterals::UPPER_CASE_Q_MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of Perl-style regexp match +# backreferences and their English versions like +# $1, $2, $&, &+, $MATCH, $PREMATCH, etc. +# +# @example +# # bad +# puts $1 +# +# # good +# puts Regexp.last_match(1) +# +# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#16 +class RuboCop::Cop::Style::PerlBackrefs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#21 + def on_back_ref(node); end + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#25 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#29 + def on_nth_ref(node); end + + private + + # @param node [RuboCop::AST::Node] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#99 + def constant_prefix(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#38 + def derived_from_braceless_interpolation?(node); end + + # @param node [RuboCop::AST::Node] + # @param preferred_expression [String] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#46 + def format_message(node:, preferred_expression:); end + + # @param node [RuboCop::AST::Node] + # @private + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#109 + def on_back_ref_or_gvar_or_nth_ref(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#58 + def original_expression_of(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#70 + def preferred_expression_to(node); end + + # @param node [RuboCop::AST::Node] + # @private + # @return [String, nil] + # + # source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#89 + def preferred_expression_to_node_with_constant_prefix(node); end +end + +# source://rubocop//lib/rubocop/cop/style/perl_backrefs.rb#19 +RuboCop::Cop::Style::PerlBackrefs::MESSAGE_FORMAT = T.let(T.unsafe(nil), String) + +# Looks for uses of `any?`, `all?`, `none?`, or `one?` with a block +# containing only an `is_a?`, `kind_of?`, or `instance_of?` check, and +# suggests using the predicate method with the class argument directly. +# +# @example +# # bad +# array.any? { |x| x.is_a?(Integer) } +# array.all? { |x| x.kind_of?(String) } +# array.none? { |x| x.is_a?(Float) } +# array.one? { |x| x.instance_of?(Symbol) } +# +# # good +# array.any?(Integer) +# array.all?(String) +# array.none?(Float) +# array.one?(Symbol) +# +# source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#27 +class RuboCop::Cop::Style::PredicateWithKind < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#45 + def kind_call?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#36 + def kind_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#59 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#49 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#63 + def extract_send_node(block_node); end + + # source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#72 + def register_offense(node, block_node, klass, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#33 +RuboCop::Cop::Style::PredicateWithKind::KIND_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#31 +RuboCop::Cop::Style::PredicateWithKind::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/predicate_with_kind.rb#32 +RuboCop::Cop::Style::PredicateWithKind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of methods `Hash#has_key?` and +# `Hash#has_value?`, and suggests using `Hash#key?` and `Hash#value?` instead. +# +# It is configurable to enforce the verbose method names, by using the +# `EnforcedStyle: verbose` configuration. +# +# @example EnforcedStyle: short (default) +# # bad +# Hash#has_key? +# Hash#has_value? +# +# # good +# Hash#key? +# Hash#value? +# @example EnforcedStyle: verbose +# # bad +# Hash#key? +# Hash#value? +# +# # good +# Hash#has_key? +# Hash#has_value? +# +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#33 +class RuboCop::Cop::Style::PreferredHashMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#52 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#56 + def message(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#68 + def offending_selector?(method_name); end + + # source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#60 + def proper_method_name(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#37 +RuboCop::Cop::Style::PreferredHashMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#39 +RuboCop::Cop::Style::PreferredHashMethods::OFFENDING_SELECTORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/preferred_hash_methods.rb#41 +RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `Proc.new` where `Kernel#proc` +# would be more appropriate. `proc` is the shorter and +# more idiomatic way to create procs in Ruby. +# +# @example +# # bad +# p = Proc.new { |n| puts n } +# +# # good +# p = proc { |n| puts n } +# +# source://rubocop//lib/rubocop/cop/style/proc.rb#17 +class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#34 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#33 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/proc.rb#23 + def proc_new?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/proc.rb#20 +RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) + +# Checks if the quotes used for quoted symbols match the configured defaults. +# By default uses the same configuration as `Style/StringLiterals`; if that +# cop is not enabled, the default `EnforcedStyle` is `single_quotes`. +# +# String interpolation is always kept in double quotes. +# +# NOTE: `Lint/SymbolConversion` can be used in parallel to ensure that symbols +# are not quoted that don't need to be. This cop is for configuring the quoting +# style to use for symbols that require quotes. +# +# @example EnforcedStyle: double_quotes +# # bad +# :'abc-def' +# +# # good +# :"abc-def" +# :"#{str}" +# :"a\'b" +# @example EnforcedStyle: same_as_string_literals (default) / single_quotes +# # bad +# :"abc-def" +# +# # good +# :'abc-def' +# :"#{str}" +# :"a\'b" +# +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#33 +class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::SymbolHelp + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#44 + def on_sym(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 + def alternative_style; end + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#88 + def correct_quotes(str); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#83 + def hash_colon_key?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#61 + def invalid_double_quotes?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 + def quoted?(sym_node); end + + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 + def wrong_quotes?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#41 +RuboCop::Cop::Style::QuotedSymbols::MSG_DOUBLE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#39 +RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) + +# Checks the args passed to `fail` and `raise`. +# +# Exploded style (default) enforces passing the exception class and message +# arguments separately, rather than constructing an instance of the error. +# +# Compact style enforces constructing an error instance. +# +# Both styles allow passing just a message, or an error instance when there is more +# than one argument. +# +# The exploded style has an `AllowedCompactTypes` configuration +# option that takes an `Array` of exception name Strings. +# +# @example EnforcedStyle: compact +# # bad +# raise StandardError, 'message' +# raise RuntimeError, arg1, arg2, arg3 +# +# # good +# raise StandardError.new('message') +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# fail 'message' +# @example EnforcedStyle: exploded (default) +# # bad +# raise StandardError.new('message') +# +# # good +# raise StandardError, 'message' +# fail 'message' +# raise MyCustomError +# raise MyCustomError.new(arg1, arg2, arg3) +# raise MyKwArgError.new(key1: val1, key2: val2) +# +# # With `AllowedCompactTypes` set to ['MyWrappedError'] +# raise MyWrappedError.new(obj) +# raise MyWrappedError.new(obj), 'message' +# +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#47 +class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#59 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#135 + def acceptable_exploded_args?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#148 + def allowed_non_exploded_type?(arg); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#98 + def check_compact(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#114 + def check_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#72 + def correction_compact_to_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#84 + def correction_exploded_to_compact(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#154 + def requires_parens?(parent); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#131 + def use_new_method?(first_arg); end +end + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#53 +RuboCop::Cop::Style::RaiseArgs::ACCEPTABLE_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#52 +RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 +RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#57 +RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of randomly generated numbers, +# added/subtracted with integer literals, as well as those with +# Integer#succ and Integer#pred methods. Prefer using ranges instead, +# as it clearly states the intentions. +# +# @example +# # bad +# rand(6) + 1 +# 1 + rand(6) +# rand(6) - 1 +# 1 - rand(6) +# rand(6).succ +# rand(6).pred +# Random.rand(6) + 1 +# Kernel.rand(6) + 1 +# rand(0..5) + 1 +# +# # good +# rand(1..6) +# rand(1...7) +# +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#26 +class RuboCop::Cop::Style::RandomWithOffset < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#33 + def integer_op_rand?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#63 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#54 + def rand_modified?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#43 + def rand_op_integer?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#73 + def random_call(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#147 + def to_int(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#78 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#135 + def boundaries_from_random_node(random_node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#88 + def corrected_integer_op_rand(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#118 + def corrected_rand_modified(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#103 + def corrected_rand_op_integer(node); end + + # source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#131 + def prefix_from_prefix_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#29 +RuboCop::Cop::Style::RandomWithOffset::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/random_with_offset.rb#30 +RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `each_with_object`, `inject`, and `reduce` calls that build +# a hash from an enumerable, where `to_h` with a block could be used instead. +# +# This cop complements `Style/HashTransformKeys` and `Style/HashTransformValues`, +# which handle hash-to-hash transformations with destructured key-value pairs. +# This cop targets the case where a hash is built from individual elements +# (non-destructured block parameter). +# +# @example +# # bad +# array.each_with_object({}) { |elem, hash| hash[elem.id] = elem.name } +# +# # bad +# array.inject({}) { |hash, elem| hash[elem.id] = elem.name; hash } +# +# # bad +# array.reduce({}) { |hash, elem| hash[elem.id] = elem.name; hash } +# +# # bad +# array.each_with_object({}) { |elem, hash| hash[elem] = elem.to_s } +# +# # good +# array.to_h { |elem| [elem.id, elem.name] } +# +# # good +# array.to_h { |elem| [elem, elem.to_s] } +# +# source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#40 +class RuboCop::Cop::Style::ReduceToHash < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # each_with_object({}) { |elem, hash| hash[key] = value } + # + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#52 + def each_with_object_to_hash?(param0 = T.unsafe(nil)); end + + # inject/reduce({}) { |hash, elem| hash[key] = value; hash } + # + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#67 + def inject_to_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#90 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#84 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#111 + def accumulator_name(block_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#106 + def accumulator_used_in_expressions?(block_node, key, value); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#169 + def adjusted_source(expr_node, block_node); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#94 + def check_offense(node, block_node); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#152 + def do_end_replacement(block_node, body, arg = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#161 + def element_arg_source(block_node); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#178 + def indent(node); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#143 + def named_block_replacement(block_node, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#116 + def references_variable?(node, name); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#120 + def register_offense(send_node, block_node, key_expr, value_expr); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#131 + def replacement(block_node, key_expr, value_expr); end + + # source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#157 + def replacement_range(send_node, block_node); end +end + +# source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#47 +RuboCop::Cop::Style::ReduceToHash::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/reduce_to_hash.rb#48 +RuboCop::Cop::Style::ReduceToHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for a redundant argument passed to certain methods. +# +# NOTE: This cop is limited to methods with single parameter. +# +# Method names and their redundant arguments can be configured like this: +# +# [source,yaml] +# ---- +# Methods: +# join: '' +# sum: 0 +# split: ' ' +# chomp: "\n" +# chomp!: "\n" +# foo: 2 +# ---- +# +# @example +# # bad +# array.join('') +# [1, 2, 3].join("") +# array.sum(0) +# exit(true) +# exit!(false) +# string.to_i(10) +# string.split(" ") +# "first\nsecond".split(" ") +# string.chomp("\n") +# string.chomp!("\n") +# A.foo(2) +# +# # good +# array.join +# [1, 2, 3].join +# array.sum +# exit +# exit! +# string.to_i +# string.split +# "first second".split +# string.chomp +# string.chomp! +# A.foo +# +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#59 +class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#78 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#66 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#110 + def argument_matched?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#102 + def argument_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#122 + def exclude_cntrl_character?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#95 + def redundant_arg_for_method(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#82 + def redundant_argument?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#63 +RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 +RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of array using redundant `Array` constructor. +# Autocorrect replaces to array literal which is the simplest and fastest. +# +# @example +# +# # bad +# Array.new([]) +# Array[] +# Array([]) +# Array.new(['foo', 'foo', 'foo']) +# Array['foo', 'foo', 'foo'] +# Array(['foo', 'foo', 'foo']) +# +# # good +# [] +# ['foo', 'foo', 'foo'] +# Array.new(3, 'foo') +# Array.new(3) { 'foo' } +# +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25 +class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33 + def redundant_array_constructor(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69 + def register_offense(range, node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28 +RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30 +RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant calls of `Array#flatten`. +# +# `Array#join` joins nested arrays recursively, so flattening an array +# beforehand is redundant. +# +# @example +# # bad +# x.flatten.join +# x.flatten(1).join +# +# # good +# x.join +# +# source://rubocop//lib/rubocop/cop/style/redundant_array_flatten.rb#26 +class RuboCop::Cop::Style::RedundantArrayFlatten < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_array_flatten.rb#34 + def flatten_join?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_array_flatten.rb#46 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_array_flatten.rb#38 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_array_flatten.rb#29 +RuboCop::Cop::Style::RedundantArrayFlatten::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_array_flatten.rb#31 +RuboCop::Cop::Style::RedundantArrayFlatten::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant assignment before returning. +# +# @example +# # bad +# def test +# x = foo +# x +# end +# +# # bad +# def test +# if x +# z = foo +# z +# elsif y +# z = bar +# z +# end +# end +# +# # good +# def test +# foo +# end +# +# # good +# def test +# if x +# foo +# elsif y +# bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#40 +class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#50 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#53 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#46 + def redundant_assignment?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#99 + def check_begin_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#58 + def check_branch(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#79 + def check_case_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#74 + def check_case_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#95 + def check_ensure_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#84 + def check_if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 + def check_rescue_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#43 +RuboCop::Cop::Style::RedundantAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `begin` blocks. A `begin` block is redundant +# when the `rescue`/`ensure` can be handled by the enclosing method +# or block definition directly, avoiding unnecessary indentation. +# +# @example +# +# # bad +# def redundant +# begin +# ala +# bala +# rescue StandardError => e +# something +# end +# end +# +# # good +# def preferred +# ala +# bala +# rescue StandardError => e +# something +# end +# +# # bad +# begin +# do_something +# end +# +# # good +# do_something +# +# # bad +# # When using Ruby 2.5 or later. +# do_something do +# begin +# something +# rescue => ex +# anything +# end +# end +# +# # good +# # In Ruby 2.5 or later, you can omit `begin` in `do-end` block. +# do_something do +# something +# rescue => ex +# anything +# end +# +# # good +# # Stabby lambdas don't support implicit `begin` in `do-end` blocks. +# -> do +# begin +# foo +# rescue Bar +# baz +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#65 +class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + def offensive_kwbegins(param0); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#111 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#94 + def on_case(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#97 + def on_case_match(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#86 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#121 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#123 + def on_kwbegin(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#120 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#109 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#99 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#131 + def allowable_kwbegin?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#205 + def begin_block_has_multiline_statements?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#197 + def condition_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#211 + def contain_rescue_or_ensure?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#190 + def correct_modifier_form_after_multiline_begin_block(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#201 + def empty_begin?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#228 + def inspect_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#138 + def register_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#167 + def remove_begin(corrector, offense_range, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#155 + def replace_begin_with_statement(corrector, offense_range, node); end + + # Restore comments that occur between "begin" and "first_child". + # These comments will be moved to above the assignment line. + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 + def restore_removed_comments(corrector, offense_range, node, first_child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#184 + def use_modifier_form_after_multiline_begin_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#224 + def valid_begin_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#217 + def valid_context_using_only_begin?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#71 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 +RuboCop::Cop::Style::RedundantBegin::MSG = T.let(T.unsafe(nil), String) + +# Checks for usage of the %W() syntax when %w() would do. +# +# @example +# # bad +# %W(cat dog pig) +# %W[door wall floor] +# +# # good +# %w/swim run bike/ +# %w[shirt pants shoes] +# %W(apple #{fruit} grape) +# +# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#17 +class RuboCop::Cop::Style::RedundantCapitalW < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#23 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#29 + def on_percent_literal(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#38 + def requires_interpolation?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_capital_w.rb#21 +RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) + +# Checks for unnecessary conditional expressions. +# +# NOTE: Since the intention of the comment cannot be automatically determined, +# autocorrection is not applied when a comment is used, as shown below: +# +# [source,ruby] +# ----- +# if b +# # Important note. +# b +# else +# c +# end +# ----- +# +# @example +# # bad +# a = b ? b : c +# +# # good +# a = b || c +# +# # bad +# if b +# b +# else +# c +# end +# +# # good +# b || c +# +# # good +# if b +# b +# elsif cond +# c +# end +# +# # bad +# a.nil? ? true : a +# +# # good +# a.nil? || a +# +# # bad +# if a.nil? +# true +# else +# a +# end +# +# # good +# a.nil? || a +# @example AllowedMethods: ['infinite?', 'nonzero?'] (default) +# # good +# num.infinite? ? true : false +# +# # good +# num.nonzero? ? true : false +# +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#68 +class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#80 + def on_if(node); end + + private + + # If the argument is using an operator, it is an invalid syntax. + # e.g. `foo || *bar`, `foo || **bar`, and `foo || &bar`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#228 + def argument_with_operator?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#205 + def asgn_type?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#195 + def branches_have_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#209 + def branches_have_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#315 + def correct_ternary(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#262 + def else_source(else_branch, arithmetic_operation); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#288 + def else_source_if_has_assignment(else_branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#278 + def else_source_if_has_method(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#184 + def if_branch_is_true_type_and_else_is_not?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#244 + def if_source(if_branch, arithmetic_operation); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#298 + def make_ternary_form(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#121 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#114 + def range_of_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#129 + def redundant_condition?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#330 + def require_braces?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#323 + def require_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#222 + def same_method?(if_branch, else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#216 + def single_argument_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#145 + def synonymous_condition_and_branch?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#334 + def use_arithmetic_operation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#141 + def use_hash_key_access?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#137 + def use_hash_key_assignment?(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#133 + def use_if_branch?(else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#338 + def without_argument_parentheses_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#236 + def wrap_arguments_with_parens(condition); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#76 +RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#74 +RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#75 +RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) + +# Checks for redundant returning of true/false in conditionals. +# +# @example +# # bad +# x == y ? true : false +# +# # bad +# if x == y +# true +# else +# false +# end +# +# # good +# x == y +# +# # bad +# x == y ? false : true +# +# # good +# x != y +# +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#27 +class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#36 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#56 + def redundant_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#61 + def redundant_condition_inverted?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 + def indented_else_node(expression, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#65 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#71 + def replacement_condition(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#32 +RuboCop::Cop::Style::RedundantConditional::COMPARISON_OPERATOR_MATCHER = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#34 +RuboCop::Cop::Style::RedundantConditional::MSG = T.let(T.unsafe(nil), String) + +# Avoid redundant `::` prefix on constant. +# +# How Ruby searches constant is a bit complicated, and it can often be difficult to +# understand from the code whether the `::` is intended or not. Where `Module.nesting` +# is empty, there is no need to prepend `::`, so it would be nice to consistently +# avoid such meaningless `::` prefix to avoid confusion. +# +# NOTE: This cop is disabled if `Lint/ConstantResolution` cop is enabled to prevent +# conflicting rules. Because it respects user configurations that want to enable +# `Lint/ConstantResolution` cop which is disabled by default. +# +# @example +# # bad +# ::Const +# +# # good +# Const +# +# # bad +# class << self +# ::Const +# end +# +# # good +# class << self +# Const +# end +# +# # good +# class A +# ::Const +# end +# +# # good +# module A +# ::Const +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#43 +class RuboCop::Cop::Style::RedundantConstantBase < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#48 + def on_cbase(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#67 + def bad?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#63 + def lint_constant_resolution_config; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#59 + def lint_constant_resolution_cop_enabled?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#71 + def module_nesting_ancestors_of(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#77 + def used_in_super_class_part?(node, class_node:); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#46 +RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) + +# Checks for paths given to `require_relative` that start with +# the current directory (`./`), which can be omitted. +# +# @example +# +# # bad +# require_relative './path/to/feature' +# +# # good +# require_relative 'path/to/feature' +# +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#17 +class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#26 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#42 + def redundant_path_length(path); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::REDUNDANT_CURRENT_DIRECTORY_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of double splat hash braces. +# +# @example +# +# # bad +# do_something(**{foo: bar, baz: qux}) +# +# # good +# do_something(foo: bar, baz: qux) +# +# # bad +# do_something(**{foo: bar, baz: qux}.merge(options)) +# +# # good +# do_something(foo: bar, baz: qux, **options) +# +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22 +class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29 + def on_hash(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#45 + def allowed_double_splat_receiver?(kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#55 + def autocorrect(corrector, node, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#89 + def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85 + def closing_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107 + def convert_to_new_arguments(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#119 + def mergeable?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81 + def opening_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#100 + def range_of_merge_methods(merge_methods); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#66 + def root_receiver(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#75 + def select_merge_method_nodes(kwsplat); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `each`. +# +# @example +# +# # bad +# array.each.each { |v| do_something(v) } +# +# # good +# array.each { |v| do_something(v) } +# +# # bad +# array.each.each_with_index { |v, i| do_something(v, i) } +# +# # good +# array.each.with_index { |v, i| do_something(v, i) } +# array.each_with_index { |v, i| do_something(v, i) } +# +# # bad +# array.each.each_with_object { |v, o| do_something(v, o) } +# +# # good +# array.each.with_object { |v, o| do_something(v, o) } +# array.each_with_object { |v, o| do_something(v, o) } +# +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#34 +class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#59 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#96 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#86 + def range(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#64 + def redundant_each_method(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#107 + def remove_redundant_each(corrector, range, redundant_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#37 +RuboCop::Cop::Style::RedundantEach::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#38 +RuboCop::Cop::Style::RedundantEach::MSG_WITH_INDEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#39 +RuboCop::Cop::Style::RedundantEach::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_each.rb#41 +RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for `RuntimeError` as the argument of `raise`/`fail`. +# +# @example +# # bad +# raise RuntimeError, 'message' +# raise RuntimeError.new('message') +# +# # good +# raise 'message' +# +# # bad - message is not a string +# raise RuntimeError, Object.new +# raise RuntimeError.new(Object.new) +# +# # good +# raise Object.new.to_s +# +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 +class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79 + def compact?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74 + def exploded?(param0 = T.unsafe(nil)); end + + # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and + # `raise RuntimeError.new('message')` to `raise 'message'`. + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57 + def fix_compact(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39 + def fix_exploded(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65 + def replaced_compact(message); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47 + def replaced_exploded(node, command, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53 + def string_message?(message); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26 +RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27 +RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 +RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`. +# +# In such cases `fetch(key, value)` method is faster than `fetch(key) { value }`. +# +# NOTE: The block string `'value'` in `hash.fetch(:key) { 'value' }` is detected +# but not when disabled. +# +# @example SafeForConstants: false (default) +# # bad +# hash.fetch(:key) { 5 } +# hash.fetch(:key) { true } +# hash.fetch(:key) { nil } +# array.fetch(5) { :value } +# ENV.fetch(:key) { 'value' } +# +# # good +# hash.fetch(:key, 5) +# hash.fetch(:key, true) +# hash.fetch(:key, nil) +# array.fetch(5, :value) +# ENV.fetch(:key, 'value') +# @example SafeForConstants: true +# # bad +# ENV.fetch(:key) { VALUE } +# +# # good +# ENV.fetch(:key, VALUE) +# +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#40 +class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#55 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#81 + def rails_cache?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#48 + def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#96 + def build_bad_method(send, body); end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#89 + def build_good_method(send, body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#103 + def check_for_constant?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#107 + def check_for_string?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#85 + def fetch_range(send, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#74 + def should_not_check?(send, body); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#45 +RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for the presence of superfluous `.rb` extension in +# the filename provided to `require` and `require_relative`. +# +# NOTE: If the extension is omitted, Ruby tries adding '.rb', '.so', +# and so on to the name until found. If the file named cannot be found, +# a `LoadError` will be raised. +# There is an edge case where `foo.so` file is loaded instead of a `LoadError` +# if `foo.so` file exists when `require 'foo.rb'` will be changed to `require 'foo'`, +# but that seems harmless. +# +# @example +# # bad +# require 'foo.rb' +# require_relative '../foo.rb' +# +# # good +# require 'foo' +# require 'foo.so' +# require_relative '../foo' +# require_relative '../foo.so' +# +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#27 +class RuboCop::Cop::Style::RedundantFileExtensionInRequire < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#39 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#35 + def require_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#53 + def extension_range(name_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#31 +RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32 +RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies usages of `any?`, `empty?` or `none?` predicate methods +# chained to `select`/`filter`/`find_all` and change them to use predicate method instead. +# +# @example +# # bad +# arr.select { |x| x > 1 }.any? +# +# # good +# arr.any? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.empty? +# arr.select { |x| x > 1 }.none? +# +# # good +# arr.none? { |x| x > 1 } +# +# # good +# relation.select(:name).any? +# arr.select { |x| x > 1 }.any?(&:odd?) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.select { |x| x > 1 }.present? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.many? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.present? +# +# # good +# arr.any? { |x| x > 1 } +# +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53 +class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#90 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62 + def select_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#108 + def offense_range(select_node, predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#112 + def predicate_range(predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#94 + def register_offense(select_node, predicate_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 +RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58 +RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71 +RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59 +RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calls to `Kernel#format` or `Kernel#sprintf` that are redundant. +# +# Calling `format` with only a single string or constant argument is redundant, +# as it can be replaced by the string or constant itself. +# +# Also looks for `format` calls where the arguments are literals that can be +# inlined into a string easily. This applies to the `%s`, `%d`, `%i`, `%u`, and +# `%f` format specifiers. +# +# @example +# +# # bad +# format('the quick brown fox jumps over the lazy dog.') +# sprintf('the quick brown fox jumps over the lazy dog.') +# +# # good +# 'the quick brown fox jumps over the lazy dog.' +# +# # bad +# format(MESSAGE) +# sprintf(MESSAGE) +# +# # good +# MESSAGE +# +# # bad +# format('%s %s', 'foo', 'bar') +# sprintf('%s %s', 'foo', 'bar') +# +# # good +# 'foo bar' +# +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#54 +class RuboCop::Cop::Style::RedundantFormat < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#73 + def complex_number?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#78 + def find_hash_value_node(param0, param1); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#63 + def format_without_additional_args?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#90 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#68 + def rational_number?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#83 + def splatted_arguments?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#138 + def all_fields_literal?(string, arguments); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#245 + def argument_value(argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#241 + def argument_values(arguments); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#277 + def complex_value(complex_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#109 + def detect_unnecessary_fields(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#263 + def dsym_value(dsym_node); end + + # Escape any control characters in the string (eg. `\t` or `\n` become `\\t` or `\\n`) + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#237 + def escape_control_chars(string); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#169 + def find_argument(sequence, arguments, hash); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#212 + def float?(argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#267 + def hash_value(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#208 + def integer?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#184 + def matching_argument?(sequence, argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#105 + def message(node, prefer); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#202 + def numeric?(argument); end + + # Add correct quotes to the formatted string, preferring retaining the existing + # quotes if possible. + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#218 + def quote(string, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#273 + def rational_value(rational_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#121 + def register_all_fields_literal(node, string, arguments); end + + # If the sequence has a variable (`*`) width, it cannot be autocorrected + # if the width is not given as a numeric literal argument + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#161 + def unknown_variable_width?(sequence, arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#60 +RuboCop::Cop::Style::RedundantFormat::ACCEPTABLE_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#57 +RuboCop::Cop::Style::RedundantFormat::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#59 +RuboCop::Cop::Style::RedundantFormat::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Checks for uses of `Object#freeze` on immutable objects. +# +# NOTE: `Regexp` and `Range` literals are frozen objects since Ruby 3.0. +# +# NOTE: From Ruby 3.0, this cop allows explicit freezing of interpolated +# string literals when `# frozen-string-literal: true` is used. +# +# @example +# # bad +# CONST = 1.freeze +# +# # good +# CONST = 1 +# +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#19 +class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#26 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#57 + def operation_produces_immutable_object?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#39 + def immutable_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#48 + def strip_parenthesis(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#23 +RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_freeze.rb#24 +RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant heredoc delimiter quotes. +# +# @example +# +# # bad +# do_something(<<~'EOS') +# no string interpolation style text +# EOS +# +# # good +# do_something(<<~EOS) +# no string interpolation style text +# EOS +# +# do_something(<<~'EOS') +# #{string_interpolation_style_text_not_evaluated} +# EOS +# +# do_something(<<~'EOS') +# Preserve \ +# newlines +# EOS +# +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#29 +class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#36 + def on_heredoc(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#48 + def need_heredoc_delimiter_quotes?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#33 +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb#34 +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Checks for `initialize` methods that are redundant. +# +# An initializer is redundant if it does not do anything, or if it only +# calls `super` with the same arguments given to it. If the initializer takes +# an argument that accepts multiple values (`restarg`, `kwrestarg`, etc.) it +# will not register an offense, because it allows the initializer to take a different +# number of arguments as its superclass potentially does. +# +# NOTE: If an initializer takes any arguments and has an empty body, RuboCop +# assumes it to *not* be redundant. This is to prevent potential `ArgumentError`. +# +# NOTE: If an initializer argument has a default value, RuboCop assumes it +# to *not* be redundant. +# +# NOTE: Empty initializers are registered as offenses, but it is possible +# to purposely create an empty `initialize` method to override a superclass's +# initializer. +# +# @example +# # bad +# def initialize +# end +# +# # bad +# def initialize +# super +# end +# +# # bad +# def initialize(a, b) +# super +# end +# +# # bad +# def initialize(a, b) +# super(a, b) +# end +# +# # good +# def initialize +# do_something +# end +# +# # good +# def initialize +# do_something +# super +# end +# +# # good (different number of parameters) +# def initialize(a, b) +# super(a) +# end +# +# # good (default value) +# def initialize(a, b = 5) +# super +# end +# +# # good (default value) +# def initialize(a, b: 5) +# super +# end +# +# # good (changes the parameter requirements) +# def initialize(_) +# end +# +# # good (changes the parameter requirements) +# def initialize(*) +# end +# +# # good (changes the parameter requirements) +# def initialize(**) +# end +# +# # good (changes the parameter requirements) +# def initialize(...) +# end +# @example AllowComments: false +# +# # bad +# def initialize +# # Overriding to negate superclass `initialize` method. +# end +# @example AllowComments: true (default) +# +# # good +# def initialize +# # Overriding to negate superclass `initialize` method. +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#106 +class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#115 + def initialize_forwards?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#119 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#143 + def acceptable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#151 + def allow_comments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#147 + def forwards?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#137 + def register_offense(node, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#157 + def same_args?(super_node, args); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#111 +RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_initialize.rb#112 +RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String) + +# Checks for strings that are just an interpolated expression. +# +# @example +# +# # bad +# "#{@var}" +# +# # good +# @var.to_s +# +# # good if @var is already a String +# @var +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#39 +class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::PercentLiteral + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#49 + def on_dstr(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#131 + def autocorrect_other(corrector, embedded_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#114 + def autocorrect_single_variable_interpolation(corrector, embedded_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#108 + def autocorrect_variable_interpolation(corrector, embedded_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#104 + def embedded_in_percent_array?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#100 + def implicit_concatenation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#92 + def interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#141 + def require_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#68 + def single_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#83 + def single_variable_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#75 + def use_match_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#96 + def variable_interpolation?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#45 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 +RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Before Ruby 3.0, interpolated strings followed the frozen string literal +# magic comment which sometimes made it necessary to explicitly unfreeze them. +# Ruby 3.0 changed interpolated strings to always be unfrozen which makes +# unfreezing them redundant. +# +# @example +# # bad +# +"#{foo} bar" +# +# # bad +# "#{foo} bar".dup +# +# # bad +# String.new("#{foo} bar") +# +# # good +# "#{foo} bar" +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#24 +class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#41 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#34 + def redundant_unfreeze?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#52 + def offense_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#29 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant line continuation. +# +# This cop marks a line continuation as redundant if removing the backslash +# does not result in a syntax error. +# However, a backslash at the end of a comment or +# for string concatenation is not redundant and is not considered an offense. +# +# @example +# # bad +# foo. \ +# bar +# foo \ +# &.bar \ +# .baz +# +# # good +# foo. +# bar +# foo +# &.bar +# .baz +# +# # bad +# [foo, \ +# bar] +# {foo: \ +# bar} +# +# # good +# [foo, +# bar] +# {foo: +# bar} +# +# # bad +# foo(bar, \ +# baz) +# +# # good +# foo(bar, +# baz) +# +# # also good - backslash in string concatenation is not redundant +# foo('bar' \ +# 'baz') +# +# # also good - backslash at the end of a comment is not redundant +# foo(bar, # \ +# baz) +# +# # also good - backslash at the line following the newline begins with a + or -, +# # it is not redundant +# 1 \ +# + 2 \ +# - 3 +# +# # also good - backslash with newline between the method name and its arguments, +# # it is not redundant. +# some_method \ +# (argument) +# +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#67 +class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#86 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#218 + def argument_is_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#184 + def argument_newline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 + def code_ends_with_continuation?(last_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#111 + def ends_with_uncommented_backslash?(range); end + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#198 + def find_node_for_line(last_line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 + def inside_string_literal?(range, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 + def inside_string_literal_or_method_with_argument?(range); end + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#151 + def inspect_end_of_ruby_code_line_continuation; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#135 + def leading_dot_method_chain_with_blank_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#225 + def method_call_with_arguments?(node); end + + # A method call without parentheses such as the following cannot remove `\`: + # + # do_something \ + # argument + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#177 + def method_with_argument?(line_range, current_token, next_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#141 + def redundant_line_continuation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#103 + def require_line_continuation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#204 + def same_line?(node, line); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#229 + def start_with_arithmetic_operator?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#120 + def string_concatenation?(source_line); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#74 +RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#81 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#75 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#84 +RuboCop::Cop::Style::RedundantLineContinuation::ARITHMETIC_OPERATOR_TOKENS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 +RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 +RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71 +RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `max_by { ... }`, `min_by { ... }`, or +# `minmax_by { ... }` can be replaced by `max`, `min`, or `minmax`. +# +# @example +# # bad +# array.max_by { |x| x } +# array.min_by { |x| x } +# array.minmax_by { |x| x } +# +# # good +# array.max +# array.min +# array.minmax +# +# source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#19 +class RuboCop::Cop::Style::RedundantMinMaxBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#29 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#41 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#35 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#50 + def redundant_minmax_by_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#60 + def redundant_minmax_by_itblock(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#55 + def redundant_minmax_by_numblock(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#76 + def message_block(send, var_name); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#86 + def message_itblock(send); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#81 + def message_numblock(send); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#72 + def offense_range(send, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#64 + def register_offense(send, node, message); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#23 +RuboCop::Cop::Style::RedundantMinMaxBy::MSG_BLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#25 +RuboCop::Cop::Style::RedundantMinMaxBy::MSG_ITBLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#24 +RuboCop::Cop::Style::RedundantMinMaxBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_min_max_by.rb#27 +RuboCop::Cop::Style::RedundantMinMaxBy::REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# Checks for redundant parentheses. +# +# @example +# +# # bad +# (x) if ((y.z).nil?) +# +# # good +# x if y.z.nil? +# +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#16 +class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Parentheses + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#31 + def allowed_pin_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#333 + def first_send_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#338 + def first_super_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#343 + def first_yield_argument?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#191 + def interpolation?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#33 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#28 + def rescue?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23 + def square_brackets?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 + def allow_in_multiline_conditions?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#68 + def allowed_ancestor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#61 + def allowed_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#73 + def allowed_multiple_expression?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#82 + def allowed_ternary?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 + def argument_of_parenthesized_method_call?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#347 + def call_chain_starts_with_int?(begin_node, send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 + def call_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138 + def check(begin_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#225 + def check_send(begin_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#237 + def check_unary(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#260 + def disallowed_literal?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#270 + def disallowed_one_line_pattern_matching?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#353 + def do_end_block_in_method_chain?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#109 + def empty_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#153 + def find_offense_message(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#114 + def first_arg_begins_with_hash_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#322 + def first_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#54 + def ignore_syntax?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#123 + def in_pattern_matching_in_method_argument?(begin_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#256 + def keyword_ancestor?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#290 + def keyword_with_redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#95 + def like_method_argument_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#211 + def method_call_parentheses_required?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#303 + def method_call_with_redundant_parentheses?(begin_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#130 + def method_chain_begins_with_hash_literal(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#102 + def multiline_control_flow_statements?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#246 + def offense(node, msg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#202 + def oneline_rescue_parentheses_required?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#318 + def only_begin_arg?(args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#45 + def parens_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#279 + def raised_to_power_negative_numeric?(begin_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#311 + def singular_parenthesized_parent?(begin_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#252 + def suspect_unary?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#88 + def ternary_parentheses_required?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#41 + def variable?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20 +RuboCop::Cop::Style::RedundantParentheses::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for usage of the %q/%Q syntax when '' or "" would do. +# +# @example +# +# # bad +# name = %q(Bruce Wayne) +# time = %q(8 o'clock) +# question = %q("What did you say?") +# +# # good +# name = 'Bruce Wayne' +# time = "8 o'clock" +# question = '"What did you say?"' +# +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#20 +class RuboCop::Cop::Style::RedundantPercentQ < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#34 + def on_dstr(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#40 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#98 + def acceptable_capital_q?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#90 + def acceptable_q?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#67 + def allowed_percent_q?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#51 + def check(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#63 + def interpolated_quotes?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#72 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#86 + def start_with_percent_q_variant?(string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#82 + def string_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#25 +RuboCop::Cop::Style::RedundantPercentQ::DYNAMIC_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#28 +RuboCop::Cop::Style::RedundantPercentQ::EMPTY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#32 +RuboCop::Cop::Style::RedundantPercentQ::ESCAPED_NON_BACKSLASH = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#23 +RuboCop::Cop::Style::RedundantPercentQ::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#30 +RuboCop::Cop::Style::RedundantPercentQ::PERCENT_CAPITAL_Q = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#29 +RuboCop::Cop::Style::RedundantPercentQ::PERCENT_Q = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#27 +RuboCop::Cop::Style::RedundantPercentQ::QUOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#26 +RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#31 +RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) + +# Identifies places where argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'foo'.byteindex(/f/) +# 'foo'.byterindex(/f/) +# 'foo'.gsub(/f/, 'x') +# 'foo'.gsub!(/f/, 'x') +# 'foo'.partition(/f/) +# 'foo'.rpartition(/f/) +# 'foo'.scan(/f/) +# 'foo'.split(/f/) +# 'foo'.start_with?(/f/) +# 'foo'.sub(/f/, 'x') +# 'foo'.sub!(/f/, 'x') +# +# # good +# 'foo'.byteindex('f') +# 'foo'.byterindex('f') +# 'foo'.gsub('f', 'x') +# 'foo'.gsub!('f', 'x') +# 'foo'.partition('f') +# 'foo'.rpartition('f') +# 'foo'.scan('f') +# 'foo'.split('f') +# 'foo'.start_with?('f') +# 'foo'.sub('f', 'x') +# 'foo'.sub!('f', 'x') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 +class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringLiteralsHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#61 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 + def determinist_regexp?(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#70 + def preferred_argument(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#97 + def replacement(regexp_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 +RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 +RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for unnecessary single-element `Regexp` character classes. +# +# @example +# +# # bad +# r = /[x]/ +# +# # good +# r = /x/ +# +# # bad +# r = /[\s]/ +# +# # good +# r = /\s/ +# +# # bad +# r = %r{/[b]} +# +# # good +# r = %r{/b} +# +# # good +# r = /[ab]/ +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#30 +class RuboCop::Cop::Style::RedundantRegexpCharacterClass < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#37 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#101 + def backslash_b?(elem); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#53 + def each_redundant_character_class(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#61 + def each_single_element_character_class(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#83 + def multiple_codepoints?(expression); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#107 + def octal_requiring_char_class?(elem); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#72 + def redundant_single_element_character_class?(node, char_class); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#113 + def requires_escape_outside_char_class?(elem); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#95 + def whitespace_in_free_space_mode?(node, elem); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#87 + def without_character_class(loc); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#34 +RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33 +RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`. +# Autocorrect replaces to regexp literal which is the simplest and fastest. +# +# @example +# +# # bad +# Regexp.new(/regexp/) +# Regexp.compile(/regexp/) +# +# # good +# /regexp/ +# Regexp.new('regexp') +# Regexp.compile('regexp') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20 +class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27 + def redundant_regexp_constructor(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23 +RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24 +RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant escapes inside `Regexp` literals. +# +# @example +# # bad +# %r{foo\/bar} +# +# # good +# %r{foo/bar} +# +# # good +# /foo\/bar/ +# +# # good +# %r/foo\/bar/ +# +# # good +# %r!foo\!bar! +# +# # bad +# /a\-b/ +# +# # good +# /a-b/ +# +# # bad +# /[\+\-]\d/ +# +# # good +# /[+\-]\d/ +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#35 +class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#46 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#61 + def allowed_escape?(node, char, index, within_character_class); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#78 + def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#94 + def delimiter?(node, char); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#106 + def each_escape(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#118 + def escape_range_at_index(node, index); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#100 + def requires_escape_to_avoid_interpolation?(char_before_escape, escaped_char); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#41 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#43 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_OUTSIDE_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#42 +RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_WITHIN_CHAR_CLASS_METACHAR_ESCAPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#44 +RuboCop::Cop::Style::RedundantRegexpEscape::INTERPOLATION_SIGILS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#39 +RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsafe(nil), String) + +# Checks for redundant `return` expressions. Ruby methods +# implicitly return the value of the last evaluated expression, +# so an explicit `return` at the end of a method body is unnecessary. +# +# @example +# # These bad cases should be extended to handle methods whose body is +# # if/else or a case expression with a default branch. +# +# # bad +# def test +# return something +# end +# +# # bad +# def test +# one +# two +# three +# return something +# end +# +# # bad +# def test +# return something if something_else +# end +# +# # good +# def test +# something if something_else +# end +# +# # good +# def test +# if x +# elsif y +# else +# end +# end +# @example AllowMultipleReturnValues: false (default) +# # bad +# def test +# return x, y +# end +# @example AllowMultipleReturnValues: true +# # good +# def test +# return x, y +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#57 +class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#71 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#74 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#65 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#106 + def add_braces(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#101 + def add_brackets(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#177 + def allow_multiple_return_values?; end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#172 + def check_begin_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#112 + def check_branch(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#146 + def check_case_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#141 + def check_case_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#167 + def check_ensure_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#151 + def check_if_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#163 + def check_resbody_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#158 + def check_rescue_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#129 + def check_return_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#82 + def correct_with_arguments(return_node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#78 + def correct_without_arguments(return_node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#97 + def hash_without_braces?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#181 + def message(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 +RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#62 +RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 +RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant uses of `self`. +# +# The usage of `self` is only needed when: +# +# * Sending a message to same object with zero arguments in +# presence of a method name clash with an argument or a local +# variable. +# +# * Calling an attribute writer to prevent a local variable assignment. +# +# Note, with using explicit self you can only send messages with public or +# protected scope, you cannot send private messages this way. +# +# Note we allow uses of `self` with operators because it would be awkward +# otherwise. Also allows the use of `self.it` without arguments in blocks, +# as in `0.times { self.it }`, following `Lint/ItWithoutArgumentsInBlock` cop. +# +# @example +# +# # bad +# def foo(bar) +# self.baz +# end +# +# # good +# def foo(bar) +# self.bar # Resolves name clash with the argument. +# end +# +# def foo +# bar = 1 +# self.bar # Resolves name clash with the local variable. +# end +# +# def foo +# %w[x y z].select do |bar| +# self.bar == bar # Resolves name clash with argument of the block. +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#45 +class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # @return [RedundantSelf] a new instance of RedundantSelf + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#60 + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + # Assignment of self.x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 + def on_and_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#87 + def on_args(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#91 + def on_blockarg(node); end + + # Using self.x to distinguish from local variable x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#82 + def on_def(node); end + + # Using self.x to distinguish from local variable x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#85 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#103 + def on_in_pattern(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#124 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#99 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#95 + def on_masgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#123 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#76 + def on_op_asgn(node); end + + # Assignment of self.x + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 + def on_or_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#107 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#138 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#137 + def on_while(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#193 + def add_lhs_to_local_variables_scopes(rhs, lhs); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#201 + def add_masgn_lhs_variables(rhs, lhs); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#207 + def add_match_var_scopes(in_pattern_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#142 + def add_scope(node, local_variables = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#187 + def allow_self(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#148 + def allowed_send_node?(node); end + + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#163 + def it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#179 + def on_argument(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#171 + def regular_method_call?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#56 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 +RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#50 +RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 +RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where redundant assignments are made for in place +# modification methods. +# +# @example +# # bad +# args = args.concat(ary) +# hash = hash.merge!(other) +# +# # good +# args.concat(foo) +# args += foo +# hash.merge!(other) +# +# # good +# foo.concat(ary) +# +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#27 +class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#86 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#74 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#75 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#73 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#77 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#49 + def redundant_self_assignment?(param0 = T.unsafe(nil), param1, param2); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#100 + def correction_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#90 + def method_returning_self?(method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#94 + def redundant_assignment?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#41 +RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#34 +RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 +RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# Checks for places where conditional branch makes redundant self-assignment. +# +# It only detects local variable because it may replace state of instance variable, +# class variable, and global variable that have state across methods with `nil`. +# +# @example +# +# # bad +# foo = condition ? bar : foo +# +# # good +# foo = bar if condition +# +# # bad +# foo = condition ? foo : bar +# +# # good +# foo = bar unless condition +# +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#25 +class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#31 + def bad_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#35 + def on_lvasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#59 + def inconvertible_to_modifier?(if_branch, else_branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#64 + def multiple_statements?(branch); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#74 + def register_offense(if_node, offense_branch, opposite_branch, keyword); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#70 + def self_assign?(variable, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#53 + def use_if_and_else_branch?(expression); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#28 +RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String) + +# Identifies instances of sorting and then +# taking only the first or last element. The same behavior can +# be accomplished without a relatively expensive sort by using +# `Enumerable#min` instead of sorting and taking the first +# element and `Enumerable#max` instead of sorting and taking the +# last element. Similarly, `Enumerable#min_by` and +# `Enumerable#max_by` can replace `Enumerable#sort_by` calls +# after which only the first or last element is used. +# +# @example +# # bad +# [2, 1, 3].sort.first +# [2, 1, 3].sort[0] +# [2, 1, 3].sort.at(0) +# [2, 1, 3].sort.slice(0) +# +# # good +# [2, 1, 3].min +# +# # bad +# [2, 1, 3].sort.last +# [2, 1, 3].sort[-1] +# [2, 1, 3].sort.at(-1) +# [2, 1, 3].sort.slice(-1) +# +# # good +# [2, 1, 3].max +# +# # bad +# arr.sort_by(&:foo).first +# arr.sort_by(&:foo)[0] +# arr.sort_by(&:foo).at(0) +# arr.sort_by(&:foo).slice(0) +# +# # good +# arr.min_by(&:foo) +# +# # bad +# arr.sort_by(&:foo).last +# arr.sort_by(&:foo)[-1] +# arr.sort_by(&:foo).at(-1) +# arr.sort_by(&:foo).slice(-1) +# +# # good +# arr.max_by(&:foo) +# +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#79 +class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#111 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#88 + def redundant_sort?(param0 = T.unsafe(nil)); end + + private + + # This gets the start of the accessor whether it has a dot + # (e.g. `.first`) or doesn't (e.g. `[0]`) + # + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#193 + def accessor_start(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#183 + def arg_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#187 + def arg_value(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#148 + def autocorrect(corrector, node, sort_node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#166 + def base(accessor, arg); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#115 + def find_redundant_sort(*nodes); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#136 + def message(node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#132 + def offense_range(sort_node, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#125 + def register_offense(node, sort_node, sorter, accessor); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#157 + def replace_with_logical_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#174 + def suffix(sorter); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#162 + def suggestion(sorter, accessor, arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#201 + def with_logical_operator?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#83 +RuboCop::Cop::Style::RedundantSort::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#85 +RuboCop::Cop::Style::RedundantSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Identifies places where `sort_by { ... }` can be replaced by +# `sort`. +# +# @example +# # bad +# array.sort_by { |x| x } +# array.sort_by do |var| +# var +# end +# +# # good +# array.sort +# +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#18 +class RuboCop::Cop::Style::RedundantSortBy < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#26 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#46 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#36 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#59 + def redundant_sort_by_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#69 + def redundant_sort_by_itblock(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#64 + def redundant_sort_by_numblock(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#73 + def sort_by_range(send, node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#22 +RuboCop::Cop::Style::RedundantSortBy::MSG_BLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#24 +RuboCop::Cop::Style::RedundantSortBy::MSG_ITBLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_sort_by.rb#23 +RuboCop::Cop::Style::RedundantSortBy::MSG_NUMBLOCK = T.let(T.unsafe(nil), String) + +# Checks for redundant escapes in string literals. +# +# @example +# # bad - no need to escape # without following {/$/@ +# "\#foo" +# +# # bad - no need to escape single quotes inside double quoted string +# "\'foo\'" +# +# # bad - heredocs are also checked for unnecessary escapes +# <<~STR +# \#foo \"foo\" +# STR +# +# # good +# "#foo" +# +# # good +# "\#{no_interpolation}" +# +# # good +# "'foo'" +# +# # good +# "foo\ +# bar" +# +# # good +# <<~STR +# #foo "foo" +# STR +# +# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#37 +class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::MatchRange + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#43 + def on_str(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#79 + def allowed_escape?(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#119 + def array_literal?(node, prefix); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#73 + def begin_loc_present?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#153 + def delimiter?(node, char); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 + def disabling_interpolation?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#149 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#139 + def heredoc_with_disabled_interpolation?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#100 + def interpolation_not_enabled?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#167 + def literal_in_interpolated_or_multiline_string?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#59 + def message(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#135 + def percent_array_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#111 + def percent_q_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#127 + def percent_w_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#131 + def percent_w_upper_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#107 + def single_quoted?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#63 + def str_contents_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#41 +RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant `keyword_init` option for `Struct.new`. +# +# Since Ruby 3.2, `keyword_init` in `Struct.new` defaults to `nil` behavior. +# Therefore, this cop detects and autocorrects redundant `keyword_init: nil` +# and `keyword_init: true` in `Struct.new`. +# +# @example +# +# # bad +# Struct.new(:foo, keyword_init: nil) +# Struct.new(:foo, keyword_init: true) +# +# # good +# Struct.new(:foo) +# +# source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#25 +class RuboCop::Cop::Style::RedundantStructKeywordInit < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#40 + def keyword_init?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#50 + def keyword_init_false?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#66 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#54 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#45 + def redundant_keyword_init?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#35 + def struct_new?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#92 + def range(redundant_keyword_init); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#82 + def register_offense(keyword_init); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#70 + def select_keyword_init_nodes(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#76 + def select_redundant_keyword_init_nodes(keyword_init_nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#29 +RuboCop::Cop::Style::RedundantStructKeywordInit::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_struct_keyword_init.rb#30 +RuboCop::Cop::Style::RedundantStructKeywordInit::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces using `//` or `%r` around regular expressions. +# +# NOTE: The following `%r` cases using a regexp starts with a blank or `=` +# as a method argument allowed to prevent syntax errors. +# +# [source,ruby] +# ---- +# do_something %r{ regexp} # `do_something / regexp/` is an invalid syntax. +# do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax. +# ---- +# +# @example AllowInnerSlashes: false (default) +# # If `false`, the cop will always recommend using `%r` if one or more +# # slashes are found in the regexp string. +# +# # bad +# x =~ /home\// +# +# # good +# x =~ %r{home/} +# @example AllowInnerSlashes: true +# # good +# x =~ /home\// +# @example EnforcedStyle: mixed +# # bad +# snake_case = %r{^[\dA-Z_]+$} +# +# # bad +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# # good +# snake_case = /^[\dA-Z_]+$/ +# +# # good +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# @example EnforcedStyle: percent_r +# # bad +# snake_case = /^[\dA-Z_]+$/ +# +# # bad +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# # good +# snake_case = %r{^[\dA-Z_]+$} +# +# # good +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# @example EnforcedStyle: slashes (default) +# # bad +# snake_case = %r{^[\dA-Z_]+$} +# +# # bad +# regex = %r{ +# foo +# (bar) +# (baz) +# }x +# +# # good +# snake_case = /^[\dA-Z_]+$/ +# +# # good +# regex = / +# foo +# (bar) +# (baz) +# /x +# +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93 +class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#101 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144 + def allow_inner_slashes?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#132 + def allowed_mixed_percent_r?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#122 + def allowed_mixed_slash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161 + def allowed_omit_parentheses_with_percent_r_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#126 + def allowed_percent_r_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#118 + def allowed_slash_literal?(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#221 + def calculate_replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#136 + def contains_disallowed_slash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140 + def contains_slash?(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#170 + def correct_delimiters(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#176 + def correct_inner_slashes(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#209 + def inner_slash_after_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#205 + def inner_slash_before_correction(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#213 + def inner_slash_for(opening_delimiter); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#192 + def inner_slash_indices(node); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148 + def node_body(node, include_begin_nodes: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#157 + def preferred_delimiters; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#153 + def slash_literal?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#99 +RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#98 +RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) + +# Sort `require` and `require_relative` in alphabetical order. +# +# @example +# # bad +# require 'b' +# require 'a' +# +# # good +# require 'a' +# require 'b' +# +# # bad +# require_relative 'b' +# require_relative 'a' +# +# # good +# require_relative 'a' +# require_relative 'b' +# +# # good (sorted within each section separated by a blank line) +# require 'a' +# require 'd' +# +# require 'b' +# require 'c' +# +# # good +# require 'b' +# require_relative 'c' +# require 'a' +# +# # bad +# require 'a' +# require 'c' if foo +# require 'b' +# +# # good +# require 'a' +# require 'b' +# require 'c' if foo +# +# # bad +# require 'c' +# if foo +# require 'd' +# require 'b' +# end +# require 'a' +# +# # good +# require 'c' +# if foo +# require 'b' +# require 'd' +# end +# require 'a' +# +# source://rubocop//lib/rubocop/cop/style/require_order.rb#66 +class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#76 + def if_inside_only_require(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#83 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#115 + def autocorrect(corrector, node, previous_older_sibling); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#101 + def find_previous_older_sibling(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/require_order.rb#133 + def in_same_section?(node1, node2); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/require_order.rb#97 + def not_modifier_form?(node); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#123 + def search_node(node); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 + def sibling_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/require_order.rb#73 +RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/require_order.rb#71 +RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `rescue` in its modifier form is added for following +# reasons: +# +# * The syntax of modifier form `rescue` can be misleading because it +# might lead us to believe that `rescue` handles the given exception +# but it actually rescue all exceptions to return the given rescue +# block. In this case, value returned by handle_error or +# SomeException. +# +# * Modifier form `rescue` would rescue all the exceptions. It would +# silently skip all exception or errors and handle the error. +# Example: If `NoMethodError` is raised, modifier form rescue would +# handle the exception. +# +# @example +# # bad +# some_method rescue handle_error +# +# # bad +# some_method rescue SomeException +# +# # good +# begin +# some_method +# rescue +# handle_error +# end +# +# # good +# begin +# some_method +# rescue SomeException +# handle_error +# end +# +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40 +class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RescueNode + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52 + def on_resbody(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#71 + def correct_rescue_block(corrector, node, parenthesized); end + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#98 + def heredoc_end(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#88 + def indentation_and_offset(node, parenthesized); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66 + def parenthesized?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46 +RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for rescuing `StandardError`. There are two supported +# styles `implicit` and `explicit`. This cop will not register an offense +# if any error other than `StandardError` is specified. +# +# @example EnforcedStyle: explicit (default) +# # `explicit` will enforce using `rescue StandardError` +# # instead of `rescue`. +# +# # bad +# begin +# foo +# rescue +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError +# bar +# end +# +# # good +# begin +# foo +# rescue OtherError +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, SecurityError +# bar +# end +# @example EnforcedStyle: implicit +# # `implicit` will enforce using `rescue` instead of +# # `rescue StandardError`. +# +# # bad +# begin +# foo +# rescue StandardError +# bar +# end +# +# # good +# begin +# foo +# rescue +# bar +# end +# +# # good +# begin +# foo +# rescue OtherError +# bar +# end +# +# # good +# begin +# foo +# rescue StandardError, SecurityError +# bar +# end +# +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#73 +class RuboCop::Cop::Style::RescueStandardError < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RescueNode + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#92 + def on_resbody(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#88 + def rescue_standard_error?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#83 + def rescue_without_error_class?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#118 + def offense_for_explicit_enforced_style(node); end + + # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#107 + def offense_for_implicit_enforced_style(node, error); end +end + +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#80 +RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79 +RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) + +# Enforces consistency between `return nil` and `return`. +# +# This cop is disabled by default. Because there seems to be a perceived semantic difference +# between `return` and `return nil`. The former can be seen as just halting evaluation, +# while the latter might be used when the return value is of specific concern. +# +# Supported styles are `return` and `return_nil`. +# +# @example EnforcedStyle: return (default) +# # bad +# def foo(arg) +# return nil if arg +# end +# +# # good +# def foo(arg) +# return if arg +# end +# @example EnforcedStyle: return_nil +# # bad +# def foo(arg) +# return if arg +# end +# +# # good +# def foo(arg) +# return nil if arg +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 +class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90 + def chained_send?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93 + def define_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48 + def on_return(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46 + def return_nil_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43 + def return_node?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80 + def correct_style?(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85 + def scoped_node?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 +RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 +RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) + +# Checks for predicate method definitions that return `nil`. +# A predicate method should only return a boolean value. +# +# @example +# # bad +# def foo? +# return if condition +# +# do_something? +# end +# +# # bad +# def foo? +# return nil if condition +# +# do_something? +# end +# +# # good +# def foo? +# return false if condition +# +# do_something? +# end +# +# # bad +# def foo? +# if condition +# nil +# else +# true +# end +# end +# +# # good +# def foo? +# if condition +# false +# else +# true +# end +# end +# @example AllowedMethods: ['foo?'] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# @example AllowedPatterns: [/foo/] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#69 +class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#90 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#77 + def return_nil?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#128 + def handle_if(if_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#113 + def handle_implicit_return_values(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#122 + def handle_nil(nil_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#118 + def handle_return(return_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#94 + def last_node_of_type(node, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#103 + def node_type?(node, type); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#107 + def register_offense(offense_node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#74 +RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `array.reverse.find` can be replaced by `array.rfind`. +# +# @example +# # bad +# array.reverse.find { |item| item.even? } +# array.reverse.detect { |item| item.even? } +# array.reverse_each.find { |item| item.even? } +# array.reverse_each.detect { |item| item.even? } +# +# # good +# array.rfind { |item| item.even? } +# +# source://rubocop//lib/rubocop/cop/style/reverse_find.rb#22 +class RuboCop::Cop::Style::ReverseFind < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/reverse_find.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/reverse_find.rb#38 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/reverse_find.rb#32 + def reverse_find?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/reverse_find.rb#26 +RuboCop::Cop::Style::ReverseFind::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/reverse_find.rb#27 +RuboCop::Cop::Style::ReverseFind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Transforms usages of a method call safeguarded by a non `nil` +# check for the variable whose method is being called to +# safe navigation (`&.`). If there is a method chain, all of the methods +# in the chain need to be checked for safety, and all of the methods will +# need to be changed to use safe navigation. +# +# The default for `ConvertCodeThatCanStartToReturnNil` is `false`. +# When configured to `true`, this will +# check for code in the format `!foo.nil? && foo.bar`. As it is written, +# the return of this code is limited to `false` and whatever the return +# of the method is. If this is converted to safe navigation, +# `foo&.bar` can start returning `nil` as well as what the method +# returns. +# +# The default for `MaxChainLength` is `2`. +# We have limited the cop to not register an offense for method chains +# that exceed this option's value. +# +# NOTE: This cop will recognize offenses but not autocorrect code when the +# right hand side (RHS) of the `&&` statement is an `||` statement +# (eg. `foo && (foo.bar? || foo.baz?)`). It can be corrected +# manually by removing the `foo &&` and adding `&.` to each `foo` on the RHS. +# +# @example +# # bad +# foo.bar if foo +# foo.bar.baz if foo +# foo.bar(param1, param2) if foo +# foo.bar { |e| e.something } if foo +# foo.bar(param) { |e| e.something } if foo +# +# foo.bar if !foo.nil? +# foo.bar unless !foo +# foo.bar unless foo.nil? +# +# foo && foo.bar +# foo && foo.bar.baz +# foo && foo.bar(param1, param2) +# foo && foo.bar { |e| e.something } +# foo && foo.bar(param) { |e| e.something } +# +# foo ? foo.bar : nil +# foo.nil? ? nil : foo.bar +# !foo.nil? ? foo.bar : nil +# !foo ? nil : foo.bar +# +# # good +# foo&.bar +# foo&.bar&.baz +# foo&.bar(param1, param2) +# foo&.bar { |e| e.something } +# foo&.bar(param) { |e| e.something } +# foo && foo.bar.baz.qux # method chain with more than 2 methods +# foo && foo.nil? # method that `nil` responds to +# +# # Method calls that do not use `.` +# foo && foo < bar +# foo < bar if foo +# +# # When checking `foo&.empty?` in a conditional, `foo` being `nil` will actually +# # do the opposite of what the author intends. +# foo && foo.empty? +# +# # This could start returning `nil` as well as the return of the method +# foo.nil? || foo.bar +# !foo || foo.bar +# +# # Methods that are used on assignment, arithmetic operation or +# # comparison should not be converted to use safe navigation +# foo.baz = bar if foo +# foo.baz + bar if foo +# foo.bar > 2 if foo +# +# foo ? foo[index] : nil # Ignored `foo&.[](index)` due to unclear readability benefit. +# foo ? foo[idx] = v : nil # Ignored `foo&.[]=(idx, v)` due to unclear readability benefit. +# foo ? foo * 42 : nil # Ignored `foo&.*(42)` due to unclear readability benefit. +# +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#93 +class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::NilMethods + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#140 + def and_inside_begin?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#134 + def and_with_rhs_or?(param0 = T.unsafe(nil)); end + + # if format: (if checked_variable body nil) + # unless format: (if checked_variable nil body) + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#108 + def modifier_if_safe_navigation_candidate(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#137 + def not_nil_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#165 + def on_and(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#146 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#143 + def strip_begin(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#123 + def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#408 + def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#304 + def allowed_if_condition?(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#235 + def and_parts(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#400 + def begin_range(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#359 + def chain_length(method_chain, method); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#217 + def collect_and_clauses(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#285 + def comments(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#229 + def concat_nodes(nodes, and_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#264 + def dotless_operator_call?(method_call); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#272 + def dotless_operator_method?(method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#404 + def end_range(node, method_call); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#323 + def extract_common_parts(method_chain, checked_variable); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#256 + def extract_if_body(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#308 + def extract_parts_from_if(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#331 + def find_matching_receiver_invocation(method_chain, checked_variable); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#211 + def find_method_chain(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#278 + def handle_comments(corrector, node, method_call); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#345 + def matching_call_nodes?(left, right); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#341 + def matching_nodes?(left, right); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#421 + def max_chain_length; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#396 + def method_called?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#388 + def negated?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#242 + def offending_node?(node, lhs_receiver, rhs, rhs_receiver); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#291 + def relevant_comment_ranges(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#194 + def report_offense(node, rhs, rhs_receiver, *removal_ranges, offense_range: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#379 + def unsafe_method?(node, send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#367 + def unsafe_method_used?(node, method_chain, method); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#252 + def use_var_only_in_unless_modifier?(node, variable); end +end + +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#101 +RuboCop::Cop::Style::SafeNavigation::LOGIC_JUMP_KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#99 +RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) + +# Enforces safe navigation chains length to not exceed the configured maximum. +# The longer the chain is, the harder it becomes to track what on it could be +# returning `nil`. +# +# There is a potential interplay with `Style/SafeNavigation` - if both are enabled +# and their settings are "incompatible", one of the cops will complain about what +# the other proposes. +# +# E.g. if `Style/SafeNavigation` is configured with `MaxChainLength: 2` (default) +# and this cop is configured with `Max: 1`, then for `foo.bar.baz if foo` the former +# will suggest `foo&.bar&.baz`, which is an offense for the latter. +# +# @example Max: 2 (default) +# # bad +# user&.address&.zip&.upcase +# +# # good +# user&.address&.zip +# user.address.zip if user +# +# source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#26 +class RuboCop::Cop::Style::SafeNavigationChainLength < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#29 + def on_csend(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#46 + def max; end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#38 + def safe_navigation_chains(node); end +end + +# source://rubocop//lib/rubocop/cop/style/safe_navigation_chain_length.rb#27 +RuboCop::Cop::Style::SafeNavigationChainLength::MSG = T.let(T.unsafe(nil), String) + +# Identifies usages of `shuffle.first`, +# `shuffle.last`, and `shuffle[]` and change them to use +# `sample` instead. +# +# @example +# # bad +# [1, 2, 3].shuffle.first +# [1, 2, 3].shuffle.first(2) +# [1, 2, 3].shuffle.last +# [2, 1, 3].shuffle.at(0) +# [2, 1, 3].shuffle.slice(0) +# [1, 2, 3].shuffle[2] +# [1, 2, 3].shuffle[0, 2] # sample(2) will do the same +# [1, 2, 3].shuffle[0..2] # sample(3) will do the same +# [1, 2, 3].shuffle(random: Random.new).first +# +# # good +# [1, 2, 3].shuffle +# [1, 2, 3].sample +# [1, 2, 3].sample(3) +# [1, 2, 3].shuffle[1, 3] # sample(3) might return a longer Array +# [1, 2, 3].shuffle[1..3] # sample(3) might return a longer Array +# [1, 2, 3].shuffle[foo, bar] +# [1, 2, 3].shuffle(random: Random.new) +# +# source://rubocop//lib/rubocop/cop/style/sample.rb#30 +class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/sample.rb#55 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#37 + def sample_candidate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/sample.rb#122 + def correction(shuffle_arg, method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#138 + def extract_source(args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#116 + def message(shuffle_arg, method, method_args, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sample.rb#59 + def offensive?(method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#96 + def range_size(range_node); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#129 + def sample_arg(method, method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#70 + def sample_size(method_args); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#79 + def sample_size_for_one_arg(arg); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#89 + def sample_size_for_two_args(first, second); end + + # source://rubocop//lib/rubocop/cop/style/sample.rb#112 + def source_range(shuffle_node, node); end +end + +# source://rubocop//lib/rubocop/cop/style/sample.rb#33 +RuboCop::Cop::Style::Sample::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/sample.rb#34 +RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Looks for places where a subset of an Enumerable (array, +# range, set, etc.; see note below) is calculated based on a class type +# check, and suggests `grep` or `grep_v` instead. +# +# NOTE: Hashes do not behave as you may expect with `grep`, which +# means that `hash.grep` is not equivalent to `hash.select`. Although +# RuboCop is limited by static analysis, this cop attempts to avoid +# registering an offense when the receiver is a hash (hash literal, +# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). +# +# @example +# # bad (select or find_all) +# array.select { |x| x.is_a?(Foo) } +# array.select { |x| x.kind_of?(Foo) } +# +# # bad (reject) +# array.reject { |x| x.is_a?(Foo) } +# +# # bad (negative form) +# array.reject { |x| !x.is_a?(Foo) } +# +# # good +# array.grep(Foo) +# array.grep_v(Foo) +# +# source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#35 +class RuboCop::Cop::Style::SelectByKind < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#72 + def calls_lvar?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#45 + def class_check?(param0 = T.unsafe(nil)); end + + # Returns true if a node appears to return a hash + # + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#58 + def creates_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#67 + def env_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#77 + def negated_calls_lvar?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#92 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#81 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#125 + def extract_send_node(block_node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#151 + def find_class_constant(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#139 + def negated?(class_check_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#96 + def receiver_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#114 + def register_offense(node, block_node, class_constant, replacement); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#102 + def replacement(class_check_send_node, node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#143 + def unwrap_negation(node); end +end + +# source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#42 +RuboCop::Cop::Style::SelectByKind::CLASS_CHECK_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#39 +RuboCop::Cop::Style::SelectByKind::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#40 +RuboCop::Cop::Style::SelectByKind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/select_by_kind.rb#41 +RuboCop::Cop::Style::SelectByKind::SELECT_METHODS = T.let(T.unsafe(nil), Array) + +# Looks for places where a subset of an Enumerable (array, +# range, set, etc.; see note below) is calculated based on a range +# check, and suggests `grep` or `grep_v` instead. +# +# NOTE: Hashes do not behave as you may expect with `grep`, which +# means that `hash.grep` is not equivalent to `hash.select`. Although +# RuboCop is limited by static analysis, this cop attempts to avoid +# registering an offense when the receiver is a hash (hash literal, +# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). +# +# @example +# # bad (select or find_all) +# array.select { |x| x.between?(1, 10) } +# array.select { |x| (1..10).cover?(x) } +# array.select { |x| (1..10).include?(x) } +# +# # bad (reject) +# array.reject { |x| x.between?(1, 10) } +# +# # bad (find or detect) +# array.find { |x| x.between?(1, 10) } +# array.detect { |x| (1..10).cover?(x) } +# +# # bad (negative form) +# array.reject { |x| !x.between?(1, 10) } +# array.find { |x| !(1..10).cover?(x) } +# +# # good +# array.grep(1..10) +# array.grep_v(1..10) +# array.grep(1..10).first +# array.grep_v(1..10).first +# +# source://rubocop//lib/rubocop/cop/style/select_by_range.rb#43 +class RuboCop::Cop::Style::SelectByRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#93 + def between_call?(param0 = T.unsafe(nil), param1); end + + # Returns true if a node appears to return a hash + # + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#79 + def creates_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#88 + def env_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#113 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#102 + def on_send(node); end + + # Matches: x.between?(min, max) or (min..max).cover?(x) or (min..max).include?(x) + # + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#54 + def range_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#98 + def range_cover_call?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#160 + def calls_lvar_in_range_check?(node, block_arg_name); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#149 + def extract_send_node(block_node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#178 + def find_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#164 + def negated?(range_check_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#117 + def receiver_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#136 + def register_offense(node, block_node, range_literal, replacement); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#123 + def replacement(range_check_send_node, node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_range.rb#168 + def unwrap_negation(node); end +end + +# source://rubocop//lib/rubocop/cop/style/select_by_range.rb#50 +RuboCop::Cop::Style::SelectByRange::FIND_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/select_by_range.rb#47 +RuboCop::Cop::Style::SelectByRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/select_by_range.rb#48 +RuboCop::Cop::Style::SelectByRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/select_by_range.rb#49 +RuboCop::Cop::Style::SelectByRange::SELECT_METHODS = T.let(T.unsafe(nil), Array) + +# Looks for places where a subset of an Enumerable (array, +# range, set, etc.; see note below) is calculated based on a `Regexp` +# match, and suggests `grep` or `grep_v` instead. +# +# NOTE: Hashes do not behave as you may expect with `grep`, which +# means that `hash.grep` is not equivalent to `hash.select`. Although +# RuboCop is limited by static analysis, this cop attempts to avoid +# registering an offense when the receiver is a hash (hash literal, +# `Hash.new`, `Hash#[]`, or `to_h`/`to_hash`). +# +# NOTE: `grep` and `grep_v` were optimized when used without a block +# in Ruby 3.0, but may be slower in previous versions. +# See https://bugs.ruby-lang.org/issues/17030 +# +# @example +# # bad (select, filter, or find_all) +# array.select { |x| x.match? /regexp/ } +# array.select { |x| /regexp/.match?(x) } +# array.select { |x| x =~ /regexp/ } +# array.select { |x| /regexp/ =~ x } +# +# # bad (reject) +# array.reject { |x| x.match? /regexp/ } +# array.reject { |x| /regexp/.match?(x) } +# array.reject { |x| x =~ /regexp/ } +# array.reject { |x| /regexp/ =~ x } +# +# # bad (negative form) +# array.reject { |x| !x.match? /regexp/ } +# +# # good +# array.grep(regexp) +# array.grep_v(regexp) +# +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#48 +class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#86 + def calls_lvar?(param0 = T.unsafe(nil), param1); end + + # Returns true if a node appears to return a hash + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#72 + def creates_hash?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#81 + def env_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#117 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#101 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#59 + def regexp_match?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#150 + def extract_send_node(block_node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#178 + def find_regexp(node, block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#192 + def match_predicate_without_receiver?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#161 + def negated?(regexp_method_send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 + def receiver_allowed?(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#138 + def register_offense(node, block_node, regexp, replacement); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#127 + def replacement(regexp_method_send_node, node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#168 + def unwrap_negation(node); end +end + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 +RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#55 +RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 +RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS_NEGATED = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#53 +RuboCop::Cop::Style::SelectByRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#54 +RuboCop::Cop::Style::SelectByRegexp::SELECT_METHODS = T.let(T.unsafe(nil), Array) + +# Enforces the use the shorthand for self-assignment. +# +# @example +# +# # bad +# x = x + 1 +# +# # good +# x += 1 +# +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#15 +class RuboCop::Cop::Style::SelfAssignment < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#33 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#29 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#25 + def on_lvasgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#88 + def apply_autocorrect(corrector, node, rhs, operator, new_rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#70 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#84 + def autocorrect_boolean_node(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#80 + def autocorrect_send_node(corrector, node, rhs); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#39 + def check(node, var_type); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#60 + def check_boolean_node(node, rhs, var_name, var_type); end + + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#49 + def check_send_node(node, rhs, var_name, var_type); end + + class << self + # source://rubocop//lib/rubocop/cop/style/self_assignment.rb#21 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#18 +RuboCop::Cop::Style::SelfAssignment::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/self_assignment.rb#19 +RuboCop::Cop::Style::SelfAssignment::OPS = T.let(T.unsafe(nil), Array) + +# Checks for multiple expressions placed on the same line. +# It also checks for lines terminated with a semicolon. +# In idiomatic Ruby, each expression should be on its own line +# for readability. +# +# This cop has `AllowAsExpressionSeparator` configuration option. +# It allows `;` to separate several expressions on the same line. +# +# @example +# # bad +# foo = 1; bar = 2; +# baz = 3; +# +# # good +# foo = 1 +# bar = 2 +# baz = 3 +# @example AllowAsExpressionSeparator: false (default) +# # bad +# foo = 1; bar = 2 +# @example AllowAsExpressionSeparator: true +# # good +# foo = 1; bar = 2 +# +# source://rubocop//lib/rubocop/cop/style/semicolon.rb#31 +class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#47 + def on_begin(node); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#41 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#66 + def check_for_line_terminator_or_opener; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#72 + def each_semicolon; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#109 + def exist_semicolon_after_left_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#113 + def exist_semicolon_after_left_lambda_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#121 + def exist_semicolon_after_left_string_interpolation_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#105 + def exist_semicolon_before_right_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#117 + def exist_semicolon_before_right_string_interpolation_brace?(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#151 + def expressions_per_line(exprs); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#165 + def find_node(nodes, token_before_semicolon); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#157 + def find_semicolon_positions(line); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#171 + def range_nodes; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#126 + def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#87 + def semicolon_position(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#82 + def tokens_for_lines; end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#179 + def value_omission_pair_nodes; end + + class << self + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#37 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/semicolon.rb#35 +RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of the send method. +# +# @example +# # bad +# Foo.send(bar) +# quuz.send(fred) +# +# # good +# Foo.__send__(bar) +# quuz.public_send(fred) +# +# source://rubocop//lib/rubocop/cop/style/send.rb#16 +class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/send.rb#25 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/send.rb#20 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/send.rb#17 +RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send.rb#18 +RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Detects the use of the `public_send` method with a literal method name argument. +# Since the `send` method can be used to call private methods, by default, +# only the `public_send` method is detected. +# +# NOTE: Writer methods with names ending in `=` are always permitted because their +# behavior differs as follows: +# +# [source,ruby] +# ---- +# def foo=(foo) +# @foo = foo +# 42 +# end +# +# self.foo = 1 # => 1 +# send(:foo=, 1) # => 42 +# ---- +# +# @example +# # bad +# obj.public_send(:method_name) +# obj.public_send('method_name') +# +# # good +# obj.method_name +# @example AllowSend: false +# # bad +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# +# # good +# obj.method_name +# @example AllowSend: true (default) +# # good +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 +class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#86 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#91 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#95 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#99 + def removal_argument_range(first_argument, second_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#60 +RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#57 +RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#61 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#58 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#59 +RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for uses of `fail` and `raise`. +# +# @example EnforcedStyle: only_fail +# # The `only_fail` style enforces the sole use of `fail`. +# # bad +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# raise +# rescue Exception +# # handle it +# end +# +# Kernel.raise +# +# # good +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# # handle it +# end +# +# Kernel.fail +# @example EnforcedStyle: only_raise (default) +# # The `only_raise` style enforces the sole use of `raise`. +# # bad +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# # handle it +# end +# +# Kernel.fail +# +# # good +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# raise +# rescue Exception +# # handle it +# end +# +# Kernel.raise +# @example EnforcedStyle: semantic +# # The `semantic` style enforces the use of `fail` to signal an +# # exception, then will use `raise` to trigger an offense after +# # it has been rescued. +# # bad +# begin +# raise +# rescue Exception +# # handle it +# end +# +# def watch_out +# # Error thrown +# rescue Exception +# fail +# end +# +# Kernel.fail +# Kernel.raise +# +# # good +# begin +# fail +# rescue Exception +# # handle it +# end +# +# def watch_out +# fail +# rescue Exception +# raise 'Preferably with descriptive message' +# end +# +# explicit_receiver.fail +# explicit_receiver.raise +# +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#107 +class RuboCop::Cop::Style::SignalException < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#120 + def custom_fail_methods(param0); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#117 + def kernel_call?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#122 + def on_rescue(node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#133 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#205 + def allow(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#187 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#166 + def check_scope(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#179 + def check_send(method_name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#199 + def command_or_kernel_call?(name, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#148 + def custom_fail_defined?; end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#209 + def each_command_or_kernel_call(method_name, node); end + + # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#155 + def message(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#111 +RuboCop::Cop::Style::SignalException::FAIL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#112 +RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/signal_exception.rb#114 +RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Sometimes using `dig` method ends up with just a single +# argument. In such cases, dig should be replaced with `[]`. +# +# Since replacing `hash&.dig(:key)` with `hash[:key]` could potentially lead to error, +# calls to the `dig` method using safe navigation will be ignored. +# +# @example +# # bad +# { key: 'value' }.dig(:key) +# [1, 2, 3].dig(0) +# +# # good +# { key: 'value' }[:key] +# [1, 2, 3][0] +# +# # good +# { key1: { key2: 'value' } }.dig(:key1, :key2) +# [1, [2, [3]]].dig(1, 1) +# +# # good +# keys = %i[key1 key2] +# { key1: { key2: 'value' } }.dig(*keys) +# +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 +class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base + include ::RuboCop::Cop::DigHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#66 + def ignore_dig_chain?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#40 +RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 +RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 +RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks whether the block parameters of a single-line +# method accepting a block match the names specified via configuration. +# +# For instance one can configure `reduce`(`inject`) to use |a, e| as +# parameters. +# +# Configuration option: Methods +# Should be set to use this cop. `Array` of hashes, where each key is the +# method name and value - array of argument names. +# +# @example Methods: [{reduce: %w[a b]}] +# # bad +# foo.reduce { |c, d| c + d } +# foo.reduce { |_, _d| 1 } +# +# # good +# foo.reduce { |a, b| a + b } +# foo.reduce { |a, _b| a } +# foo.reduce { |a, (id, _)| a + id } +# foo.reduce { true } +# +# # good +# foo.reduce do |c, d| +# c + d +# end +# +# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#31 +class RuboCop::Cop::Style::SingleLineBlockParams < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#36 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#105 + def args_match?(method_name, args); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#69 + def autocorrect(corrector, node, preferred_block_arguments, joined_block_arguments); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#57 + def build_preferred_arguments_map(node, preferred_arguments); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#79 + def eligible_arguments?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#83 + def eligible_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#95 + def method_name(method); end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#91 + def method_names; end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#87 + def methods; end + + # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#99 + def target_args(method_name); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34 +RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) + +# Checks for single-line `do`...`end` block. +# +# In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic` +# is configured for `Style/BlockDelimiters`. The autocorrection maintains the +# `do` ... `end` syntax to preserve semantics and does not change it to `{`...`}` block. +# +# NOTE: If `InspectBlocks` is set to `true` for `Layout/RedundantLineBreak`, blocks will +# be autocorrected to be on a single line if possible. This cop respects that configuration +# by not registering an offense if it would subsequently cause a +# `Layout/RedundantLineBreak` offense. +# +# @example +# +# # bad +# foo do |arg| bar(arg) end +# +# # good +# foo do |arg| +# bar(arg) +# end +# +# # bad +# ->(arg) do bar(arg) end +# +# # good +# ->(arg) { bar(arg) } +# +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#33 +class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CheckSingleLineSuitability + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#40 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#59 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#58 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 + def do_line(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#72 + def single_line_blocks_preferred?; end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#37 +RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) + +# Checks for single-line method definitions that contain a body. +# Single-line methods with a body are harder to read and debug +# than their multi-line equivalents. It will accept single-line +# methods with no body. +# +# Endless methods added in Ruby 3.0 are also accepted by this cop. +# +# If `Style/EndlessMethod` is enabled with `EnforcedStyle: allow_single_line`, `allow_always`, +# `require_single_line`, or `require_always`, single-line methods will be autocorrected +# to endless methods if there is only one statement in the body. +# +# @example +# # bad +# def some_method; body end +# def link_to(url); {:name => url}; end +# def @table.columns; super; end +# +# # good +# def self.resource_class=(klass); end +# def @table.columns; end +# def some_method() = body +# @example AllowIfMethodIsEmpty: false +# # bad +# def no_op; end +# @example AllowIfMethodIsEmpty: true (default) +# # good +# def no_op; end +# +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#36 +class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#43 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#50 + def on_defs(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#62 + def allow_empty?; end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#54 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#99 + def break_line_before(corrector, node, range, indent_steps: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#90 + def correct_to_endless(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#66 + def correct_to_endless?(body_node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#76 + def correct_to_multiline(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#141 + def disallow_endless_method_style?; end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#106 + def each_part(body); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#123 + def method_body_source(method_body); end + + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#116 + def move_comment(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#134 + def require_parentheses?(method_body); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#40 +RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#41 +RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) + +# Checks that arrays are not sliced with the redundant `ary[0..-1]`, replacing it with `ary`, +# and ensures arrays are sliced with endless ranges instead of `ary[start..-1]` on Ruby 2.6+, +# and with beginless ranges instead of `ary[nil..end]` on Ruby 2.7+. +# +# @example +# # bad +# items[0..-1] +# items[0..nil] +# items[0...nil] +# +# # good +# items +# +# # bad +# items[1..-1] # Ruby 2.6+ +# items[1..nil] # Ruby 2.6+ +# +# # good +# items[1..] # Ruby 2.6+ +# +# # bad +# items[nil..42] # Ruby 2.7+ +# +# # good +# items[..42] # Ruby 2.7+ +# items[0..42] # Ruby 2.7+ +# +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#46 +class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#94 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#77 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#73 + def range_from_zero?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#57 + def range_from_zero_till_minus_one?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#65 + def range_till_minus_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#140 + def arguments_source(node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#136 + def beginless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#132 + def endless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#102 + def find_offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#126 + def offense_message_for_partial_range(node, prefer, offense_range); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#110 + def offense_message_with_removal_range(node, range_node, offense_range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#98 + def unparenthesized_call?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#52 +RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#53 +RuboCop::Cop::Style::SlicingWithRange::MSG_USELESS_RANGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#54 +RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# If the branch of a conditional consists solely of a conditional node, +# its conditions can be combined with the conditions of the outer branch. +# This helps to keep the nesting level from getting too deep. +# +# @example +# # bad +# if condition_a +# if condition_b +# do_something +# end +# end +# +# # bad +# if condition_b +# do_something +# end if condition_a +# +# # good +# if condition_a && condition_b +# do_something +# end +# @example AllowModifier: false (default) +# # bad +# if condition_a +# do_something if condition_b +# end +# +# # bad +# if condition_b +# do_something +# end if condition_a +# @example AllowModifier: true +# # good +# if condition_a +# do_something if condition_b +# end +# +# # good +# if condition_b +# do_something +# end if condition_a +# +# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#49 +class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#59 + def on_if(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 + def add_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#176 + def add_parentheses_if_needed(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 + def allow_modifier?; end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 + def assigned_variables(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#205 + def assignment_in_and?(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#98 + def autocorrect(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#106 + def autocorrect_outer_condition_basic(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#150 + def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#168 + def chainable_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#133 + def correct_for_basic_condition_style(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#159 + def correct_for_comment(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#123 + def correct_for_guard_condition_style(corrector, node, if_branch); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#117 + def correct_node(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#89 + def offending_branch?(node, branch); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#192 + def parenthesize_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#218 + def parenthesized_and(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 + def parenthesized_and_clause(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#211 + def parenthesized_method_arguments(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#74 + def use_variable_assignment_in_condition?(condition, if_branch); end + + class << self + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#55 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53 +RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) + +# Looks for uses of Perl-style global variables. +# Perl-style global variables like `$;` or `$/` are cryptic +# and hard to understand without consulting documentation. +# The `English` library provides descriptive aliases like +# `$FIELD_SEPARATOR` and `$INPUT_RECORD_SEPARATOR`. +# +# Correcting to global variables in the `English` library +# will add a require statement to the top of the file if +# enabled by RequireEnglish config. +# +# @example EnforcedStyle: use_builtin_english_names +# +# # good +# # Like `use_perl_names` but allows builtin global vars. +# puts $LOAD_PATH +# puts $LOADED_FEATURES +# puts $PROGRAM_NAME +# puts ARGV +# puts $: +# puts $" +# puts $0 +# puts $! +# puts $@ +# puts $; +# puts $, +# puts $/ +# puts $\ +# puts $. +# puts $_ +# puts $> +# puts $< +# puts $$ +# puts $? +# puts $~ +# puts $= +# puts $* +# @example EnforcedStyle: use_english_names (default) +# # good +# require 'English' # or this could be in another file. +# +# puts $LOAD_PATH +# puts $LOADED_FEATURES +# puts $PROGRAM_NAME +# puts $ERROR_INFO +# puts $ERROR_POSITION +# puts $FIELD_SEPARATOR # or $FS +# puts $OUTPUT_FIELD_SEPARATOR # or $OFS +# puts $INPUT_RECORD_SEPARATOR # or $RS +# puts $OUTPUT_RECORD_SEPARATOR # or $ORS +# puts $INPUT_LINE_NUMBER # or $NR +# puts $LAST_READ_LINE +# puts $DEFAULT_OUTPUT +# puts $DEFAULT_INPUT +# puts $PROCESS_ID # or $PID +# puts $CHILD_STATUS +# puts $LAST_MATCH_INFO +# puts $IGNORECASE +# puts $ARGV # or ARGV +# @example EnforcedStyle: use_perl_names +# # good +# puts $: +# puts $" +# puts $0 +# puts $! +# puts $@ +# puts $; +# puts $, +# puts $/ +# puts $\ +# puts $. +# puts $_ +# puts $> +# puts $< +# puts $$ +# puts $? +# puts $~ +# puts $= +# puts $* +# +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#91 +class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RequireLibrary + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#180 + def autocorrect(corrector, node, global_var); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#172 + def message(global_var); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#156 + def on_gvar(node); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151 + def on_new_investigation; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251 + def add_require_english?; end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#245 + def english_name_replacement(preferred_name, node); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#194 + def format_english_message(global_var); end + + # For now, we assume that lists are 2 items or less. Easy grammar! + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216 + def format_list(items); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#202 + def format_message(english, regular, global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#239 + def matching_styles(global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#231 + def preferred_names(global); end + + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#220 + def replacement(node, global_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#255 + def should_require_english?(global_var); end +end + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#132 +RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#104 +RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#149 +RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#102 +RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) + +# Anything *not* in this set is provided by the English library. +# +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#126 +RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128 +RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#143 +RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) + +# Checks for parentheses around stabby lambda arguments. +# There are two different styles. Defaults to `require_parentheses`. +# +# @example EnforcedStyle: require_no_parentheses +# # bad +# ->(a,b,c) { a + b + c } +# +# # good +# ->a,b,c { a + b + c} +# @example EnforcedStyle: require_parentheses (default) +# # bad +# ->a,b,c { a + b + c } +# +# # good +# ->(a,b,c) { a + b + c} +# +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#22 +class RuboCop::Cop::Style::StabbyLambdaParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#28 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#54 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#46 + def missing_parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#58 + def missing_parentheses_corrector(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#73 + def parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#50 + def redundant_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#69 + def stabby_lambda_with_args?(node); end + + # source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#62 + def unwanted_parentheses_corrector(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#27 +RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_NO_REQUIRE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/stabby_lambda_parentheses.rb#26 +RuboCop::Cop::Style::StabbyLambdaParentheses::MSG_REQUIRE = T.let(T.unsafe(nil), String) + +# Checks for places where classes with only class methods can be +# replaced with a module. Classes should be used only when it makes sense to create +# instances out of them. +# +# @example +# # bad +# class SomeClass +# def self.some_method +# # body omitted +# end +# +# def self.some_other_method +# # body omitted +# end +# end +# +# # good +# module SomeModule +# module_function +# +# def some_method +# # body omitted +# end +# +# def some_other_method +# # body omitted +# end +# end +# +# # good - has instance method +# class SomeClass +# def instance_method; end +# def self.class_method; end +# end +# +# source://rubocop//lib/rubocop/cop/style/static_class.rb#46 +class RuboCop::Cop::Style::StaticClass < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::VisibilityHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#53 + def on_class(class_node); end + + private + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#64 + def autocorrect(corrector, class_node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#77 + def autocorrect_def(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#83 + def autocorrect_sclass(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#90 + def class_convertible_to_module?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/static_class.rb#114 + def class_elements(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#102 + def extend_call?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/static_class.rb#106 + def sclass_convertible_to_module?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/static_class.rb#51 +RuboCop::Cop::Style::StaticClass::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `$stderr.puts` can be replaced by +# `warn`. The latter has the advantage of easily being disabled by, +# the `-W0` interpreter flag or setting `$VERBOSE` to `nil`. +# +# @example +# # bad +# $stderr.puts('hello') +# +# # good +# warn('hello') +# +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#17 +class RuboCop::Cop::Style::StderrPuts < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#32 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#25 + def stderr_puts?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#43 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#47 + def stderr_gvar?(sym); end + + # source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#51 + def stderr_puts_range(send); end +end + +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#21 +RuboCop::Cop::Style::StderrPuts::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/stderr_puts.rb#22 +RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for uses of `String#split` with empty string or regexp literal argument. +# +# @example +# # bad +# string.split(//) +# string.split('') +# +# # good +# string.chars +# +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#21 +class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#38 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#27 +RuboCop::Cop::Style::StringChars::BAD_ARGUMENTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#25 +RuboCop::Cop::Style::StringChars::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/string_chars.rb#26 +RuboCop::Cop::Style::StringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for places where string concatenation +# can be replaced with string interpolation. +# +# The cop can autocorrect simple cases but will skip autocorrecting +# more complex cases where the resulting code would be harder to read. +# In those cases, it might be useful to extract statements to local +# variables or methods which you can then interpolate in a string. +# +# NOTE: When concatenation between two strings is broken over multiple +# lines, this cop does not register an offense; instead, +# `Style/LineEndConcatenation` will pick up the offense if enabled. +# +# Two modes are supported: +# 1. `aggressive` style checks and corrects all occurrences of `+` where +# either the left or right side of `+` is a string literal. +# 2. `conservative` style on the other hand, checks and corrects only if +# left side (receiver of `+` method call) is a string literal. +# This is useful when the receiver is some expression that returns string like `Pathname` +# instead of a string literal. +# +# @example Mode: aggressive (default) +# # bad +# email_with_name = user.name + ' <' + user.email + '>' +# Pathname.new('/') + 'test' +# +# # good +# email_with_name = "#{user.name} <#{user.email}>" +# email_with_name = format('%s <%s>', user.name, user.email) +# "#{Pathname.new('/')}test" +# +# # accepted, line-end concatenation +# name = 'First' + +# 'Last' +# @example Mode: conservative +# # bad +# 'Hello' + user.name +# +# # good +# "Hello #{user.name}" +# user.name + '!!' +# Pathname.new('/') + 'test' +# +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#53 +class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#67 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#71 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#60 + def string_concatenation?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#149 + def adjust_str(part); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#114 + def collect_parts(node, parts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#139 + def corrected_ancestor?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#106 + def find_topmost_plus_node(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#166 + def handle_quotes(parts); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#133 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#96 + def line_end_concatenation?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#176 + def mode; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#125 + def plus_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#84 + def register_offense(topmost_plus_node, parts); end + + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#143 + def replacement(parts); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#172 + def single_quoted?(str_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#129 + def uncorrectable?(part); end +end + +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#56 +RuboCop::Cop::Style::StringConcatenation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/string_concatenation.rb#57 +RuboCop::Cop::Style::StringConcatenation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for the use of strings as keys in hashes. The use of +# symbols is preferred instead. +# +# @example +# # bad +# { 'one' => 1, 'two' => 2, 'three' => 3 } +# +# # good +# { one: 1, two: 2, three: 3 } +# +# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#19 +class RuboCop::Cop::Style::StringHashKeys < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#42 + def on_pair(node); end + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#30 + def receive_environments_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#25 + def string_hash_key?(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/string_hash_keys.rb#22 +RuboCop::Cop::Style::StringHashKeys::MSG = T.let(T.unsafe(nil), String) + +# Checks if uses of quotes match the configured preference. +# +# @example EnforcedStyle: double_quotes +# # bad +# 'Just some text' +# 'No special chars or interpolation' +# +# # good +# "Just some text" +# "No special chars or interpolation" +# "Every string in #{project} uses double_quotes" +# @example EnforcedStyle: single_quotes (default) +# # bad +# "No special symbols" +# "No string interpolation" +# "Just text" +# +# # good +# 'No special symbols' +# 'No string interpolation' +# 'Just text' +# "Wait! What's #{this}!" +# +# source://rubocop//lib/rubocop/cop/style/string_literals.rb#29 +class RuboCop::Cop::Style::StringLiterals < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::StringLiteralsHelp + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#37 + def on_dstr(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#123 + def accept_child_double_quotes?(nodes); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#71 + def all_string_literals?(nodes); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#61 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#105 + def check_multiline_quote_style(node, quote); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#101 + def consistent_multiline?; end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#75 + def detect_quote_styles(node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#87 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#97 + def offense?(node); end + + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#65 + def register_offense(node, message: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#119 + def unexpected_double_quotes?(quote); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals.rb#115 + def unexpected_single_quotes?(quote); end +end + +# source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 +RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) + +# Checks that quotes inside string, symbol, and regexp interpolations +# match the configured preference. +# +# @example EnforcedStyle: double_quotes +# # bad +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ +# +# # good +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# @example EnforcedStyle: single_quotes (default) +# # bad +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ +# +# # good +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ +# +# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 +class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::StringLiteralsHelp + include ::RuboCop::Cop::StringHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 + def autocorrect(corrector, node); end + + # Cop classes that include the StringHelp module usually ignore regexp + # nodes. Not so for this cop, which is why we override the on_regexp + # definition with an empty one. + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 + def offense?(node); end +end + +# Enforces the use of consistent method names +# from the `String` class. +# +# @example +# # bad +# 'name'.intern +# 'var'.unfavored_method +# +# # good +# 'name'.to_sym +# 'var'.preferred_method +# +# source://rubocop//lib/rubocop/cop/style/string_methods.rb#17 +class RuboCop::Cop::Style::StringMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/string_methods.rb#32 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/string_methods.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/string_methods.rb#21 +RuboCop::Cop::Style::StringMethods::MSG = T.let(T.unsafe(nil), String) + +# Identifies places where `lstrip.rstrip` can be replaced by +# `strip`. +# +# @example +# # bad +# 'abc'.lstrip.rstrip +# 'abc'.rstrip.lstrip +# +# # good +# 'abc'.strip +# +# source://rubocop//lib/rubocop/cop/style/strip.rb#16 +class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/strip.rb#24 + def lstrip_rstrip(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#41 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/strip.rb#20 +RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/strip.rb#21 +RuboCop::Cop::Style::Strip::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for inheritance from `Struct.new`. Inheriting from `Struct.new` +# adds a superfluous level in inheritance tree. +# +# @example +# # bad +# class Person < Struct.new(:first_name, :last_name) +# def age +# 42 +# end +# end +# +# Person.ancestors +# # => [Person, #, Struct, (...)] +# +# # good +# Person = Struct.new(:first_name, :last_name) do +# def age +# 42 +# end +# end +# +# Person.ancestors +# # => [Person, Struct, (...)] +# +# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#33 +class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#40 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#52 + def struct_constructor?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#59 + def correct_parent(parent, corrector); end + + # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#69 + def range_for_empty_class_body(class_node, struct_new); end +end + +# source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#37 +RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) + +# Checks for redundant argument forwarding when calling super with arguments identical to +# the method definition. +# +# Using zero arity `super` within a `define_method` block results in `RuntimeError`: +# +# [source,ruby] +# ---- +# def m +# define_method(:foo) { super() } # => OK +# end +# +# def m +# define_method(:foo) { super } # => RuntimeError +# end +# ---- +# +# Furthermore, any arguments accompanied by a block may potentially be delegating to +# `define_method`, therefore, `super` used within these blocks will be allowed. +# This approach might result in false negatives, yet ensuring safe detection takes precedence. +# +# NOTE: When forwarding the same arguments but replacing the block argument with a new inline +# block, it is not necessary to explicitly list the non-block arguments. As such, an offense +# will be registered in this case. +# +# @example +# # bad +# def method(*args, **kwargs) +# super(*args, **kwargs) +# end +# +# # good - implicitly passing all arguments +# def method(*args, **kwargs) +# super +# end +# +# # good - forwarding a subset of the arguments +# def method(*args, **kwargs) +# super(*args) +# end +# +# # good - forwarding no arguments +# def method(*args, **kwargs) +# super() +# end +# +# # bad - forwarding with overridden block +# def method(*args, **kwargs, &block) +# super(*args, **kwargs) { do_something } +# end +# +# # good - implicitly passing all non-block arguments +# def method(*args, **kwargs, &block) +# super { do_something } +# end +# +# # good - assigning to the block variable before calling super +# def method(&block) +# # Assigning to the block variable would pass the old value to super, +# # under this circumstance the block must be referenced explicitly. +# block ||= proc { 'fallback behavior' } +# super(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#68 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#77 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#125 + def argument_list_size_differs?(def_args, super_args, super_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107 + def arguments_identical?(def_node, super_node, def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#180 + def block_arg_same?(def_node, super_node, def_arg, super_arg); end + + # Reassigning the block argument will still pass along the original block to super + # https://bugs.ruby-lang.org/issues/20505 + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#194 + def block_reassigned?(def_node, block_arg_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#134 + def block_sends_to_super?(super_node, parent_node = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#95 + def find_def_node(super_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#205 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#160 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#170 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#143 + def positional_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#150 + def positional_rest_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#209 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#71 +RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#73 +RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#74 +RuboCop::Cop::Style::SuperArguments::MSG_INLINE_BLOCK = T.let(T.unsafe(nil), String) + +# Enforces the presence of parentheses in `super` containing arguments. +# +# `super` is a keyword and is provided as a distinct cop from those designed for method call. +# +# @example +# +# # bad +# super name, age +# +# # good +# super(name, age) +# +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18 +class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23 + def on_super(node); end +end + +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21 +RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String) + +# Enforces the use of shorthand-style swapping of 2 variables. +# +# @example +# # bad +# tmp = x +# x = y +# y = tmp +# +# # good +# x, y = y, x +# +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#21 +class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#30 + def on_asgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#43 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#43 + def on_cvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#43 + def on_gvasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#43 + def on_ivasgn(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#43 + def on_lvasgn(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#47 + def allowed_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#93 + def correction_range(tmp_assign, y_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#81 + def lhs(node); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#66 + def message(x_assign, y_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#75 + def replacement(x_assign); end + + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#89 + def rhs(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#60 + def simple_assignment?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/swap_values.rb#51 + def swapping_values?(tmp_assign, x_assign, y_assign); end +end + +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#25 +RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/swap_values.rb#28 +RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set) + +# Checks for array literals made up of symbols that are not +# using the %i() syntax. +# +# Alternatively, it checks for symbol arrays using the %i() syntax on +# projects which do not want to use that syntax, perhaps because they +# support a version of Ruby lower than 2.0. +# +# Configuration option: MinSize +# If set, arrays with fewer elements than this value will not trigger the +# cop. For example, a `MinSize` of `3` will not enforce a style on an +# array of 2 or fewer elements. +# +# @example EnforcedStyle: brackets +# # good +# [:foo, :bar, :baz] +# +# # bad +# %i[foo bar baz] +# @example EnforcedStyle: percent (default) +# # good +# %i[foo bar baz] +# +# # bad +# [:foo, :bar, :baz] +# +# # bad (contains spaces) +# %i[foo\ bar baz\ quux] +# +# # bad (contains [] with spaces) +# %i[foo \[ \]] +# +# # bad (contains () with spaces) +# %i(foo \( \)) +# +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 +class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ArrayMinSize + include ::RuboCop::Cop::ArraySyntax + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::PercentArray + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 + def on_array(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 + def build_bracketed_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 + def complex_content?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 + def symbol_without_quote?(string); end + + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 + def to_symbol_literal(string); end + + class << self + # Returns the value of attribute largest_brackets. + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 + def largest_brackets; end + + # Sets the attribute largest_brackets + # + # @param value the value to set the attribute largest_brackets to. + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 + def largest_brackets=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 +RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 +RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 +RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + +# Checks symbol literal syntax. +# +# @example +# +# # bad +# :"symbol" +# +# # good +# :symbol +# +# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#15 +class RuboCop::Cop::Style::SymbolLiteral < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#20 + def on_sym(node); end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_literal.rb#18 +RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) + +# Use symbols as procs when possible. +# +# If you prefer a style that allows block for method with arguments, +# please set `true` to `AllowMethodsWithArguments`. +# `define_method?` methods are allowed by default. +# These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# something.map { |s| s.upcase } +# something.map { _1.upcase } +# +# # good +# something.map(&:upcase) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# +# # good +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # good +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# @example AllowComments: false (default) +# # bad +# something.do_something do |s| # some comment +# # some comment +# s.upcase # some comment +# # some comment +# end +# @example AllowComments: true +# # good - if there are comment in either position +# something.do_something do |s| # some comment +# # some comment +# s.upcase # some comment +# # some comment +# end +# @example AllowMethodsWithArguments: false (default) +# # bad +# something.do_something(foo) { |o| o.bar } +# +# # good +# something.do_something(foo, &:bar) +# @example AllowMethodsWithArguments: true +# # good +# something.do_something(foo) { |o| o.bar } +# @example AllowedMethods: [define_method] (default) +# # good +# define_method(:foo) { |foo| foo.bar } +# @example AllowedPatterns: ['map'] (default) +# # good +# something.map { |s| s.upcase } +# @example AllowedPatterns: [] (default) +# # bad +# something.map { |s| s.upcase } +# +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 +class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 + def destructuring_block_argument?(argument_node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#171 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#188 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + def proc_node?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 + def symbol_proc?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 + def symbol_proc_receiver?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#276 + def allow_comments?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#272 + def allow_if_method_has_argument?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#206 + def allowed_method_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#219 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#249 + def autocorrect_lambda_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + def autocorrect_with_args(corrector, node, args, method_name); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#227 + def autocorrect_without_args(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#262 + def begin_pos_for_replacement(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#257 + def block_range_with_space(node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#210 + def register_offense(node, method_name, block_method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#202 + def unsafe_array_usage?(node); end + + # See: https://github.com/rubocop/rubocop/issues/10864 + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#198 + def unsafe_hash_usage?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#166 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 +RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 +RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 +RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) + +# Checks for manual counting patterns that can be replaced by `Enumerable#tally`. +# +# The cop detects the following patterns: +# +# - `each_with_object(Hash.new(0)) { |item, counts| counts[item] += 1 }` +# - `group_by(&:itself).transform_values(&:count)` +# - `group_by { |x| x }.transform_values(&:size)` +# - `group_by { |x| x }.transform_values { |v| v.length }` +# +# @example +# # bad +# array.each_with_object(Hash.new(0)) { |item, counts| counts[item] += 1 } +# +# # bad +# array.group_by(&:itself).transform_values(&:count) +# +# # bad +# array.group_by { |item| item }.transform_values(&:size) +# +# # bad +# array.group_by { |item| item }.transform_values { |v| v.length } +# +# # good +# array.tally +# +# source://rubocop//lib/rubocop/cop/style/tally_method.rb#36 +class RuboCop::Cop::Style::TallyMethod < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#136 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#129 + def on_send(node); end + + # Pattern 1: collection.each_with_object(Hash.new(0)) { |elem, hash| hash[elem] += 1 } + # + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#50 + def tally_each_with_object?(param0 = T.unsafe(nil)); end + + # Pattern 3: collection.group_by { |x| x }.transform_values(&:count/size/length) + # + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#78 + def tally_group_by_identity_block?(param0 = T.unsafe(nil)); end + + # Pattern 2: collection.group_by(&:itself).transform_values(&:count/size/length) + # + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#69 + def tally_group_by_symbol?(param0 = T.unsafe(nil)); end + + # Pattern 4: collection.group_by(&:itself).transform_values { |v| v.count/size/length } + # collection.group_by { |x| x }.transform_values { |v| v.count/size/length } + # + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#92 + def tally_group_by_transform_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#140 + def check_each_with_object(node); end + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#150 + def check_transform_values(node); end + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#166 + def group_by_send_node(transform_node); end + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#158 + def register_group_by_offense(transform_node, end_node); end + + # source://rubocop//lib/rubocop/cop/style/tally_method.rb#175 + def replacement_range(start_node, end_node); end +end + +# source://rubocop//lib/rubocop/cop/style/tally_method.rb#46 +RuboCop::Cop::Style::TallyMethod::COUNTING_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/tally_method.rb#43 +RuboCop::Cop::Style::TallyMethod::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/tally_method.rb#44 +RuboCop::Cop::Style::TallyMethod::MSG_GROUP_BY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/tally_method.rb#45 +RuboCop::Cop::Style::TallyMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Corrector to correct conditional assignment in ternary conditions. +# +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#505 +class RuboCop::Cop::Style::TernaryCorrector + extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper + extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper + + class << self + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#510 + def correct(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#514 + def move_assignment_inside_condition(corrector, node); end + + private + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#528 + def correction(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#541 + def element_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#545 + def extract_branches(node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#558 + def move_branch_inside_condition(corrector, branch, assignment); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#553 + def remove_parentheses(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#532 + def ternary(node); end + end +end + +# Checks for the presence of parentheses around ternary +# conditions. It is configurable to enforce inclusion or omission of +# parentheses using `EnforcedStyle`. Omission is only enforced when +# removing the parentheses won't cause a different behavior. +# +# `AllowSafeAssignment` option for safe assignment. +# By safe assignment we mean putting parentheses around +# an assignment to indicate "I know I'm using an assignment +# as a condition. It's not a mistake." +# +# @example AllowSafeAssignment: false +# # bad +# foo = (bar = baz) ? a : b +# @example AllowSafeAssignment: true (default) +# # good +# foo = (bar = baz) ? a : b +# @example EnforcedStyle: require_no_parentheses (default) +# # bad +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = (bar && baz) ? a : b +# +# # good +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = bar && baz ? a : b +# @example EnforcedStyle: require_parentheses +# # bad +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = bar && baz ? a : b +# +# # good +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = (bar && baz) ? a : b +# @example EnforcedStyle: require_parentheses_when_complex +# # bad +# foo = (bar?) ? a : b +# foo = (bar.baz?) ? a : b +# foo = bar && baz ? a : b +# +# # good +# foo = bar? ? a : b +# foo = bar.baz? ? a : b +# foo = (bar && baz) ? a : b +# +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#57 +class RuboCop::Cop::Style::TernaryParentheses < ::RuboCop::Cop::Base + include ::RuboCop::Cop::SafeAssignment + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#191 + def method_name(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#69 + def on_if(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#100 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#181 + def below_ternary_precedence?(child); end + + # If the condition is parenthesized we recurse and check for any + # complex expressions within it. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#131 + def complex_condition?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#89 + def condition_as_parenthesized_one_line_pattern_matching?(condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#196 + def correct_parenthesized(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#210 + def correct_unparenthesized(corrector, condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#151 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#227 + def node_args_need_parens?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#234 + def node_with_args?(node); end + + # Anything that is not a variable, constant, or method/.method call + # will be counted as a complex expression. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#141 + def non_complex_expression?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#145 + def non_complex_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#113 + def offense?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#85 + def only_closing_parenthesis_is_last_line?(condition); end + + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#214 + def parenthesize_condition_arguments(corrector, send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#169 + def parenthesized?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#161 + def require_parentheses?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#165 + def require_parentheses_when_complex?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#177 + def unparenthesized_method_call?(child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#173 + def unsafe_autocorrect?(condition); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#222 + def whitespace_after?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#66 +RuboCop::Cop::Style::TernaryParentheses::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#67 +RuboCop::Cop::Style::TernaryParentheses::MSG_COMPLEX = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#64 +RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/ternary_parentheses.rb#63 +RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) + +# Newcomers to ruby applications may write top-level methods, +# when ideally they should be organized in appropriate classes or modules. +# This cop looks for definitions of top-level methods and warns about them. +# +# However for ruby scripts it is perfectly fine to use top-level methods. +# Hence this cop is disabled by default. +# +# @example +# # bad +# def some_method +# end +# +# # bad +# def self.some_method +# end +# +# # bad +# define_method(:foo) { puts 1 } +# +# # good +# module Foo +# def some_method +# end +# end +# +# # good +# class Foo +# def self.some_method +# end +# end +# +# # good +# Struct.new do +# def some_method +# end +# end +# +# # good +# class Foo +# define_method(:foo) { puts 1 } +# end +# +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#47 +class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#80 + def define_method_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#60 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#52 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#57 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#67 + def on_itblock(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#66 + def on_numblock(node); end + + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#58 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#71 + def top_level_method_definition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#48 +RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/top_level_method_definition.rb#50 +RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for trailing code after the class definition. +# +# @example +# # bad +# class Foo; def foo; end +# end +# +# # good +# class Foo +# def foo; end +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#18 +class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 + def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#37 + def on_sclass(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#23 +RuboCop::Cop::Style::TrailingBodyOnClass::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing code after the method definition. +# +# NOTE: It always accepts endless method definitions that are basically on the same line. +# +# @example +# # bad +# def some_method; do_stuff +# end +# +# def f(x); b = foo +# b[c: x] +# end +# +# # good +# def some_method +# do_stuff +# end +# +# def f(x) +# b = foo +# b[c: x] +# end +# +# def endless_method = do_stuff +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#31 +class RuboCop::Cop::Style::TrailingBodyOnMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#38 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#51 + def on_defs(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_method_definition.rb#36 +RuboCop::Cop::Style::TrailingBodyOnMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing code after the module definition. +# +# @example +# # bad +# module Foo extend self +# end +# +# # good +# module Foo +# extend self +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#18 +class RuboCop::Cop::Style::TrailingBodyOnModule < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::TrailingBody + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#25 + def on_module(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_body_on_module.rb#23 +RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing comma in argument lists. +# The supported styles are: +# +# * `consistent_comma`: Requires a comma after the last argument, +# for all parenthesized multi-line method calls with arguments. +# * `comma`: Requires a comma after the last argument, but only for +# parenthesized method calls where each argument is on its own line. +# * `diff_comma`: Requires a comma after the last argument, but only +# when that argument is followed by an immediate newline, even if +# there is an inline comment on the same line. +# * `no_comma`: Requires that there is no comma after the last +# argument. +# +# Regardless of style, trailing commas are not allowed in +# single-line method calls. +# +# @example EnforcedStyleForMultiline: comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # bad +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, +# 3 +# ) +# +# # bad +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, 2, 3 +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # good +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# @example EnforcedStyleForMultiline: diff_comma +# # bad +# method(1, 2,) +# +# # good +# method(1, 2) +# +# # good +# method( +# 1, 2, +# 3, +# ) +# +# # good +# method( +# 1, 2, 3, +# ) +# +# # good +# method( +# 1, +# 2, +# ) +# +# # bad +# method(1, [ +# 2, +# ],) +# +# # good +# method(1, [ +# 2, +# ]) +# +# # bad +# object[1, 2, +# 3, 4,] +# +# # good +# object[1, 2, +# 3, 4] +# @example EnforcedStyleForMultiline: no_comma (default) +# # bad +# method(1, 2,) +# +# # bad +# object[1, 2,] +# +# # good +# method(1, 2) +# +# # good +# object[1, 2] +# +# # good +# method( +# 1, +# 2 +# ) +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#141 +class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#156 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#149 + def on_send(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#145 + def autocorrect_incompatible_with; end + end +end + +# Checks for trailing comma in array literals. +# The configuration options are: +# +# * `consistent_comma`: Requires a comma after the last item of all non-empty, multiline array +# literals. +# * `comma`: Requires a comma after the last item in an array, but only when each item is on +# its own line. +# * `diff_comma`: Requires a comma after the last item in an array, but only when that item is +# followed by an immediate newline, even if there is an inline comment on the same line. +# * `no_comma`: Does not require a comma after the last item in an array +# +# @example EnforcedStyleForMultiline: comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # bad +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, +# 3 +# ] +# +# # bad +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, 2, 3 +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# @example EnforcedStyleForMultiline: consistent_comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # good +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# +# # bad +# a = [1, 2, +# 3, 4] +# +# # good +# a = [1, 2, +# 3, 4,] +# @example EnforcedStyleForMultiline: diff_comma +# # bad +# a = [1, 2,] +# +# # good +# a = [1, 2] +# +# # good +# a = [ +# 1, 2, +# 3, +# ] +# +# # good +# a = [ +# 1, 2, 3, +# ] +# +# # good +# a = [ +# 1, +# 2, +# ] +# +# # bad +# a = [1, 2, +# 3, 4,] +# +# # good +# a = [1, 2, +# 3, 4] +# @example EnforcedStyleForMultiline: no_comma (default) +# # bad +# a = [1, 2,] +# +# # good +# a = [ +# 1, +# 2 +# ] +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#125 +class RuboCop::Cop::Style::TrailingCommaInArrayLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_array_literal.rb#129 + def on_array(node); end +end + +# Checks whether trailing commas in block arguments are +# required. Blocks with only one argument and a trailing comma require +# that comma to be present. Blocks with more than one argument never +# require a trailing comma. +# +# @example +# # bad +# add { |foo, bar,| foo + bar } +# +# # good +# add { |foo, bar| foo + bar } +# +# # good +# add { |foo,| foo } +# +# # good +# add { foo } +# +# # bad +# add do |foo, bar,| +# foo + bar +# end +# +# # good +# add do |foo, bar| +# foo + bar +# end +# +# # good +# add do |foo,| +# foo +# end +# +# # good +# add do +# foo + bar +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#62 +class RuboCop::Cop::Style::TrailingCommaInBlockArgs < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#67 + def on_block(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#83 + def arg_count(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#95 + def argument_tokens(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#91 + def last_comma(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#87 + def trailing_comma?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#79 + def useless_trailing_comma?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_block_args.rb#65 +RuboCop::Cop::Style::TrailingCommaInBlockArgs::MSG = T.let(T.unsafe(nil), String) + +# Checks for trailing comma in hash literals. +# The configuration options are: +# +# * `consistent_comma`: Requires a comma after the last item of all non-empty, multiline hash +# literals. +# * `comma`: Requires a comma after the last item in a hash, but only when each item is on its +# own line. +# * `diff_comma`: Requires a comma after the last item in a hash, but only when that item is +# followed by an immediate newline, even if there is an inline comment on the same line. +# * `no_comma`: Does not require a comma after the last item in a hash +# +# @example EnforcedStyleForMultiline: comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # bad +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3 +# } +# +# # bad +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3 +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# @example EnforcedStyleForMultiline: consistent_comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# +# # bad +# a = { foo: 1, bar: 2, +# baz: 3, qux: 4 } +# +# # good +# a = { foo: 1, bar: 2, +# baz: 3, qux: 4, } +# @example EnforcedStyleForMultiline: diff_comma +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { foo: 1, bar: 2 } +# +# # good +# a = { +# foo: 1, bar: 2, +# qux: 3, +# } +# +# # good +# a = { +# foo: 1, bar: 2, qux: 3, +# } +# +# # good +# a = { +# foo: 1, +# bar: 2, +# } +# +# # bad +# a = { foo: 1, bar: 2, +# baz: 3, qux: 4, } +# +# # good +# a = { foo: 1, bar: 2, +# baz: 3, qux: 4 } +# @example EnforcedStyleForMultiline: no_comma (default) +# +# # bad +# a = { foo: 1, bar: 2, } +# +# # good +# a = { +# foo: 1, +# bar: 2 +# } +# +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#129 +class RuboCop::Cop::Style::TrailingCommaInHashLiteral < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::TrailingComma + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb#133 + def on_hash(node); end +end + +# Checks for trailing code after the method definition. +# +# @example +# # bad +# def some_method +# do_stuff; end +# +# def do_this(x) +# baz.map { |b| b.this(x) } end +# +# def foo +# block do +# bar +# end end +# +# # good +# def some_method +# do_stuff +# end +# +# def do_this(x) +# baz.map { |b| b.this(x) } +# end +# +# def foo +# block do +# bar +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#36 +class RuboCop::Cop::Style::TrailingMethodEndStatement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#41 + def on_def(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#55 + def body_and_end_on_same_line?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#51 + def trailing_end?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_method_end_statement.rb#39 +RuboCop::Cop::Style::TrailingMethodEndStatement::MSG = T.let(T.unsafe(nil), String) + +# Checks for extra underscores in variable assignment. +# +# @example +# # bad +# a, b, _ = foo +# a, b, _, = foo +# a, _, _ = foo +# a, _, _, = foo +# +# # good +# a, b, = foo +# a, = foo +# *a, b, _ = foo +# # => We need to know to not include 2 variables in a +# a, *b, _ = foo +# # => The correction `a, *b, = foo` is a syntax error +# @example AllowNamedUnderscoreVariables: false +# # bad +# a, b, _something = foo +# @example AllowNamedUnderscoreVariables: true (default) +# # good +# a, b, _something = foo +# +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#31 +class RuboCop::Cop::Style::TrailingUnderscoreVariable < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::SurroundingSpace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#41 + def on_masgn(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#92 + def allow_named_underscore_variables; end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#125 + def children_offenses(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#57 + def find_first_offense(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#66 + def find_first_possible_offense(variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#108 + def main_node_offense(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#146 + def range_for_parentheses(offense, left); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#88 + def reverse_index(collection, item); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#80 + def splat_variable_before?(first_offense, variables); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#96 + def unneeded_ranges(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#133 + def unused_range(node_type, mlhs_node, right); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#129 + def unused_variables_only?(offense, variables); end +end + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#38 +RuboCop::Cop::Style::TrailingUnderscoreVariable::DISALLOW = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#36 +RuboCop::Cop::Style::TrailingUnderscoreVariable::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/trailing_underscore_variable.rb#37 +RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil), String) + +# Looks for trivial reader/writer methods, that could +# have been created with the attr_* family of functions automatically. +# `to_ary`, `to_a`, `to_c`, `to_enum`, `to_h`, `to_hash`, `to_i`, `to_int`, `to_io`, +# `to_open`, `to_path`, `to_proc`, `to_r`, `to_regexp`, `to_str`, `to_s`, and `to_sym` methods +# are allowed by default. These are customizable with `AllowedMethods` option. +# +# @example +# # bad +# def foo +# @foo +# end +# +# def bar=(val) +# @bar = val +# end +# +# def self.baz +# @baz +# end +# +# # good +# attr_reader :foo +# attr_writer :bar +# +# class << self +# attr_reader :baz +# end +# @example AllowDSLWriters: false +# # bad +# def on_exception(action) +# @on_exception=action +# end +# +# # good +# attr_writer :on_exception +# @example AllowDSLWriters: true (default) +# # good +# def on_exception(action) +# @on_exception=action +# end +# @example AllowPredicates: false +# # bad +# def foo? +# @foo +# end +# +# # good +# attr_reader :foo +# @example AllowPredicates: true (default) +# # good +# def foo? +# @foo +# end +# @example AllowedMethods: ['allowed_method'] +# # good +# def allowed_method +# @foo +# end +# @example ExactNameMatch: false +# # bad +# def name +# @other_name +# end +# @example ExactNameMatch: true (default) +# # good +# def name +# @other_name +# end +# @example IgnoreClassMethods: false (default) +# # bad +# def self.foo +# @foo +# end +# +# # good +# class << self +# attr_reader :foo +# end +# @example IgnoreClassMethods: true +# # good +# def self.foo +# @foo +# end +# +# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 +class RuboCop::Cop::Style::TrivialAccessors < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#190 + def looks_like_trivial_writer?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#104 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#111 + def on_defs(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#222 + def accessor(kind, method_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#161 + def allow_dsl_writers?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#157 + def allow_predicates?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#195 + def allowed_method_name?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#169 + def allowed_method_names; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#204 + def allowed_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#200 + def allowed_writer?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#142 + def autocorrect(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#234 + def autocorrect_class(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#226 + def autocorrect_instance(corrector, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#173 + def dsl_writer?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#153 + def exact_name_match?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#165 + def ignore_class_methods?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#115 + def in_module_or_instance_eval?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#181 + def looks_like_trivial_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#208 + def names_match?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#129 + def on_method_def(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#248 + def top_level_node?(node); end + + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#214 + def trivial_accessor_kind(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#177 + def trivial_reader?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#185 + def trivial_writer?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#102 +RuboCop::Cop::Style::TrivialAccessors::MSG = T.let(T.unsafe(nil), String) + +# Looks for `unless` expressions with `else` clauses. +# +# @example +# # bad +# unless foo_bar.nil? +# # do something... +# else +# # do a different thing... +# end +# +# # good +# if foo_bar.present? +# # do something... +# else +# # do a different thing... +# end +# +# source://rubocop//lib/rubocop/cop/style/unless_else.rb#22 +class RuboCop::Cop::Style::UnlessElse < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#27 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#44 + def range_between_condition_and_else(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_else.rb#50 + def range_between_else_and_end(node); end +end + +# source://rubocop//lib/rubocop/cop/style/unless_else.rb#25 +RuboCop::Cop::Style::UnlessElse::MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of logical operators in an `unless` condition. +# It discourages such code, as the condition becomes more difficult +# to read and understand. +# +# This cop supports two styles: +# +# - `forbid_mixed_logical_operators` (default) +# - `forbid_logical_operators` +# +# `forbid_mixed_logical_operators` style forbids the use of more than one type +# of logical operators. This makes the `unless` condition easier to read +# because either all conditions need to be met or any condition need to be met +# in order for the expression to be truthy or falsey. +# +# `forbid_logical_operators` style forbids any use of logical operator. +# This makes it even more easy to read the `unless` condition as +# there is only one condition in the expression. +# +# @example EnforcedStyle: forbid_logical_operators +# # bad +# return unless a || b +# return unless a && b +# return unless a or b +# return unless a and b +# +# # good +# return unless a +# return unless a? +# @example EnforcedStyle: forbid_mixed_logical_operators (default) +# # bad +# return unless a || b && c +# return unless a && b || c +# return unless a && b and c +# return unless a || b or c +# return unless a && b or c +# return unless a || b and c +# +# # good +# return unless a && b && c +# return unless a || b || c +# return unless a and b and c +# return unless a or b or c +# return unless a? +# +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#50 +class RuboCop::Cop::Style::UnlessLogicalOperators < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#62 + def and_with_or?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#67 + def logical_operator?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#71 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#57 + def or_with_and?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#83 + def mixed_logical_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#90 + def mixed_precedence_and?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#97 + def mixed_precedence_or?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#54 +RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/unless_logical_operators.rb#53 +RuboCop::Cop::Style::UnlessLogicalOperators::FORBID_MIXED_LOGICAL_OPERATORS = T.let(T.unsafe(nil), String) + +# Checks for accessing the first element of `String#unpack` +# which can be replaced with the shorter method `unpack1`. +# +# @example +# +# # bad +# 'foo'.unpack('h*').first +# 'foo'.unpack('h*')[0] +# 'foo'.unpack('h*').slice(0) +# 'foo'.unpack('h*').at(0) +# +# # good +# 'foo'.unpack1('h*') +# +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#20 +class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#49 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#30 + def unpack_and_first_element?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#53 + def first_element_range(node, unpack_call); end +end + +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#26 +RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#27 +RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for variable interpolation (like "#@ivar"). +# +# @example +# # bad +# "His name is #$name" +# /check #$pattern/ +# "Let's go to the #@store" +# +# # good +# "His name is #{$name}" +# /check #{$pattern}/ +# "Let's go to the #{@store}" +# +# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#18 +class RuboCop::Cop::Style::VariableInterpolation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#24 + def on_node_with_interpolations(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#34 + def message(range); end + + # source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#38 + def var_nodes(nodes); end +end + +# source://rubocop//lib/rubocop/cop/style/variable_interpolation.rb#22 +RuboCop::Cop::Style::VariableInterpolation::MSG = T.let(T.unsafe(nil), String) + +# Checks for `when;` uses in `case` expressions. +# +# @example +# # bad +# case foo +# when 1; 'baz' +# when 2; 'bar' +# end +# +# # good +# case foo +# when 1 then 'baz' +# when 2 then 'bar' +# end +# +# source://rubocop//lib/rubocop/cop/style/when_then.rb#20 +class RuboCop::Cop::Style::WhenThen < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/when_then.rb#25 + def on_when(node); end +end + +# source://rubocop//lib/rubocop/cop/style/when_then.rb#23 +RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) + +# Checks for uses of `do` in multi-line `while/until` statements. +# +# @example +# +# # bad +# while x.any? do +# do_something(x.pop) +# end +# +# # good +# while x.any? +# do_something(x.pop) +# end +# +# # bad +# until x.empty? do +# do_something(x.pop) +# end +# +# # good +# until x.empty? +# do_something(x.pop) +# end +# +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29 +class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#43 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 + def on_while(node); end +end + +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32 +RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) + +# Checks for while and until statements that would fit on one line +# if written as a modifier while/until. The maximum line length is +# configured in the `Layout/LineLength` cop. +# +# @example +# # bad +# while x < 10 +# x += 1 +# end +# +# # good +# x += 1 while x < 10 +# +# # bad +# until x > 10 +# x += 1 +# end +# +# # good +# x += 1 until x > 10 +# +# # bad +# x += 100 while x < 500 # a long comment that makes code too long if it were a single line +# +# # good +# while x < 500 # a long comment that makes code too long if it were a single line +# x += 100 +# end +# +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#34 +class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp + include ::RuboCop::Cop::StatementModifier + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#47 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 + def on_while(node); end +end + +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#38 +RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) + +# Checks for array literals made up of word-like +# strings, that are not using the %w() syntax. +# +# Alternatively, it can check for uses of the %w() syntax, in projects +# which do not want to include that syntax. +# +# NOTE: When using the `percent` style, %w() arrays containing a space +# will be registered as offenses. +# +# Configuration option: MinSize +# If set, arrays with fewer elements than this value will not trigger the +# cop. For example, a `MinSize` of `3` will not enforce a style on an +# array of 2 or fewer elements. +# +# @example EnforcedStyle: brackets +# # good +# ['foo', 'bar', 'baz'] +# +# # bad +# %w[foo bar baz] +# +# # good (contains spaces) +# ['foo bar', 'baz quux'] +# +# # good +# [ +# ['one', 'One'], +# ['two', 'Two'] +# ] +# +# # bad +# [ +# %w[one One], +# %w[two Two] +# ] +# @example EnforcedStyle: percent (default) +# # good +# %w[foo bar baz] +# +# # bad +# ['foo', 'bar', 'baz'] +# +# # bad (contains spaces) +# %w[foo\ bar baz\ quux] +# +# # bad +# [ +# ['one', 'One'], +# ['two', 'Two'] +# ] +# +# # good +# [ +# %w[one One], +# %w[two Two] +# ] +# +# # good (2d array containing spaces) +# [ +# ['one', 'One'], +# ['two', 'Two'], +# ['forty two', 'Forty Two'] +# ] +# +# source://rubocop//lib/rubocop/cop/style/word_array.rb#71 +class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ArrayMinSize + include ::RuboCop::Cop::ArraySyntax + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::PercentArray + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#94 + def on_array(node); end + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#85 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#138 + def build_bracketed_array(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#118 + def complex_content?(strings, complex_regex: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#129 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#113 + def matrix_of_complex_content?(array); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#107 + def within_matrix_of_complex_content?(node); end + + # source://rubocop//lib/rubocop/cop/style/word_array.rb#134 + def word_regex; end + + class << self + # Returns the value of attribute largest_brackets. + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 + def largest_brackets; end + + # Sets the attribute largest_brackets + # + # @param value the value to set the attribute largest_brackets to. + # + # source://rubocop//lib/rubocop/cop/style/word_array.rb#82 + def largest_brackets=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/cop/style/word_array.rb#79 +RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/word_array.rb#78 +RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) + +# Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with +# `File.read` argument. +# +# NOTE: `YAML.safe_load_file` was introduced in Ruby 3.0. +# +# @example +# +# # bad +# YAML.load(File.read(path)) +# YAML.parse(File.read(path)) +# +# # good +# YAML.load_file(path) +# YAML.parse_file(path) +# +# # bad +# YAML.safe_load(File.read(path)) # Ruby 3.0 and newer +# +# # good +# YAML.safe_load_file(path) # Ruby 3.0 and newer +# +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#27 +class RuboCop::Cop::Style::YAMLFileRead < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#34 + def yaml_file_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#60 + def offense_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#30 +RuboCop::Cop::Style::YAMLFileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#31 +RuboCop::Cop::Style::YAMLFileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Enforces or forbids Yoda conditions, +# i.e. comparison operations where the order of expression is reversed. +# eg. `5 == x` +# +# @example EnforcedStyle: forbid_for_all_comparison_operators (default) +# # bad +# 99 == foo +# "bar" != foo +# 42 >= foo +# 10 < bar +# 99 == CONST +# +# # good +# foo == 99 +# foo == "bar" +# foo <= 42 +# bar > 10 +# CONST == 99 +# "#{interpolation}" == foo +# /#{interpolation}/ == foo +# @example EnforcedStyle: forbid_for_equality_operators_only +# # bad +# 99 == foo +# "bar" != foo +# +# # good +# 99 >= foo +# 3 < a && a < 5 +# @example EnforcedStyle: require_for_all_comparison_operators +# # bad +# foo == 99 +# foo == "bar" +# foo <= 42 +# bar > 10 +# +# # good +# 99 == foo +# "bar" != foo +# 42 >= foo +# 10 < bar +# @example EnforcedStyle: require_for_equality_operators_only +# # bad +# 99 >= foo +# 3 < a && a < 5 +# +# # good +# 99 == foo +# "bar" != foo +# +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#77 +class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#96 + def file_constant_equal_program_name?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#100 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 + def actual_code_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 + def constant_portion?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#142 + def corrected_code(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#113 + def enforce_yoda?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#117 + def equality_only?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#177 + def interpolation?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 + def non_equality_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 + def noncommutative_operator?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 + def program_name?(name); end + + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 + def reverse_comparison(operator); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 + def source_file_path_constant?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#126 + def valid_yoda?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#121 + def yoda_compatible_condition?(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#88 +RuboCop::Cop::Style::YodaCondition::ENFORCE_YODA_STYLES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#91 +RuboCop::Cop::Style::YodaCondition::EQUALITY_ONLY_STYLES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#84 +RuboCop::Cop::Style::YodaCondition::EQUALITY_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#82 +RuboCop::Cop::Style::YodaCondition::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#85 +RuboCop::Cop::Style::YodaCondition::NONCOMMUTATIVE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#86 +RuboCop::Cop::Style::YodaCondition::PROGRAM_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#87 +RuboCop::Cop::Style::YodaCondition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#83 +RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Hash) + +# Forbids Yoda expressions, i.e. binary operations (using `*`, `+`, `&`, `|`, +# and `^` operators) where the order of expression is reversed, eg. `1 + x`. +# This cop complements `Style/YodaCondition` cop, which has a similar purpose. +# +# This cop is disabled by default to respect user intentions such as: +# +# [source,ruby] +# ---- +# config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i +# ---- +# +# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) +# # bad +# 10 * y +# 1 + x +# 1 & z +# 1 | x +# 1 ^ x +# 1 + CONST +# +# # good +# y * 10 +# x + 1 +# z & 1 +# x | 1 +# x ^ 1 +# CONST + 1 +# 60 * 24 +# +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 +class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#74 + def constant_portion?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#82 + def offended_ancestor?(node); end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#86 + def offended_nodes; end + + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#78 + def supported_operators; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#70 + def yoda_expression_constant?(lhs, rhs); end +end + +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 +RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 +RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for numeric comparisons that can be replaced +# by a predicate method, such as `receiver.length == 0`, +# `receiver.length > 0`, and `receiver.length != 0`, +# `receiver.length < 1` and `receiver.size == 0` that can be +# replaced by `receiver.empty?` and `!receiver.empty?`. +# +# NOTE: `File`, `Tempfile`, and `StringIO` do not have `empty?` +# so allow `size == 0` and `size.zero?`. +# +# @example +# # bad +# [1, 2, 3].length == 0 +# 0 == "foobar".length +# array.length < 1 +# {a: 1, b: 2}.length != 0 +# string.length > 0 +# hash.size > 0 +# +# # good +# [1, 2, 3].empty? +# "foobar".empty? +# array.empty? +# !{a: 1, b: 2}.empty? +# !string.empty? +# !hash.empty? +# +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#37 +class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # Some collection like objects in the Ruby standard library + # implement `#size`, but not `#empty`. We ignore those to + # reduce false positives. + # + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147 + def non_polymorphic_collection?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 + def nonzero_length_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138 + def other_length_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106 + def zero_length_comparison(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 + def zero_length_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + def zero_length_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85 + def check_nonzero_length_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70 + def check_zero_length_comparison(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58 + def check_zero_length_predicate(node); end + + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 + def replacement(node); end +end + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#41 +RuboCop::Cop::Style::ZeroLengthPredicate::NONZERO_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#43 +RuboCop::Cop::Style::ZeroLengthPredicate::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#40 +RuboCop::Cop::Style::ZeroLengthPredicate::ZERO_MSG = T.let(T.unsafe(nil), String) + +# Common functionality for checking and correcting surrounding whitespace. +# +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#6 +module RuboCop::Cop::SurroundingSpace + include ::RuboCop::Cop::RangeHelp + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#110 + def empty_brackets?(left_bracket_token, right_bracket_token, tokens: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#104 + def empty_offense(node, range, message, command); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#94 + def empty_offenses(node, left, right, message); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#68 + def extra_space?(token, side); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#129 + def no_character_between?(left_bracket_token, right_bracket_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#38 + def no_space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#120 + def offending_empty_no_space?(config, left_token, right_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#116 + def offending_empty_space?(config, left_token, right_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#33 + def on_new_investigation; end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#78 + def reposition(src, pos, step, include_newlines: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#16 + def side_space_range(range:, side:, include_newlines: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#124 + def space_between?(left_bracket_token, right_bracket_token); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#85 + def space_offense(node, token, side, message, command); end + + # source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#53 + def space_offenses(node, left_token, right_token, message, start_ok: T.unsafe(nil), end_ok: T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#9 +RuboCop::Cop::SurroundingSpace::NO_SPACE_COMMAND = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#12 +RuboCop::Cop::SurroundingSpace::SINGLE_SPACE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/mixin/surrounding_space.rb#10 +RuboCop::Cop::SurroundingSpace::SPACE_COMMAND = T.let(T.unsafe(nil), String) + +# Classes that include this module just implement functions for working +# with symbol nodes. +# +# source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#7 +module RuboCop::Cop::SymbolHelp + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/symbol_help.rb#8 + def hash_key?(node); end +end + +# Common functionality for checking target ruby version. +# +# source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#6 +module RuboCop::Cop::TargetRubyVersion + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#19 + def maximum_target_ruby_version(version); end + + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#15 + def minimum_target_ruby_version(version); end + + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#11 + def required_maximum_ruby_version; end + + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#7 + def required_minimum_ruby_version; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/target_ruby_version.rb#23 + def support_target_ruby_version?(version); end +end + +# A group of cops, ready to be called on duty to inspect files. +# Team is responsible for selecting only relevant cops to be sent on duty, +# as well as insuring that the needed forces are sent along with them. +# +# For performance reasons, Team will first dispatch cops & forces in two groups, +# first the ones needed for autocorrection (if any), then the rest +# (unless autocorrections happened). +# +# source://rubocop//lib/rubocop/cop/team.rb#13 +class RuboCop::Cop::Team + # @return [Team] a new instance of Team + # + # source://rubocop//lib/rubocop/cop/team.rb#61 + def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#72 + def autocorrect?; end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/cop/team.rb#57 + def cops; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#76 + def debug?; end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/cop/team.rb#57 + def errors; end + + # source://rubocop//lib/rubocop/cop/team.rb#128 + def external_dependency_checksum; end + + # @deprecated + # + # source://rubocop//lib/rubocop/cop/team.rb#120 + def forces; end + + # source://rubocop//lib/rubocop/cop/team.rb#82 + def inspect_file(processed_source); end + + # @return [Commissioner::InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/team.rb#91 + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end + + # Returns the value of attribute updated_source_file. + # + # source://rubocop//lib/rubocop/cop/team.rb#57 + def updated_source_file; end + + # Returns the value of attribute updated_source_file. + # + # source://rubocop//lib/rubocop/cop/team.rb#59 + def updated_source_file?; end + + # Returns the value of attribute warnings. + # + # source://rubocop//lib/rubocop/cop/team.rb#57 + def warnings; end + + private + + # source://rubocop//lib/rubocop/cop/team.rb#139 + def autocorrect(processed_source, report, original:, offset:); end + + # source://rubocop//lib/rubocop/cop/team.rb#203 + def autocorrect_report(report, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#158 + def be_ready; end + + # source://rubocop//lib/rubocop/cop/team.rb#209 + def collate_corrections(report, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#225 + def each_corrector(report); end + + # source://rubocop//lib/rubocop/cop/team.rb#277 + def handle_error(error, location, cop); end + + # source://rubocop//lib/rubocop/cop/team.rb#269 + def handle_warning(error, location); end + + # @return [Commissioner::InvestigationReport] + # + # source://rubocop//lib/rubocop/cop/team.rb#172 + def investigate_partial(cops, processed_source, offset:, original:); end + + # source://rubocop//lib/rubocop/cop/team.rb#252 + def process_errors(file, errors); end + + # source://rubocop//lib/rubocop/cop/team.rb#166 + def reset; end + + # @return [Array] + # + # source://rubocop//lib/rubocop/cop/team.rb#178 + def roundup_relevant_cops(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#194 + def support_target_rails_version?(cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/team.rb#188 + def support_target_ruby_version?(cop); end + + # source://rubocop//lib/rubocop/cop/team.rb#240 + def suppress_clobbering; end + + # source://rubocop//lib/rubocop/cop/team.rb#246 + def validate_config; end + + class << self + # @return [Array] needed for the given cops + # + # source://rubocop//lib/rubocop/cop/team.rb#43 + def forces_for(cops); end + + # @return [Team] with cops assembled from the given `cop_classes` + # + # source://rubocop//lib/rubocop/cop/team.rb#28 + def mobilize(cop_classes, config, options = T.unsafe(nil)); end + + # @return [Array] + # + # source://rubocop//lib/rubocop/cop/team.rb#34 + def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end + + # @return [Team] + # + # source://rubocop//lib/rubocop/cop/team.rb#15 + def new(cop_or_classes, config, options = T.unsafe(nil)); end + end +end + +# Common methods shared by TrailingBody cops +# +# source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#6 +module RuboCop::Cop::TrailingBody + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#12 + def body_on_first_line?(node, body); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#16 + def first_part_of(body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_body.rb#7 + def trailing_body?(node); end +end + +# Common methods shared by Style/TrailingCommaInArguments, +# Style/TrailingCommaInArrayLiteral and Style/TrailingCommaInHashLiteral +# +# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#8 +module RuboCop::Cop::TrailingComma + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + private + + # A single argument with the closing bracket on the same line as the end + # of the argument is not considered multiline, even if the argument + # itself might span multiple lines. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#112 + def allowed_multiline_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#185 + def any_heredoc?(items); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#177 + def autocorrect_range(item); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#151 + def avoid_comma(kind, comma_begin_pos, extra_info); end + + # Returns true if the node has round/square/curly brackets. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#87 + def brackets?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#20 + def check(node, items, kind, begin_pos, end_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#38 + def check_comma(node, kind, comma_pos); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#44 + def check_literal(node, kind); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#31 + def comma_offset(items, range); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#116 + def elements(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#55 + def extra_avoid_comma_info; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#189 + def heredoc?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#207 + def heredoc_send?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#81 + def inside_comment?(range, comma_offset); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#145 + def last_item_precedes_newline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#99 + def method_name_and_arguments_on_same_line?(node); end + + # Returns true if the round/square/curly brackets of the given node are + # on different lines, each item within is on its own line, and the + # closing bracket is on its own line. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#94 + def multiline?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#131 + def no_elements_on_same_line?(node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#137 + def node_end_location(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#141 + def on_same_line?(range1, range2); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#165 + def put_comma(items, kind); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#68 + def should_have_comma?(style, node); end + + # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#16 + def style_parameter_name; end +end + +# source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#12 +RuboCop::Cop::TrailingComma::MSG = T.let(T.unsafe(nil), String) + +# Common functionality shared by Uncommunicative cops +# +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#6 +module RuboCop::Cop::UncommunicativeName + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#12 + def check(node, args); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#95 + def allow_nums; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#87 + def allowed_names; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#78 + def arg_range(arg, length); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#45 + def case_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#64 + def ends_with_num?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#91 + def forbidden_names; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#83 + def forbidden_offense(node, range, name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#36 + def issue_offenses(node, range, name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#68 + def length_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#74 + def long_enough?(name); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#99 + def min_length; end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#53 + def name_type(node); end + + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#60 + def num_offense(node, range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#49 + def uppercase?(name); end +end + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#7 +RuboCop::Cop::UncommunicativeName::CASE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#10 +RuboCop::Cop::UncommunicativeName::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#9 +RuboCop::Cop::UncommunicativeName::LENGTH_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/uncommunicative_name.rb#8 +RuboCop::Cop::UncommunicativeName::NUM_MSG = T.let(T.unsafe(nil), String) + +# This autocorrects unused arguments. +# +# source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#6 +class RuboCop::Cop::UnusedArgCorrector + extend ::RuboCop::Cop::RangeHelp + + class << self + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#12 + def correct(corrector, processed_source, node); end + + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#31 + def correct_for_blockarg_type(corrector, node); end + + # Returns the value of attribute processed_source. + # + # source://rubocop//lib/rubocop/cop/correctors/unused_arg_corrector.rb#10 + def processed_source; end + end +end + +# This module contains a collection of useful utility methods. +# +# source://rubocop//lib/rubocop/cop/util.rb#7 +module RuboCop::Cop::Util + include ::RuboCop::PathUtil + + private + + # source://rubocop//lib/rubocop/cop/util.rb#39 + def add_parentheses(node, corrector); end + + # source://rubocop//lib/rubocop/cop/util.rb#60 + def any_descendant?(node, *types); end + + # source://rubocop//lib/rubocop/cop/util.rb#75 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#87 + def args_end(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#108 + def begins_its_line?(range); end + + # This is a bad API + # + # source://rubocop//lib/rubocop/cop/util.rb#17 + def comment_line?(line_source); end + + # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar + # + # source://rubocop//lib/rubocop/cop/util.rb#22 + def comment_lines?(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#205 + def compatible_external_encoding_for?(src); end + + # If converting a string to Ruby string literal source code, must + # double quotes be used? + # + # source://rubocop//lib/rubocop/cop/util.rb#133 + def double_quotes_required?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#147 + def escape_string(string); end + + # Returns, for example, a bare `if` node if the given node is an `if` + # with calls chained to the end of it. + # + # source://rubocop//lib/rubocop/cop/util.rb#118 + def first_part_of_call_chain(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#209 + def include_or_equal?(source, target); end + + # source://rubocop//lib/rubocop/cop/util.rb#184 + def indent(node, offset: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/util.rb#164 + def interpret_string_escapes(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#168 + def line(node_or_range); end + + # source://rubocop//lib/rubocop/cop/util.rb#30 + def line_range(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#143 + def needs_escaping?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#91 + def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/util.rb#34 + def parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#195 + def parse_regexp(text); end + + # source://rubocop//lib/rubocop/cop/util.rb#176 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/util.rb#151 + def to_string_literal(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#190 + def to_supported_styles(enforced_style); end + + # source://rubocop//lib/rubocop/cop/util.rb#160 + def trim_string_interpolation_escape_character(str); end + + class << self + # source://rubocop//lib/rubocop/cop/util.rb#39 + def add_parentheses(node, corrector); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#60 + def any_descendant?(node, *types); end + + # source://rubocop//lib/rubocop/cop/util.rb#75 + def args_begin(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#87 + def args_end(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#108 + def begins_its_line?(range); end + + # This is a bad API + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#17 + def comment_line?(line_source); end + + # @deprecated Use `ProcessedSource#line_with_comment?`, `contains_comment?` or similar + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#22 + def comment_lines?(node); end + + # If converting a string to Ruby string literal source code, must + # double quotes be used? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#133 + def double_quotes_required?(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#147 + def escape_string(string); end + + # Returns, for example, a bare `if` node if the given node is an `if` + # with calls chained to the end of it. + # + # source://rubocop//lib/rubocop/cop/util.rb#118 + def first_part_of_call_chain(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#184 + def indent(node, offset: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/util.rb#164 + def interpret_string_escapes(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#168 + def line(node_or_range); end + + # source://rubocop//lib/rubocop/cop/util.rb#30 + def line_range(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#143 + def needs_escaping?(string); end + + # @yield [sexp] + # + # source://rubocop//lib/rubocop/cop/util.rb#91 + def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#34 + def parentheses?(node); end + + # source://rubocop//lib/rubocop/cop/util.rb#195 + def parse_regexp(text); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/util.rb#176 + def same_line?(node1, node2); end + + # source://rubocop//lib/rubocop/cop/util.rb#151 + def to_string_literal(string); end + + # source://rubocop//lib/rubocop/cop/util.rb#190 + def to_supported_styles(enforced_style); end + + # source://rubocop//lib/rubocop/cop/util.rb#160 + def trim_string_interpolation_escape_character(str); end + end +end + +# source://rubocop//lib/rubocop/cop/util.rb#103 +RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) + +# Match literal regex characters, not including anchors, character +# classes, alternatives, groups, repetitions, references, etc +# +# source://rubocop//lib/rubocop/cop/util.rb#12 +RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) + +# Arbitrarily chosen value, should be enough to cover +# the most nested source code in real world projects. +# +# source://rubocop//lib/rubocop/cop/util.rb#102 +RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 +module RuboCop::Cop::Utils; end + +# Parses {Kernel#sprintf} format strings. +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#7 +class RuboCop::Cop::Utils::FormatString + # @return [FormatString] a new instance of FormatString + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#104 + def initialize(string); end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#108 + def format_sequences; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#120 + def max_digit_dollar_num; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#116 + def named_interpolation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#112 + def valid?; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#132 + def mixed_formats?; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#126 + def parse; end +end + +# Escaping the `#` in `INTERPOLATION` and `TEMPLATE_NAME` is necessary to +# avoid a bug in Ruby 3.2.0 +# See: https://bugs.ruby-lang.org/issues/19379 +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 +RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 +RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) + +# The syntax of a format sequence is as follows. +# +# ``` +# %[flags][width][.precision]type +# ``` +# +# A format sequence consists of a percent sign, followed by optional +# flags, width, and precision indicators, then terminated with a field +# type character. +# +# For more complex formatting, Ruby supports a reference by name. +# +# @see https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-format +# +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#47 +class RuboCop::Cop::Utils::FormatString::FormatSequence + # @return [FormatSequence] a new instance of FormatSequence + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#50 + def initialize(match); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#66 + def annotated?; end + + # Returns the value of attribute arg_number. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def arg_number; end + + # Number of arguments required for the format sequence + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#85 + def arity; end + + # Returns the value of attribute begin_pos. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def begin_pos; end + + # Returns the value of attribute end_pos. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def end_pos; end + + # Returns the value of attribute flags. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def flags; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#89 + def max_digit_dollar_num; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#62 + def percent?; end + + # Returns the value of attribute precision. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def precision; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#93 + def style; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#70 + def template?; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def type; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#74 + def variable_width?; end + + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#78 + def variable_width_argument_number; end + + # Returns the value of attribute width. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#48 + def width; end +end + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 +RuboCop::Cop::Utils::FormatString::INTERPOLATION = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#19 +RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 +RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 +RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#17 +RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#22 +RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#20 +RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#18 +RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 +RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) + +# This force provides a way to track local variables and scopes of Ruby. +# Cops interact with this force need to override some of the hook methods. +# +# def before_entering_scope(scope, variable_table) +# end +# +# def after_entering_scope(scope, variable_table) +# end +# +# def before_leaving_scope(scope, variable_table) +# end +# +# def after_leaving_scope(scope, variable_table) +# end +# +# def before_declaring_variable(variable, variable_table) +# end +# +# def after_declaring_variable(variable, variable_table) +# end +# +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#27 +class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force + # Starting point. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#81 + def investigate(processed_source); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#90 + def process_node(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#76 + def variable_table; end + + private + + # source://rubocop//lib/rubocop/cop/variable_force.rb#391 + def after_declaring_variable(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#391 + def after_entering_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#391 + def after_leaving_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#391 + def before_declaring_variable(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#391 + def before_entering_scope(arg); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#391 + def before_leaving_scope(arg); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#352 + def descendant_reference(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#342 + def each_descendant_reference(loop_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#327 + def find_variables_in_loop(loop_node); end + + # This is called for each scope recursively. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#99 + def inspect_variables_in_scope(scope_node); end + + # Mark last assignments which are referenced in the same loop + # as referenced by ignoring AST order since they would be referenced + # in next iteration. + # + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#309 + def mark_assignments_as_referenced_in_loop(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#132 + def node_handler_method_name(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#105 + def process_children(origin_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#240 + def process_loop(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#184 + def process_pattern_match_variable(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#166 + def process_regexp_named_captures(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#260 + def process_rescue(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#279 + def process_scope(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#298 + def process_send(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#148 + def process_variable_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#136 + def process_variable_declaration(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#228 + def process_variable_multiple_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#198 + def process_variable_operator_assignment(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#235 + def process_variable_referencing(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#271 + def process_zero_arity_super(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#363 + def reference_assignments(loop_assignments, loop_node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#192 + def regexp_captured_names(node); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#374 + def scanned_node?(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#378 + def scanned_nodes; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#113 + def skip_children!; end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#292 + def twisted_nodes(node); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#35 +RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) + +# This class represents each assignment of a variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#7 +class RuboCop::Cop::VariableForce::Assignment + include ::RuboCop::Cop::VariableForce::Branchable + + # @return [Assignment] a new instance of Assignment + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#17 + def initialize(node, variable); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#58 + def exception_assignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#80 + def for_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#91 + def meta_assignment_node; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#68 + def multiple_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#31 + def name; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#86 + def operator; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#62 + def operator_assignment?; end + + # Returns the value of attribute reassigned. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def reassigned; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#44 + def reassigned!; end + + # Returns the value of attribute reassigned. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#15 + def reassigned?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#39 + def reference!(node); end + + # Returns the value of attribute referenced. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def referenced; end + + # Returns the value of attribute referenced. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#14 + def referenced?; end + + # Returns the value of attribute references. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def references; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54 + def regexp_named_capture?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#74 + def rest_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#35 + def scope; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 + def used?; end + + # Returns the value of attribute variable. + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 + def variable; end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#145 + def find_multiple_assignment_node(grandparent_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#135 + def for_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#112 + def multiple_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 + def operator_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#128 + def rest_assignment_node; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10 +RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#68 +class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#69 + def assignment?; end + + # Returns the value of attribute node + # + # @return [Object] the current value of node + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def node; end + + # Sets the attribute node + # + # @param value [Object] the value to set the attribute node to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def node=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def inspect; end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def members; end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#68 + def new(*_arg0); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#74 +RuboCop::Cop::VariableForce::BRANCH_NODES = T.let(T.unsafe(nil), Array) + +# Namespace for branch classes for each control structure. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#7 +module RuboCop::Cop::VariableForce::Branch + class << self + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#8 + def of(target_node, scope: T.unsafe(nil)); end + end +end + +# left_body && right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#265 +class RuboCop::Cop::VariableForce::Branch::And < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::Operator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# left_body &&= right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#273 +class RuboCop::Cop::VariableForce::Branch::AndAsgn < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::Operator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# Abstract base class for branch classes. +# A branch represents a conditional branch in a scope. +# +# @example +# def some_scope +# do_something # no branch +# +# if foo +# do_something # branch A +# do_something # branch A +# else +# do_something # branch B +# if bar +# do_something # branch C (whose parent is branch B) +# end +# end +# +# do_something # no branch +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 +class RuboCop::Cop::VariableForce::Branch::Base < ::Struct + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#121 + def ==(other); end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#92 + def always_run?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#88 + def branched?; end + + # Returns the value of attribute child_node + # + # @return [Object] the current value of child_node + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def child_node; end + + # Sets the attribute child_node + # + # @param value [Object] the value to set the attribute child_node to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def child_node=(_); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#70 + def control_node; end + + # @yield [_self] + # @yieldparam _self [RuboCop::Cop::VariableForce::Branch::Base] the object that the method was called on + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#80 + def each_ancestor(include_self: T.unsafe(nil), &block); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#127 + def eql?(other); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#104 + def exclusive_with?(other); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#129 + def hash; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#96 + def may_jump_to_other_branch?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#100 + def may_run_incompletely?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#74 + def parent; end + + # Returns the value of attribute scope + # + # @return [Object] the current value of scope + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def scope; end + + # Sets the attribute scope + # + # @param value [Object] the value to set the attribute scope to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def scope=(_); end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#135 + def scan_ancestors; end + + class << self + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#43 + def classes; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#56 + def define_predicate(name, child_index: T.unsafe(nil)); end + + # @private + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#47 + def inherited(subclass); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def inspect; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def members; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#42 + def new(*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#52 + def type; end + end +end + +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#349 +RuboCop::Cop::VariableForce::Branch::CLASSES_BY_TYPE = T.let(T.unsafe(nil), Hash) + +# case target +# when /pattern/ # when_clause +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#219 +class RuboCop::Cop::VariableForce::Branch::Case < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#224 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def target?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def when_clause?; end +end + +# case target +# in pattern # in_pattern +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#234 +class RuboCop::Cop::VariableForce::Branch::CaseMatch < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#239 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def in_pattern?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def target?; end +end + +# begin +# main_body +# ensure +# ensure_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#338 +class RuboCop::Cop::VariableForce::Branch::Ensure < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#344 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def ensure_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def main_body?; end +end + +# Mix-in module for exception handling control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#305 +module RuboCop::Cop::VariableForce::Branch::ExceptionHandler + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#306 + def may_jump_to_other_branch?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#310 + def may_run_incompletely?; end +end + +# for element in collection +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#247 +class RuboCop::Cop::VariableForce::Branch::For < ::RuboCop::Cop::VariableForce::Branch::Base + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#252 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def collection?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def element?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# if conditional_clause +# truthy_body +# else +# falsey_body +# end +# +# unless conditional_clause +# falsey_body +# else +# truthy_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#166 +class RuboCop::Cop::VariableForce::Branch::If < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def falsey_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def truthy_body?; end +end + +# e.g. left_body += right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#297 +class RuboCop::Cop::VariableForce::Branch::OpAsgn < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::Operator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# Mix-in module for operator control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#258 +module RuboCop::Cop::VariableForce::Branch::Operator + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#259 + def always_run?; end +end + +# left_body || right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#281 +class RuboCop::Cop::VariableForce::Branch::Or < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::Operator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# left_body ||= right_body +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#289 +class RuboCop::Cop::VariableForce::Branch::OrAsgn < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::Operator + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def left_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def right_body?; end +end + +# begin +# main_body +# rescue StandardError => error # rescue_clause +# else +# else_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#321 +class RuboCop::Cop::VariableForce::Branch::Rescue < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::ExceptionHandler + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#328 + def always_run?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def else_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def main_body?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def rescue_clause?; end +end + +# Mix-in module for simple conditional control structures. +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#145 +module RuboCop::Cop::VariableForce::Branch::SimpleConditional + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#150 + def always_run?; end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#146 + def conditional_clause?; end +end + +# until conditional_clause +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#187 +class RuboCop::Cop::VariableForce::Branch::Until < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# begin +# loop_body +# end until conditional_clause +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#207 +class RuboCop::Cop::VariableForce::Branch::UntilPost < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# while conditional_clause +# loop_body +# end +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#177 +class RuboCop::Cop::VariableForce::Branch::While < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# begin +# loop_body +# end while conditional_clause +# +# source://rubocop//lib/rubocop/cop/variable_force/branch.rb#197 +class RuboCop::Cop::VariableForce::Branch::WhilePost < ::RuboCop::Cop::VariableForce::Branch::Base + include ::RuboCop::Cop::VariableForce::Branch::SimpleConditional + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def conditional_clause?; end + + # source://rubocop//lib/rubocop/cop/variable_force/branch.rb#57 + def loop_body?; end +end + +# Mix-in module for classes which own a node and need branch information +# of the node. The user classes must implement #node and #scope. +# +# source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#8 +module RuboCop::Cop::VariableForce::Branchable + # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#9 + def branch; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/branchable.rb#15 + def run_exclusively_with?(other); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#42 +RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#51 +RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 +RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#117 +RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#50 +RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#29 +RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#53 +RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#46 +RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# This class represents each reference of a variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7 +class RuboCop::Cop::VariableForce::Reference + include ::RuboCop::Cop::VariableForce::Branchable + + # @return [Reference] a new instance of Reference + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#16 + def initialize(node, scope); end + + # There's an implicit variable reference by the zero-arity `super`: + # + # def some_method(foo) + # super + # end + # + # Another case is `binding`: + # + # def some_method(foo) + # do_something(binding) + # end + # + # In these cases, the variable `foo` is not explicitly referenced, + # but it can be considered used implicitly by the `super` or `binding`. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#41 + def explicit?; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 + def node; end + + # Returns the value of attribute scope. + # + # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#14 + def scope; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/reference.rb#10 +RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#58 +RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#60 +RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) + +# A Scope represents a context of local variable visibility. +# This is a place where local variables belong to. +# A scope instance holds a scope node and variable entries. +# +# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#9 +class RuboCop::Cop::VariableForce::Scope + # @return [Scope] a new instance of Scope + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#22 + def initialize(node); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#35 + def ==(other); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#43 + def body_node; end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#61 + def each_node(&block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#57 + def include?(target_node); end + + # Returns the value of attribute naked_top_level. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def naked_top_level; end + + # Returns the value of attribute naked_top_level. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#20 + def naked_top_level?; end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#39 + def name; end + + # Returns the value of attribute node. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def node; end + + # Returns the value of attribute variables. + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#18 + def variables; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#100 + def ancestor_node?(target_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#90 + def belong_to_inner_scope?(target_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#79 + def belong_to_outer_scope?(target_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/scope.rb#70 + def scan_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/variable_force/scope.rb#10 +RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(nil), Hash) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 +RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#28 +RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#31 +RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 +RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) + +# A Variable represents existence of a local variable. +# This holds a variable declaration node and some states of the variable. +# +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 +class RuboCop::Cop::VariableForce::Variable + # @return [Variable] a new instance of Variable + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#15 + def initialize(name, declaration_node, scope); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#105 + def argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#31 + def assign(node); end + + # Returns the value of attribute assignments. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def assignments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#113 + def block_argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#85 + def capture_with_block!; end + + # Returns the value of attribute captured_by_block. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def captured_by_block; end + + # Returns the value of attribute captured_by_block. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 + def captured_by_block?; end + + # Returns the value of attribute declaration_node. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def declaration_node; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#121 + def explicit_block_local_variable?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#77 + def in_modifier_conditional?(assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#117 + def keyword_argument?; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#39 + def mark_last_as_reassigned!(assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#109 + def method_argument?; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def name; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#51 + def reference!(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#46 + def referenced?; end + + # Returns the value of attribute references. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def references; end + + # Returns the value of attribute scope. + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + def scope; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#101 + def should_be_unused?; end + + # This is a convenient way to check whether the variable is used + # in its entire variable lifetime. + # For more precise usage check, refer Assignment#used?. + # + # Once the variable is captured by a block, we have no idea + # when, where, and how many times the block would be invoked. + # This means we cannot track the usage of the variable. + # So we consider it's used to suppress false positive offenses. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#97 + def used?; end +end + +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#9 +RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#62 +class RuboCop::Cop::VariableForce::VariableReference < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#63 + def assignment?; end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def name=(_); end + + class << self + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def inspect; end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def keyword_init?; end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def members; end + + # source://rubocop//lib/rubocop/cop/variable_force.rb#62 + def new(*_arg0); end + end +end + +# A VariableTable manages the lifetime of all scopes and local variables +# in a program. +# This holds scopes as stack structure, provides a way to add local +# variables to current scope, and find local variables by considering +# variable visibility of the current scope. +# +# source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#11 +class RuboCop::Cop::VariableForce::VariableTable + # @return [VariableTable] a new instance of VariableTable + # + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#12 + def initialize(hook_receiver = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#113 + def accessible_variables; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#56 + def assign_to_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#40 + def current_scope; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#44 + def current_scope_level; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#48 + def declare_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#94 + def find_variable(name); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#16 + def invoke_hook(hook_name, *args); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#32 + def pop_scope; end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#24 + def push_scope(scope_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#68 + def reference_variable(name, node); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#20 + def scope_stack; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#109 + def variable_exist?(name); end + + private + + # source://rubocop//lib/rubocop/cop/variable_force/variable_table.rb#122 + def mark_variable_as_captured_by_block_if_so(variable); end +end + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#55 +RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) + +# Help methods for determining node visibility. +# +# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#8 +module RuboCop::Cop::VisibilityHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#57 + def visibility_block?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#62 + def visibility_inline_on_def?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#67 + def visibility_inline_on_method_name?(param0 = T.unsafe(nil), method_name:); end + + private + + # Navigate to find the last protected method + # + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#48 + def find_visibility_end(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#43 + def find_visibility_start(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#15 + def node_visibility(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#39 + def node_visibility_from_visibility_block(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#21 + def node_visibility_from_visibility_inline(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#28 + def node_visibility_from_visibility_inline_on_def(node); end + + # source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#33 + def node_visibility_from_visibility_inline_on_method_name(node); end +end + +# source://rubocop//lib/rubocop/cop/mixin/visibility_help.rb#11 +RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) + +# This class wraps the `Parser::Source::Comment` object that represents a +# cops it contains. +# +# source://rubocop//lib/rubocop/directive_comment.rb#7 +class RuboCop::DirectiveComment + # @return [DirectiveComment] a new instance of DirectiveComment + # + # source://rubocop//lib/rubocop/directive_comment.rb#52 + def initialize(comment, cop_registry = T.unsafe(nil)); end + + # Checks if all cops specified in this directive + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#146 + def all_cops?; end + + # Returns the value of attribute comment. + # + # source://rubocop//lib/rubocop/directive_comment.rb#50 + def comment; end + + # Returns array of specified in this directive cop names + # + # source://rubocop//lib/rubocop/directive_comment.rb#151 + def cop_names; end + + # Returns the value of attribute cop_registry. + # + # source://rubocop//lib/rubocop/directive_comment.rb#50 + def cop_registry; end + + # Returns the value of attribute cops. + # + # source://rubocop//lib/rubocop/directive_comment.rb#50 + def cops; end + + # Returns array of specified in this directive department names + # when all department disabled + # + # source://rubocop//lib/rubocop/directive_comment.rb#162 + def department_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#176 + def directive_count; end + + # Checks if this directive disables cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#111 + def disabled?; end + + # Checks if this directive disables all cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#141 + def disabled_all?; end + + # Checks if this directive enables cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#116 + def enabled?; end + + # Checks if this directive enables all cops + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#136 + def enabled_all?; end + + # Checks if directive departments include cop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#167 + def in_directive_department?(cop); end + + # Returns line number for directive + # + # source://rubocop//lib/rubocop/directive_comment.rb#181 + def line_number; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#66 + def malformed?; end + + # Checks if this directive contains all the given cop names + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#87 + def match?(cop_names); end + + # Returns match captures to directive comment pattern + # + # source://rubocop//lib/rubocop/directive_comment.rb#100 + def match_captures; end + + # Checks if the directive comment is missing a cop name + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#75 + def missing_cop_name?; end + + # Returns the value of attribute mode. + # + # source://rubocop//lib/rubocop/directive_comment.rb#50 + def mode; end + + # Checks if cop department has already used in directive comment + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#172 + def overridden_by_department?(cop); end + + # Checks if this directive is a pop + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#126 + def pop?; end + + # Checks if this directive is a push + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#121 + def push?; end + + # Returns the push arguments as a hash of cop names with their operations + # + # source://rubocop//lib/rubocop/directive_comment.rb#131 + def push_args; end + + # source://rubocop//lib/rubocop/directive_comment.rb#91 + def range; end + + # Returns an array of cops for this directive comment, without resolving departments + # + # source://rubocop//lib/rubocop/directive_comment.rb#156 + def raw_cop_names; end + + # Checks if this directive relates to single line + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#82 + def single_line?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#61 + def start_with_marker?; end + + private + + # source://rubocop//lib/rubocop/directive_comment.rb#198 + def all_cop_names; end + + # source://rubocop//lib/rubocop/directive_comment.rb#202 + def cop_names_for_department(department); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#194 + def department?(name); end + + # source://rubocop//lib/rubocop/directive_comment.rb#207 + def exclude_lint_department_cops(cops); end + + # source://rubocop//lib/rubocop/directive_comment.rb#211 + def parse_push_args; end + + # source://rubocop//lib/rubocop/directive_comment.rb#187 + def parsed_cop_names; end + + class << self + # source://rubocop//lib/rubocop/directive_comment.rb#46 + def before_comment(line); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#27 +RuboCop::DirectiveComment::AVAILABLE_MODES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#23 +RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#21 +RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#19 +RuboCop::DirectiveComment::COP_NAMES_PATTERN_NC = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#15 +RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#17 +RuboCop::DirectiveComment::COP_NAME_PATTERN_NC = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#35 +RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#33 +RuboCop::DirectiveComment::DIRECTIVE_HEADER_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#29 +RuboCop::DirectiveComment::DIRECTIVE_MARKER_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#31 +RuboCop::DirectiveComment::DIRECTIVE_MARKER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#9 +RuboCop::DirectiveComment::LINT_DEPARTMENT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#11 +RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#13 +RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#42 +RuboCop::DirectiveComment::MALFORMED_DIRECTIVE_WITHOUT_COP_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#25 +RuboCop::DirectiveComment::PUSH_POP_ARGS_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#40 +RuboCop::DirectiveComment::TRAILING_COMMENT_MARKER = T.let(T.unsafe(nil), String) + +# An Error exception is different from an Offense with severity 'error' +# When this exception is raised, it means that RuboCop is unable to perform +# a requested action (probably due to misconfiguration) and must stop +# immediately, rather than carrying on +# +# source://rubocop//lib/rubocop/error.rb#8 +class RuboCop::Error < ::StandardError; end + +# A wrapper to display errored location of analyzed file. +# +# source://rubocop//lib/rubocop/error.rb#13 +class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error + # @return [ErrorWithAnalyzedFileLocation] a new instance of ErrorWithAnalyzedFileLocation + # + # source://rubocop//lib/rubocop/error.rb#14 + def initialize(cause:, node:, cop:); end + + # Returns the value of attribute cause. + # + # source://rubocop//lib/rubocop/error.rb#21 + def cause; end + + # source://rubocop//lib/rubocop/error.rb#27 + def column; end + + # Returns the value of attribute cop. + # + # source://rubocop//lib/rubocop/error.rb#21 + def cop; end + + # source://rubocop//lib/rubocop/error.rb#23 + def line; end + + # source://rubocop//lib/rubocop/error.rb#31 + def message; end +end + +# Allows specified configuration options to have an exclude limit +# ie. a maximum value tracked that it can be used by `--auto-gen-config`. +# +# source://rubocop//lib/rubocop/cop/exclude_limit.rb#6 +module RuboCop::ExcludeLimit + # Sets up a configuration option to have an exclude limit tracked. + # The parameter name given is transformed into a method name (eg. `Max` + # becomes `self.max=` and `MinDigits` becomes `self.min_digits=`). + # + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#10 + def exclude_limit(parameter_name, method_name: T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#22 + def transform(parameter_name); end +end + +# source://rubocop//lib/rubocop/ext/comment.rb#4 +module RuboCop::Ext; end + +# Extensions to `Parser::Source::Comment`. +# +# source://rubocop//lib/rubocop/ext/comment.rb#6 +module RuboCop::Ext::Comment + # source://rubocop//lib/rubocop/ext/comment.rb#7 + def source; end + + # source://rubocop//lib/rubocop/ext/comment.rb#11 + def source_range; end +end + +# Extensions to AST::ProcessedSource for our cached comment_config +# +# source://rubocop//lib/rubocop/ext/processed_source.rb#6 +module RuboCop::Ext::ProcessedSource + # source://rubocop//lib/rubocop/ext/processed_source.rb#9 + def comment_config; end + + # Returns the value of attribute config. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def config=(_arg0); end + + # source://rubocop//lib/rubocop/ext/processed_source.rb#13 + def disabled_line_ranges; end + + # Returns the value of attribute registry. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def registry; end + + # Sets the attribute registry + # + # @param value the value to set the attribute registry to. + # + # source://rubocop//lib/rubocop/ext/processed_source.rb#7 + def registry=(_arg0); end +end + +# Extensions to Parser::Source::Range +# +# source://rubocop//lib/rubocop/ext/range.rb#6 +module RuboCop::Ext::Range + # Adds `Range#single_line?` to parallel `Node#single_line?` + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/ext/range.rb#8 + def single_line?; end +end + +# Extensions to AST::RegexpNode for our cached parsed regexp info +# +# source://rubocop//lib/rubocop/ext/regexp_node.rb#6 +module RuboCop::Ext::RegexpNode + # source://rubocop//lib/rubocop/ext/regexp_node.rb#18 + def assign_properties(*_arg0); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#31 + def each_capture(named: T.unsafe(nil)); end + + # Note: we extend Regexp nodes to provide `loc` and `expression` + # see `ext/regexp_parser`. + # + # @return [Regexp::Expression::Root, nil] + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#16 + def parsed_tree; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#43 + def named_capturing?(exp, event, named); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#50 + def with_interpolations_blanked; end +end + +# source://rubocop//lib/rubocop/ext/regexp_node.rb#7 +RuboCop::Ext::RegexpNode::ANY = T.let(T.unsafe(nil), Object) + +# Extensions for `regexp_parser` gem +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#6 +module RuboCop::Ext::RegexpParser; end + +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#20 +module RuboCop::Ext::RegexpParser::Expression; end + +# Add `expression` and `loc` to all `regexp_parser` nodes +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#22 +module RuboCop::Ext::RegexpParser::Expression::Base + # Shortcut to `loc.expression` + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26 + def expression; end + + # E.g. + # [a-z]{2,} + # ^^^^^^^^^ expression + # ^^^^ quantifier + # ^^^^^ body + # ^ begin + # ^ end + # + # Please open issue if you need other locations + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44 + def loc; end + + # Returns the value of attribute origin. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 + def origin; end + + # Sets the attribute origin + # + # @param value the value to set the attribute origin to. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#23 + def origin=(_arg0); end + + private + + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#50 + def build_location; end +end + +# Provide `CharacterSet` with `begin` and `end` locations. +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62 +module RuboCop::Ext::RegexpParser::Expression::CharacterSet + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63 + def build_location; end +end + +# Source map for RegexpParser nodes +# +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#8 +class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map + # @return [Map] a new instance of Map + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#11 + def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end + + # Returns the value of attribute begin. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def begin; end + + # Returns the value of attribute body. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def body; end + + # Returns the value of attribute end. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def end; end + + # Returns the value of attribute quantifier. + # + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#9 + def quantifier; end +end + +# This class handles loading files (a.k.a. features in Ruby) specified +# by `--require` command line option and `require` directive in the config. +# +# Normally, the given string is directly passed to `require`. If a string +# beginning with `.` is given, it is assumed to be relative to the given +# directory. +# +# If a string containing `-` is given, it will be used as is, but if we +# cannot find the file to load, we will replace `-` with `/` and try it +# again as when Bundler loads gems. +# +# @api private +# +# source://rubocop//lib/rubocop/feature_loader.rb#16 +class RuboCop::FeatureLoader + # @api private + # @param config_directory_path [String] + # @param feature [String] + # @return [FeatureLoader] a new instance of FeatureLoader + # + # source://rubocop//lib/rubocop/feature_loader.rb#27 + def initialize(config_directory_path:, feature:); end + + # @api private + # + # source://rubocop//lib/rubocop/feature_loader.rb#32 + def load; end + + private + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#55 + def namespaced_feature; end + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#60 + def namespaced_target; end + + # @api private + # @param [String] + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#70 + def relative(feature); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/feature_loader.rb#75 + def relative?; end + + # @api private + # @param error [LoadError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/feature_loader.rb#81 + def seems_cannot_load_such_file_error?(error); end + + # @api private + # @return [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#86 + def target; end + + class << self + # @api private + # @param config_directory_path [String] + # @param feature [String] + # + # source://rubocop//lib/rubocop/feature_loader.rb#20 + def load(config_directory_path:, feature:); end + end +end + +# Common methods for finding files. +# +# @api private +# +# source://rubocop//lib/rubocop/file_finder.rb#8 +module RuboCop::FileFinder + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#13 + def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#20 + def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#26 + def traverse_directories_upwards(start_dir, stop_dir = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#36 + def traverse_files_upwards(filename, start_dir, stop_dir); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level; end + + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level=(_arg0); end + end +end + +# A wrapper around patterns array to perform optimized search. +# +# For projects with a large set of rubocop todo files, most items in `Exclude`/`Include` +# are exact file names. It is wasteful to linearly check the list of patterns over and over +# to check if the file is relevant to the cop. +# +# This class partitions an array of patterns into a set of exact match strings and the rest +# of the patterns. This way we can firstly do a cheap check in the set and then proceed via +# the costly patterns check, if needed. +# +# @api private +# +# source://rubocop//lib/rubocop/file_patterns.rb#14 +class RuboCop::FilePatterns + # @api private + # @return [FilePatterns] a new instance of FilePatterns + # + # source://rubocop//lib/rubocop/file_patterns.rb#21 + def initialize(patterns); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/file_patterns.rb#27 + def match?(path); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/file_patterns.rb#33 + def partition_patterns(patterns); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/file_patterns.rb#17 + def from(patterns); end + end +end + +# The bootstrap module for formatter. +# +# source://rubocop//lib/rubocop/formatter.rb#5 +module RuboCop::Formatter; end + +# Does not show individual offenses in the console. +# +# source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#6 +class RuboCop::Formatter::AutoGenConfigFormatter < ::RuboCop::Formatter::ProgressFormatter + # source://rubocop//lib/rubocop/formatter/auto_gen_config_formatter.rb#7 + def finished(inspected_files); end +end + +# Abstract base class for formatter, implements all public API methods. +# +# ## Creating Custom Formatter +# +# You can create a custom formatter by subclassing +# `RuboCop::Formatter::BaseFormatter` and overriding some methods +# or by implementing all the methods by duck typing. +# +# ## Using Custom Formatter in Command Line +# +# You can tell RuboCop to use your custom formatter with a combination of +# `--format` and `--require` option. +# For example, when you have defined `MyCustomFormatter` in +# `./path/to/my_custom_formatter.rb`, you would type this command: +# +# rubocop --require ./path/to/my_custom_formatter --format MyCustomFormatter +# +# Note: The path passed to `--require` is directly passed to +# `Kernel.require`. +# If your custom formatter file is not in `$LOAD_PATH`, +# you need to specify the path as relative path prefixed with `./` +# explicitly or absolute path. +# +# ## Method Invocation Order +# +# For example, when RuboCop inspects 2 files, +# the invocation order should be like this: +# +# * `#initialize` +# * `#started` +# * `#file_started` +# * `#file_finished` +# * `#file_started` +# * `#file_finished` +# * `#finished` +# +# source://rubocop//lib/rubocop/formatter/base_formatter.rb#41 +class RuboCop::Formatter::BaseFormatter + # @api public + # @param output [IO] `$stdout` or opened file + # @return [BaseFormatter] a new instance of BaseFormatter + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#63 + def initialize(output, options = T.unsafe(nil)); end + + # Invoked at the end of inspecting each files. + # + # @api public + # @param file [String] the file path + # @param offenses [Array(RuboCop::Cop::Offense)] all detected offenses for the file + # @return [void] + # @see RuboCop::Cop::Offense + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#104 + def file_finished(file, offenses); end + + # Invoked at the beginning of inspecting each files. + # + # @api public + # @param file [String] the file path + # @param options [Hash] file specific information, currently this is always empty. + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#89 + def file_started(file, options); end + + # Invoked after all files are inspected or interrupted by user. + # + # @api public + # @param inspected_files [Array(String)] the inspected file paths. + # This would be same as `target_files` passed to `#started` + # unless RuboCop is interrupted by user. + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#116 + def finished(inspected_files); end + + # @api public + # @return [Hash] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#57 + def options; end + + # @api public + # @return [IO] the IO object passed to `#initialize` + # @see #initialize + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#50 + def output; end + + # Invoked once before any files are inspected. + # + # @api public + # @param target_files [Array(String)] all target file paths to be inspected + # @return [void] + # + # source://rubocop//lib/rubocop/formatter/base_formatter.rb#76 + def started(target_files); end +end + +# This formatter formats report data in clang style. +# The precise location of the problem is shown together with the +# relevant source code. +# +# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#8 +class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleTextFormatter + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#11 + def report_file(file, offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47 + def report_highlighted_area(highlighted_area); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 + def report_line(location); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 + def report_offense(file, offense); end + + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#53 + def to_whitespace(string); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 + def valid_line?(offense); end +end + +# source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#9 +RuboCop::Formatter::ClangStyleFormatter::ELLIPSES = T.let(T.unsafe(nil), String) + +# This mix-in module provides string coloring methods for terminals. +# It automatically disables coloring if coloring is disabled in the process +# globally or the formatter's output is not a terminal. +# +# source://rubocop//lib/rubocop/formatter/colorizable.rb#8 +module RuboCop::Formatter::Colorizable + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def black(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def blue(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#21 + def colorize(string, *args); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def cyan(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def green(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def magenta(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#9 + def rainbow; end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def red(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def white(string); end + + # source://rubocop//lib/rubocop/formatter/colorizable.rb#35 + def yellow(string); end +end + +# This formatter displays a YAML configuration file where all cops that +# detected any offenses are configured to not detect the offense. +# +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#7 +class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::PathUtil + + # @return [DisabledConfigFormatter] a new instance of DisabledConfigFormatter + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#44 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#57 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#50 + def file_started(_file, options); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 + def finished(_inspected_files); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#86 + def auto_gen_enforced_style?; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#90 + def command; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#182 + def cop_config_params(default_cfg, cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 + def default_config(cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#244 + def excludes(offending_files, cop_name, parent); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#215 + def filtered_config(cfg); end + + # Returns true if the given arr include the given elm or if any of the + # given arr is a regexp that matches the given elm. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#292 + def include_or_match?(arr, elm); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#265 + def merge_mode_for_exclude?(cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#286 + def no_exclude_limit?; end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#119 + def output_cop(cop_name, offense_count); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#154 + def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#204 + def output_cop_config(output_buffer, cfg, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#186 + def output_cop_param_comments(output_buffer, params, default_cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#234 + def output_exclude_list(output_buffer, offending_files, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#269 + def output_exclude_path(output_buffer, exclude_path, parent); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#223 + def output_offending_files(output_buffer, cfg, cop_name); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#113 + def output_offenses; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#282 + def safe_autocorrect?(config); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#133 + def set_max(cfg, cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#142 + def should_set_max?(cop_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#82 + def show_offense_counts?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#78 + def show_timestamp?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#174 + def supports_safe_autocorrect?(cop_class, default_cfg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#178 + def supports_unsafe_autocorrect?(cop_class, default_cfg); end + + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#109 + def timestamp; end + + class << self + # Returns the value of attribute config_to_allow_offenses. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#41 + def config_to_allow_offenses; end + + # Sets the attribute config_to_allow_offenses + # + # @param value the value to set the attribute config_to_allow_offenses to. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#41 + def config_to_allow_offenses=(_arg0); end + + # Returns the value of attribute detected_styles. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#41 + def detected_styles; end + + # Sets the attribute detected_styles + # + # @param value the value to set the attribute detected_styles to. + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#41 + def detected_styles=(_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#20 +RuboCop::Formatter::DisabledConfigFormatter::EXCLUDED_CONFIG_KEYS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#10 +RuboCop::Formatter::DisabledConfigFormatter::HEADING = T.let(T.unsafe(nil), String) + +# This formatter displays the report data in format that's +# easy to process in the Emacs text editor. +# The output is machine-parsable. +# +# source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#8 +class RuboCop::Formatter::EmacsStyleFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#9 + def file_finished(file, offenses); end + + private + + # source://rubocop//lib/rubocop/formatter/emacs_style_formatter.rb#24 + def message(offense); end +end + +# This formatter displays just a list of the files with offenses in them, +# separated by newlines. The output is machine-parsable. +# +# Here's the format: +# +# /some/file +# /some/other/file +# +# source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#12 +class RuboCop::Formatter::FileListFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/file_list_formatter.rb#13 + def file_finished(file, offenses); end +end + +# This is a collection of formatters. A FormatterSet can hold multiple +# formatter instances and provides transparent formatter API methods +# which invoke same method of each formatters. +# +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#10 +class RuboCop::Formatter::FormatterSet < ::Array + # @return [FormatterSet] a new instance of FormatterSet + # + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 + def initialize(options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 + def add_formatter(formatter_type, output_path = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 + def close_output_files; end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 + def file_started(file, options); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 + def finished(*args); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 + def started(*args); end + + private + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 + def builtin_formatter_class(specified_key); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 + def custom_formatter_class(specified_class_name); end + + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 + def formatter_class(formatter_type); end +end + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 +RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) + +# This formatter displays a progress bar and shows details of offenses as +# soon as they are detected. +# This is inspired by the Fuubar formatter for RSpec by Jeff Kreeftmeijer. +# https://github.com/jeffkreeftmeijer/fuubar +# +# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#11 +class RuboCop::Formatter::FuubarStyleFormatter < ::RuboCop::Formatter::ClangStyleFormatter + # @return [FuubarStyleFormatter] a new instance of FuubarStyleFormatter + # + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#14 + def initialize(*output); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#51 + def count_stats(offenses); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#40 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#71 + def progressbar_color; end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#20 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#61 + def with_color; end +end + +# source://rubocop//lib/rubocop/formatter/fuubar_style_formatter.rb#12 +RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String) + +# This formatter formats report data as GitHub Workflow commands resulting +# in GitHub check annotations when run within GitHub Actions. +# +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 +class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 + def finished(_inspected_files); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 + def started(_target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 + def github_escape(string); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 + def github_severity(offense); end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 + def minimum_severity_to_fail; end + + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 + def report_offense(file, offense); end +end + +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#8 +RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# This formatter saves the output as an html file. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9 +class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter + # @return [HTMLFormatter] a new instance of HTMLFormatter + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#29 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#39 + def file_finished(file, offenses); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 + def files; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#44 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#50 + def render_html; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#35 + def started(target_files); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 + def summary; end +end + +# This class provides helper methods used in the ERB CSS template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#137 +class RuboCop::Formatter::HTMLFormatter::CSSContext + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#148 + def binding; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#138 +RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +RuboCop::Formatter::HTMLFormatter::CSS_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 +class RuboCop::Formatter::HTMLFormatter::Color < ::Struct + # Returns the value of attribute alpha + # + # @return [Object] the current value of alpha + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def alpha; end + + # Sets the attribute alpha + # + # @param value [Object] the value to set the attribute alpha to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def alpha=(_); end + + # Returns the value of attribute blue + # + # @return [Object] the current value of blue + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def blue; end + + # Sets the attribute blue + # + # @param value [Object] the value to set the attribute blue to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def blue=(_); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#19 + def fade_out(amount); end + + # Returns the value of attribute green + # + # @return [Object] the current value of green + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def green; end + + # Sets the attribute green + # + # @param value [Object] the value to set the attribute green to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def green=(_); end + + # Returns the value of attribute red + # + # @return [Object] the current value of red + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def red; end + + # Sets the attribute red + # + # @param value [Object] the value to set the attribute red to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def red=(_); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 + def to_s; end + + class << self + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def inspect; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def keyword_init?; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def members; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10 +RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) + +# This class provides helper methods used in the ERB template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#63 +class RuboCop::Formatter::HTMLFormatter::ERBContext + include ::RuboCop::PathUtil + include ::RuboCop::Formatter::TextUtil + + # @return [ERBContext] a new instance of ERBContext + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#71 + def initialize(files, summary); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#118 + def base64_encoded_logo_image; end + + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 + def binding; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 + def decorated_message(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#114 + def escape(string); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 + def files; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 + def highlight_source_tag(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87 + def highlighted_source_line(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 + def possible_ellipses(location); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#126 + def render_css; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105 + def source_after_highlight(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 + def source_before_highlight(offense); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 + def summary; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 +RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 +class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct + # Returns the value of attribute offenses + # + # @return [Object] the current value of offenses + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def offenses; end + + # Sets the attribute offenses + # + # @param value [Object] the value to set the attribute offenses to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def offenses=(_); end + + # Returns the value of attribute path + # + # @return [Object] the current value of path + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def path; end + + # Sets the attribute path + # + # @param value [Object] the value to set the attribute path to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def path=(_); end + + class << self + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def inspect; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def keyword_init?; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def members; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 +class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct + # Returns the value of attribute inspected_files + # + # @return [Object] the current value of inspected_files + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def inspected_files; end + + # Sets the attribute inspected_files + # + # @param value [Object] the value to set the attribute inspected_files to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def inspected_files=(_); end + + # Returns the value of attribute offense_count + # + # @return [Object] the current value of offense_count + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def offense_count; end + + # Sets the attribute offense_count + # + # @param value [Object] the value to set the attribute offense_count to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def offense_count=(_); end + + # Returns the value of attribute target_files + # + # @return [Object] the current value of target_files + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def target_files; end + + # Sets the attribute target_files + # + # @param value [Object] the value to set the attribute target_files to. + # @return [Object] the newly set value + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def target_files=(_); end + + class << self + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def [](*_arg0); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def inspect; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def keyword_init?; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def members; end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 + def new(*_arg0); end + end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 +RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) + +# This formatter formats the report data in JSON format. +# +# source://rubocop//lib/rubocop/formatter/json_formatter.rb#8 +class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::PathUtil + + # @return [JSONFormatter] a new instance of JSONFormatter + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#13 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 + def hash_for_file(file, offenses); end + + # TODO: Consider better solution for Offense#real_column. + # The minimum value of `start_column: real_column` is 1. + # So, the minimum value of `last_column` should be 1. + # And non-zero value of `last_column` should be used as is. + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#64 + def hash_for_location(offense); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#49 + def hash_for_offense(offense); end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#32 + def metadata_hash; end + + # Returns the value of attribute output_hash. + # + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#11 + def output_hash; end + + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#18 + def started(target_files); end +end + +# This formatter formats the report data in JUnit format. +# +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 +class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter + # @return [JUnitFormatter] a new instance of JUnitFormatter + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + def finished(_inspected_files); end + + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 + def offenses_for_cop(all_offenses, cop); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 + def relevant_for_output?(options, target_offenses); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 + def reset_count; end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 + def xml_escape(string); end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 +RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 +class RuboCop::Formatter::JUnitFormatter::FailureElement + # @return [FailureElement] a new instance of FailureElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 + def initialize(type:, message:, text:); end + + # Returns the value of attribute message. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def message; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def text; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def type; end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 +class RuboCop::Formatter::JUnitFormatter::TestCaseElement + # @return [TestCaseElement] a new instance of TestCaseElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 + def initialize(classname:, name:); end + + # Returns the value of attribute classname. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def classname; end + + # Returns the value of attribute failures. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def failures; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def name; end +end + +# This formatter displays the report data in markdown +# +# source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#6 +class RuboCop::Formatter::MarkdownFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::Formatter::TextUtil + include ::RuboCop::PathUtil + + # @return [MarkdownFormatter] a new instance of MarkdownFormatter + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#12 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#22 + def file_finished(file, offenses); end + + # Returns the value of attribute files. + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#10 + def files; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#27 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#18 + def started(target_files); end + + # Returns the value of attribute summary. + # + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#10 + def summary; end + + private + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#74 + def possible_ellipses(location); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#34 + def render_markdown; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#68 + def write_code(offense); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#62 + def write_context(offense); end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#43 + def write_file_messages; end + + # source://rubocop//lib/rubocop/formatter/markdown_formatter.rb#55 + def write_heading(file); end +end + +# This formatter displays the list of offended cops with a count of how +# many offenses of their kind were found. Ordered by desc offense count +# +# Here's the format: +# +# 26 LineLength +# 3 OneLineConditional +# -- +# 29 Total in 5 files +# +# source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#16 +class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#81 + def cop_information(cop_name); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#42 + def file_finished(_file, offenses); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#51 + def finished(_inspected_files); end + + # Returns the value of attribute offense_counts. + # + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#17 + def offense_counts; end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#73 + def ordered_offense_counts(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#56 + def report_summary(offense_counts, offending_files_count); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#19 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#77 + def total_offense_count(offense_counts); end +end + +# This formatter prints a PACDOT per every file to be analyzed. +# Pacman will "eat" one PACDOT per file when no offense is detected. +# Otherwise it will print a Ghost. +# This is inspired by the Pacman formatter for RSpec by Carlos Rojas. +# https://github.com/go-labs/rspec_pacman_formatter +# +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#10 +class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleFormatter + include ::RuboCop::Formatter::TextUtil + + # @return [PacmanFormatter] a new instance of PacmanFormatter + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#20 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#51 + def cols; end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#38 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#34 + def file_started(_file, _options); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#44 + def next_step(offenses); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#65 + def pacdots(number); end + + # Returns the value of attribute progress_line. + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#13 + def progress_line; end + + # Sets the attribute progress_line + # + # @param value the value to set the attribute progress_line to. + # + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#13 + def progress_line=(_arg0); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#27 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#69 + def step(character); end + + # source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#58 + def update_progress_line; end +end + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#15 +RuboCop::Formatter::PacmanFormatter::FALLBACK_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#16 +RuboCop::Formatter::PacmanFormatter::GHOST = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#18 +RuboCop::Formatter::PacmanFormatter::PACDOT = T.let(T.unsafe(nil), Rainbow::NullPresenter) + +# source://rubocop//lib/rubocop/formatter/pacman_formatter.rb#17 +RuboCop::Formatter::PacmanFormatter::PACMAN = T.let(T.unsafe(nil), Rainbow::NullPresenter) + +# This formatter display dots for files with no offenses and +# letters for files with problems in the them. In the end it +# appends the regular report data in the clang style format. +# +# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#8 +class RuboCop::Formatter::ProgressFormatter < ::RuboCop::Formatter::ClangStyleFormatter + include ::RuboCop::Formatter::TextUtil + + # @return [ProgressFormatter] a new instance of ProgressFormatter + # + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#13 + def initialize(output, options = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#24 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#33 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#50 + def report_file_as_mark(offenses); end + + # source://rubocop//lib/rubocop/formatter/progress_formatter.rb#18 + def started(target_files); end +end + +# source://rubocop//lib/rubocop/formatter/progress_formatter.rb#11 +RuboCop::Formatter::ProgressFormatter::DOT = T.let(T.unsafe(nil), String) + +# If no offenses are found, no output is displayed. +# Otherwise, SimpleTextFormatter's output is displayed. +# +# source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#7 +class RuboCop::Formatter::QuietFormatter < ::RuboCop::Formatter::SimpleTextFormatter + # source://rubocop//lib/rubocop/formatter/quiet_formatter.rb#8 + def report_summary(file_count, offense_count, correction_count, correctable_count); end +end + +# A basic formatter that displays only files with offenses. +# Offenses are displayed at compact form - just the +# location of the problem and the associated message. +# +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#8 +class RuboCop::Formatter::SimpleTextFormatter < ::RuboCop::Formatter::BaseFormatter + include ::RuboCop::Formatter::Colorizable + include ::RuboCop::PathUtil + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#27 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#34 + def finished(inspected_files); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#41 + def report_file(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#55 + def report_summary(file_count, offense_count, correction_count, correctable_count); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#21 + def started(_target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#83 + def annotate_message(msg); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#78 + def colored_severity_code(offense); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#71 + def count_stats(offenses); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#87 + def message(offense); end +end + +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#12 +RuboCop::Formatter::SimpleTextFormatter::COLOR_FOR_SEVERITY = T.let(T.unsafe(nil), Hash) + +# A helper class for building the report summary text. +# +# source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#103 +class RuboCop::Formatter::SimpleTextFormatter::Report + include ::RuboCop::Formatter::Colorizable + include ::RuboCop::Formatter::TextUtil + + # @return [Report] a new instance of Report + # + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#108 + def initialize(file_count, offense_count, correction_count, correctable_count, rainbow, safe_autocorrect: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#121 + def summary; end + + private + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#158 + def correctable; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#151 + def corrections; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#140 + def files; end + + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#144 + def offenses; end + + # Returns the value of attribute rainbow. + # + # source://rubocop//lib/rubocop/formatter/simple_text_formatter.rb#138 + def rainbow; end +end + +# This formatter formats report data using the Test Anything Protocol. +# TAP allows for to communicate tests results in a language agnostics way. +# +# source://rubocop//lib/rubocop/formatter/tap_formatter.rb#7 +class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatter + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#14 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#8 + def started(target_files); end + + private + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#65 + def annotate_message(msg); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#69 + def message(offense); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 + def report_highlighted_area(highlighted_area); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#29 + def report_line(location); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#49 + def report_offense(file, offense); end + + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#45 + def to_whitespace(string); end +end + +# Common logic for UI texts. +# +# source://rubocop//lib/rubocop/formatter/text_util.rb#6 +module RuboCop::Formatter::TextUtil + private + + # source://rubocop//lib/rubocop/formatter/text_util.rb#9 + def pluralize(number, thing, options = T.unsafe(nil)); end + + class << self + # source://rubocop//lib/rubocop/formatter/text_util.rb#9 + def pluralize(number, thing, options = T.unsafe(nil)); end + end +end + +# This formatter displays the list of offensive files, sorted by number of +# offenses with the worst offenders first. +# +# Here's the format: +# +# 26 this/file/is/really/bad.rb +# 3 just/ok.rb +# -- +# 29 Total in 2 files +# +# source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#16 +class RuboCop::Formatter::WorstOffendersFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#24 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#31 + def finished(_inspected_files); end + + # Returns the value of attribute offense_counts. + # + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#17 + def offense_counts; end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#55 + def ordered_offense_counts(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#36 + def report_summary(offense_counts); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#19 + def started(target_files); end + + # source://rubocop//lib/rubocop/formatter/worst_offenders_formatter.rb#59 + def total_offense_count(offense_counts); end +end + +# source://rubocop//lib/rubocop/options.rb#8 +class RuboCop::IncorrectCopNameError < ::StandardError; end + +# The RuboCop's built-in LSP module. +# +# source://rubocop//lib/rubocop/lsp.rb#5 +module RuboCop::LSP + private + + # Disable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end + + # Enable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end + + # Returns true when LSP is enabled, false when disabled. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end + + class << self + # Disable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end + + # Enable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end + + # Returns true when LSP is enabled, false when disabled. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end + end +end + +# Encapsulation of a lockfile for use when checking for gems. +# Does not actually resolve gems, just parses the lockfile. +# +# @api private +# +# source://rubocop//lib/rubocop/lockfile.rb#15 +class RuboCop::Lockfile + # @api private + # @param lockfile_path [String, Pathname, nil] + # @return [Lockfile] a new instance of Lockfile + # + # source://rubocop//lib/rubocop/lockfile.rb#17 + def initialize(lockfile_path = T.unsafe(nil)); end + + # Gems that the bundle directly depends on. + # + # @api private + # @return [Array, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#29 + def dependencies; end + + # Returns the locked versions of gems from this lockfile. + # + # @api private + # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies + # are returned, i.e. those listed explicitly in the `Gemfile`. + # + # source://rubocop//lib/rubocop/lockfile.rb#49 + def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end + + # All activated gems, including transitive dependencies. + # + # @api private + # @return [Array, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#37 + def gems; end + + # Whether this lockfile includes the named gem, directly or indirectly. + # + # @api private + # @param name [String] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#65 + def includes_gem?(name); end + + private + + # @api private + # @return [Bundler::LockfileParser, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#72 + def parser; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def use_bundler_lock_parser?; end +end + +# Parse different formats of magic comments. +# +# @abstract parent of three different magic comment handlers +# +# source://rubocop//lib/rubocop/magic_comment.rb#7 +class RuboCop::MagicComment + # @return [MagicComment] a new instance of MagicComment + # + # source://rubocop//lib/rubocop/magic_comment.rb#33 + def initialize(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#37 + def any?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#110 + def encoding_specified?; end + + # Expose the `frozen_string_literal` value coerced to a boolean if possible. + # + # @return [Boolean] if value is `true` or `false` in any case + # @return [nil] if frozen_string_literal comment isn't found + # @return [String] if comment is found but isn't true or false + # + # source://rubocop//lib/rubocop/magic_comment.rb#92 + def frozen_string_literal; end + + # Does the magic comment enable the frozen string literal feature. + # + # Test whether the frozen string literal value is `true`. Cannot + # just return `frozen_string_literal` since an invalid magic comment + # `'yes'` does not actually enable the feature + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#57 + def frozen_string_literal?; end + + # Was a magic comment for the frozen string literal found? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#76 + def frozen_string_literal_specified?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#114 + def rbs_inline_specified?; end + + # Expose the `shareable_constant_value` value coerced to a boolean if possible. + # + # @return [String] for shareable_constant_value config + # + # source://rubocop//lib/rubocop/magic_comment.rb#106 + def shareable_constant_value; end + + # Was a shareable_constant_value specified? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#83 + def shareable_constant_value_specified?; end + + # source://rubocop//lib/rubocop/magic_comment.rb#125 + def typed; end + + # Was the Sorbet `typed` sigil specified? + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#121 + def typed_specified?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#45 + def valid?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#61 + def valid_literal_value?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#65 + def valid_rbs_inline_value?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#69 + def valid_shareable_constant_value?; end + + private + + # Match the entire comment string with a pattern and take the first capture. + # + # @param pattern [Regexp] + # @return [String] if pattern matched + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/magic_comment.rb#141 + def extract(pattern); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/magic_comment.rb#131 + def specified?(value); end + + class << self + # Detect magic comment format and pass it to the appropriate wrapper. + # + # @param comment [String] + # @return [RuboCop::MagicComment] + # + # source://rubocop//lib/rubocop/magic_comment.rb#24 + def parse(comment); end + end +end + +# Parent to Vim and Emacs magic comment handling. +# +# @abstract +# +# source://rubocop//lib/rubocop/magic_comment.rb#148 +class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment + # source://rubocop//lib/rubocop/magic_comment.rb#149 + def encoding; end + + # Rewrite the comment without a given token type + # + # source://rubocop//lib/rubocop/magic_comment.rb#154 + def without(type); end + + private + + # Find a token starting with the provided keyword and extract its value. + # + # @param keyword [String] + # @return [String] extracted value if it is found + # @return [nil] otherwise + # + # source://rubocop//lib/rubocop/magic_comment.rb#169 + def match(keyword); end + + # Individual tokens composing an editor specific comment string. + # + # @return [Array] + # + # source://rubocop//lib/rubocop/magic_comment.rb#184 + def tokens; end +end + +# Wrapper for Emacs style magic comments. +# +# @example Emacs style comment +# comment = RuboCop::MagicComment.parse( +# '# -*- encoding: ASCII-8BIT -*-' +# ) +# +# comment.encoding # => 'ascii-8bit' +# @see https://github.com/ruby/ruby/blob/3f306dc/parse.y#L6873-L6892 Emacs handling in parse.y +# @see https://www.gnu.org/software/emacs/manual/html_node/emacs/Specify-Coding.html +# +# source://rubocop//lib/rubocop/magic_comment.rb#200 +class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment + # source://rubocop//lib/rubocop/magic_comment.rb#206 + def new_frozen_string_literal(value); end + + private + + # source://rubocop//lib/rubocop/magic_comment.rb#212 + def extract_frozen_string_literal; end + + # Emacs comments cannot specify RBS::inline behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#217 + def extract_rbs_inline_value; end + + # source://rubocop//lib/rubocop/magic_comment.rb#219 + def extract_shareable_constant_value; end + + # Emacs comments cannot specify Sorbet typechecking behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#224 + def extract_typed; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#202 +RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#204 +RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#201 +RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/magic_comment.rb#203 +RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#11 +RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# Wrapper for regular magic comments not bound to an editor. +# +# Simple comments can only specify one setting per comment. +# +# @example encoding comments +# comment2 = RuboCop::MagicComment.parse('# encoding: utf-8') +# comment2.frozen_string_literal # => nil +# comment2.encoding # => 'utf-8' +# @example frozen string literal comments +# comment1 = RuboCop::MagicComment.parse('# frozen_string_literal: true') +# comment1.frozen_string_literal # => true +# comment1.encoding # => nil +# +# source://rubocop//lib/rubocop/magic_comment.rb#281 +class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment + # Match `encoding` or `coding` + # + # source://rubocop//lib/rubocop/magic_comment.rb#285 + def encoding; end + + # source://rubocop//lib/rubocop/magic_comment.rb#298 + def new_frozen_string_literal(value); end + + # Rewrite the comment without a given token type + # + # source://rubocop//lib/rubocop/magic_comment.rb#290 + def without(type); end + + private + + # Extract `frozen_string_literal`. + # + # The `frozen_string_literal` magic comment only works if it + # is the only text in the comment. + # + # Case-insensitive and dashes/underscores are acceptable. + # + # @see https://github.com/ruby/ruby/blob/78b95b49f8/parse.y#L7134-L7138 + # + # source://rubocop//lib/rubocop/magic_comment.rb#311 + def extract_frozen_string_literal; end + + # source://rubocop//lib/rubocop/magic_comment.rb#315 + def extract_rbs_inline_value; end + + # source://rubocop//lib/rubocop/magic_comment.rb#319 + def extract_shareable_constant_value; end + + # source://rubocop//lib/rubocop/magic_comment.rb#323 + def extract_typed; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#282 +RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String) + +# IRB's pattern for matching magic comment tokens. +# +# @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5 +# +# source://rubocop//lib/rubocop/magic_comment.rb#10 +RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String) + +# Wrapper for Vim style magic comments. +# +# @example Vim style comment +# comment = RuboCop::MagicComment.parse( +# '# vim: filetype=ruby, fileencoding=ascii-8bit' +# ) +# +# comment.encoding # => 'ascii-8bit' +# +# source://rubocop//lib/rubocop/magic_comment.rb#235 +class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment + # For some reason the fileencoding keyword only works if there + # is at least one other token included in the string. For example + # + # # works + # # vim: foo=bar, fileencoding=ascii-8bit + # + # # does nothing + # # vim: foo=bar, fileencoding=ascii-8bit + # + # source://rubocop//lib/rubocop/magic_comment.rb#251 + def encoding; end + + # Vim comments cannot specify RBS::inline behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#259 + def extract_rbs_inline_value; end + + # Vim comments cannot specify Sorbet typechecking behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#265 + def extract_typed; end + + # Vim comments cannot specify frozen string literal behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#256 + def frozen_string_literal; end + + # Vim comments cannot specify shareable constant values behavior. + # + # source://rubocop//lib/rubocop/magic_comment.rb#262 + def shareable_constant_value; end +end + +# source://rubocop//lib/rubocop/magic_comment.rb#237 +RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#240 +RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/magic_comment.rb#239 +RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/magic_comment.rb#236 +RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/magic_comment.rb#238 +RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String) + +# Common functionality for finding names that are similar to a given name. +# +# @api private +# +# source://rubocop//lib/rubocop/name_similarity.rb#6 +module RuboCop::NameSimilarity + private + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#9 + def find_similar_name(target_name, names); end + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#15 + def find_similar_names(target_name, names); end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#9 + def find_similar_name(target_name, names); end + + # @api private + # + # source://rubocop//lib/rubocop/name_similarity.rb#15 + def find_similar_names(target_name, names); end + end +end + +# source://rubocop//lib/rubocop/ast_aliases.rb#5 +RuboCop::NodePattern = RuboCop::AST::NodePattern + +# source://rubocop//lib/rubocop/options.rb#10 +class RuboCop::OptionArgumentError < ::StandardError; end + +# This class handles command line options. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#14 +class RuboCop::Options + # @api private + # @return [Options] a new instance of Options + # + # source://rubocop//lib/rubocop/options.rb#22 + def initialize; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#27 + def parse(command_line_args); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#236 + def add_additional_modes(opts); end + + # the autocorrect command-line arguments map to the autocorrect @options values like so: + # :fix_layout :autocorrect :safe_autocorrect :autocorrect_all + # -x, --fix-layout true true - - + # -a, --auto-correct - true true - + # --safe-auto-correct - true true - + # -A, --auto-correct-all - true - true + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#141 + def add_autocorrection_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#206 + def add_cache_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#74 + def add_check_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#164 + def add_config_generation_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#182 + def add_cop_selection_csv_option(option, opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#248 + def add_general_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#213 + def add_lsp_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#219 + def add_mcp_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#106 + def add_output_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#261 + def add_profile_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#225 + def add_server_options(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#197 + def add_severity_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#53 + def define_options; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#271 + def handle_deprecated_option(old_option, new_option); end + + # Finds the option in `args` starting with -- and converts it to a symbol, + # e.g. [..., '--autocorrect', ...] to :autocorrect. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#305 + def long_opt_symbol(args); end + + # Sets a value in the @options hash, based on the given long option and its + # value, in addition to calling the block if a block is given. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#294 + def option(opts, *args); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#310 + def plugin_feature(file); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#276 + def rainbow; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#316 + def require_feature(file); end + + # Creates a section of options in order to separate them visually when + # using `--help`. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#286 + def section(opts, heading, &_block); end +end + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#20 +RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#19 +RuboCop::Options::EXITING_OPTIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#15 +RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) + +# This module contains help texts for command line options. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#519 +module RuboCop::OptionsHelp; end + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#521 +RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#520 +RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/options.rb#523 +RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) + +# Validates option arguments and the options' compatibility with each other. +# +# @api private +# +# source://rubocop//lib/rubocop/options.rb#334 +class RuboCop::OptionsValidator + # @api private + # @return [OptionsValidator] a new instance of OptionsValidator + # + # source://rubocop//lib/rubocop/options.rb#372 + def initialize(options); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#493 + def boolean_or_empty_cache?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#463 + def disable_parallel_when_invalid_option_combo; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#489 + def except_syntax?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#497 + def incompatible_options; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#476 + def invalid_arguments_for_parallel; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/options.rb#484 + def only_includes_redundant_disable?; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#404 + def validate_auto_gen_config; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#449 + def validate_autocorrect; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#509 + def validate_cache_enabled_for_cache_root; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#381 + def validate_compatibility; end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#376 + def validate_cop_options; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#425 + def validate_display_only_correctable_and_autocorrect; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#417 + def validate_display_only_failed; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#434 + def validate_display_only_failed_and_display_only_correctable; end + + # @api private + # @raise [OptionParser::MissingArgument] + # + # source://rubocop//lib/rubocop/options.rb#501 + def validate_exclude_limit_option; end + + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#443 + def validate_lsp_and_editor_mode; end + + class << self + # Cop name validation must be done later than option parsing, so it's not + # called from within Options. + # + # @api private + # + # source://rubocop//lib/rubocop/options.rb#341 + def validate_cop_list(names); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#358 + def format_message_from(name, cop_names); end + end +end + +# Common methods and behaviors for dealing with paths. +# +# source://rubocop//lib/rubocop/path_util.rb#5 +module RuboCop::PathUtil + private + + # Returns true for an absolute Unix or Windows path. + # + # source://rubocop//lib/rubocop/path_util.rb#83 + def absolute?(path); end + + # Returns true for a glob + # + # source://rubocop//lib/rubocop/path_util.rb#88 + def glob?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#118 + def hidden_dir?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#101 + def hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#92 + def hidden_file_in_not_hidden_dir?(pattern, path); end + + # source://rubocop//lib/rubocop/path_util.rb#55 + def match_path?(pattern, path); end + + # Loose check to reduce memory allocations + # + # source://rubocop//lib/rubocop/path_util.rb#108 + def maybe_hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#13 + def relative_path(path, base_dir = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/path_util.rb#31 + def remote_file?(uri); end + + # source://rubocop//lib/rubocop/path_util.rb#38 + def smart_path(path); end + + class << self + # Returns true for an absolute Unix or Windows path. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#83 + def absolute?(path); end + + # Returns true for a glob + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#88 + def glob?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#118 + def hidden_dir?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#101 + def hidden_file?(path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#92 + def hidden_file_in_not_hidden_dir?(pattern, path); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#55 + def match_path?(pattern, path); end + + # Loose check to reduce memory allocations + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#108 + def maybe_hidden_file?(path); end + + # source://rubocop//lib/rubocop/path_util.rb#13 + def relative_path(path, base_dir = T.unsafe(nil)); end + + # Returns the value of attribute relative_paths_cache. + # + # source://rubocop//lib/rubocop/path_util.rb#7 + def relative_paths_cache; end + + # Sets the attribute relative_paths_cache + # + # @param value the value to set the attribute relative_paths_cache to. + # + # source://rubocop//lib/rubocop/path_util.rb#7 + def relative_paths_cache=(_arg0); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#31 + def remote_file?(uri); end + + # source://rubocop//lib/rubocop/path_util.rb#38 + def smart_path(path); end + end +end + +# source://rubocop//lib/rubocop/path_util.rb#105 +RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/path_util.rb#35 +RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) + +# Reports information about pending cops that are not explicitly configured. +# +# This class is responsible for displaying warnings when new cops have been added to RuboCop +# but have not yet been enabled or disabled in the user's configuration. +# It provides a centralized way to determine whether such warnings should be shown, +# based on global flags or configuration settings. +# +# source://rubocop//lib/rubocop/pending_cops_reporter.rb#10 +class RuboCop::PendingCopsReporter + class << self + # Returns the value of attribute disable_pending_cops. + # + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#20 + def disable_pending_cops; end + + # Sets the attribute disable_pending_cops + # + # @param value the value to set the attribute disable_pending_cops to. + # + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#20 + def disable_pending_cops=(_arg0); end + + # Returns the value of attribute enable_pending_cops. + # + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#20 + def enable_pending_cops; end + + # Sets the attribute enable_pending_cops + # + # @param value the value to set the attribute enable_pending_cops to. + # + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#20 + def enable_pending_cops=(_arg0); end + + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#22 + def warn_if_needed(config); end + + private + + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#31 + def pending_cops_only_qualified(pending_cops); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#35 + def possible_new_cops?(config); end + + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#40 + def warn_on_pending_cops(pending_cops); end + + # source://rubocop//lib/rubocop/pending_cops_reporter.rb#48 + def warn_pending_cop(cop); end + end +end + +# This module provides information on the platform that RuboCop is being run +# on. +# +# source://rubocop//lib/rubocop/platform.rb#6 +module RuboCop::Platform + class << self + # @return [Boolean] + # + # source://rubocop//lib/rubocop/platform.rb#7 + def windows?; end + end +end + +# Provides a plugin for RuboCop extensions that conform to lint_roller. +# https://github.com/standardrb/lint_roller +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/not_supported_error.rb#4 +module RuboCop::Plugin + class << self + # @api private + # + # source://rubocop//lib/rubocop/plugin.rb#37 + def integrate_plugins(rubocop_config, plugins); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/plugin.rb#22 + def plugin_capable?(feature_name); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin.rb#11 +RuboCop::Plugin::BUILTIN_INTERNAL_PLUGINS = T.let(T.unsafe(nil), Hash) + +# A class for integrating plugin configurations into RuboCop. +# Handles configuration merging, validation, and compatibility for plugins. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#11 +class RuboCop::Plugin::ConfigurationIntegrator + class << self + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#13 + def integrate_plugins_into_rubocop_config(rubocop_config, plugins); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#44 + def combine_rubocop_configs(default_config, runner_context, plugins); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#27 + def create_context(rubocop_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#81 + def fake_out_rubocop_default_configuration(default_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#92 + def load_plugin_rubocop_config(plugin, runner_context); end + + # This is how we ensure "first-in wins": plugins can override AllCops settings that are + # set by RuboCop's default configuration, but once a plugin sets an AllCop setting, they + # have exclusive first-in-wins rights to that setting. + # + # The one exception to this are array fields, because we don't want to + # overwrite the AllCops defaults but rather munge the arrays (`existing | + # new`) to allow plugins to add to the array, for example Include and + # Exclude paths and patterns. + # + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#118 + def merge_all_cop_settings(existing_all_cops, new_all_cops, already_configured_keys); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#67 + def merge_plugin_config_into_all_cops!(rubocop_config, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#71 + def merge_plugin_config_into_default_config!(default_config, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#137 + def resolver; end + + # @api private + # @raise [Plugin::NotSupportedError] + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#37 + def validate_plugins!(plugins, runner_context); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin.rb#18 +RuboCop::Plugin::INTERNAL_AFFAIRS_PLUGIN_NAME = T.let(T.unsafe(nil), String) + +# An exception raised when a plugin fails to load. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/load_error.rb#7 +class RuboCop::Plugin::LoadError < ::RuboCop::Error + # @api private + # @return [LoadError] a new instance of LoadError + # + # source://rubocop//lib/rubocop/plugin/load_error.rb#8 + def initialize(plugin_name); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/load_error.rb#14 + def message; end +end + +# A class for loading and resolving plugins. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/loader.rb#10 +class RuboCop::Plugin::Loader + class << self + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#20 + def load(plugins); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#70 + def constantize(plugin_name, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#61 + def constantize_plugin_from(plugin_name, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#90 + def constantize_plugin_from_gemspec_metadata(plugin_name); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#34 + def normalize(plugin_configs); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#86 + def require_plugin(require_path); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin/loader.rb#12 +RuboCop::Plugin::Loader::DEFAULT_PLUGIN_CONFIG = T.let(T.unsafe(nil), Hash) + +# An exception raised when a plugin is not supported by the RuboCop engine. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/not_supported_error.rb#7 +class RuboCop::Plugin::NotSupportedError < ::RuboCop::Error + # @api private + # @return [NotSupportedError] a new instance of NotSupportedError + # + # source://rubocop//lib/rubocop/plugin/not_supported_error.rb#8 + def initialize(unsupported_plugins); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/not_supported_error.rb#14 + def message; end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin.rb#19 +RuboCop::Plugin::OBSOLETE_INTERNAL_AFFAIRS_PLUGIN_NAME = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/ast_aliases.rb#6 +RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource + +# Common methods and behaviors for dealing with remote config files. +# +# @api private +# +# source://rubocop//lib/rubocop/remote_config.rb#9 +class RuboCop::RemoteConfig + # @api private + # @return [RemoteConfig] a new instance of RemoteConfig + # + # source://rubocop//lib/rubocop/remote_config.rb#14 + def initialize(url, cache_root); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#23 + def file; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#37 + def inherit_from_remote(file); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#10 + def uri; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#100 + def cache_name_from_uri; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#83 + def cache_path; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/remote_config.rb#87 + def cache_path_exists?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/remote_config.rb#91 + def cache_path_expired?; end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#107 + def cloned_url; end + + # @api private + # @yield [request] + # + # source://rubocop//lib/rubocop/remote_config.rb#58 + def generate_request(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/remote_config.rb#67 + def handle_response(response, limit, &block); end + + # @api private + # @raise [ArgumentError] + # + # source://rubocop//lib/rubocop/remote_config.rb#45 + def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end +end + +# @api private +# +# source://rubocop//lib/rubocop/remote_config.rb#12 +RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) + +# Provides functionality for caching RuboCop runs. +# +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#11 +class RuboCop::ResultCache + # @api private + # @return [ResultCache] a new instance of ResultCache + # + # source://rubocop//lib/rubocop/result_cache.rb#99 + def initialize(file, team, options, config_store, cache_root_override = T.unsafe(nil)); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#112 + def debug?; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#120 + def load; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#97 + def path; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#125 + def save(offenses); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#116 + def valid?; end + + private + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#158 + def any_symlink?(path); end + + # We combine team and options into a single "context" checksum to avoid + # making file names that are too long for some filesystems to handle. + # This context is for anything that's not (1) the RuboCop executable + # checksum or (2) the inspected file checksum. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#245 + def context_checksum(team, options); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#169 + def file_checksum(file, config_store); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#154 + def symlink_protection_triggered?(path); end + + class << self + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#93 + def allow_symlinks_in_cache_location?(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#87 + def cache_root(config_store, cache_root_override = T.unsafe(nil)); end + + # Remove old files so that the cache doesn't grow too big. When the + # threshold MaxFilesInCache has been exceeded, the oldest 50% of all the + # files in the cache are removed. The reason for removing so much is that + # removing should be done relatively seldom, since there is a slight risk + # that some other RuboCop process was just about to read the file, when + # there's parallel execution and the cache is shared. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#28 + def cleanup(config_store, verbose, cache_root_override = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#182 + def inhibit_cleanup; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#182 + def inhibit_cleanup=(_arg0); end + + # Return a hash of the options given at invocation, minus the ones that have + # no effect on which offenses and disabled line ranges are found, and thus + # don't affect caching. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#202 + def relevant_options_digest(options); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#44 + def rubocop_required_features; end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#44 + def rubocop_required_features=(_arg0); end + + # The checksum of the RuboCop program running the inspection. + # + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#185 + def source_checksum; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#212 + def digest(path); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#67 + def remove_files(files, remove_count); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#54 + def remove_oldest_files(files, rubocop_cache_dir, verbose); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/result_cache.rb#50 + def requires_file_removal?(file_count, config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/result_cache.rb#223 + def rubocop_extra_features; end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#16 +RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rubocop//lib/rubocop/result_cache.rb#12 +RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) + +# This class handles the processing of files, which includes dealing with +# formatters and letting cops inspect the files. +# +# source://rubocop//lib/rubocop/runner.rb#8 +class RuboCop::Runner + # @return [Runner] a new instance of Runner + # + # source://rubocop//lib/rubocop/runner.rb#59 + def initialize(options, config_store); end + + # Sets the attribute aborting + # + # @param value the value to set the attribute aborting to. + # + # source://rubocop//lib/rubocop/runner.rb#57 + def aborting=(_arg0); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#87 + def aborting?; end + + # Returns the value of attribute errors. + # + # source://rubocop//lib/rubocop/runner.rb#56 + def errors; end + + # source://rubocop//lib/rubocop/runner.rb#67 + def run(paths); end + + # Returns the value of attribute warnings. + # + # source://rubocop//lib/rubocop/runner.rb#56 + def warnings; end + + private + + # source://rubocop//lib/rubocop/runner.rb#203 + def add_redundant_disables(file, offenses, source); end + + # source://rubocop//lib/rubocop/runner.rb#177 + def cached_result(file, team); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#257 + def cached_run?; end + + # Check whether a run created source identical to a previous run, which + # means that we definitely have an infinite loop. + # + # source://rubocop//lib/rubocop/runner.rb#337 + def check_for_infinite_loop(processed_source, offenses_by_iteration); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#229 + def check_for_redundant_disables?(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#439 + def considered_failure?(offense); end + + # source://rubocop//lib/rubocop/runner.rb#476 + def default_config(cop_name); end + + # source://rubocop//lib/rubocop/runner.rb#279 + def do_inspection_loop(file); end + + # source://rubocop//lib/rubocop/runner.rb#137 + def each_inspected_file(files); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#243 + def except_redundant_cop_disable_directive?; end + + # source://rubocop//lib/rubocop/runner.rb#366 + def extract_ruby_sources(processed_source); end + + # source://rubocop//lib/rubocop/runner.rb#252 + def file_finished(file, offenses); end + + # source://rubocop//lib/rubocop/runner.rb#181 + def file_offense_cache(file); end + + # source://rubocop//lib/rubocop/runner.rb#169 + def file_offenses(file); end + + # source://rubocop//lib/rubocop/runner.rb#247 + def file_started(file); end + + # source://rubocop//lib/rubocop/runner.rb#419 + def filter_cop_classes(cop_classes, config); end + + # source://rubocop//lib/rubocop/runner.rb#108 + def find_target_files(paths); end + + # source://rubocop//lib/rubocop/runner.rb#430 + def formatter_set; end + + # source://rubocop//lib/rubocop/runner.rb#491 + def get_processed_source(file, prism_result); end + + # source://rubocop//lib/rubocop/runner.rb#351 + def inspect_file(processed_source, team = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/runner.rb#119 + def inspect_files(files); end + + # source://rubocop//lib/rubocop/runner.rb#312 + def iterate_until_no_changes(source, offenses_by_iteration); end + + # source://rubocop//lib/rubocop/runner.rb#152 + def list_files(paths); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#472 + def mark_as_safe_by_config?(config); end + + # source://rubocop//lib/rubocop/runner.rb#480 + def minimum_severity_to_fail; end + + # source://rubocop//lib/rubocop/runner.rb#380 + def mobilize_team(processed_source); end + + # source://rubocop//lib/rubocop/runner.rb#385 + def mobilized_cop_classes(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#448 + def offense_displayed?(offense); end + + # source://rubocop//lib/rubocop/runner.rb#460 + def offenses_to_report(offenses); end + + # source://rubocop//lib/rubocop/runner.rb#156 + def process_file(file); end + + # source://rubocop//lib/rubocop/runner.rb#409 + def qualify_option_cop_names; end + + # @yield [cop] + # + # source://rubocop//lib/rubocop/runner.rb#235 + def redundant_cop_disable_directive(file); end + + # source://rubocop//lib/rubocop/runner.rb#269 + def save_in_cache(cache, offenses); end + + # A Cop::Team instance is stateful and may change when inspecting. + # The "standby" team for a given config is an initialized but + # otherwise dormant team that can be used for config- and option- + # level caching in ResultCache. + # + # source://rubocop//lib/rubocop/runner.rb#523 + def standby_team(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#426 + def style_guide_cops_only?(config); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/runner.rb#464 + def supports_safe_autocorrect?(offense); end + + # @yield [team] + # + # source://rubocop//lib/rubocop/runner.rb#218 + def team_for_redundant_disables(file, offenses, source); end + + # Warms up the RuboCop cache by forking a suitable number of RuboCop + # instances that each inspects its allotted group of files. + # + # source://rubocop//lib/rubocop/runner.rb#95 + def warm_cache(target_files); end + + class << self + # @return [Array<#call>] + # + # source://rubocop//lib/rubocop/runner.rb#29 + def ruby_extractors; end + + private + + # @return [#call] + # + # source://rubocop//lib/rubocop/runner.rb#36 + def default_ruby_extractor; end + end +end + +# An exception indicating that the inspection loop got stuck correcting +# offenses back and forth. +# +# source://rubocop//lib/rubocop/runner.rb#11 +class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError + # @return [InfiniteCorrectionLoop] a new instance of InfiniteCorrectionLoop + # + # source://rubocop//lib/rubocop/runner.rb#14 + def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end + + # Returns the value of attribute offenses. + # + # source://rubocop//lib/rubocop/runner.rb#12 + def offenses; end +end + +# @api private +# +# source://rubocop//lib/rubocop/runner.rb#49 +RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://rubocop//lib/rubocop/runner.rb#52 +RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) + +# Take a string with embedded escapes, and convert the escapes as the Ruby +# interpreter would when reading a double-quoted string literal. +# For example, "\\n" will be converted to "\n". +# +# source://rubocop//lib/rubocop/string_interpreter.rb#7 +class RuboCop::StringInterpreter + class << self + # source://rubocop//lib/rubocop/string_interpreter.rb#24 + def interpret(string); end + + private + + # source://rubocop//lib/rubocop/string_interpreter.rb#51 + def interpret_hex(escape); end + + # source://rubocop//lib/rubocop/string_interpreter.rb#55 + def interpret_octal(escape); end + + # source://rubocop//lib/rubocop/string_interpreter.rb#33 + def interpret_string_escape(escape); end + + # source://rubocop//lib/rubocop/string_interpreter.rb#43 + def interpret_unicode(escape); end + end +end + +# source://rubocop//lib/rubocop/string_interpreter.rb#8 +RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/string_interpreter.rb#12 +RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) + +# This class finds target files to inspect by scanning the directory tree and picking ruby files. +# +# @api private +# +# source://rubocop//lib/rubocop/target_finder.rb#6 +class RuboCop::TargetFinder + # @api private + # @return [TargetFinder] a new instance of TargetFinder + # + # source://rubocop//lib/rubocop/target_finder.rb#9 + def initialize(config_store, options = T.unsafe(nil)); end + + # Generate a list of target files by expanding globbing patterns (if any). If args is empty, + # recursively find all Ruby source files under the current directory + # + # @api private + # @return [Array] array of file paths + # + # source://rubocop//lib/rubocop/target_finder.rb#17 + def find(args, mode); end + + # Search for files recursively starting at the given base directory using the given flags that + # determine how the match is made. Excluded files will be removed later by the caller, but as an + # optimization find_files removes the top level directories that are excluded in configuration + # in the normal way (dir/**/*). + # + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#60 + def find_files(base_dir, flags); end + + # Finds all Ruby source files under the current or other supplied directory. A Ruby source file + # is defined as a file with the `.rb` extension or a file with no extension that has a ruby + # shebang line as its first line. + # It is possible to specify includes and excludes using the config file, so you can include + # other Ruby files like Rakefiles and gemspecs. + # + # @api private + # @param base_dir Root directory under which to search for + # ruby source files + # @return [Array] Array of filenames + # + # source://rubocop//lib/rubocop/target_finder.rb#41 + def target_files_in_dir(base_dir = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#124 + def all_cops_include; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#110 + def combined_exclude_glob_patterns(base_dir); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#177 + def configured_include?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#213 + def debug?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#217 + def fail_fast?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#205 + def force_exclusion?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#82 + def hidden_path?(path); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#209 + def ignore_parent_exclusion?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#150 + def included_file?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#196 + def order; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#128 + def process_explicit_path(path, mode); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#181 + def ruby_executable?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#162 + def ruby_extension?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#166 + def ruby_extensions; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#154 + def ruby_file?(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#173 + def ruby_filename?(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#117 + def ruby_filenames; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#192 + def ruby_interpreters(file); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#158 + def stdin?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#102 + def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_finder.rb#75 + def to_inspect?(file, base_dir_config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#86 + def wanted_dir_patterns(base_dir, exclude_pattern, flags); end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#139 + def without_excluded(files); end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_finder.rb#7 +RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) + +# The kind of Ruby that code inspected by RuboCop is written in. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#6 +class RuboCop::TargetRuby + # @api private + # @return [TargetRuby] a new instance of TargetRuby + # + # source://rubocop//lib/rubocop/target_ruby.rb#290 + def initialize(config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#306 + def rubocop_version_with_support; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#294 + def source; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/target_ruby.rb#302 + def supported?; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#298 + def version; end + + class << self + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#274 + def supported_versions; end + end +end + +# The lock file of Bundler may identify the target ruby version. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#221 +class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#222 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#255 + def bundler_lock_file_path; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#228 + def find_version; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#10 +RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) + +# If all else fails, a default version will be picked. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#262 +class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#263 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#269 + def find_version; end +end + +# The target ruby version may be found in a .gemspec file. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#69 +class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/target_ruby.rb#78 + def gem_requirement_versions(param0 = T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#84 + def name; end + + # source://rubocop//lib/rubocop/target_ruby.rb#73 + def required_ruby_version(param0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#148 + def find_minimal_known_ruby(right_hand_side); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#90 + def find_version; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#100 + def gemspec_filepath; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#144 + def version_from_array(array); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#114 + def version_from_gemspec_file(file); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#132 + def version_from_right_hand_side(right_hand_side); end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#7 +RuboCop::TargetRuby::KNOWN_RUBIES = T.let(T.unsafe(nil), Array) + +# The target ruby version may be found in a mise.toml file, in a line +# starting with `ruby = "`. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#207 +class RuboCop::TargetRuby::MiseTomlFile < ::RuboCop::TargetRuby::RubyVersionFile + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#210 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#214 + def pattern; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#12 +RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) + +# The target ruby version may be configured in RuboCop's config. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#55 +class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#56 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#62 + def find_version; end +end + +# The target ruby version may be configured by setting the +# `RUBOCOP_TARGET_RUBY_VERSION` environment variable. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#41 +class RuboCop::TargetRuby::RuboCopEnvVar < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#42 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#48 + def find_version; end +end + +# The target ruby version may be found in a .ruby-version file. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#162 +class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#163 + def name; end + + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#169 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#177 + def find_version; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#173 + def pattern; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#184 + def version_file; end +end + +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#278 +RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) + +# A place where information about a target ruby version is found. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#26 +class RuboCop::TargetRuby::Source + # @api private + # @return [Source] a new instance of Source + # + # source://rubocop//lib/rubocop/target_ruby.rb#29 + def initialize(config); end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#27 + def name; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#34 + def to_s; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#27 + def version; end +end + +# The target ruby version may be found in a .tool-versions file, in a line +# starting with `ruby`. +# +# @api private +# +# source://rubocop//lib/rubocop/target_ruby.rb#192 +class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile + private + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#195 + def filename; end + + # @api private + # + # source://rubocop//lib/rubocop/target_ruby.rb#199 + def pattern; end +end + +# source://rubocop//lib/rubocop/ast_aliases.rb#7 +RuboCop::Token = RuboCop::AST::Token + +# This module contains a collection of useful utility methods. +# +# source://rubocop//lib/rubocop/util.rb#5 +module RuboCop::Util + class << self + # source://rubocop//lib/rubocop/util.rb#6 + def silence_warnings; end + end +end + +# source://rubocop//lib/rubocop/error.rb#10 +class RuboCop::ValidationError < ::RuboCop::Error; end + +# This module holds the RuboCop version information. +# +# source://rubocop//lib/rubocop/version.rb#5 +module RuboCop::Version + class << self + # @api private + # + # source://rubocop//lib/rubocop/version.rb#121 + def config_for_pwd(env); end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#151 + def document_version; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#74 + def extension_versions(env); end + + # Returns feature version in one of two ways: + # + # * Find by RuboCop core version style (e.g. rubocop-performance, rubocop-rspec) + # * Find by `bundle gem` version style (e.g. rubocop-rake) + # + # @api private + # + # source://rubocop//lib/rubocop/version.rb#135 + def feature_version(feature); end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#57 + def parser_version(target_ruby_version); end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#156 + def server_mode; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#112 + def target_ruby_version(env); end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#52 + def verbose(env: T.unsafe(nil)); end + + # NOTE: Marked as private but used by gems like standard. + # + # @api private + # + # source://rubocop//lib/rubocop/version.rb#26 + def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end + end +end + +# source://rubocop//lib/rubocop/version.rb#15 +RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/version.rb#19 +RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/version.rb#13 +RuboCop::Version::MINIMUM_PARSABLE_PRISM_VERSION = T.let(T.unsafe(nil), Float) + +# source://rubocop//lib/rubocop/version.rb#8 +RuboCop::Version::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/version.rb#6 +RuboCop::Version::STRING = T.let(T.unsafe(nil), String) + +# A Warning exception is different from an Offense with severity 'warning' +# When a Warning is raised, this means that RuboCop was unable to perform a +# requested operation (such as inspecting or correcting a source file) due to +# user error +# For example, a configuration value in .rubocop.yml might be malformed +# +# source://rubocop//lib/rubocop/warning.rb#9 +class RuboCop::Warning < ::StandardError; end + +# Find duplicated keys from YAML. +# +# @api private +# +# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#6 +module RuboCop::YAMLDuplicationChecker + class << self + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 + def check(yaml_string, filename, &on_duplicated); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#14 +class RuboCop::YAMLDuplicationChecker::DuplicationCheckHandler < ::Psych::TreeBuilder + # @api private + # @return [DuplicationCheckHandler] a new instance of DuplicationCheckHandler + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#15 + def initialize(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#20 + def end_mapping; end +end + +# Extensions to the core String class +# +# source://rubocop//lib/rubocop/core_ext/string.rb#4 +class String + include ::Comparable + + # Checks whether a string is blank. A string is considered blank if it + # is either empty or contains only whitespace characters. + # + # @example + # ''.blank? #=> true + # ' '.blank? #=> true + # ' test'.blank? #=> false + # @return [Boolean] true is the string is blank, false otherwise + # + # source://rubocop//lib/rubocop/core_ext/string.rb#15 + def blank?; end +end diff --git a/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi b/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi deleted file mode 100644 index da3d134..0000000 --- a/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +++ /dev/null @@ -1,1331 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ruby-graphviz` gem. -# Please instead update this file by running `bin/tapioca gem ruby-graphviz`. - -# source://ruby-graphviz//lib/graphviz.rb#20 -::IS_CYGWIN = T.let(T.unsafe(nil), FalseClass) - -# source://ruby-graphviz//lib/graphviz.rb#19 -::IS_JRUBY = T.let(T.unsafe(nil), FalseClass) - -# source://ruby-graphviz//lib/graphviz/attrs.rb#17 -class AttributeException < ::RuntimeError; end - -# source://ruby-graphviz//lib/graphviz/types/gv_bool.rb#1 -class BoolException < ::RuntimeError; end - -# source://ruby-graphviz//lib/graphviz/types/color.rb#3 -class ColorException < ::RuntimeError; end - -# source://ruby-graphviz//lib/graphviz/dot2ruby.rb#21 -class Dot2Ruby - include ::GraphViz::Utils - - # @return [Dot2Ruby] a new instance of Dot2Ruby - # - # source://ruby-graphviz//lib/graphviz/dot2ruby.rb#24 - def initialize(xGVPath, xOutFile, xOutFormat = T.unsafe(nil)); end - - # source://ruby-graphviz//lib/graphviz/dot2ruby.rb#47 - def eval(xFile); end - - # source://ruby-graphviz//lib/graphviz/dot2ruby.rb#54 - def eval_string(data); end - - # source://ruby-graphviz//lib/graphviz/dot2ruby.rb#35 - def run(xFile); end -end - -# source://ruby-graphviz//lib/graphviz/types/gv_double.rb#1 -class DoubleException < ::RuntimeError; end - -# spliteType or point -# -# spline ( ';' spline )* -# where spline = (endp)? (startp)? point (triple)+ -# and triple = point point point -# and endp = "e,%f,%f" -# and startp = "s,%f,%f" -# -# If a spline has points p1 p2 p3 ... pn, (n = 1 (mod 3)), the points correspond -# to the control points of a B-spline from p1 to pn. If startp is given, it touches -# one node of the edge, and the arrowhead goes from p1 to startp. If startp is not -# given, p1 touches a node. Similarly for pn and endp. -# -# source://ruby-graphviz//lib/graphviz/utils.rb#3 -class GraphViz - include ::GraphViz::Constants - include ::GraphViz::Utils - - # Create a new graph object - # - # Options : - # * :output : Output format (GraphViz::Constants::FORMATS) (default : dot) - # * :file : Output file name (default : nil) - # * :use : Program to use (GraphViz::Constants::PROGRAMS) (default : dot) - # * :path : Program PATH - # * :parent : Parent graph (default : nil) - # * :type : Graph type (GraphViz::Constants::GRAPHTYPE) (default : digraph) - # * :errors : DOT error level (default 1) - # * 0 = Error + Warning - # * 1 = Error - # * 2 = none - # - # @return [GraphViz] a new instance of GraphViz - # @yield [_self] - # @yieldparam _self [GraphViz] the object that the method was called on - # - # source://ruby-graphviz//lib/graphviz.rb#824 - def initialize(xGraphName, hOpts = T.unsafe(nil), &block); end - - # Create an edge between the current cluster and the node or cluster +oNode+ - # - # @raise [ArgumentError] - # - # source://ruby-graphviz//lib/graphviz.rb#670 - def -(oNode); end - - # Create an edge between the current cluster and the node or cluster +oNode+ - # - # @raise [ArgumentError] - # - # source://ruby-graphviz//lib/graphviz.rb#670 - def <<(oNode); end - - # Create an edge between the current cluster and the node or cluster +oNode+ - # - # @raise [ArgumentError] - # - # source://ruby-graphviz//lib/graphviz.rb#670 - def >(oNode); end - - # Create an edge between the current cluster and the node or cluster +oNode+ - # - # @raise [ArgumentError] - # - # source://ruby-graphviz//lib/graphviz.rb#670 - def >>(oNode); end - - # Get the value of the graph attribute +xAttrName+ - # - # source://ruby-graphviz//lib/graphviz.rb#394 - def [](xAttrName); end - - # Set value +xValue+ to the graph attribute +xAttrName+ - # - # source://ruby-graphviz//lib/graphviz.rb#386 - def []=(xAttrName, xValue); end - - # Add nodes and edges defined by a Hash - # - # source://ruby-graphviz//lib/graphviz.rb#332 - def add(h); end - - # source://ruby-graphviz//lib/graphviz.rb#191 - def add_edge(oNodeOne, oNodeTwo, hOpts = T.unsafe(nil)); end - - # Create a new edge - # - # In: - # * node_one : First node (or node list) - # * node_two : Second Node (or node list) - # * options : Edge attributes - # - # source://ruby-graphviz//lib/graphviz.rb#204 - def add_edges(node_one, node_two, options = T.unsafe(nil)); end - - # Create a new graph - # - # In: - # * xGraphName : Graph name - # * hOpts : Graph attributes - # - # source://ruby-graphviz//lib/graphviz.rb#269 - def add_graph(xGraphName = T.unsafe(nil), hOpts = T.unsafe(nil), &block); end - - # source://ruby-graphviz//lib/graphviz.rb#85 - def add_node(xNodeName, hOpts = T.unsafe(nil)); end - - # Create a new node - # - # In: - # * xNodeName : Name of the new node - # * hOpts : Node attributes - # - # Return the GraphViz::Node object created - # - # source://ruby-graphviz//lib/graphviz.rb#99 - def add_nodes(node_name, options = T.unsafe(nil)); end - - # source://ruby-graphviz//lib/graphviz.rb#627 - def append_attributes_and_types(script); end - - # Return a new completed graph - # - # source://ruby-graphviz//lib/graphviz.rb#776 - def complete; end - - # Complete the current graph - # - # source://ruby-graphviz//lib/graphviz.rb#781 - def complete!; end - - # Return true if the graph is directed. - # - # @return [Boolean] - # - # source://ruby-graphviz//lib/graphviz.rb#787 - def directed?; end - - # source://ruby-graphviz//lib/graphviz.rb#418 - def each_attribut(&b); end - - # Calls block once for each attribute of the graph, passing the name and value to the - # block as a two-element array. - # - # source://ruby-graphviz//lib/graphviz.rb#413 - def each_attribute(&b); end - - # Allow you to traverse edges - # - # source://ruby-graphviz//lib/graphviz.rb#237 - def each_edge(&block); end - - # Allow you to traverse graphs - # - # source://ruby-graphviz//lib/graphviz.rb#319 - def each_graph(&block); end - - # Allow you to traverse nodes - # - # source://ruby-graphviz//lib/graphviz.rb#176 - def each_node(&block); end - - # This accessor allow you to set global edges attributes - # - # source://ruby-graphviz//lib/graphviz.rb#79 - def edge; end - - # This accessor allow you to set global edges attributes - # - # source://ruby-graphviz//lib/graphviz.rb#79 - def edge=(_arg0); end - - # This accessor allow you to set global edges attributes - # - # source://ruby-graphviz//lib/graphviz.rb#79 - def edge_attrs; end - - # Get the number of edges - # - # source://ruby-graphviz//lib/graphviz.rb#250 - def edge_count; end - - # source://ruby-graphviz//lib/graphviz.rb#156 - def enumerate_nodes; end - - # Returns the first node found in the entire graph, starting from the root graph - # - # source://ruby-graphviz//lib/graphviz.rb#140 - def find_node(name); end - - # Return the edge object for the given index - # - # source://ruby-graphviz//lib/graphviz.rb#257 - def get_edge_at_index(index); end - - # Return the graph object for the given name (or nil) - # - # @yield [graph] - # - # source://ruby-graphviz//lib/graphviz.rb#308 - def get_graph(xGraphName, &block); end - - # Return the node object for the given name (or nil) in the current graph - # - # @yield [node] - # - # source://ruby-graphviz//lib/graphviz.rb#131 - def get_node(xNodeName, &block); end - - # Return the node object for the given index - # - # source://ruby-graphviz//lib/graphviz.rb#168 - def get_node_at_index(index); end - - # This accessor allow you to set global graph attributes - # - # source://ruby-graphviz//lib/graphviz.rb#71 - def graph; end - - # This accessor allow you to set global graph attributes - # - # source://ruby-graphviz//lib/graphviz.rb#71 - def graph=(_arg0); end - - # This accessor allow you to set global graph attributes - # - # source://ruby-graphviz//lib/graphviz.rb#71 - def graph_attrs; end - - # Get the number of graphs - # - # source://ruby-graphviz//lib/graphviz.rb#353 - def graph_count; end - - # @return [Boolean] - # - # source://ruby-graphviz//lib/graphviz.rb#791 - def has_parent_graph?; end - - # Get the graph name - # - # source://ruby-graphviz//lib/graphviz.rb#662 - def id; end - - # source://ruby-graphviz//lib/graphviz.rb#357 - def method_missing(idName, *args, &block); end - - # Get the graph name - # - # source://ruby-graphviz//lib/graphviz.rb#662 - def name; end - - # This accessor allow you to set global nodes attributes - # - # source://ruby-graphviz//lib/graphviz.rb#75 - def node; end - - # This accessor allow you to set global nodes attributes - # - # source://ruby-graphviz//lib/graphviz.rb#75 - def node=(_arg0); end - - # This accessor allow you to set global nodes attributes - # - # source://ruby-graphviz//lib/graphviz.rb#75 - def node_attrs; end - - # Get the number of nodes - # - # source://ruby-graphviz//lib/graphviz.rb#187 - def node_count; end - - # Generate the graph - # - # Options : - # * :output : Output format (GraphViz::Constants::FORMATS) - # * :file : Output file name - # * :use : Program to use (GraphViz::Constants::PROGRAMS) - # * :path : Program PATH - # * : => : can be - # * a file name - # * nil, then the output will be printed to STDOUT - # * String, then the output will be returned as a String - # * :errors : DOT error level (default 1) - # * 0 = Error + Warning - # * 1 = Error - # * 2 = none - # - # source://ruby-graphviz//lib/graphviz.rb#447 - def output(hOpts = T.unsafe(nil)); end - - # source://ruby-graphviz//lib/graphviz.rb#685 - def pg; end - - # source://ruby-graphviz//lib/graphviz.rb#688 - def pg=(x); end - - # Return the root graph - # - # source://ruby-graphviz//lib/graphviz.rb#695 - def root_graph; end - - # Generate the graph - # - # Options : - # * :output : Output format (GraphViz::Constants::FORMATS) - # * :file : Output file name - # * :use : Program to use (GraphViz::Constants::PROGRAMS) - # * :path : Program PATH - # * : => : can be - # * a file name - # * nil, then the output will be printed to STDOUT - # * String, then the output will be returned as a String - # * :errors : DOT error level (default 1) - # * 0 = Error + Warning - # * 1 = Error - # * 2 = none - # - # source://ruby-graphviz//lib/graphviz.rb#447 - def save(hOpts = T.unsafe(nil)); end - - # Return the first node found in the current graph, and it subgraphs - # - # source://ruby-graphviz//lib/graphviz.rb#146 - def search_node(name); end - - # source://ruby-graphviz//lib/graphviz.rb#711 - def set_position(xType, xKey, xValue); end - - # Create a new graph - # - # In: - # * xGraphName : Graph name - # * hOpts : Graph attributes - # - # source://ruby-graphviz//lib/graphviz.rb#269 - def subgraph(xGraphName = T.unsafe(nil), hOpts = T.unsafe(nil), &block); end - - # Create a new graph from the current subgraph - # - # source://ruby-graphviz//lib/graphviz.rb#424 - def to_graph; end - - # source://ruby-graphviz//lib/graphviz.rb#655 - def to_s; end - - # Return the graph type (graph digraph) - # - # source://ruby-graphviz//lib/graphviz.rb#343 - def type; end - - # source://ruby-graphviz//lib/graphviz.rb#346 - def type=(x); end - - private - - # Edge between a node and a Hash - # Used by GraphViz#add - # - # source://ruby-graphviz//lib/graphviz.rb#892 - def add_hash_edge(node, hash); end - - class << self - # source://ruby-graphviz//lib/graphviz.rb#699 - def commonGraph(o1, o2); end - - # Change default options (:use, :path, :errors and :output) - # - # source://ruby-graphviz//lib/graphviz.rb#724 - def default(hOpts); end - - # Create a new directed graph - # - # See also GraphViz::new - # - # source://ruby-graphviz//lib/graphviz.rb#917 - def digraph(xGraphName, hOpts = T.unsafe(nil), &block); end - - # Escape a string to be acceptable as a node name in a graphviz input file - # - # source://ruby-graphviz//lib/graphviz.rb#960 - def escape(str, opts = T.unsafe(nil)); end - - # Create a random graph. - # - # source://ruby-graphviz//lib/graphviz.rb#929 - def generate(num_nodes, num_edges, directed = T.unsafe(nil), weight_range = T.unsafe(nil)); end - - # Create a new undirected graph - # - # See also GraphViz::new - # - # source://ruby-graphviz//lib/graphviz.rb#908 - def graph(xGraphName, hOpts = T.unsafe(nil), &block); end - - # source://ruby-graphviz//lib/graphviz.rb#741 - def options(hOpts); end - - # Create a new graph from a GraphViz File - # - # Options : - # * :output : Output format (GraphViz::Constants::FORMATS) (default : dot) - # * :file : Output file name (default : none) - # * :use : Program to use (GraphViz::Constants::PROGRAMS) (default : dot) - # * :path : Program PATH - # - # @yield [graph] - # - # source://ruby-graphviz//lib/graphviz.rb#755 - def parse(xFile, hOpts = T.unsafe(nil), &block); end - - # Create a new graph from a GraphViz File - # - # Options : - # * :output : Output format (GraphViz::Constants::FORMATS) (default : dot) - # * :file : Output file name (default : none) - # * :use : Program to use (GraphViz::Constants::PROGRAMS) (default : dot) - # * :path : Program PATH - # - # @yield [graph] - # - # source://ruby-graphviz//lib/graphviz.rb#769 - def parse_string(str, hOpts = T.unsafe(nil), &block); end - - # Create a new strict directed graph - # - # See also GraphViz::new - # - # source://ruby-graphviz//lib/graphviz.rb#924 - def strict_digraph(xGraphName, hOpts = T.unsafe(nil), &block); end - end -end - -# source://ruby-graphviz//lib/graphviz/attrs.rb#21 -class GraphViz::Attrs - # @return [Attrs] a new instance of Attrs - # - # source://ruby-graphviz//lib/graphviz/attrs.rb#24 - def initialize(gviz, name, attributes); end - - # source://ruby-graphviz//lib/graphviz/attrs.rb#41 - def [](key); end - - # source://ruby-graphviz//lib/graphviz/attrs.rb#51 - def []=(key, value); end - - # Returns the value of attribute data. - # - # source://ruby-graphviz//lib/graphviz/attrs.rb#22 - def data; end - - # Sets the attribute data - # - # @param value the value to set the attribute data to. - # - # source://ruby-graphviz//lib/graphviz/attrs.rb#22 - def data=(_arg0); end - - # source://ruby-graphviz//lib/graphviz/attrs.rb#31 - def each; end - - # source://ruby-graphviz//lib/graphviz/attrs.rb#37 - def to_h; end -end - -# source://ruby-graphviz//lib/graphviz/constants.rb#43 -module GraphViz::Constants - class << self - # source://ruby-graphviz//lib/graphviz/constants.rb#111 - def getAttrsFor(x); end - end -end - -# Const: Edge attributes -# -# source://ruby-graphviz//lib/graphviz/constants.rb#301 -GraphViz::Constants::EDGESATTRS = T.let(T.unsafe(nil), Hash) - -# Const: Output formats -# -# source://ruby-graphviz//lib/graphviz/constants.rb#47 -GraphViz::Constants::FORMATS = T.let(T.unsafe(nil), Array) - -# E, N, G, S and C represent edges, nodes, the root graph, subgraphs and cluster subgraphs, respectively -# -# source://ruby-graphviz//lib/graphviz/constants.rb#120 -GraphViz::Constants::GENCS_ATTRS = T.let(T.unsafe(nil), Hash) - -# Const: Graph attributes -# -# source://ruby-graphviz//lib/graphviz/constants.rb#295 -GraphViz::Constants::GRAPHSATTRS = T.let(T.unsafe(nil), Hash) - -# Const: graphs type -# -# source://ruby-graphviz//lib/graphviz/constants.rb#105 -GraphViz::Constants::GRAPHTYPE = T.let(T.unsafe(nil), Array) - -# Const: Node attributes -# -# source://ruby-graphviz//lib/graphviz/constants.rb#298 -GraphViz::Constants::NODESATTRS = T.let(T.unsafe(nil), Hash) - -# Const: programs -# -# source://ruby-graphviz//lib/graphviz/constants.rb#95 -GraphViz::Constants::PROGRAMS = T.let(T.unsafe(nil), Array) - -# source://ruby-graphviz//lib/graphviz/constants.rb#44 -GraphViz::Constants::RGV_VERSION = T.let(T.unsafe(nil), String) - -# source://ruby-graphviz//lib/graphviz/dot_script.rb#48 -class GraphViz::DOTScript - extend ::Forwardable - - # @return [DOTScript] a new instance of DOTScript - # - # source://ruby-graphviz//lib/graphviz/dot_script.rb#53 - def initialize; end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#57 - def <<(line); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#74 - def add_type(type, data); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#57 - def append(line); end - - # source://forwardable/1.3.2/forwardable.rb#229 - def end_with?(*args, &block); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#70 - def make_subgraph(name); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#64 - def prepend(line); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#93 - def to_s; end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#93 - def to_str; end - - private - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#104 - def append_statement(statement); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#100 - def assure_ends_with(str, ending = T.unsafe(nil)); end -end - -# source://ruby-graphviz//lib/graphviz/dot_script.rb#4 -class GraphViz::DOTScriptData - # @return [DOTScriptData] a new instance of DOTScriptData - # - # source://ruby-graphviz//lib/graphviz/dot_script.rb#6 - def initialize(type = T.unsafe(nil)); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#12 - def <<(data); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#17 - def add_attribute(name, value); end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#12 - def append(data); end - - # @return [Boolean] - # - # source://ruby-graphviz//lib/graphviz/dot_script.rb#32 - def empty?; end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#22 - def to_s; end - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#22 - def to_str; end - - # Returns the value of attribute type. - # - # source://ruby-graphviz//lib/graphviz/dot_script.rb#5 - def type; end - - # Sets the attribute type - # - # @param value the value to set the attribute type to. - # - # source://ruby-graphviz//lib/graphviz/dot_script.rb#5 - def type=(_arg0); end - - private - - # source://ruby-graphviz//lib/graphviz/dot_script.rb#38 - def determine_separator; end -end - -# source://ruby-graphviz//lib/graphviz/edge.rb#21 -class GraphViz::Edge - include ::GraphViz::Constants - - # Create a new edge - # - # In: - # * vNodeOne : First node (can be a GraphViz::Node or a node ID) - # * vNodeTwo : Second node (can be a GraphViz::Node or a node ID) - # * parent_graph : Graph - # - # @return [Edge] a new instance of Edge - # - # source://ruby-graphviz//lib/graphviz/edge.rb#30 - def initialize(vNodeOne, vNodeTwo, parent_graph); end - - # source://ruby-graphviz//lib/graphviz/edge.rb#117 - def -(node); end - - # source://ruby-graphviz//lib/graphviz/edge.rb#117 - def <<(node); end - - # source://ruby-graphviz//lib/graphviz/edge.rb#117 - def >(node); end - - # source://ruby-graphviz//lib/graphviz/edge.rb#117 - def >>(node); end - - # Set values for edge attributes or - # get the value of the given edge attribute +attribute_name+ - # - # source://ruby-graphviz//lib/graphviz/edge.rb#82 - def [](attribute_name); end - - # Set value +attribute_value+ to the edge attribute +attribute_name+ - # - # source://ruby-graphviz//lib/graphviz/edge.rb#75 - def []=(attribute_name, attribute_value); end - - # source://ruby-graphviz//lib/graphviz/edge.rb#112 - def each_attribut(global = T.unsafe(nil), &b); end - - # Calls block once for each attribute of the edge, passing the name and value to the - # block as a two-element array. - # - # If global is set to false, the block does not receive the attributes set globally - # - # source://ruby-graphviz//lib/graphviz/edge.rb#103 - def each_attribute(global = T.unsafe(nil), &b); end - - # Return the node two as string (so with port if any) - # - # source://ruby-graphviz//lib/graphviz/edge.rb#57 - def head_node(with_port = T.unsafe(nil), escaped = T.unsafe(nil)); end - - # Return the index of the edge - # - # source://ruby-graphviz//lib/graphviz/edge.rb#67 - def index; end - - # source://ruby-graphviz//lib/graphviz/edge.rb#70 - def index=(i); end - - # Add edge options - # use edge.